/* BioStudio AI — Windows 11 (25H2) shell fidelity layer.

   Loaded after every other shell stylesheet (including the per-window palette
   CSS and css/visual-effects.css) so it can restate the exact Windows 11
   metrics: Mica title bars, 46×32 caption buttons, the 48px centred taskbar,
   the 25H2 Start menu, WinUI flyouts and menus, and File Explorer.

   Everything here is scoped to the Windows OS-style marker. `#os` carries the
   shell; `body` carries the popups that render outside #os (context menus,
   dialogs, previews). Colours key off the OS colour sub-theme: White is Light
   mode, Black is Dark mode, and Ocean / Orchid are dark modes tinted by their
   own palette. Values are WinUI 3 theme resources (Fluent 2). */

/* --- Fonts ----------------------------------------------------------------
   Segoe UI Variable is only installed on Windows. Everywhere else we fall
   back to Selawik, Microsoft's open-source (OFL) metric match for Segoe UI. */
@font-face { font-family: "BS Selawik"; src: url("../assets/fonts/selawik/selawksl.woff2") format("woff2"); font-weight: 300 350; font-display: swap; }
@font-face { font-family: "BS Selawik"; src: url("../assets/fonts/selawik/selawk.woff2") format("woff2"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "BS Selawik"; src: url("../assets/fonts/selawik/selawksb.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "BS Selawik"; src: url("../assets/fonts/selawik/selawkb.woff2") format("woff2"); font-weight: 700 900; font-display: swap; }

/* The taskbar search button carries a text label that only Windows shows. */
.tb-search-label { display: none; }

/* The Widgets button (js/core/win11-widgets.js) is Windows-only. */
.tb-widgets { display: none; }

/* Settings-app furniture in the Profile app: only Windows and macOS show it. */
.profile-nav-head,
.profile-page-title,
.profile-tab-icon,
.about-specs {
  display: none;
}

/* Windows 11 / macOS 26 app icons (js/lib/os-app-icons.js) draw their own
   shape, shadow and margin, so the house clip and bleed never apply. */
.icon.icon-osapp {
  display: inline-grid;
  place-items: center;
  border-radius: 0;
  overflow: visible;
}

.icon.icon-osapp > svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
  transform: none;
}

/* --- Tokens: Light (White) --------------------------------------------------- */
html:not(.shell-mobile) #os.theme-windows,
html:not(.shell-mobile) body.theme-windows {
  --w11-font: "Segoe UI Variable Text", "Segoe UI Variable", "Segoe UI", "BS Selawik", system-ui, sans-serif;
  --w11-font-display: "Segoe UI Variable Display", "Segoe UI Variable", "Segoe UI", "BS Selawik", system-ui, sans-serif;
  --w11-text: rgba(0, 0, 0, 0.894);
  --w11-text-2: rgba(0, 0, 0, 0.606);
  --w11-text-3: rgba(0, 0, 0, 0.447);
  --w11-text-off: rgba(0, 0, 0, 0.361);
  /* Mica takes a faint cast from the wallpaper; --w11-tint carries it. */
  --w11-tint: #eef2f8;
  --w11-mica: color-mix(in srgb, #f3f3f3 78%, var(--w11-tint));
  --w11-mica-alt: color-mix(in srgb, #e5e5e5 70%, var(--w11-tint));
  --w11-layer: #f9f9f9;
  --w11-content: #ffffff;
  --w11-card: rgba(255, 255, 255, 0.7);
  --w11-card-solid: #fbfbfb;
  --w11-card-stroke: rgba(0, 0, 0, 0.0578);
  --w11-divider: rgba(0, 0, 0, 0.0803);
  --w11-subtle-hover: rgba(0, 0, 0, 0.0373);
  --w11-subtle-press: rgba(0, 0, 0, 0.0241);
  --w11-control: rgba(255, 255, 255, 0.7);
  --w11-control-hover: rgba(249, 249, 249, 0.5);
  --w11-control-press: rgba(249, 249, 249, 0.3);
  --w11-control-solid: #ffffff;
  --w11-control-stroke: rgba(0, 0, 0, 0.0578);
  --w11-control-stroke-2: rgba(0, 0, 0, 0.1622);
  --w11-input-stroke: rgba(0, 0, 0, 0.4458);
  --w11-accent: #005fb8;
  --w11-accent-text: #003e92;
  --w11-on-accent: #ffffff;
  --w11-accent-soft: rgba(0, 95, 184, 0.1);
  --w11-acrylic: rgba(249, 249, 249, 0.86);
  --w11-acrylic-solid: #f9f9f9;
  --w11-flyout-stroke: rgba(0, 0, 0, 0.0578);
  --w11-flyout-shadow: 0 8px 16px rgba(0, 0, 0, 0.14);
  --w11-dialog-shadow: 0 32px 64px rgba(0, 0, 0, 0.1876), 0 2px 21px rgba(0, 0, 0, 0.1474);
  --w11-taskbar: rgba(238, 238, 238, 0.86);
  --w11-taskbar-stroke: rgba(0, 0, 0, 0.0803);
  --w11-tb-hover: rgba(255, 255, 255, 0.62);
  --w11-tb-hover-stroke: rgba(0, 0, 0, 0.06);
  --w11-tb-press: rgba(255, 255, 255, 0.36);
  --w11-caption-hover: rgba(0, 0, 0, 0.0578);
  --w11-caption-press: rgba(0, 0, 0, 0.0373);
  --w11-close: #c42b1c;
  --w11-close-press: #c83c31;
  --w11-win-stroke: rgba(0, 0, 0, 0.14);
  --w11-win-stroke-idle: rgba(0, 0, 0, 0.1);
  --w11-win-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.06), 0 2px 21px rgba(0, 0, 0, 0.2), 0 32px 64px rgba(0, 0, 0, 0.24);
  --w11-win-shadow-idle: 0 2px 10px rgba(0, 0, 0, 0.12), 0 16px 32px rgba(0, 0, 0, 0.14);
  --w11-scroll-thumb: rgba(0, 0, 0, 0.447);
  --w11-selection: rgba(0, 95, 184, 0.14);
  color-scheme: light;
}

/* A colourway other than the default keeps its own accent, the way Windows
   lets you pick one; Bloom shows the stock Windows blue. */
html:not(.shell-mobile) #os.theme-windows:not(.wp-biostudio):not(.wp-bloom),
html:not(.shell-mobile) body.theme-windows:not(.wp-biostudio):not(.wp-bloom) {
  --w11-accent: color-mix(in srgb, var(--accent) 78%, #000);
  --w11-accent-text: color-mix(in srgb, var(--accent) 60%, #000);
  --w11-accent-soft: color-mix(in srgb, var(--accent) 12%, transparent);
  --w11-selection: color-mix(in srgb, var(--accent) 16%, transparent);
}

/* The default BioStudio AI colourway paints its chrome in its own navy. */
html:not(.shell-mobile) #os.theme-windows.wp-biostudio,
html:not(.shell-mobile) body.theme-windows.wp-biostudio {
  --w11-accent: #00376e;
  --w11-accent-text: #00376e;
  --w11-accent-soft: rgba(0, 55, 110, 0.1);
  --w11-selection: rgba(0, 55, 110, 0.12);
}

/* --- Tokens: Dark (Black / Ocean / Orchid) ------------------------------------ */
html:not(.shell-mobile) #os.theme-windows:is([data-color-theme="black"], [data-color-theme="ocean"], [data-color-theme="orchid"]),
html:not(.shell-mobile) body.theme-windows:is([data-color-theme="black"], [data-color-theme="ocean"], [data-color-theme="orchid"]) {
  --w11-text: #ffffff;
  --w11-text-2: rgba(255, 255, 255, 0.786);
  --w11-text-3: rgba(255, 255, 255, 0.545);
  --w11-text-off: rgba(255, 255, 255, 0.363);
  --w11-tint: #1b2233;
  --w11-mica: color-mix(in srgb, #202020 84%, var(--w11-tint));
  --w11-mica-alt: color-mix(in srgb, #0a0a0a 80%, var(--w11-tint));
  --w11-layer: #272727;
  --w11-content: #191919;
  --w11-card: rgba(255, 255, 255, 0.0512);
  --w11-card-solid: #2b2b2b;
  --w11-card-stroke: rgba(255, 255, 255, 0.0698);
  --w11-divider: rgba(255, 255, 255, 0.0837);
  --w11-subtle-hover: rgba(255, 255, 255, 0.0605);
  --w11-subtle-press: rgba(255, 255, 255, 0.0419);
  --w11-control: rgba(255, 255, 255, 0.0605);
  --w11-control-hover: rgba(255, 255, 255, 0.0837);
  --w11-control-press: rgba(255, 255, 255, 0.0326);
  --w11-control-solid: #2d2d2d;
  --w11-control-stroke: rgba(255, 255, 255, 0.0698);
  --w11-control-stroke-2: rgba(255, 255, 255, 0.0465);
  --w11-input-stroke: rgba(255, 255, 255, 0.5442);
  --w11-accent: #60cdff;
  --w11-accent-text: #99ebff;
  --w11-on-accent: #000000;
  --w11-accent-soft: rgba(96, 205, 255, 0.14);
  --w11-acrylic: rgba(44, 44, 44, 0.94);
  --w11-acrylic-solid: #2c2c2c;
  --w11-flyout-stroke: rgba(255, 255, 255, 0.09);
  --w11-flyout-shadow: 0 8px 16px rgba(0, 0, 0, 0.26);
  --w11-dialog-shadow: 0 32px 64px rgba(0, 0, 0, 0.37), 0 2px 21px rgba(0, 0, 0, 0.37);
  --w11-taskbar: rgba(28, 28, 28, 0.86);
  --w11-taskbar-stroke: rgba(255, 255, 255, 0.07);
  --w11-tb-hover: rgba(255, 255, 255, 0.0837);
  --w11-tb-hover-stroke: rgba(255, 255, 255, 0.04);
  --w11-tb-press: rgba(255, 255, 255, 0.0419);
  --w11-caption-hover: rgba(255, 255, 255, 0.0605);
  --w11-caption-press: rgba(255, 255, 255, 0.0419);
  --w11-win-stroke: rgba(255, 255, 255, 0.14);
  --w11-win-stroke-idle: rgba(255, 255, 255, 0.09);
  --w11-win-shadow: 0 2px 21px rgba(0, 0, 0, 0.45), 0 32px 64px rgba(0, 0, 0, 0.5);
  --w11-win-shadow-idle: 0 2px 10px rgba(0, 0, 0, 0.35), 0 16px 32px rgba(0, 0, 0, 0.35);
  --w11-scroll-thumb: rgba(255, 255, 255, 0.545);
  --w11-selection: rgba(96, 205, 255, 0.18);
  color-scheme: dark;
}

html:not(.shell-mobile) #os.theme-windows:is([data-color-theme="black"], [data-color-theme="ocean"], [data-color-theme="orchid"]):not(.wp-biostudio):not(.wp-bloom),
html:not(.shell-mobile) body.theme-windows:is([data-color-theme="black"], [data-color-theme="ocean"], [data-color-theme="orchid"]):not(.wp-biostudio):not(.wp-bloom) {
  --w11-accent: color-mix(in srgb, var(--accent) 62%, #fff);
  --w11-accent-text: color-mix(in srgb, var(--accent) 40%, #fff);
  --w11-accent-soft: color-mix(in srgb, var(--accent) 16%, transparent);
}

/* ...and in Black, the same navy lifted so it reads on dark surfaces. */
html:not(.shell-mobile) #os.theme-windows.wp-biostudio[data-color-theme="black"],
html:not(.shell-mobile) body.theme-windows.wp-biostudio[data-color-theme="black"] {
  --w11-accent: #3a76c2;
  --w11-accent-text: #8fb5e6;
  --w11-on-accent: #ffffff;
  --w11-accent-soft: rgba(58, 118, 194, 0.16);
  --w11-selection: rgba(58, 118, 194, 0.2);
}

/* Ocean and Orchid are Windows dark mode tinted with their palette. */
html:not(.shell-mobile) #os.theme-windows[data-color-theme="ocean"],
html:not(.shell-mobile) body.theme-windows[data-color-theme="ocean"],
html:not(.shell-mobile) #os.theme-windows[data-color-theme="orchid"],
html:not(.shell-mobile) body.theme-windows[data-color-theme="orchid"] {
  --w11-mica: color-mix(in srgb, var(--ct-bg) 88%, #202020);
  --w11-mica-alt: color-mix(in srgb, var(--ct-desktop) 85%, #000);
  --w11-layer: var(--ct-surface-2);
  --w11-content: var(--ct-bg);
  --w11-acrylic: var(--ct-flyout);
  --w11-acrylic-solid: var(--ct-surface-2);
  --w11-taskbar: var(--ct-taskbar);
  --w11-accent: var(--ct-accent);
  --w11-accent-text: var(--ct-accent-strong);
  --w11-on-accent: var(--ct-accent-ink);
  --w11-accent-soft: var(--ct-accent-soft);
  --w11-text-2: var(--ct-muted);
}

/* The shell's own token names follow Windows so every legacy rule that reads
   them (flyouts, search, dialogs) paints with the Windows values. */
html:not(.shell-mobile) #os.theme-windows,
html:not(.shell-mobile) body.theme-windows {
  --font: var(--w11-font);
  --radius: 8px;
  --taskbar-h: 48px;
  --taskbar-button: 40px;
  --taskbar-icon: 24px;
  --window-titlebar-h: 32px;
  --window-control-w: 46px;
  --taskbar-bg: var(--w11-taskbar);
  --taskbar-border: var(--w11-taskbar-stroke);
  --tb-hover: var(--w11-tb-hover);
  --tb-active: var(--w11-tb-hover);
  --flyout-bg: var(--w11-acrylic);
  --flyout-border: var(--w11-flyout-stroke);
  --menu-bg: var(--w11-acrylic);
  --menu-border: var(--w11-flyout-stroke);
  --menu-hover: var(--w11-subtle-hover);
  --scrollbar-thumb: var(--w11-scroll-thumb);
  font-family: var(--w11-font);
}

/* ============================================================================
   Windows (title bar, frame, caption buttons)
   ============================================================================ */

/* Per-window Mica. The window's own palette decides light or dark, exactly as
   an app can run in a different theme from the shell. White and Black windows
   get stock Mica; any other palette keeps its own title-bar colour. */
html:not(.shell-mobile) #os.theme-windows .window,
html:not(.shell-mobile) body.theme-windows .window {
  --w11-win-mica: var(--w11-mica);
  --w11-win-text: var(--w11-text);
  --w11-win-text-idle: var(--w11-text-3);
  --w11-win-hover: var(--w11-caption-hover);
  --w11-win-press: var(--w11-caption-press);
  --w11-win-edge: var(--w11-win-stroke);
  --w11-win-edge-idle: var(--w11-win-stroke-idle);
}

html:not(.shell-mobile) #os.theme-windows .window[data-app-color-tone="light"],
html:not(.shell-mobile) body.theme-windows .window[data-app-color-tone="light"] {
  --w11-win-mica: color-mix(in srgb, #f3f3f3 78%, var(--w11-tint));
  --w11-win-text: rgba(0, 0, 0, 0.894);
  --w11-win-text-idle: rgba(0, 0, 0, 0.447);
  --w11-win-hover: rgba(0, 0, 0, 0.0578);
  --w11-win-press: rgba(0, 0, 0, 0.0373);
  --w11-win-edge: rgba(0, 0, 0, 0.14);
  --w11-win-edge-idle: rgba(0, 0, 0, 0.1);
}

html:not(.shell-mobile) #os.theme-windows .window[data-app-color-tone="dark"],
html:not(.shell-mobile) body.theme-windows .window[data-app-color-tone="dark"] {
  --w11-win-mica: color-mix(in srgb, #202020 84%, var(--w11-tint));
  --w11-win-text: #ffffff;
  --w11-win-text-idle: rgba(255, 255, 255, 0.545);
  --w11-win-hover: rgba(255, 255, 255, 0.0605);
  --w11-win-press: rgba(255, 255, 255, 0.0419);
  --w11-win-edge: rgba(255, 255, 255, 0.14);
  --w11-win-edge-idle: rgba(255, 255, 255, 0.09);
}

html:not(.shell-mobile) #os.theme-windows .window[data-app-color-theme]:not([data-app-color-theme="white"]):not([data-app-color-theme="black"]),
html:not(.shell-mobile) body.theme-windows .window[data-app-color-theme]:not([data-app-color-theme="white"]):not([data-app-color-theme="black"]) {
  --w11-win-mica: var(--titlebar-bg);
}

html:not(.shell-mobile) #os.theme-windows .window,
html:not(.shell-mobile) #os.theme-windows .window[data-app-color-theme] {
  border-radius: 8px !important;
  border: 1px solid var(--w11-win-edge-idle) !important;
  box-shadow: var(--w11-win-shadow-idle) !important;
  font-family: var(--w11-font);
  animation-duration: 0.19s;
  animation-timing-function: cubic-bezier(0.1, 0.9, 0.2, 1);
}

html:not(.shell-mobile) #os.theme-windows .window.focused,
html:not(.shell-mobile) #os.theme-windows .window[data-app-color-theme].focused {
  border-color: var(--w11-win-edge) !important;
  box-shadow: var(--w11-win-shadow) !important;
}

html:not(.shell-mobile) #os.theme-windows .window.maximized,
html:not(.shell-mobile) #os.theme-windows .window[data-app-color-theme].maximized {
  border-radius: 0 !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

/* Windows 11 squares the corners of snapped windows, as for maximized. */
html:not(.shell-mobile) #os.theme-windows .window.snapped,
html:not(.shell-mobile) #os.theme-windows .window[data-app-color-theme].snapped {
  border-radius: 0 !important;
}

/* Mica is opaque: no glass strip over the wallpaper. */
html:not(.shell-mobile) #os.theme-windows:not(.shell-mobile) .window:not(.maximized):not(.dragging),
html.fx-glass:not(.shell-mobile) #os.theme-windows:not(.shell-mobile) .window:not(.maximized):not(.dragging) {
  background: var(--win-bg) !important;
}

html:not(.shell-mobile) #os.theme-windows .window .window-titlebar,
html:not(.shell-mobile) #os.theme-windows .window[data-app-color-theme] .window-titlebar,
html.fx-glass:not(.shell-mobile) #os.theme-windows:not(.shell-mobile) .window:not(.maximized):not(.dragging) .window-titlebar {
  height: 32px;
  padding: 0 0 0 12px;
  background: var(--w11-win-mica) !important;
  border-bottom: 0 !important;
  color: var(--w11-win-text) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  opacity: 1 !important;
}

html:not(.shell-mobile) #os.theme-windows .window .window-title-text,
html:not(.shell-mobile) #os.theme-windows .window[data-app-color-theme] .window-title-text {
  gap: 12px;
  font-family: var(--w11-font);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--w11-win-text) !important;
}

html:not(.shell-mobile) #os.theme-windows .window .window-title-label,
html:not(.shell-mobile) #os.theme-windows .window[data-app-color-theme] .window-title-label {
  color: inherit !important;
}

html:not(.shell-mobile) #os.theme-windows .window .window-title-icon,
html:not(.shell-mobile) #os.theme-windows .window .window-title-icon .icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

/* Inactive windows grey the caption text and glyphs rather than fading. */
html:not(.shell-mobile) #os.theme-windows .window:not(.focused) .window-title-text,
html:not(.shell-mobile) #os.theme-windows .window[data-app-color-theme]:not(.focused) .window-title-text,
html:not(.shell-mobile) #os.theme-windows .window:not(.focused) .win-btn,
html:not(.shell-mobile) #os.theme-windows .window[data-app-color-theme]:not(.focused) .win-btn {
  color: var(--w11-win-text-idle) !important;
  opacity: 1 !important;
}

html.fx-glass:not(.shell-mobile) #os.theme-windows:not(.shell-mobile) .window:not(.focused) :is(.window-title-text, .window-controls) {
  opacity: 1;
}

html:not(.shell-mobile) #os.theme-windows .window .window-controls {
  height: 32px;
  align-items: stretch;
  gap: 0;
}

/* Caption buttons: 46 × 32, Segoe Fluent chrome glyphs, red close. */
html:not(.shell-mobile) #os.theme-windows .window .win-btn,
html:not(.shell-mobile) #os.theme-windows .window[data-app-color-theme] .win-btn {
  width: 46px;
  min-width: 46px;
  height: 32px;
  border-radius: 0;
  background: transparent;
  color: var(--w11-win-text) !important;
  transition: background-color 0.083s linear, color 0.083s linear;
}

html:not(.shell-mobile) #os.theme-windows .window :is(.win-btn.min, .win-btn.max, .win-btn.close) svg {
  display: none;
}

html:not(.shell-mobile) #os.theme-windows .window :is(.win-btn.min, .win-btn.max, .win-btn.close)::before {
  content: "";
  width: 10px;
  height: 10px;
  background: currentColor;
  -webkit-mask: var(--w11-glyph) center / 10px 10px no-repeat;
  mask: var(--w11-glyph) center / 10px 10px no-repeat;
}

html:not(.shell-mobile) #os.theme-windows .window .win-btn.min {
  --w11-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M0 5h10' stroke='%23000' stroke-width='1'/%3E%3C/svg%3E");
}

html:not(.shell-mobile) #os.theme-windows .window .win-btn.max {
  --w11-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Crect x='.5' y='.5' width='9' height='9' rx='1.5' fill='none' stroke='%23000' stroke-width='1'/%3E%3C/svg%3E");
}

html:not(.shell-mobile) #os.theme-windows .window.maximized .win-btn.max {
  --w11-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Crect x='.5' y='2.5' width='7' height='7' rx='1.2' fill='none' stroke='%23000' stroke-width='1'/%3E%3Cpath d='M2.5 2.5V2A1.5 1.5 0 0 1 4 .5h4A1.5 1.5 0 0 1 9.5 2v4A1.5 1.5 0 0 1 8 7.5h-.5' fill='none' stroke='%23000' stroke-width='1'/%3E%3C/svg%3E");
}

html:not(.shell-mobile) #os.theme-windows .window .win-btn.close {
  --w11-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M.5.5l9 9M9.5.5l-9 9' stroke='%23000' stroke-width='1' stroke-linecap='square'/%3E%3C/svg%3E");
}

html:not(.shell-mobile) #os.theme-windows .window .win-btn:hover:not(.close),
html:not(.shell-mobile) #os.theme-windows .window[data-app-color-theme] .win-btn:hover:not(.close) {
  background: var(--w11-win-hover) !important;
}

html:not(.shell-mobile) #os.theme-windows .window .win-btn:active:not(.close) {
  background: var(--w11-win-press) !important;
}

html:not(.shell-mobile) #os.theme-windows .window .win-btn.close:hover,
html:not(.shell-mobile) #os.theme-windows .window[data-app-color-theme] .win-btn.close:hover {
  background: var(--w11-close) !important;
  color: #ffffff !important;
}

html:not(.shell-mobile) #os.theme-windows .window .win-btn.close:active {
  background: var(--w11-close-press) !important;
  color: rgba(255, 255, 255, 0.7) !important;
}

/* BioStudio's own title-bar tools (skills, notes, pin, window colour) sit to
   the left of the caption buttons like an app's title-bar commands. */
html:not(.shell-mobile) #os.theme-windows .window :is(.win-btn.skills, .win-btn.notes, .win-btn.newtab, .win-btn.mergeback, .win-btn.pin) {
  width: 40px;
  min-width: 40px;
  margin: 0;
  border-radius: 0;
  font-size: 14px;
}

html:not(.shell-mobile) #os.theme-windows .window :is(.win-btn.pin, .win-btn.newtab, .win-btn.mergeback) svg {
  width: 16px;
  height: 16px;
}

html:not(.shell-mobile) #os.theme-windows .window .win-theme-picker {
  margin: 0 6px;
}

/* Title bar never draws a divider; Mica runs straight into the app. */
html:not(.shell-mobile) #os.theme-windows .window .window-body {
  border-top: 0;
}

/* ============================================================================
   Taskbar (48px, centred)
   ============================================================================ */

/* Flush to the bottom edge like stock Windows 11. The optional floating bar
   (Settings → Visual effects, off by default) still lifts it when chosen. */
html:not(.shell-mobile) #os.theme-windows .taskbar:not(.dock):not(.bs-dock) {
  left: 0;
  right: 0;
  bottom: 0;
  height: 48px;
  padding: 0 0 0 12px;
  border: 0;
  border-top: 1px solid var(--w11-taskbar-stroke);
  border-radius: 0;
  background: var(--w11-taskbar);
  background-image: none !important;
  box-shadow: none;
  backdrop-filter: blur(min(60px, var(--bs-max-blur, 60px))) saturate(1.25);
  -webkit-backdrop-filter: blur(min(60px, var(--bs-max-blur, 60px))) saturate(1.25);
  font-family: var(--w11-font);
  color: var(--w11-text);
}

html:not(.shell-mobile) #os.theme-windows .taskbar-center {
  gap: 4px;
}

html:not(.shell-mobile) #os.theme-windows .taskbar-apps {
  gap: 4px;
}

/* Every centred button: 40 × 40 hit area, 4px corners, a white lift on hover
   (light) and the same lift kept on the focused app. */
html:not(.shell-mobile) #os.theme-windows :is(.tb-icon-btn, .task-btn) {
  width: 40px;
  min-width: 40px;
  height: 40px;
  border-radius: 4px;
  border: 1px solid transparent;
  color: var(--w11-text);
  transition: background-color 0.083s linear, border-color 0.083s linear;
}

html:not(.shell-mobile) #os.theme-windows :is(.tb-icon-btn, .task-btn):hover,
html:not(.shell-mobile) #os.theme-windows .task-btn.active {
  background: var(--w11-tb-hover);
  border-color: var(--w11-tb-hover-stroke);
}

html:not(.shell-mobile) #os.theme-windows :is(.tb-icon-btn, .task-btn):active {
  background: var(--w11-tb-press);
  transform: none;
}

html:not(.shell-mobile) #os.theme-windows .task-btn:active .task-btn-icon,
html:not(.shell-mobile) #os.theme-windows .tb-icon-btn:active > .icon {
  transform: scale(0.86);
  transition: transform 0.083s ease;
}

html:not(.shell-mobile) #os.theme-windows :is(.task-btn-icon, .task-btn-icon .icon) {
  width: 24px;
  height: 24px;
}

html:not(.shell-mobile) #os.theme-windows .tb-icon-btn > .icon {
  width: 24px;
  height: 24px;
}

html:not(.shell-mobile) #os.theme-windows .taskbar-start > .icon {
  width: 24px;
  height: 24px;
}

/* Running: a 6px grey pill. Focused: a 16px accent pill. */
html:not(.shell-mobile) #os.theme-windows .task-btn-indicator {
  bottom: 1px;
  height: 3px;
  border-radius: 1.5px;
  background: var(--w11-text-3);
  box-shadow: none !important;
  transition: width 0.167s cubic-bezier(0.1, 0.9, 0.2, 1), background-color 0.083s linear, opacity 0.083s linear;
}

html:not(.shell-mobile) #os.theme-windows .task-btn.running .task-btn-indicator {
  width: 6px;
  opacity: 1;
}

html:not(.shell-mobile) #os.theme-windows .task-btn.active .task-btn-indicator,
html.fx-tb-adaptive:not(.shell-mobile) #os.theme-windows .taskbar.tb-tinted .task-btn.active .task-btn-indicator {
  width: 16px;
  background: var(--w11-accent);
  box-shadow: none;
}

html:not(.shell-mobile) #os.theme-windows .task-btn.multi.running .task-btn-indicator {
  box-shadow: none;
}

/* No adaptive shrink or accent wash: the Windows bar is static. */
html.fx-tb-adaptive:not(.shell-mobile) #os.theme-windows .taskbar.tb-compact .task-btn-icon,
html.fx-tb-adaptive:not(.shell-mobile) #os.theme-windows .taskbar.tb-compact .taskbar-start > .icon {
  transform: none;
}

/* Search box (the Windows 11 default "Search box" mode). */
html:not(.shell-mobile) #os.theme-windows .taskbar-center > .tb-icon-btn.tb-search {
  width: auto;
  min-width: 0;
  height: 32px;
  margin: 0 2px;
  padding: 0 16px 0 12px;
  gap: 10px;
  justify-content: flex-start;
  border-radius: 16px;
  border: 1px solid var(--w11-control-stroke);
  border-bottom-color: var(--w11-control-stroke-2);
  background: var(--w11-control);
  color: var(--w11-text-2);
}

html:not(.shell-mobile) #os.theme-windows .taskbar-center > .tb-icon-btn.tb-search:hover {
  background: var(--w11-control-hover);
  border-color: var(--w11-control-stroke);
}

html:not(.shell-mobile) #os.theme-windows .taskbar-center > .tb-icon-btn.tb-search > .icon {
  width: 16px;
  height: 16px;
}

html:not(.shell-mobile) #os.theme-windows .tb-search-label {
  display: inline;
  min-width: 150px;
  text-align: left;
  font-size: 14px;
  line-height: 20px;
  color: var(--w11-text-2);
}

/* Windows has Task View for desktops and Start for all apps; the BioStudio
   desktop pill and the separate All-apps button are not part of its bar. */
html:not(.shell-mobile) #os.theme-windows .taskbar .tb-desktop-pill,
html:not(.shell-mobile) #os.theme-windows .taskbar .taskbar-apps-launcher {
  display: none;
}

/* --- System tray ----------------------------------------------------------- */
html:not(.shell-mobile) #os.theme-windows .taskbar-right {
  gap: 0;
  height: 48px;
}

html:not(.shell-mobile) #os.theme-windows .taskbar-tray {
  height: 48px;
  gap: 2px;
  padding: 0 2px 0 0;
}

html:not(.shell-mobile) #os.theme-windows .taskbar-tray > * {
  order: 1;
}

html:not(.shell-mobile) #os.theme-windows .taskbar-tray > .tray-notif-btn {
  order: 5;
}

html:not(.shell-mobile) #os.theme-windows .taskbar-tray > .tray-clock {
  order: 4;
}

html:not(.shell-mobile) #os.theme-windows :is(.tray-chevron, .tray-cluster, .tray-clock, .tray-notif-btn, .tb-style-toggle, .tb-compute-toggle) {
  height: 40px;
  border-radius: 4px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--w11-text);
  font-family: var(--w11-font);
  transition: background-color 0.083s linear, border-color 0.083s linear;
}

html:not(.shell-mobile) #os.theme-windows :is(.tray-chevron, .tray-cluster, .tray-clock, .tray-notif-btn, .tb-style-toggle, .tb-compute-toggle):hover {
  background: var(--w11-tb-hover);
  border-color: var(--w11-tb-hover-stroke);
}

html:not(.shell-mobile) #os.theme-windows .tray-chevron {
  width: 24px;
  color: var(--w11-text);
}

html:not(.shell-mobile) #os.theme-windows .tray-chevron .icon {
  width: 16px;
  height: 16px;
}

html:not(.shell-mobile) #os.theme-windows .tray-cluster {
  gap: 8px;
  padding: 0 8px;
}

html:not(.shell-mobile) #os.theme-windows .tray-cluster .icon {
  width: 16px;
  height: 16px;
}

html:not(.shell-mobile) #os.theme-windows .tray-clock {
  justify-content: center;
  align-items: flex-end;
  gap: 0;
  padding: 0 8px;
  font-size: 12px;
  line-height: 16px;
  text-align: right;
}

html:not(.shell-mobile) #os.theme-windows .tray-clock :is(.clock-time, .clock-date) {
  font-size: 12px;
  line-height: 16px;
  font-weight: 400;
}

html:not(.shell-mobile) #os.theme-windows .tray-notif-btn {
  width: 32px;
  padding: 0;
}

html:not(.shell-mobile) #os.theme-windows .tray-notif-btn .icon {
  width: 16px;
  height: 16px;
}

/* Unread count: Windows shows a small accent badge on the bell. */
html:not(.shell-mobile) #os.theme-windows .tray-notif-btn .tray-notif-badge {
  top: 5px;
  right: 2px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 7px;
  background: var(--w11-accent);
  color: var(--w11-on-accent);
  font-size: 9px;
  line-height: 14px;
}

/* The OS-style switcher reads as one more tray glyph. */
html:not(.shell-mobile) #os.theme-windows .tb-style-toggle {
  width: 32px;
  min-width: 32px;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 0;
}

html:not(.shell-mobile) #os.theme-windows .tb-style-toggle > span {
  display: none;
}

html:not(.shell-mobile) #os.theme-windows .tb-style-toggle::before {
  content: "";
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4.5 3A2.5 2.5 0 0 0 2 5.5v7A2.5 2.5 0 0 0 4.5 15H7v1H5.5a.5.5 0 0 0 0 1h9a.5.5 0 0 0 0-1H13v-1h2.5a2.5 2.5 0 0 0 2.5-2.5v-7A2.5 2.5 0 0 0 15.5 3zM12 15v1H8v-1zM3 5.5C3 4.67 3.67 4 4.5 4h11c.83 0 1.5.67 1.5 1.5v7c0 .83-.67 1.5-1.5 1.5h-11A1.5 1.5 0 0 1 3 12.5z'/%3E%3C/svg%3E") center / 16px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4.5 3A2.5 2.5 0 0 0 2 5.5v7A2.5 2.5 0 0 0 4.5 15H7v1H5.5a.5.5 0 0 0 0 1h9a.5.5 0 0 0 0-1H13v-1h2.5a2.5 2.5 0 0 0 2.5-2.5v-7A2.5 2.5 0 0 0 15.5 3zM12 15v1H8v-1zM3 5.5C3 4.67 3.67 4 4.5 4h11c.83 0 1.5.67 1.5 1.5v7c0 .83-.67 1.5-1.5 1.5h-11A1.5 1.5 0 0 1 3 12.5z'/%3E%3C/svg%3E") center / 16px no-repeat;
}

/* Show-desktop sliver: 12px, a hairline on hover. */
html:not(.shell-mobile) #os.theme-windows .tb-show-desktop {
  width: 12px;
  height: 48px;
  margin-left: 4px;
  border: 0;
  border-left: 1px solid transparent;
  background: transparent;
}

html:not(.shell-mobile) #os.theme-windows .tb-show-desktop:hover {
  border-left-color: var(--w11-divider);
  background: transparent;
}

/* Hover thumbnails: acrylic cards with a caption row. */
html:not(.shell-mobile) body.theme-windows .tb-preview-popover {
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--w11-flyout-stroke);
  background: var(--w11-acrylic);
  box-shadow: var(--w11-flyout-shadow);
  backdrop-filter: blur(min(30px, var(--bs-max-blur, 30px))) saturate(1.25);
  -webkit-backdrop-filter: blur(min(30px, var(--bs-max-blur, 30px))) saturate(1.25);
  font-family: var(--w11-font);
  color: var(--w11-text);
}

html:not(.shell-mobile) body.theme-windows .tb-preview {
  border-radius: 4px;
}

html:not(.shell-mobile) body.theme-windows .tb-preview:hover {
  background: var(--w11-subtle-hover);
}

html:not(.shell-mobile) body.theme-windows .tb-preview-title {
  font-size: 12px;
  font-weight: 400;
}

html:not(.shell-mobile) body.theme-windows .tb-preview-close {
  border-radius: 4px;
}

html:not(.shell-mobile) body.theme-windows .tb-preview-close:hover {
  background: var(--w11-close);
  color: #fff;
}

/* ============================================================================
   Start (25H2): one scrolling page — Pinned, Recommended, All
   ============================================================================ */

html:not(.shell-mobile) #os.theme-windows .start-menu,
html.os-windows:not(.shell-mobile) #os.theme-windows .start-menu {
  --w11-start-pad: 32px;
  left: 50%;
  bottom: 60px;
  width: min(792px, calc(100vw - 24px));
  min-height: 0;
  height: min(740px, calc(100dvh - 72px));
  max-height: min(740px, calc(100dvh - 72px));
  padding: 32px 0 0;
  border-radius: 8px;
  border: 1px solid var(--w11-flyout-stroke);
  background: var(--w11-acrylic);
  box-shadow: var(--w11-dialog-shadow);
  backdrop-filter: blur(min(60px, var(--bs-max-blur, 60px))) saturate(1.3);
  -webkit-backdrop-filter: blur(min(60px, var(--bs-max-blur, 60px))) saturate(1.3);
  font-family: var(--w11-font);
  color: var(--w11-text);
  transform: translateX(-50%) translateY(48px);
  transition:
    opacity 0.167s linear,
    transform 0.25s cubic-bezier(0.1, 0.9, 0.2, 1);
}

html:not(.shell-mobile) #os.theme-windows .start-menu.visible {
  transform: translateX(-50%) translateY(0);
}

html:not(.shell-mobile) #os.theme-windows .start-menu::before {
  display: none;
}

/* Search: 36px pill, accent underline while typing. */
html:not(.shell-mobile) #os.theme-windows .start-searchbar {
  height: 36px;
  margin: 0 var(--w11-start-pad);
  padding: 0 14px;
  gap: 10px;
  border-radius: 18px;
  border: 1px solid var(--w11-control-stroke);
  border-bottom-color: var(--w11-input-stroke);
  background: var(--w11-control-solid);
  box-shadow: none;
}

html:not(.shell-mobile) #os.theme-windows .start-searchbar:focus-within {
  border-color: var(--w11-control-stroke);
  border-bottom: 2px solid var(--w11-accent);
  background: var(--w11-control-solid);
  box-shadow: none;
}

html:not(.shell-mobile) #os.theme-windows .start-searchbar .icon {
  width: 16px;
  height: 16px;
  opacity: 1;
  color: var(--w11-text-2);
}

html:not(.shell-mobile) #os.theme-windows .start-search {
  font-family: var(--w11-font);
  font-size: 14px;
  color: var(--w11-text);
}

html:not(.shell-mobile) #os.theme-windows .start-search::placeholder {
  color: var(--w11-text-2);
}

html:not(.shell-mobile) #os.theme-windows :is(.start-home, .start-all-pane, .start-results) {
  gap: 0;
  padding: 24px var(--w11-start-pad) 16px;
  scrollbar-color: var(--w11-scroll-thumb) transparent;
}

html:not(.shell-mobile) #os.theme-windows .start-section {
  height: 32px;
  margin: 0 0 8px;
  padding: 0 0 0 4px;
  align-items: center;
}

html:not(.shell-mobile) #os.theme-windows .start-home > .start-section:not(:first-child) {
  margin-top: 24px;
}

html:not(.shell-mobile) #os.theme-windows .start-section-title {
  font-family: var(--w11-font);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--w11-text);
}

/* "Show all", view picker, Back: WinUI standard buttons. */
html:not(.shell-mobile) #os.theme-windows :is(.start-allapps, .start-view-btn, .start-back) {
  height: 24px;
  padding: 0 8px;
  gap: 6px;
  display: inline-flex;
  align-items: center;
  border-radius: 4px;
  border: 1px solid var(--w11-control-stroke);
  border-bottom-color: var(--w11-control-stroke-2);
  background: var(--w11-control);
  color: var(--w11-text);
  font-family: var(--w11-font);
  font-size: 12px;
  font-weight: 400;
  box-shadow: none;
}

html:not(.shell-mobile) #os.theme-windows :is(.start-allapps, .start-view-btn, .start-back):hover {
  background: var(--w11-control-hover);
}

html:not(.shell-mobile) #os.theme-windows :is(.start-allapps, .start-view-btn, .start-back):active {
  background: var(--w11-control-press);
  color: var(--w11-text-2);
}

html:not(.shell-mobile) #os.theme-windows :is(.start-allapps, .start-view-btn) .icon {
  width: 12px;
  height: 12px;
}

/* Pinned grid: 96 × 84 tiles, a 32px icon over a 12px label. */
html:not(.shell-mobile) #os.theme-windows .start-grid,
html.os-windows:not(.shell-mobile) #os.theme-windows .start-grid {
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0;
}

@media (max-width: 1100px) {
  html:not(.shell-mobile) #os.theme-windows .start-grid,
  html.os-windows:not(.shell-mobile) #os.theme-windows .start-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

html:not(.shell-mobile) #os.theme-windows .start-tile {
  height: auto;
  min-height: 84px;
  gap: 8px;
  padding: 12px 4px 6px;
  justify-content: flex-start;
  border-radius: 4px;
  background: transparent;
  box-shadow: none;
  transform: none;
  color: var(--w11-text);
  animation: none !important;
  transition: background-color 0.083s linear;
}

html:not(.shell-mobile) #os.theme-windows .start-tile:hover {
  background: var(--w11-subtle-hover);
  box-shadow: none;
  transform: none;
}

html:not(.shell-mobile) #os.theme-windows .start-tile:active {
  background: var(--w11-subtle-press);
  transform: none;
}

html:not(.shell-mobile) #os.theme-windows .start-tile:active .start-tile-icon {
  transform: scale(0.9);
}

html:not(.shell-mobile) #os.theme-windows :is(.start-tile, .start-tile:hover) .start-tile-icon,
html:not(.shell-mobile) #os.theme-windows .start-tile.is-generic .start-tile-icon {
  width: 32px;
  height: 32px;
  border-radius: 0;
  background: none;
  box-shadow: none;
  filter: none;
  transform: none;
  color: var(--w11-text);
}

html:not(.shell-mobile) #os.theme-windows .start-tile .start-tile-icon .icon,
html:not(.shell-mobile) #os.theme-windows .start-tile:not(.is-generic) .start-tile-icon .icon {
  width: 32px;
  height: 32px;
}

html:not(.shell-mobile) #os.theme-windows .start-tile-name {
  font-family: var(--w11-font);
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

html:not(.shell-mobile) #os.theme-windows :is(.start-tile, .start-all-row, .start-rec, .start-best, .start-cat-app):focus-visible {
  outline: 2px solid var(--w11-text);
  outline-offset: -2px;
}

html:not(.shell-mobile) #os.theme-windows .start-tile-notif-badge {
  top: -3px;
  right: -7px;
  background: var(--w11-accent);
  color: var(--w11-on-accent);
  box-shadow: none;
}

/* Recommended: three columns of 32px icon + name + detail. */
html:not(.shell-mobile) #os.theme-windows .start-recommended {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px 12px;
}

html:not(.shell-mobile) #os.theme-windows .start-rec {
  min-height: 56px;
  padding: 8px 12px;
  gap: 12px;
  border-radius: 4px;
  background: transparent;
  box-shadow: none;
  transform: none;
  color: var(--w11-text);
}

html:not(.shell-mobile) #os.theme-windows .start-rec:hover {
  background: var(--w11-subtle-hover);
  transform: none;
}

html:not(.shell-mobile) #os.theme-windows .start-rec:active {
  background: var(--w11-subtle-press);
}

html:not(.shell-mobile) #os.theme-windows :is(.start-rec, .start-rec.is-generic) .start-rec-icon {
  width: 32px;
  height: 32px;
  background: none;
  box-shadow: none;
  color: var(--w11-text);
}

html:not(.shell-mobile) #os.theme-windows .start-rec .start-rec-icon .icon,
html:not(.shell-mobile) #os.theme-windows .start-rec:not(.is-generic) .start-rec-icon .icon {
  width: 32px;
  height: 32px;
}

html:not(.shell-mobile) #os.theme-windows .start-rec-name {
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
  color: var(--w11-text);
}

html:not(.shell-mobile) #os.theme-windows .start-rec-sub {
  font-size: 12px;
  line-height: 16px;
  color: var(--w11-text-2);
}

/* All · Category: 2×2 app cards, the fourth slot a mini-grid for the rest. */
html:not(.shell-mobile) #os.theme-windows .start-inline-all[data-mode="category"] {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px 12px;
  align-items: start;
}

html:not(.shell-mobile) #os.theme-windows .start-cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 4px 0 8px;
}

html:not(.shell-mobile) #os.theme-windows .start-cat-icons {
  display: grid;
  grid-template-columns: repeat(2, 56px);
  grid-auto-rows: 56px;
  gap: 4px;
  padding: 6px;
  border-radius: 8px;
  background: var(--w11-card);
  border: 1px solid var(--w11-card-stroke);
}

html:not(.shell-mobile) #os.theme-windows :is(.start-cat-app, .start-cat-more) {
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: transparent;
  color: var(--w11-text);
}

html:not(.shell-mobile) #os.theme-windows :is(.start-cat-app, .start-cat-more):hover {
  background: var(--w11-subtle-hover);
}

html:not(.shell-mobile) #os.theme-windows .start-cat-app .icon {
  width: 32px;
  height: 32px;
}

html:not(.shell-mobile) #os.theme-windows .start-cat-more {
  grid-template-columns: repeat(2, 14px);
  grid-auto-rows: 14px;
  gap: 4px;
  place-content: center;
}

html:not(.shell-mobile) #os.theme-windows .start-cat-card-name {
  max-width: 150px;
  font-size: 12px;
  line-height: 16px;
  text-align: center;
  color: var(--w11-text);
}

html:not(.shell-mobile) #os.theme-windows .start-cat-expanded {
  display: none;
}

html:not(.shell-mobile) #os.theme-windows .start-cat-card.is-open {
  grid-column: 1 / -1;
  align-items: stretch;
  padding: 8px;
  border-radius: 8px;
  background: var(--w11-card);
  border: 1px solid var(--w11-card-stroke);
}

html:not(.shell-mobile) #os.theme-windows .start-cat-card.is-open .start-cat-icons {
  display: none;
}

html:not(.shell-mobile) #os.theme-windows .start-cat-card.is-open .start-cat-card-name {
  order: -1;
  max-width: none;
  padding: 4px 8px;
  text-align: left;
  font-weight: 600;
}

html:not(.shell-mobile) #os.theme-windows .start-cat-card.is-open .start-cat-expanded {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
}

/* All · Grid and List: A–Z with letter headers. */
html:not(.shell-mobile) #os.theme-windows .start-inline-all:is([data-mode="grid"], [data-mode="az"]) {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

html:not(.shell-mobile) #os.theme-windows .start-letter-head {
  width: auto;
  height: 32px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  border-radius: 4px;
  background: transparent;
  font-family: var(--w11-font);
  font-size: 14px;
  font-weight: 600;
  color: var(--w11-text);
}

html:not(.shell-mobile) #os.theme-windows .start-list {
  display: flex;
  flex-direction: column;
}

html:not(.shell-mobile) #os.theme-windows .start-all-row {
  min-height: 40px;
  padding: 4px 12px;
  gap: 12px;
  border-radius: 4px;
  background: transparent;
  box-shadow: none;
  transform: none;
  color: var(--w11-text);
}

html:not(.shell-mobile) #os.theme-windows .start-all-row:hover {
  background: var(--w11-subtle-hover);
  transform: none;
}

html:not(.shell-mobile) #os.theme-windows :is(.start-all-row, .start-all-row.is-generic) .start-all-icon {
  width: 24px;
  height: 24px;
  background: none;
  box-shadow: none;
  color: var(--w11-text);
}

html:not(.shell-mobile) #os.theme-windows .start-all-row .start-all-icon .icon,
html:not(.shell-mobile) #os.theme-windows .start-all-row:not(.is-generic) .start-all-icon .icon {
  width: 24px;
  height: 24px;
}

html:not(.shell-mobile) #os.theme-windows .start-all-name {
  font-size: 14px;
  font-weight: 400;
}

html:not(.shell-mobile) #os.theme-windows .start-all-sub {
  display: none;
}

/* Search results: Best match card + list. */
html:not(.shell-mobile) #os.theme-windows .start-results-label {
  margin: 12px 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--w11-text);
}

html:not(.shell-mobile) #os.theme-windows .start-best {
  padding: 12px;
  gap: 16px;
  border-radius: 8px;
  background: var(--w11-card);
  border: 1px solid var(--w11-card-stroke);
  box-shadow: none;
}

html:not(.shell-mobile) #os.theme-windows .start-best:hover {
  background: var(--w11-control-hover);
}

html:not(.shell-mobile) #os.theme-windows :is(.start-best, .start-best.is-generic) .start-best-icon {
  background: none;
  box-shadow: none;
}

html:not(.shell-mobile) #os.theme-windows .start-best-name {
  font-size: 14px;
  font-weight: 600;
}

html:not(.shell-mobile) #os.theme-windows .start-best-sub {
  font-size: 12px;
  color: var(--w11-text-2);
}

html:not(.shell-mobile) #os.theme-windows .start-best-open {
  border-radius: 4px;
  background: var(--w11-accent);
  color: var(--w11-on-accent);
}

/* Footer: a Mica strip with the account on the left and power on the right. */
html:not(.shell-mobile) #os.theme-windows .start-footer {
  height: 64px;
  margin: 0;
  padding: 0 32px 0 48px;
  border-top: 1px solid var(--w11-divider);
  border-radius: 0 0 8px 8px;
  background: color-mix(in srgb, var(--w11-mica) 70%, transparent);
  box-shadow: none;
}

html:not(.shell-mobile) #os.theme-windows :is(.start-user, .start-power) {
  height: 40px;
  border-radius: 4px;
  background: transparent;
  box-shadow: none;
  color: var(--w11-text);
  font-family: var(--w11-font);
  font-size: 12px;
  font-weight: 400;
}

html:not(.shell-mobile) #os.theme-windows .start-user {
  padding: 0 12px;
  gap: 12px;
  margin-left: -12px;
}

html:not(.shell-mobile) #os.theme-windows .start-power {
  width: 40px;
  display: grid;
  place-items: center;
}

html:not(.shell-mobile) #os.theme-windows :is(.start-user, .start-power):hover {
  background: var(--w11-subtle-hover);
}

html:not(.shell-mobile) #os.theme-windows .start-power .icon {
  width: 16px;
  height: 16px;
}

html:not(.shell-mobile) #os.theme-windows .start-user .user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--w11-subtle-hover);
  color: var(--w11-text);
  font-size: 14px;
  font-weight: 600;
  box-shadow: none;
}

html:not(.shell-mobile) #os.theme-windows .start-empty {
  padding: 16px 4px;
  font-size: 12px;
  color: var(--w11-text-2);
}

/* ============================================================================
   Context menus (MenuFlyout): acrylic, 8px corners, 32px rows
   ============================================================================ */

html:not(.shell-mobile) body.theme-windows .ctx-menu {
  --w11m-bg: var(--w11-acrylic);
  --w11m-text: var(--w11-text);
  --w11m-text-2: var(--w11-text-2);
  --w11m-hover: var(--w11-subtle-hover);
  --w11m-press: var(--w11-subtle-press);
  --w11m-stroke: var(--w11-flyout-stroke);
  --w11m-divider: var(--w11-divider);
  --w11m-shadow: var(--w11-flyout-shadow);
}

html:not(.shell-mobile) body.theme-windows .ctx-menu[data-app-color-tone="light"] {
  --w11m-bg: rgba(249, 249, 249, 0.88);
  --w11m-text: rgba(0, 0, 0, 0.894);
  --w11m-text-2: rgba(0, 0, 0, 0.606);
  --w11m-hover: rgba(0, 0, 0, 0.0373);
  --w11m-press: rgba(0, 0, 0, 0.0241);
  --w11m-stroke: rgba(0, 0, 0, 0.0578);
  --w11m-divider: rgba(0, 0, 0, 0.0803);
  --w11m-shadow: 0 8px 16px rgba(0, 0, 0, 0.14);
}

html:not(.shell-mobile) body.theme-windows .ctx-menu[data-app-color-tone="dark"] {
  --w11m-bg: rgba(44, 44, 44, 0.95);
  --w11m-text: #ffffff;
  --w11m-text-2: rgba(255, 255, 255, 0.786);
  --w11m-hover: rgba(255, 255, 255, 0.0605);
  --w11m-press: rgba(255, 255, 255, 0.0419);
  --w11m-stroke: rgba(255, 255, 255, 0.09);
  --w11m-divider: rgba(255, 255, 255, 0.0837);
  --w11m-shadow: 0 8px 16px rgba(0, 0, 0, 0.26);
}

html:not(.shell-mobile) body.theme-windows .ctx-menu[data-app-color-theme]:not([data-app-color-theme="white"]):not([data-app-color-theme="black"]) {
  --w11m-bg: var(--surface);
}

html:not(.shell-mobile) body.theme-windows .ctx-menu,
html:not(.shell-mobile) body.theme-windows .ctx-menu[role="menu"][data-app-color-theme] {
  min-width: 200px;
  max-width: 360px;
  padding: 4px 0;
  border-radius: 8px;
  border: 1px solid var(--w11m-stroke) !important;
  background: var(--w11m-bg) !important;
  background-image: none !important;
  box-shadow: var(--w11m-shadow);
  backdrop-filter: blur(min(30px, var(--bs-max-blur, 30px))) saturate(1.25);
  -webkit-backdrop-filter: blur(min(30px, var(--bs-max-blur, 30px))) saturate(1.25);
  color: var(--w11m-text) !important;
  font-family: var(--w11-font);
  transform-origin: top center;
  opacity: 0;
  transform: translateY(-6px);
  clip-path: inset(0 0 100% 0 round 8px);
  transition:
    opacity 0.083s linear,
    transform 0.2s cubic-bezier(0.1, 0.9, 0.2, 1),
    clip-path 0.2s cubic-bezier(0.1, 0.9, 0.2, 1);
}

html:not(.shell-mobile) body.theme-windows .ctx-menu.ctx-in,
html:not(.shell-mobile) body.theme-windows .ctx-menu[role="menu"][data-app-color-theme].ctx-in {
  opacity: 1;
  transform: none;
  clip-path: inset(0 0 0 0 round 8px);
}

html:not(.shell-mobile) body.theme-windows .ctx-menu .ctx-item,
html:not(.shell-mobile) body.theme-windows .ctx-menu[role="menu"][data-app-color-theme] .ctx-item {
  width: calc(100% - 8px);
  height: 32px;
  margin: 0 4px;
  padding: 0 12px 0 12px;
  gap: 12px;
  border-radius: 4px;
  font-family: var(--w11-font);
  font-size: 14px;
  font-weight: 400;
  color: var(--w11m-text) !important;
  transition: background-color 0.083s linear;
}

html:not(.shell-mobile) body.theme-windows .ctx-menu .ctx-item:hover:not([disabled]),
html:not(.shell-mobile) body.theme-windows .ctx-menu[role="menu"][data-app-color-theme] .ctx-item:hover:not([disabled]) {
  background: var(--w11m-hover) !important;
}

html:not(.shell-mobile) body.theme-windows .ctx-menu .ctx-item:active:not([disabled]) {
  background: var(--w11m-press) !important;
}

/* Windows never paints destructive commands red in a menu. */
html:not(.shell-mobile) body.theme-windows .ctx-menu .ctx-item.danger,
html:not(.shell-mobile) body.theme-windows .ctx-menu .ctx-item.danger:hover:not([disabled]) {
  color: var(--w11m-text) !important;
}

html:not(.shell-mobile) body.theme-windows .ctx-menu .ctx-item[disabled] {
  opacity: 0.45;
}

html:not(.shell-mobile) body.theme-windows .ctx-menu .ctx-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: var(--w11m-text);
}

html:not(.shell-mobile) body.theme-windows .ctx-menu .ctx-icon .icon {
  width: 16px;
  height: 16px;
}

html:not(.shell-mobile) body.theme-windows .ctx-menu .ctx-check {
  color: var(--w11m-text);
}

html:not(.shell-mobile) body.theme-windows .ctx-menu .ctx-shortcut {
  margin-left: 24px;
  font-size: 12px;
  letter-spacing: 0;
  color: var(--w11m-text-2);
}

html:not(.shell-mobile) body.theme-windows .ctx-menu .ctx-arrow,
html:not(.shell-mobile) body.theme-windows .ctx-menu .ctx-arrow .icon {
  width: 12px;
  height: 12px;
  color: var(--w11m-text-2);
}

html:not(.shell-mobile) body.theme-windows .ctx-menu .ctx-sep {
  height: 1px;
  margin: 2px 0;
  background: var(--w11m-divider);
}

html:not(.shell-mobile) body.theme-windows .ctx-menu .ctx-header {
  padding: 8px 16px 4px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--w11m-text-2);
}

/* The Cut / Copy / Rename / Share / Delete strip. */
html:not(.shell-mobile) body.theme-windows .ctx-menu .ctx-iconrow {
  display: flex;
  justify-content: space-between;
  gap: 2px;
  margin: 0 4px 2px;
  padding: 0 0 4px;
  border-bottom: 1px solid var(--w11m-divider);
}

html:not(.shell-mobile) body.theme-windows .ctx-menu .ctx-iconbtn {
  flex: 1 1 0;
  height: 36px;
  min-width: 36px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  color: var(--w11m-text);
  transition: background-color 0.083s linear;
}

html:not(.shell-mobile) body.theme-windows .ctx-menu .ctx-iconbtn:hover:not([disabled]) {
  background: var(--w11m-hover);
}

html:not(.shell-mobile) body.theme-windows .ctx-menu .ctx-iconbtn[disabled] {
  opacity: 0.4;
}

html:not(.shell-mobile) body.theme-windows .ctx-menu .ctx-iconbtn .icon {
  width: 16px;
  height: 16px;
}

/* ============================================================================
   Flyouts: Quick Settings, Notifications + Calendar
   ============================================================================ */

html:not(.shell-mobile) #os.theme-windows .flyout {
  border-radius: 8px;
  border: 1px solid var(--w11-flyout-stroke);
  background: var(--w11-acrylic);
  box-shadow: var(--w11-dialog-shadow);
  backdrop-filter: blur(min(60px, var(--bs-max-blur, 60px))) saturate(1.3);
  -webkit-backdrop-filter: blur(min(60px, var(--bs-max-blur, 60px))) saturate(1.3);
  font-family: var(--w11-font);
  color: var(--w11-text);
  transition:
    opacity 0.083s linear,
    transform 0.25s cubic-bezier(0.1, 0.9, 0.2, 1);
}

html:not(.shell-mobile) #os.theme-windows .flyout.opens-up:not(.visible) {
  transform: translateY(24px);
}

/* --- Quick Settings ------------------------------------------------------- */
html:not(.shell-mobile) #os.theme-windows .quick-settings[data-variant="win11"] {
  width: 360px;
  padding: 0;
  overflow: hidden;
}

html:not(.shell-mobile) #os.theme-windows .w11-qs-body {
  padding: 24px 24px 16px;
}

html:not(.shell-mobile) #os.theme-windows .w11-qs-tiles {
  position: relative;
  min-height: 176px;
  padding-right: 12px;
}

html:not(.shell-mobile) #os.theme-windows .w11-qs-grid {
  display: grid;
  grid-template-columns: repeat(3, 96px);
  grid-auto-rows: 80px;
  gap: 8px 12px;
}

html:not(.shell-mobile) #os.theme-windows .w11-qs-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

html:not(.shell-mobile) #os.theme-windows .w11-qs-btn {
  display: flex;
  width: 96px;
  height: 48px;
  border-radius: 4px;
  border: 1px solid var(--w11-control-stroke);
  border-bottom-color: var(--w11-control-stroke-2);
  background: var(--w11-control);
  overflow: hidden;
}

html:not(.shell-mobile) #os.theme-windows .w11-qs-btn.on {
  border-color: transparent;
  background: var(--w11-accent);
  color: var(--w11-on-accent);
}

html:not(.shell-mobile) #os.theme-windows .w11-qs-btn :is(.w11-qs-toggle, .w11-qs-more) {
  display: grid;
  place-items: center;
  height: 100%;
  color: inherit;
  transition: background-color 0.083s linear;
}

html:not(.shell-mobile) #os.theme-windows .w11-qs-toggle {
  flex: 1 1 auto;
  color: var(--w11-text);
}

html:not(.shell-mobile) #os.theme-windows .w11-qs-btn.on .w11-qs-toggle {
  color: var(--w11-on-accent);
}

html:not(.shell-mobile) #os.theme-windows .w11-qs-more {
  flex: 0 0 34px;
  border-left: 1px solid var(--w11-control-stroke);
  color: var(--w11-text);
}

html:not(.shell-mobile) #os.theme-windows .w11-qs-btn.on .w11-qs-more {
  border-left-color: color-mix(in srgb, var(--w11-on-accent) 22%, transparent);
  color: var(--w11-on-accent);
}

html:not(.shell-mobile) #os.theme-windows .w11-qs-btn :is(.w11-qs-toggle, .w11-qs-more):hover {
  background: var(--w11-subtle-hover);
}

html:not(.shell-mobile) #os.theme-windows .w11-qs-btn.on :is(.w11-qs-toggle, .w11-qs-more):hover {
  background: color-mix(in srgb, var(--w11-on-accent) 10%, transparent);
}

html:not(.shell-mobile) #os.theme-windows .w11-qs-btn .icon {
  width: 16px;
  height: 16px;
}

html:not(.shell-mobile) #os.theme-windows .w11-qs-label {
  max-width: 100px;
  font-size: 12px;
  line-height: 16px;
  text-align: center;
  color: var(--w11-text);
}

html:not(.shell-mobile) #os.theme-windows .w11-qs-dots {
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

html:not(.shell-mobile) #os.theme-windows .w11-qs-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--w11-text-3);
  opacity: 0.6;
}

html:not(.shell-mobile) #os.theme-windows .w11-qs-dot[aria-pressed="true"] {
  height: 12px;
  border-radius: 3px;
  background: var(--w11-text-2);
  opacity: 1;
}

html:not(.shell-mobile) #os.theme-windows .w11-qs-slider {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 40px;
  margin-top: 8px;
}

html:not(.shell-mobile) #os.theme-windows .w11-qs-slider-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--w11-text);
}

html:not(.shell-mobile) #os.theme-windows .w11-qs-slider-pad {
  width: 32px;
}

html:not(.shell-mobile) #os.theme-windows .w11-qs-output {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  color: var(--w11-text);
}

html:not(.shell-mobile) #os.theme-windows .w11-qs-output:hover {
  background: var(--w11-subtle-hover);
}

/* WinUI Slider: 4px rail, accent fill, 20px thumb with a 12px accent core. */
html:not(.shell-mobile) #os.theme-windows .w11-qs-range {
  --fill: 50%;
  flex: 1;
  height: 20px;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

html:not(.shell-mobile) #os.theme-windows .w11-qs-range::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--w11-accent) var(--fill), var(--w11-input-stroke) var(--fill));
}

html:not(.shell-mobile) #os.theme-windows .w11-qs-range::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--w11-accent) var(--fill), var(--w11-input-stroke) var(--fill));
}

html:not(.shell-mobile) #os.theme-windows .w11-qs-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -8px;
  border-radius: 50%;
  border: 1px solid var(--w11-control-stroke);
  background: radial-gradient(circle, var(--w11-accent) 0 6px, var(--w11-control-solid) 6.5px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.14);
  transition: background 0.083s linear;
}

html:not(.shell-mobile) #os.theme-windows .w11-qs-range:hover::-webkit-slider-thumb {
  background: radial-gradient(circle, var(--w11-accent) 0 7px, var(--w11-control-solid) 7.5px);
}

html:not(.shell-mobile) #os.theme-windows .w11-qs-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--w11-control-stroke);
  background: radial-gradient(circle, var(--w11-accent) 0 6px, var(--w11-control-solid) 6.5px);
}

html:not(.shell-mobile) #os.theme-windows .w11-qs-footer {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 48px;
  padding: 0 12px 0 16px;
  border-top: 1px solid var(--w11-divider);
  background: color-mix(in srgb, var(--w11-mica) 72%, transparent);
}

html:not(.shell-mobile) #os.theme-windows .w11-qs-spacer {
  flex: 1;
}

html:not(.shell-mobile) #os.theme-windows :is(.w11-qs-battery, .w11-qs-icon) {
  height: 32px;
  min-width: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 8px;
  border-radius: 4px;
  color: var(--w11-text);
  font-size: 12px;
}

html:not(.shell-mobile) #os.theme-windows :is(.w11-qs-battery, .w11-qs-icon):hover {
  background: var(--w11-subtle-hover);
}

/* Night light: warm the whole screen. */
#os.qs-night-light::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  pointer-events: none;
  background: rgba(255, 150, 40, 0.16);
  mix-blend-mode: multiply;
}

/* --- Notifications + Calendar: two separate cards ------------------------- */
html:not(.shell-mobile) #os.theme-windows .notif-center[data-variant="win11"] {
  width: 334px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

html:not(.shell-mobile) #os.theme-windows :is(.w11-nc-card, .w11-cal-card) {
  border-radius: 8px;
  border: 1px solid var(--w11-flyout-stroke);
  background: var(--w11-acrylic);
  box-shadow: var(--w11-dialog-shadow);
  backdrop-filter: blur(min(60px, var(--bs-max-blur, 60px))) saturate(1.3);
  -webkit-backdrop-filter: blur(min(60px, var(--bs-max-blur, 60px))) saturate(1.3);
  overflow: hidden;
}

html:not(.shell-mobile) #os.theme-windows .w11-nc-card {
  padding: 0 0 8px;
}

html:not(.shell-mobile) #os.theme-windows .w11-nc-card .nc-header {
  height: 48px;
  margin: 0;
  padding: 0 12px 0 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--w11-text);
}

html:not(.shell-mobile) #os.theme-windows .w11-nc-card .nc-clear {
  height: 24px;
  padding: 0 8px;
  border-radius: 4px;
  border: 1px solid var(--w11-control-stroke);
  border-bottom-color: var(--w11-control-stroke-2);
  background: var(--w11-control);
  color: var(--w11-text);
  font-size: 12px;
}

html:not(.shell-mobile) #os.theme-windows .w11-nc-card .nc-clear:hover {
  background: var(--w11-control-hover);
}

html:not(.shell-mobile) #os.theme-windows .w11-nc-card .nc-list {
  max-height: min(420px, 40vh);
  gap: 4px;
  padding: 0 12px;
}

html:not(.shell-mobile) #os.theme-windows .w11-nc-card .nc-empty {
  padding: 28px 0 24px;
  font-size: 14px;
  color: var(--w11-text-2);
}

html:not(.shell-mobile) #os.theme-windows .w11-nc-card .nc-item {
  padding: 12px;
  gap: 12px;
  border-radius: 8px;
  border: 1px solid var(--w11-card-stroke);
  background: var(--w11-card-solid);
}

html:not(.shell-mobile) #os.theme-windows .w11-nc-card .nc-item:hover {
  background: var(--w11-layer);
}

html:not(.shell-mobile) #os.theme-windows .w11-nc-card .nc-item.unread {
  background: var(--w11-card-solid);
}

html:not(.shell-mobile) #os.theme-windows .w11-nc-card .nc-item-title {
  font-size: 14px;
  font-weight: 600;
}

html:not(.shell-mobile) #os.theme-windows .w11-nc-card .nc-item-msg {
  font-size: 14px;
  color: var(--w11-text-2);
}

html:not(.shell-mobile) #os.theme-windows .w11-nc-card :is(.nc-item-category, .nc-item-time) {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--w11-text-2);
}

html:not(.shell-mobile) #os.theme-windows .w11-nc-card .nc-unread-dot {
  background: var(--w11-accent);
}

html:not(.shell-mobile) #os.theme-windows .w11-cal-card .nc-calendar {
  margin: 0;
  padding: 0;
  border: 0;
}

html:not(.shell-mobile) #os.theme-windows .w11-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  padding: 0 8px 0 16px;
  border-bottom: 1px solid var(--w11-divider);
  background: color-mix(in srgb, var(--w11-mica) 60%, transparent);
  font-size: 14px;
  font-weight: 600;
}

html:not(.shell-mobile) #os.theme-windows :is(.w11-cal-collapse, .w11-cal-step, .w11-cal-month, .w11-focus-adj) {
  height: 32px;
  min-width: 32px;
  display: inline-grid;
  place-items: center;
  border-radius: 4px;
  color: var(--w11-text);
  font-family: var(--w11-font);
}

html:not(.shell-mobile) #os.theme-windows :is(.w11-cal-collapse, .w11-cal-step, .w11-cal-month, .w11-focus-adj):hover {
  background: var(--w11-subtle-hover);
}

html:not(.shell-mobile) #os.theme-windows .w11-cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 8px 4px 8px;
}

html:not(.shell-mobile) #os.theme-windows .w11-cal-month {
  padding: 0 8px;
  font-size: 14px;
  font-weight: 600;
}

html:not(.shell-mobile) #os.theme-windows .w11-cal-steps {
  display: flex;
  gap: 4px;
}

html:not(.shell-mobile) #os.theme-windows .w11-cal-grid {
  grid-template-columns: repeat(7, 40px);
  justify-content: center;
  gap: 2px 4px;
  padding: 0 8px 12px;
}

html:not(.shell-mobile) #os.theme-windows .w11-cal-grid .cal-dow {
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 12px;
  color: var(--w11-text);
}

html:not(.shell-mobile) #os.theme-windows .w11-cal-grid .cal-cell {
  width: 40px;
  height: 40px;
  padding: 0;
  aspect-ratio: auto;
  border-radius: 50%;
  font-size: 14px;
  color: var(--w11-text);
}

html:not(.shell-mobile) #os.theme-windows .w11-cal-grid .cal-cell:hover {
  background: var(--w11-subtle-hover);
}

html:not(.shell-mobile) #os.theme-windows .w11-cal-grid .cal-cell.other-month {
  color: var(--w11-text-3);
}

html:not(.shell-mobile) #os.theme-windows .w11-cal-grid .cal-cell.today {
  background: var(--w11-accent);
  color: var(--w11-on-accent);
  font-weight: 600;
}

html:not(.shell-mobile) #os.theme-windows .w11-focus {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 16px;
  border-top: 1px solid var(--w11-divider);
  background: color-mix(in srgb, var(--w11-mica) 60%, transparent);
}

html:not(.shell-mobile) #os.theme-windows .w11-focus-time {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
}

html:not(.shell-mobile) #os.theme-windows .w11-focus-mins {
  min-width: 64px;
  text-align: center;
}

html:not(.shell-mobile) #os.theme-windows .w11-focus-adj {
  font-size: 16px;
}

html:not(.shell-mobile) #os.theme-windows .w11-focus-start {
  height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 4px;
  border: 1px solid var(--w11-control-stroke);
  border-bottom-color: var(--w11-control-stroke-2);
  background: var(--w11-control);
  color: var(--w11-text);
  font-size: 14px;
}

html:not(.shell-mobile) #os.theme-windows .w11-focus-start:hover {
  background: var(--w11-control-hover);
}

html:not(.shell-mobile) #os.theme-windows .w11-focus-play {
  font-size: 10px;
}

/* ============================================================================
   File Explorer
   Tabs in a Mica Alt title bar; an address row and command bar on the
   lighter layer; nav pane and content on the solid content surface.
   ============================================================================ */

.window-titlebar-accessory {
  display: flex;
  align-items: stretch;
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
}

html:not(.shell-mobile) #os.theme-windows .window {
  --w11e-strip: var(--w11-mica-alt);
  --w11e-bar: var(--w11-layer);
  --w11e-body: var(--w11-content);
}

html:not(.shell-mobile) #os.theme-windows .window[data-app-color-tone="light"] {
  --w11e-strip: color-mix(in srgb, #e3e3e3 76%, var(--w11-tint));
  --w11e-bar: #f9f9f9;
  --w11e-body: #ffffff;
}

html:not(.shell-mobile) #os.theme-windows .window[data-app-color-tone="dark"] {
  --w11e-strip: color-mix(in srgb, #141414 86%, var(--w11-tint));
  --w11e-bar: #2b2b2b;
  --w11e-body: #1c1c1c;
}

html:not(.shell-mobile) #os.theme-windows .window[data-app-color-theme]:not([data-app-color-theme="white"]):not([data-app-color-theme="black"]) {
  --w11e-strip: var(--titlebar-bg);
  --w11e-bar: var(--surface-2);
  --w11e-body: var(--surface);
}

/* Tab strip: a 40px title bar, the tab rising from its bottom edge. */
html:not(.shell-mobile) #os.theme-windows .window.has-titlebar-accessory .window-titlebar,
html:not(.shell-mobile) #os.theme-windows .window[data-app-color-theme].has-titlebar-accessory .window-titlebar,
html.fx-glass:not(.shell-mobile) #os.theme-windows:not(.shell-mobile) .window.has-titlebar-accessory:not(.maximized):not(.dragging) .window-titlebar {
  height: 40px;
  padding-left: 8px;
  background: var(--w11e-strip) !important;
}

html:not(.shell-mobile) #os.theme-windows .window.has-titlebar-accessory .window-title-text {
  display: none;
}

html:not(.shell-mobile) #os.theme-windows .window.has-titlebar-accessory :is(.window-controls, .win-btn) {
  height: 40px;
}

html:not(.shell-mobile) #os.theme-windows .w11-fe-tabs {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  min-width: 0;
  height: 100%;
}

html:not(.shell-mobile) #os.theme-windows .w11-fe-tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: clamp(120px, 26vw, 240px);
  height: 32px;
  padding: 0 4px 0 12px;
  border-radius: 8px 8px 0 0;
  background: var(--w11e-bar);
  color: var(--w11-win-text);
  font-size: 12px;
}

/* The inverted corners that make the tab flow into the toolbar. */
html:not(.shell-mobile) #os.theme-windows .w11-fe-tab::before,
html:not(.shell-mobile) #os.theme-windows .w11-fe-tab::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 8px;
  height: 8px;
  background: radial-gradient(circle at var(--c) 0, transparent 7.5px, var(--w11e-bar) 8px);
}

html:not(.shell-mobile) #os.theme-windows .w11-fe-tab::before { left: -8px; --c: 0; }
html:not(.shell-mobile) #os.theme-windows .w11-fe-tab::after { right: -8px; --c: 100%; }

html:not(.shell-mobile) #os.theme-windows .w11-fe-tab-icon,
html:not(.shell-mobile) #os.theme-windows .w11-fe-tab-icon svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

html:not(.shell-mobile) #os.theme-windows .w11-fe-tab-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html:not(.shell-mobile) #os.theme-windows :is(.w11-fe-tab-close, .w11-fe-newtab) {
  display: grid;
  place-items: center;
  border-radius: 4px;
  color: var(--w11-win-text);
}

html:not(.shell-mobile) #os.theme-windows .w11-fe-tab-close {
  width: 24px;
  height: 24px;
}

html:not(.shell-mobile) #os.theme-windows .w11-fe-newtab {
  width: 32px;
  height: 28px;
  margin: 0 0 2px 6px;
}

html:not(.shell-mobile) #os.theme-windows :is(.w11-fe-tab-close, .w11-fe-newtab):hover {
  background: var(--w11-win-hover);
}

html:not(.shell-mobile) #os.theme-windows .w11-fe-tab-close .icon {
  width: 10px;
  height: 10px;
}

/* --- Explorer body -------------------------------------------------------- */
html:not(.shell-mobile) #os.theme-windows .fe-explorer-root[data-os-variant="win11"] {
  --fe-accent: var(--w11-accent);
  --fe-accent-soft: var(--w11-selection);
  --fe-ink: var(--w11-win-text);
  --fe-ink-soft: var(--w11-text-2);
  --fe-surface: var(--w11e-body);
  --fe-line: var(--w11-divider);
  background: var(--w11e-body);
  color: var(--w11-win-text);
  font-family: var(--w11-font);
}

html:not(.shell-mobile) #os.theme-windows .window .fe-explorer-root[data-os-variant="win11"] :is(.fe-explorer, .fe-body, .files-main, .files-grid) {
  background: var(--w11e-body) !important;
  box-shadow: none !important;
  font-family: var(--w11-font);
}

/* The app focuses its root on open; Windows draws no ring for that. */
html:not(.shell-mobile) #os.theme-windows .fe-explorer-root:focus-visible {
  outline: none;
}

/* The palette layer repaints every "*toolbar*", "*sidebar*" and "*statusbar*"
   inside a window at (1,6,0); `:not(#_)` lifts these surfaces above it. */
html:not(.shell-mobile) #os.theme-windows .fe-explorer-root[data-os-variant="win11"] .files-toolbar.fe-command-bar:not(#_) {
  display: block;
  height: auto;
  padding: 0;
  border: 0 !important;
  border-bottom: 1px solid var(--w11-divider) !important;
  background: var(--w11e-bar) !important;
  box-shadow: none;
  color: var(--w11-win-text) !important;
}

html:not(.shell-mobile) #os.theme-windows .w11-fe-addressrow {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 12px 0 8px;
}

html:not(.shell-mobile) #os.theme-windows .w11-fe-nav {
  display: flex;
  gap: 2px;
}

html:not(.shell-mobile) #os.theme-windows :is(.w11-fe-navbtn, .w11-fe-cmd) {
  height: 32px;
  min-width: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--w11-win-text);
  font-family: var(--w11-font);
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
  transition: background-color 0.083s linear;
}

html:not(.shell-mobile) #os.theme-windows :is(.w11-fe-navbtn, .w11-fe-cmd):hover:not(:disabled) {
  background: var(--w11-win-hover);
}

html:not(.shell-mobile) #os.theme-windows :is(.w11-fe-navbtn, .w11-fe-cmd):active:not(:disabled) {
  background: var(--w11-win-press);
}

html:not(.shell-mobile) #os.theme-windows :is(.w11-fe-navbtn, .w11-fe-cmd):disabled {
  opacity: 0.36;
}

html:not(.shell-mobile) #os.theme-windows .w11-fe-cmd[aria-pressed="true"] {
  background: var(--w11-win-hover);
}

html:not(.shell-mobile) #os.theme-windows :is(.w11-fe-navbtn, .w11-fe-cmd) .icon {
  width: 16px;
  height: 16px;
}

html:not(.shell-mobile) #os.theme-windows .w11-fe-cmd .icon:last-child:not(:first-child) {
  width: 12px;
  height: 12px;
  margin-left: -2px;
}

html:not(.shell-mobile) #os.theme-windows .w11-fe-new-icon {
  display: inline-grid;
  color: var(--w11-accent);
}

/* Address: breadcrumb with chevron separators; click empty space to type. */
html:not(.shell-mobile) #os.theme-windows .w11-fe-address {
  flex: 1 1 auto;
  min-width: 0;
  height: 32px;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 6px 0 10px;
  overflow: hidden;
  border-radius: 4px;
  border: 1px solid var(--w11-control-stroke);
  background: var(--w11-control);
  cursor: text;
}

html:not(.shell-mobile) #os.theme-windows .w11-fe-address:hover {
  background: var(--w11-control-hover);
}

html:not(.shell-mobile) #os.theme-windows .w11-fe-address-icon,
html:not(.shell-mobile) #os.theme-windows .w11-fe-address-icon svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

html:not(.shell-mobile) #os.theme-windows .w11-fe-crumb-sep {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 24px;
  color: var(--w11-text-2);
}

html:not(.shell-mobile) #os.theme-windows .w11-fe-crumb-sep .icon {
  width: 10px;
  height: 10px;
}

html:not(.shell-mobile) #os.theme-windows .w11-fe-crumb {
  height: 24px;
  padding: 0 4px;
  border-radius: 4px;
  color: var(--w11-win-text);
  font-size: 12px;
  white-space: nowrap;
  cursor: default;
}

html:not(.shell-mobile) #os.theme-windows .w11-fe-crumb:hover {
  background: var(--w11-win-hover);
}

html:not(.shell-mobile) #os.theme-windows .window .w11-fe-address-input:not(#_),
html:not(.shell-mobile) #os.theme-windows .window .w11-fe-search-input:not(#_) {
  flex: 1 1 auto;
  min-width: 0;
  height: 30px;
  padding: 0;
  border: 0 !important;
  border-radius: 0;
  outline: none;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--w11-win-text) !important;
  font-family: var(--w11-font);
  font-size: 12px;
}

html:not(.shell-mobile) #os.theme-windows .w11-fe-search {
  flex: 0 1 260px;
  min-width: 140px;
  height: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border-radius: 4px;
  border: 1px solid var(--w11-control-stroke);
  background: var(--w11-control);
  color: var(--w11-text-2);
}

html:not(.shell-mobile) #os.theme-windows .w11-fe-search:focus-within,
html:not(.shell-mobile) #os.theme-windows .w11-fe-address:focus-within {
  border-bottom: 2px solid var(--w11-accent);
  background: var(--w11-control-solid);
}

html:not(.shell-mobile) #os.theme-windows .w11-fe-search .icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

html:not(.shell-mobile) #os.theme-windows .window .w11-fe-search-input:not(#_)::placeholder {
  color: var(--w11-text-2);
}

html:not(.shell-mobile) #os.theme-windows .window .w11-fe-search-input:not(#_)::-webkit-search-cancel-button {
  cursor: pointer;
}

/* Command bar. */
html:not(.shell-mobile) #os.theme-windows .w11-fe-commands {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 2px;
  height: 48px;
  padding: 0 12px;
  overflow: hidden;
}

html:not(.shell-mobile) #os.theme-windows .w11-fe-commands > * {
  flex-shrink: 0;
}

html:not(.shell-mobile) #os.theme-windows .w11-fe-commands > .w11-fe-spacer {
  flex: 1 1 0;
  min-width: 0;
}

html:not(.shell-mobile) #os.theme-windows .w11-fe-cmd.has-label {
  padding: 0 10px 0 8px;
}

html:not(.shell-mobile) #os.theme-windows .w11-fe-sep {
  width: 1px;
  height: 16px;
  margin: 0 6px;
  background: var(--w11-divider);
}

html:not(.shell-mobile) #os.theme-windows .w11-fe-spacer {
  flex: 1 1 auto;
}

html:not(.shell-mobile) #os.theme-windows .w11-fe-commands > .w11-fe-trailing {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
}

html:not(.shell-mobile) #os.theme-windows .w11-fe-trailing > * {
  flex-shrink: 0;
}

/* BioStudio's function search sits in the address row beside the folder
   search, sized like it. */
html:not(.shell-mobile) #os.theme-windows .fe-explorer-root .w11-fe-addressrow .fe-fnsearch {
  flex: 0 1 200px;
  min-width: 0;
  align-self: center;
  margin: 0;
  order: 0;
}

html:not(.shell-mobile) #os.theme-windows .fe-explorer-root .w11-fe-addressrow .fe-fnsearch-field {
  height: 32px;
  border-radius: 4px;
  border: 1px solid var(--w11-control-stroke);
  background: var(--w11-control);
  color: var(--w11-text-2);
  font-family: var(--w11-font);
  font-size: 12px;
}

html:not(.shell-mobile) #os.theme-windows .fe-explorer-root[data-os-variant="win11"] .w11-fe-trailing:not(#_) {
  background: transparent !important;
  border-color: transparent !important;
  color: var(--w11-win-text) !important;
}

html:not(.shell-mobile) #os.theme-windows .window .fe-explorer-root[data-os-variant="win11"] .w11-fe-trailing .btn:not(#_) {
  height: 32px;
  padding: 0 10px;
  border-radius: 4px;
  border: 1px solid transparent !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--w11-win-text) !important;
  font-family: var(--w11-font);
  font-size: 12px;
  font-weight: 400;
}

html:not(.shell-mobile) #os.theme-windows .window .fe-explorer-root[data-os-variant="win11"] .w11-fe-trailing .btn:not(#_):hover {
  background: var(--w11-win-hover) !important;
}

html:not(.shell-mobile) #os.theme-windows .fe-explorer-root[data-os-variant="win11"] :is(.fe-selection-bar, .files-path.fe-address-bar) {
  display: none !important;
}

/* Navigation pane: no headers, 32px rows, a chevron gutter, pins. */
html:not(.shell-mobile) #os.theme-windows .fe-explorer-root[data-os-variant="win11"] .files-sidebar.fe-nav-pane:not(#_) {
  padding: 8px 4px 8px 8px;
  gap: 0;
  border-right: 0 !important;
  background: var(--w11e-body) !important;
  color: var(--w11-win-text) !important;
}

html:not(.shell-mobile) #os.theme-windows .fe-explorer-root[data-os-variant="win11"] .fe-nav-header {
  display: none;
}

html:not(.shell-mobile) #os.theme-windows .fe-explorer-root[data-os-variant="win11"] .files-side-divider {
  height: 1px;
  margin: 6px 8px;
  background: var(--w11-divider);
}

html:not(.shell-mobile) #os.theme-windows .fe-explorer-root[data-os-variant="win11"] .files-side-item {
  height: 32px;
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px 0 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  box-shadow: none;
  color: var(--w11-win-text);
  font-family: var(--w11-font);
  font-size: 12px;
  font-weight: 400;
}

html:not(.shell-mobile) #os.theme-windows .fe-explorer-root[data-os-variant="win11"] .files-side-item.is-nested {
  padding-left: 16px;
}

html:not(.shell-mobile) #os.theme-windows .fe-explorer-root[data-os-variant="win11"] .files-side-item:hover {
  background: var(--w11-win-hover);
}

html:not(.shell-mobile) #os.theme-windows .fe-explorer-root[data-os-variant="win11"] .files-side-item.active:not(#_) {
  background: var(--w11-win-hover) !important;
  box-shadow: none;
  color: var(--w11-win-text);
  font-weight: 400;
}

html:not(.shell-mobile) #os.theme-windows .fe-explorer-root[data-os-variant="win11"] .files-side-item.active::before {
  display: none;
}

html:not(.shell-mobile) #os.theme-windows .fe-explorer-root[data-os-variant="win11"] .fe-nav-chevron {
  width: 16px;
  flex: 0 0 16px;
  display: grid;
  place-items: center;
  color: var(--w11-text-2);
}

html:not(.shell-mobile) #os.theme-windows .fe-explorer-root[data-os-variant="win11"] .fe-nav-chevron .icon {
  width: 10px;
  height: 10px;
}

html:not(.shell-mobile) #os.theme-windows .fe-explorer-root[data-os-variant="win11"] :is(.fe-nav-icon, .fe-nav-icon svg) {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  font-size: 0;
}

html:not(.shell-mobile) #os.theme-windows .fe-explorer-root[data-os-variant="win11"] .fe-nav-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html:not(.shell-mobile) #os.theme-windows .fe-explorer-root[data-os-variant="win11"] .fe-nav-pin {
  display: inline-grid;
  color: var(--w11-text-3);
}

html:not(.shell-mobile) #os.theme-windows .fe-explorer-root[data-os-variant="win11"] .fe-nav-pin .icon {
  width: 12px;
  height: 12px;
}

html:not(.shell-mobile) #os.theme-windows .fe-explorer-root[data-os-variant="win11"] .files-pane-resizer {
  background: transparent;
}

/* Details view: 12px text, secondary columns in grey, rounded selections. */
html:not(.shell-mobile) #os.theme-windows .fe-explorer-root[data-os-variant="win11"] .fe-details-header:not(#_) {
  height: 32px;
  margin: 0 0 2px;
  padding: 0 12px;
  border-bottom: 0 !important;
  background: transparent !important;
  color: var(--w11-text-2);
  font-size: 12px;
  font-weight: 400;
}

html:not(.shell-mobile) #os.theme-windows .fe-explorer-root[data-os-variant="win11"] .fe-details-header .fe-col-sort {
  color: var(--w11-text-2);
  font-size: 12px;
  font-weight: 400;
  border-right: 1px solid var(--w11-divider);
}

html:not(.shell-mobile) #os.theme-windows .fe-explorer-root[data-os-variant="win11"] .fe-details-header .fe-col-sort:hover {
  background: var(--w11-win-hover);
}

html:not(.shell-mobile) #os.theme-windows .fe-explorer-root[data-os-variant="win11"] .fe-list-row {
  min-height: 32px;
  margin: 0 4px;
  width: calc(100% - 8px);
  padding: 0 8px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--w11-win-text);
}

html:not(.shell-mobile) #os.theme-windows .fe-explorer-root[data-os-variant="win11"] .fe-list-row :is(.fe-list-modified, .fe-list-created, .fe-list-type, .fe-list-size, .fe-list-location, .fe-list-assay, .fe-list-plate) {
  color: var(--w11-text-2);
  font-size: 12px;
}

html:not(.shell-mobile) #os.theme-windows .fe-explorer-root[data-os-variant="win11"] .fe-list-icon,
html:not(.shell-mobile) #os.theme-windows .fe-explorer-root[data-os-variant="win11"] .fe-list-icon svg {
  width: 16px;
  height: 16px;
}

html:not(.shell-mobile) #os.theme-windows .fe-explorer-root[data-os-variant="win11"] .file-item:hover {
  background: var(--w11-win-hover);
}

html:not(.shell-mobile) #os.theme-windows .fe-explorer-root[data-os-variant="win11"] .file-item.selected {
  background: var(--w11-selection);
  box-shadow: none;
  outline: 0;
}

html:not(.shell-mobile) #os.theme-windows .fe-explorer-root[data-os-variant="win11"] .file-item.selected:hover {
  background: color-mix(in srgb, var(--w11-selection) 100%, var(--w11-win-hover));
}

/* Large icons view. */
html:not(.shell-mobile) #os.theme-windows .fe-explorer-root[data-os-variant="win11"] .files-grid.fe-view-icons {
  grid-template-columns: repeat(auto-fill, 104px);
  gap: 4px;
  padding: 8px 12px;
}

html:not(.shell-mobile) #os.theme-windows .fe-explorer-root[data-os-variant="win11"] .fe-icon-tile {
  padding: 6px 4px 8px;
  border-radius: 4px;
  border: 1px solid transparent;
}

html:not(.shell-mobile) #os.theme-windows .fe-explorer-root[data-os-variant="win11"] .fe-icon-tile.selected {
  border-color: color-mix(in srgb, var(--w11-accent) 30%, transparent);
}

html:not(.shell-mobile) #os.theme-windows .fe-explorer-root[data-os-variant="win11"] .fe-icon-caption,
html:not(.shell-mobile) #os.theme-windows .fe-explorer-root[data-os-variant="win11"] .fe-icon-tile .file-name {
  font-size: 12px;
  color: var(--w11-win-text);
}

/* Status bar: item count on the content surface. */
html:not(.shell-mobile) #os.theme-windows .window .fe-explorer-root[data-os-variant="win11"] .fe-statusbar:not(#_) {
  height: 28px;
  min-height: 28px;
  padding: 0 16px;
  border-top: 0 !important;
  background: var(--w11e-body) !important;
  color: var(--w11-win-text) !important;
  font-family: var(--w11-font);
  font-size: 12px;
}

html:not(.shell-mobile) #os.theme-windows .fe-explorer-root[data-os-variant="win11"] .files-preview {
  border-left: 1px solid var(--w11-divider);
  background: var(--w11e-body);
}

/* ============================================================================
   Focus visuals, inactive windows
   ============================================================================ */

/* WinUI focus visual: a 2px ring in the text colour, only for keyboard focus. */
#os.theme-windows :focus-visible,
body.theme-windows :focus-visible {
  outline: 2px solid var(--w11-text);
  outline-offset: 1px;
}

#os.theme-windows [tabindex="-1"]:focus-visible {
  outline: none;
}

/* Windows neither glows the focused window nor dims the others. */
html.fx-glow:not(.shell-mobile) #os.theme-windows:not(.shell-mobile) .window::before {
  display: none;
}

/* ============================================================================
   Wallpaper (Bloom) and desktop icons
   ============================================================================ */

.tk-bloom {
  background: url("../assets/wallpapers/bloom-light.svg") center / cover no-repeat, #dcebfb;
}

html:not(.shell-mobile) #os.theme-windows.wp-bloom[data-os-theme] {
  background: url("../assets/wallpapers/bloom-light.svg") center / cover no-repeat, #e2eefc;
}

html:not(.shell-mobile) #os.theme-windows.wp-bloom[data-os-theme]:is([data-color-theme="black"], [data-color-theme="ocean"], [data-color-theme="orchid"]) {
  background: url("../assets/wallpapers/bloom-dark.svg") center / cover no-repeat, #081330;
}

/* Medium icons are 48px on a 76px column, like Explorer's desktop view. */
html:not(.shell-mobile) #os.theme-windows {
  --desktop-pad: 4px;
  --desktop-icon-glyph-small: 32px;
  --desktop-icon-width-small: 72px;
  --desktop-icon-cell-small: 76px;
  --desktop-icon-row-small: 84px;
  --desktop-icon-glyph-medium: 48px;
  --desktop-icon-width-medium: 76px;
  --desktop-icon-cell-medium: 80px;
  --desktop-icon-row-medium: 100px;
  --desktop-icon-glyph-large: 96px;
  --desktop-icon-width-large: 116px;
  --desktop-icon-cell-large: 120px;
  --desktop-icon-row-large: 148px;
  --desktop-icon-label: 12px;
  --desktop-icon-label-small: 12px;
  --desktop-icon-label-large: 12px;
}

html:not(.shell-mobile) #os.theme-windows .desktop-icon {
  gap: 4px;
  padding: 4px 2px 4px;
  border-radius: 4px;
  border: 1px solid transparent;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75), 0 0 2px rgba(0, 0, 0, 0.45);
  transition: background-color 0.083s linear, border-color 0.083s linear;
}

html:not(.shell-mobile) #os.theme-windows .desktop-icon:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: none;
  transform: none;
}

html:not(.shell-mobile) #os.theme-windows .desktop-icon.selected {
  background: rgba(204, 232, 255, 0.3);
  border-color: rgba(153, 209, 255, 0.6);
  box-shadow: none;
}

html:not(.shell-mobile) #os.theme-windows .desktop-icon.is-pressing {
  transform: none;
}

html:not(.shell-mobile) #os.theme-windows .desktop-icon:hover .desktop-icon-glyph,
html:not(.shell-mobile) #os.theme-windows .desktop-icon.is-pressing .desktop-icon-glyph {
  transform: none;
}

html:not(.shell-mobile) #os.theme-windows .desktop-icon-label {
  font-family: var(--w11-font);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 16px;
}

html:not(.shell-mobile) #os.theme-windows .desktop-icon.selected .desktop-icon-label {
  -webkit-line-clamp: 4;
}

/* App folders stay inside one icon cell: a 48px tile with a 2×2 preview. */
html:not(.shell-mobile) #os.theme-windows .desktop-folder-preview,
html:not(.shell-mobile) #os.theme-windows .size-large .desktop-folder-preview,
html:not(.shell-mobile) #os.theme-windows .size-small .desktop-folder-preview {
  --folder-glyph-scale: 1;
  padding: 4px;
  gap: 2px;
  border-radius: 8px;
}

html:not(.shell-mobile) #os.theme-windows .size-large .desktop-folder-preview {
  width: var(--desktop-icon-glyph-large);
  height: var(--desktop-icon-glyph-large);
}

html:not(.shell-mobile) #os.theme-windows .size-small .desktop-folder-preview {
  width: var(--desktop-icon-glyph-small);
  height: var(--desktop-icon-glyph-small);
  padding: 3px;
}

html:not(.shell-mobile) #os.theme-windows .desktop-folder-mini {
  border-radius: 3px;
}

/* Rubber-band selection: Windows' translucent blue with a solid edge. */
html:not(.shell-mobile) #os.theme-windows .marquee {
  border: 1px solid rgba(0, 120, 215, 0.9);
  background: rgba(0, 120, 215, 0.24);
  border-radius: 0;
}

/* ============================================================================
   Snap layouts, Task View, dialogs, search, notifications, scrollbars
   ============================================================================ */

html:not(.shell-mobile) body.theme-windows .snap-flyout.is-win11 {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 12px 16px;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--w11-flyout-stroke);
  background: var(--w11-acrylic);
  box-shadow: var(--w11-flyout-shadow);
  transform: translateY(-4px);
  transition: opacity 0.083s linear, transform 0.2s cubic-bezier(0.1, 0.9, 0.2, 1);
}

html:not(.shell-mobile) body.theme-windows .snap-flyout.is-win11.show {
  transform: none;
}

html:not(.shell-mobile) body.theme-windows .snap-layout.is-frac {
  position: relative;
  display: block;
  width: 92px;
  height: 60px;
  padding: 0;
  border-radius: 6px;
  background: transparent;
}

html:not(.shell-mobile) body.theme-windows .snap-layout.is-frac .snap-cell {
  position: absolute;
  padding: 0;
  border: 2px solid transparent;
  background-clip: padding-box;
  border-radius: 5px;
  background-color: color-mix(in srgb, var(--w11-text) 16%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--w11-text) 12%, transparent);
  opacity: 1;
  transition: background-color 0.083s linear;
}

html:not(.shell-mobile) body.theme-windows .snap-layout.is-frac .snap-cell:hover {
  background-color: var(--w11-accent);
  box-shadow: none;
}

/* Task View: windows on a dimmed backdrop, desktops strip below. */
html:not(.shell-mobile) #os.theme-windows .task-view,
html:not(.shell-mobile) body.theme-windows .task-view {
  font-family: var(--w11-font);
}

html:not(.shell-mobile) body.theme-windows .tv-scrim {
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(min(40px, var(--bs-max-blur, 40px))) saturate(1.2);
  -webkit-backdrop-filter: blur(min(40px, var(--bs-max-blur, 40px))) saturate(1.2);
}

html:not(.shell-mobile) body.theme-windows .tv-window {
  padding: 0;
  border-radius: 8px;
  border: 2px solid transparent;
  background: transparent;
  box-shadow: none;
  transition: border-color 0.083s linear;
}

html:not(.shell-mobile) body.theme-windows .tv-window:hover {
  transform: none;
  border-color: rgba(255, 255, 255, 0.72);
}

html:not(.shell-mobile) body.theme-windows .tv-window-head {
  height: 36px;
  padding: 0 4px 0 10px;
  gap: 10px;
  background: transparent;
  color: #ffffff;
  font-size: 12px;
  font-weight: 400;
}

html:not(.shell-mobile) body.theme-windows .tv-thumb {
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

html:not(.shell-mobile) body.theme-windows .tv-window-close {
  width: 28px;
  height: 28px;
  border-radius: 4px;
}

html:not(.shell-mobile) body.theme-windows .tv-window-close:hover {
  background: var(--w11-close);
}

html:not(.shell-mobile) body.theme-windows .tv-desktops {
  padding: 12px 16px;
  gap: 12px;
  border-radius: 8px;
  background: rgba(32, 32, 32, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(min(30px, var(--bs-max-blur, 30px)));
  -webkit-backdrop-filter: blur(min(30px, var(--bs-max-blur, 30px)));
}

html:not(.shell-mobile) body.theme-windows :is(.tv-desktop, .tv-add) {
  border-radius: 8px;
  transform: none;
}

html:not(.shell-mobile) body.theme-windows .tv-desktop:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.08);
}

html:not(.shell-mobile) body.theme-windows .tv-desktop.active {
  border-color: var(--w11-accent);
}

html:not(.shell-mobile) body.theme-windows .tv-desktop-name {
  font-size: 12px;
  font-weight: 400;
}

/* ContentDialog: layer body, Mica footer with equal-width buttons, smoke. */
html:not(.shell-mobile) body.theme-windows .platform-dialog-overlay {
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

html:not(.shell-mobile) body.theme-windows .platform-dialog {
  width: min(448px, calc(100vw - 48px));
  padding: 0;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--w11-flyout-stroke);
  background: var(--w11-layer) !important;
  box-shadow: var(--w11-dialog-shadow);
  color: var(--w11-text);
  font-family: var(--w11-font);
}

html:not(.shell-mobile) body.theme-windows .platform-dialog-head {
  padding: 24px 24px 0;
  border: 0;
  background: transparent;
}

html:not(.shell-mobile) body.theme-windows .platform-dialog-title {
  font-family: var(--w11-font-display);
  font-size: 20px;
  font-weight: 600;
  line-height: 28px;
  color: var(--w11-text);
}

html:not(.shell-mobile) body.theme-windows .platform-dialog-x {
  display: none;
}

html:not(.shell-mobile) body.theme-windows .platform-dialog-body {
  padding: 12px 24px 24px;
  font-size: 14px;
  line-height: 20px;
  color: var(--w11-text);
}

html:not(.shell-mobile) body.theme-windows .platform-dialog-message {
  font-size: 14px;
  line-height: 20px;
  color: var(--w11-text);
}

html:not(.shell-mobile) body.theme-windows .platform-dialog-foot {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 8px;
  padding: 24px;
  border-top: 1px solid var(--w11-card-stroke);
  background: var(--w11-mica);
}

/* The primary (last) button leads, as in a WinUI ContentDialog. */
html:not(.shell-mobile) body.theme-windows .platform-dialog-foot > :last-child {
  order: -1;
}

html:not(.shell-mobile) body.theme-windows .platform-dialog :is(.platform-dialog-foot button, .platform-dialog-foot .btn) {
  height: 32px;
  min-width: 0;
  padding: 0 12px;
  border-radius: 4px;
  border: 1px solid var(--w11-control-stroke);
  border-bottom-color: var(--w11-control-stroke-2);
  background: var(--w11-control-solid);
  box-shadow: none;
  color: var(--w11-text);
  font-family: var(--w11-font);
  font-size: 14px;
  font-weight: 400;
}

html:not(.shell-mobile) body.theme-windows .platform-dialog-foot > :last-child {
  border-color: transparent;
  background: var(--w11-accent);
  color: var(--w11-on-accent);
}

html:not(.shell-mobile) body.theme-windows .platform-dialog-input {
  height: 32px;
  border-radius: 4px;
  border: 1px solid var(--w11-control-stroke);
  border-bottom-color: var(--w11-input-stroke);
  background: var(--w11-control-solid);
  font-family: var(--w11-font);
  font-size: 14px;
}

html:not(.shell-mobile) body.theme-windows .platform-dialog-input:focus {
  border-bottom: 2px solid var(--w11-accent);
  box-shadow: none;
  outline: none;
}

/* Search: opens above the taskbar like Windows Search, not mid-screen. */
html:not(.shell-mobile) body.theme-windows .bs-search-overlay {
  align-items: flex-end;
  justify-content: center;
  padding: 0 0 60px;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

html:not(.shell-mobile) body.theme-windows .bs-search-box {
  width: min(792px, calc(100vw - 24px));
  max-height: min(740px, calc(100dvh - 72px));
  border-radius: 8px;
  border: 1px solid var(--w11-flyout-stroke);
  background: var(--w11-acrylic);
  box-shadow: var(--w11-dialog-shadow);
  backdrop-filter: blur(min(60px, var(--bs-max-blur, 60px))) saturate(1.3);
  -webkit-backdrop-filter: blur(min(60px, var(--bs-max-blur, 60px))) saturate(1.3);
  color: var(--w11-text);
  font-family: var(--w11-font);
}

html:not(.shell-mobile) body.theme-windows .bs-search-head {
  margin: 24px 24px 12px;
  height: 36px;
  padding: 0 14px;
  gap: 10px;
  border-radius: 18px;
  border: 1px solid var(--w11-control-stroke);
  border-bottom: 2px solid var(--w11-accent);
  background: var(--w11-control-solid);
}

html:not(.shell-mobile) body.theme-windows .bs-search-input {
  font-family: var(--w11-font);
  font-size: 14px;
  color: var(--w11-text);
  border: 0 !important;
  outline: none;
  box-shadow: none !important;
  background: transparent !important;
}

html:not(.shell-mobile) body.theme-windows .bs-search-esc {
  display: none;
}

html:not(.shell-mobile) body.theme-windows .bs-search-hint {
  padding: 4px 24px;
  font-size: 12px;
  color: var(--w11-text-2);
}

html:not(.shell-mobile) body.theme-windows .bs-search-list {
  padding: 4px 16px 16px;
}

/* Notifications: Windows 11 toast cards above the clock. */
html:not(.shell-mobile) #os.theme-windows .toast-layer {
  right: 12px;
  bottom: 60px;
  gap: 8px;
}

html:not(.shell-mobile) #os.theme-windows .toast {
  width: 364px;
  padding: 16px;
  gap: 12px;
  border-radius: 8px;
  border: 1px solid var(--w11-flyout-stroke);
  border-left-width: 1px;
  background: var(--w11-acrylic);
  box-shadow: var(--w11-dialog-shadow);
  color: var(--w11-text);
  font-family: var(--w11-font);
  transform: translateX(calc(100% + 24px));
  transition: transform 0.35s cubic-bezier(0.1, 0.9, 0.2, 1);
}

html:not(.shell-mobile) #os.theme-windows .toast.show {
  transform: none;
}

html:not(.shell-mobile) #os.theme-windows .toast-icon .icon {
  width: 16px;
  height: 16px;
}

html:not(.shell-mobile) #os.theme-windows .toast-title {
  font-size: 14px;
  font-weight: 600;
}

html:not(.shell-mobile) #os.theme-windows .toast-message {
  font-size: 14px;
  line-height: 20px;
  color: var(--w11-text-2);
}

html:not(.shell-mobile) #os.theme-windows .toast-close {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  font-size: 16px;
}

html:not(.shell-mobile) #os.theme-windows .toast-close:hover {
  background: var(--w11-subtle-hover);
}

/* Overlay scrollbars: a 2px rail that widens to 6px on hover. */
#os.theme-windows ::-webkit-scrollbar,
body.theme-windows ::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

#os.theme-windows ::-webkit-scrollbar-track,
body.theme-windows ::-webkit-scrollbar-track {
  background: transparent;
}

#os.theme-windows ::-webkit-scrollbar-thumb,
body.theme-windows ::-webkit-scrollbar-thumb {
  border: 5px solid transparent;
  border-radius: 6px;
  background: var(--w11-scroll-thumb) padding-box;
}

#os.theme-windows ::-webkit-scrollbar-thumb:hover,
body.theme-windows ::-webkit-scrollbar-thumb:hover {
  border-width: 3px;
}

#os.theme-windows ::-webkit-scrollbar-corner,
body.theme-windows ::-webkit-scrollbar-corner {
  background: transparent;
}

/* Text fields show focus with their accent underline, not the outer ring. */
#os.theme-windows :is(.start-search, .w11-fe-search-input, .w11-fe-address-input):focus-visible,
body.theme-windows :is(.bs-search-input, .platform-dialog-input):focus-visible {
  outline: none;
}

html:not(.shell-mobile) body.theme-windows .bs-search-input:focus,
html:not(.shell-mobile) body.theme-windows .bs-search-input:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}


/* Fluent app icons stand on their own: no plate in the apps overlay. */
html:not(.shell-mobile) #os.theme-windows .launchpad-icon-glyph:has(.icon-osapp) {
  background: none;
  box-shadow: none;
}

/* ============================================================================
   Settings (the Profile app) — Windows 11 Settings layout
   ============================================================================ */

html:not(.shell-mobile) #os.theme-windows .window[data-app="profile"] .profile-content {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas: "head title" "nav body";
  column-gap: 16px;
  height: 100%;
  padding: 0 0 0 8px;
  overflow: hidden !important;
  background: var(--w11-win-mica);
  font-family: var(--w11-font);
}

html:not(.shell-mobile) #os.theme-windows .window[data-app="profile"] :is(.profile-hero, .profile-footnote) {
  display: none;
}

html:not(.shell-mobile) #os.theme-windows .window[data-app="profile"] .profile-nav-head {
  grid-area: head;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px 8px 12px;
}

html:not(.shell-mobile) #os.theme-windows .profile-nav-user {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 4px;
  border-radius: 6px;
  background: transparent;
  color: var(--w11-win-text);
  text-align: left;
}

html:not(.shell-mobile) #os.theme-windows .profile-nav-user:hover {
  background: var(--w11-win-hover);
}

html:not(.shell-mobile) #os.theme-windows .profile-nav-avatar {
  width: 60px;
  height: 60px;
  flex: 0 0 60px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: color-mix(in srgb, var(--w11-accent) 18%, var(--w11-card-solid));
  color: var(--w11-accent-text) !important;
  font-family: var(--w11-font-display);
  font-size: 24px;
  font-weight: 600;
}

html:not(.shell-mobile) #os.theme-windows .profile-nav-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

html:not(.shell-mobile) #os.theme-windows .profile-nav-id {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

html:not(.shell-mobile) #os.theme-windows .profile-nav-name {
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html:not(.shell-mobile) #os.theme-windows .profile-nav-email {
  overflow: hidden;
  font-size: 12px;
  color: var(--w11-text-2) !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html:not(.shell-mobile) #os.theme-windows .profile-nav-searchbox {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 10px;
  border-radius: 4px;
  border: 1px solid var(--w11-control-stroke);
  border-bottom-color: var(--w11-input-stroke);
  background: var(--w11-control);
  color: var(--w11-text-2);
}

html:not(.shell-mobile) #os.theme-windows .profile-nav-searchbox:focus-within {
  border-bottom: 2px solid var(--w11-accent);
  background: var(--w11-control-solid);
}

html:not(.shell-mobile) #os.theme-windows .window .profile-nav-search:not(#_) {
  flex: 1;
  min-width: 0;
  height: 28px;
  padding: 0;
  border: 0 !important;
  outline: none;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--w11-win-text) !important;
  font-family: var(--w11-font);
  font-size: 14px;
}

html:not(.shell-mobile) #os.theme-windows .window[data-app="profile"] .profile-main-tabs {
  grid-area: nav;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  padding: 0 8px 16px;
  margin: 0;
  border: 0;
  overflow-y: auto;
  background: transparent;
}

html:not(.shell-mobile) #os.theme-windows .window[data-app="profile"] .profile-main-tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  box-shadow: none;
  color: var(--w11-win-text);
  font-family: var(--w11-font);
  font-size: 14px;
  font-weight: 400;
  text-align: left;
}

html:not(.shell-mobile) #os.theme-windows .window[data-app="profile"] .profile-main-tab:hover {
  background: var(--w11-win-hover);
}

html:not(.shell-mobile) #os.theme-windows .window[data-app="profile"] .profile-main-tab.active {
  background: var(--w11-win-hover);
  color: var(--w11-win-text);
}

/* The WinUI NavigationView selection pill. */
html:not(.shell-mobile) #os.theme-windows .window[data-app="profile"] .profile-main-tab.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 2px;
  background: var(--w11-accent);
}

html:not(.shell-mobile) #os.theme-windows .window[data-app="profile"] .profile-tab-icon {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  color: var(--tab-c) !important;
}

html:not(.shell-mobile) #os.theme-windows .window[data-app="profile"] .profile-main-tab[data-tab="settings"] .profile-tab-icon {
  color: var(--w11-accent) !important;
}

html:not(.shell-mobile) #os.theme-windows .window[data-app="profile"] .profile-tab-icon .icon {
  color: inherit !important;
  width: 16px;
  height: 16px;
}

html:not(.shell-mobile) #os.theme-windows .window[data-app="profile"] .profile-page-title {
  grid-area: title;
  display: block;
  align-self: end;
  margin: 0;
  padding: 26px 24px 16px 12px;
  color: var(--w11-win-text);
  font-family: var(--w11-font-display);
  font-size: 28px;
  font-weight: 600;
  line-height: 36px;
}

html:not(.shell-mobile) #os.theme-windows .window[data-app="profile"] .profile-tab-body {
  grid-area: body;
  min-height: 0;
  padding: 0 24px 24px 12px;
  overflow-y: auto;
}

/* Sections become Settings cards. */
html:not(.shell-mobile) #os.theme-windows .window[data-app="profile"] .settings-section {
  margin: 0 0 12px;
  padding: 16px 20px;
  border-radius: 8px;
  border: 1px solid var(--w11-card-stroke);
  background: var(--w11-card-solid);
  box-shadow: none;
}

html:not(.shell-mobile) #os.theme-windows .window[data-app="profile"] .settings-section > h3 {
  margin: 0 0 12px;
  color: var(--w11-win-text);
  font-family: var(--w11-font);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

/* ============================================================================
   Properties — the Win32 property sheet as Windows 11 draws it
   ============================================================================ */

html:not(.shell-mobile) body.theme-windows .fe-os-props[data-variant="win"] {
  --fe-os-props-shadow: var(--w11-win-shadow);
  --wp-sheet: var(--w11-content);
  --wp-face: color-mix(in srgb, var(--w11-mica) 70%, var(--w11-layer));
  --wp-line: var(--w11-control-stroke-2);
  width: 370px;
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  border: 1px solid var(--w11-win-stroke);
  background: var(--wp-face);
  box-shadow: var(--w11-win-shadow);
  color: var(--w11-text);
  font-family: var(--w11-font);
  font-size: 12px;
  overflow: hidden;
}

html:not(.shell-mobile) body.theme-windows .fe-os-props[data-variant="win"] .fe-os-props-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding-left: 10px;
  cursor: default;
  user-select: none;
  touch-action: none;
}

html:not(.shell-mobile) body.theme-windows .fe-wp-bar-icon {
  width: 16px;
  height: 16px;
}

html:not(.shell-mobile) body.theme-windows .fe-os-props[data-variant="win"] .fe-os-props-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html:not(.shell-mobile) body.theme-windows .fe-wp-close {
  width: 46px;
  height: 32px;
  border: 0;
  border-radius: 0 7px 0 0;
  background: transparent;
  color: var(--w11-text);
  cursor: default;
}

html:not(.shell-mobile) body.theme-windows .fe-wp-close::before {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  margin: auto;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M.5.5l9 9m0-9l-9 9' stroke='black' stroke-width='1'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M.5.5l9 9m0-9l-9 9' stroke='black' stroke-width='1'/%3E%3C/svg%3E") center / contain no-repeat;
}

html:not(.shell-mobile) body.theme-windows .fe-wp-close:hover {
  background: var(--w11-close);
  color: #ffffff;
}

html:not(.shell-mobile) body.theme-windows .fe-wp-tabs {
  display: flex;
  gap: 0;
  margin: 4px 10px 0;
  position: relative;
  z-index: 1;
}

html:not(.shell-mobile) body.theme-windows .fe-wp-tab {
  height: 21px;
  margin-top: 2px;
  padding: 0 8px;
  border: 1px solid var(--wp-line);
  border-bottom: 0;
  border-radius: 0;
  background: color-mix(in srgb, var(--wp-face) 60%, var(--w11-text) 4%);
  color: var(--w11-text);
  font: inherit;
  cursor: default;
}

html:not(.shell-mobile) body.theme-windows .fe-wp-tab + .fe-wp-tab {
  margin-left: -1px;
}

html:not(.shell-mobile) body.theme-windows .fe-wp-tab:hover {
  background: color-mix(in srgb, var(--w11-accent) 10%, var(--wp-sheet));
}

html:not(.shell-mobile) body.theme-windows .fe-wp-tab.is-active {
  height: 24px;
  margin: -1px -1px -1px 0;
  padding: 0 10px;
  background: var(--wp-sheet);
}

html:not(.shell-mobile) body.theme-windows .fe-wp-sheet {
  margin: 0 10px;
  min-height: 330px;
  padding: 14px 12px 12px;
  border: 1px solid var(--wp-line);
  background: var(--wp-sheet);
}

html:not(.shell-mobile) body.theme-windows .fe-wp-namerow {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 2px 12px;
}

html:not(.shell-mobile) body.theme-windows .fe-wp-namerow .fe-os-props-icon {
  width: 32px;
  height: 32px;
}

html:not(.shell-mobile) body.theme-windows .fe-wp-name:not(#_),
html:not(.shell-mobile) body.theme-windows .fe-wp-multi {
  flex: 1;
  min-width: 0;
  height: 22px;
  padding: 0 6px;
  border: 1px solid var(--wp-line) !important;
  border-radius: 3px;
  background: var(--wp-sheet) !important;
  box-shadow: none !important;
  color: var(--w11-text) !important;
  font: 12px var(--w11-font);
  line-height: 20px;
}

html:not(.shell-mobile) body.theme-windows .fe-wp-multi {
  border: 0 !important;
}

html:not(.shell-mobile) body.theme-windows .fe-wp-rule {
  height: 0;
  margin: 10px 0;
  border: 0;
  border-top: 1px solid var(--wp-line);
}

html:not(.shell-mobile) body.theme-windows .fe-wp-grid {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 8px 8px;
  margin: 0;
  padding: 0 2px;
}

html:not(.shell-mobile) body.theme-windows .fe-wp-grid dt {
  color: var(--w11-text);
  font-weight: 400;
}

html:not(.shell-mobile) body.theme-windows .fe-wp-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
  user-select: text;
}

html:not(.shell-mobile) body.theme-windows .fe-wp-details {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

html:not(.shell-mobile) body.theme-windows .fe-wp-details th {
  height: 24px;
  padding: 0 6px;
  border-right: 1px solid var(--wp-line);
  border-bottom: 1px solid var(--wp-line);
  color: var(--w11-text-2);
  font-weight: 400;
  text-align: left;
}

html:not(.shell-mobile) body.theme-windows .fe-wp-details th:last-child {
  border-right: 0;
}

html:not(.shell-mobile) body.theme-windows .fe-wp-details td {
  height: 21px;
  padding: 0 6px;
  vertical-align: middle;
  overflow-wrap: anywhere;
  user-select: text;
}

html:not(.shell-mobile) body.theme-windows .fe-wp-details td:first-child {
  width: 108px;
  color: var(--w11-text-2);
}

html:not(.shell-mobile) body.theme-windows .fe-wp-details tbody tr:hover {
  background: var(--w11-subtle-hover);
}

html:not(.shell-mobile) body.theme-windows .fe-wp-detail-actions {
  margin-top: 12px;
}

html:not(.shell-mobile) body.theme-windows .fe-os-props .fe-os-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--w11-accent-text);
  font: inherit;
  cursor: pointer;
}

html:not(.shell-mobile) body.theme-windows .fe-os-props .fe-os-link:hover {
  text-decoration: underline;
}

html:not(.shell-mobile) body.theme-windows .fe-wp-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  padding: 10px 10px 10px;
}

html:not(.shell-mobile) body.theme-windows .fe-wp-btn {
  min-width: 75px;
  height: 24px;
  padding: 0 10px;
  border: 1px solid var(--w11-control-stroke-2);
  border-bottom-color: color-mix(in srgb, var(--w11-control-stroke-2) 100%, var(--w11-text) 8%);
  border-radius: 4px;
  background: var(--w11-control-solid);
  color: var(--w11-text);
  font: 12px var(--w11-font);
  cursor: default;
}

html:not(.shell-mobile) body.theme-windows .fe-wp-btn:hover:not(:disabled) {
  background: color-mix(in srgb, var(--w11-control-solid) 92%, var(--w11-text));
}

html:not(.shell-mobile) body.theme-windows .fe-wp-btn.is-accent {
  border-color: var(--w11-accent);
  box-shadow: inset 0 0 0 1px var(--w11-accent);
}

html:not(.shell-mobile) body.theme-windows .fe-wp-btn:disabled {
  color: var(--w11-text-off);
}

/* ============================================================================
   Task Manager — search in the title bar, nav rail, Processes and Performance
   ============================================================================ */

html:not(.shell-mobile) #os.theme-windows .window[data-app="task-manager"].has-titlebar-accessory .window-titlebar:not(#_) {
  height: 48px;
  padding-left: 16px;
  background: var(--w11-win-mica) !important;
}

html:not(.shell-mobile) #os.theme-windows .window[data-app="task-manager"].has-titlebar-accessory .window-title-text {
  display: flex;
  flex: 0 0 auto;
  width: 160px;
}

html:not(.shell-mobile) #os.theme-windows .window[data-app="task-manager"].has-titlebar-accessory :is(.window-controls, .win-btn) {
  height: 48px;
}

html:not(.shell-mobile) #os.theme-windows .window[data-app="task-manager"] .window-titlebar-accessory {
  justify-content: center;
  align-items: center;
  padding-right: 24px;
}

html:not(.shell-mobile) #os.theme-windows .tmgr-win-bar {
  display: flex;
  justify-content: center;
  width: 100%;
  min-width: 0;
}

html:not(.shell-mobile) #os.theme-windows .tmgr-win-search {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(460px, 100%);
  height: 32px;
  padding: 0 12px;
  border-radius: 4px;
  border: 1px solid var(--w11-control-stroke);
  border-bottom-color: var(--w11-input-stroke);
  background: var(--w11-control);
  color: var(--w11-text-2);
}

html:not(.shell-mobile) #os.theme-windows .tmgr-win-search:focus-within {
  border-bottom: 2px solid var(--w11-accent);
  background: var(--w11-control-solid);
}

html:not(.shell-mobile) #os.theme-windows .tmgr-win-search .tmgr-search-input:not(#_) {
  flex: 1;
  min-width: 0;
  height: 28px;
  padding: 0;
  border: 0 !important;
  outline: none;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--w11-win-text) !important;
  font: 13px var(--w11-font);
}

html:not(.shell-mobile) #os.theme-windows .tmgr[data-os="win"] {
  --tm-layer: var(--w11e-bar, var(--w11-layer));
  --tm-line: var(--w11-divider);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas: "rail head" "rail main" "rail note";
  background: var(--w11-win-mica) !important;
  color: var(--w11-win-text);
  font-family: var(--w11-font);
  font-size: 12px;
}

html:not(.shell-mobile) #os.theme-windows .tmgr[data-os="win"] :is(.tmgr-kpis, .tmgr-live, .tmgr-spacer, .tmgr-bar-wrap) {
  display: none;
}

/* Nav rail: icons only until the hamburger opens it. */
html:not(.shell-mobile) #os.theme-windows .tmgr[data-os="win"] .tmgr-rail {
  grid-area: rail;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 48px;
  padding: 4px 4px 8px;
  transition: width 0.167s cubic-bezier(0, 0, 0, 1);
}

html:not(.shell-mobile) #os.theme-windows .tmgr[data-os="win"] .tmgr-rail.expanded {
  width: 240px;
}

html:not(.shell-mobile) #os.theme-windows .tmgr-rail-btn:not(#_) {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 36px;
  padding: 0 12px;
  border: 0 !important;
  border-radius: 4px;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--w11-win-text) !important;
  font: 14px var(--w11-font);
  white-space: nowrap;
  overflow: hidden;
  cursor: default;
}

html:not(.shell-mobile) #os.theme-windows .tmgr-rail-btn:not(#_):hover,
html:not(.shell-mobile) #os.theme-windows .tmgr-rail-btn.active:not(#_) {
  background: var(--w11-win-hover) !important;
}

html:not(.shell-mobile) #os.theme-windows .tmgr-rail-btn.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 2px;
  background: var(--w11-accent);
}

html:not(.shell-mobile) #os.theme-windows .tmgr-rail-btn svg {
  flex: 0 0 16px;
}

html:not(.shell-mobile) #os.theme-windows .tmgr-rail-icon {
  display: grid;
  place-items: center;
  flex: 0 0 16px;
}

html:not(.shell-mobile) #os.theme-windows .tmgr-rail-label {
  opacity: 0;
  transition: opacity 0.1s linear;
}

html:not(.shell-mobile) #os.theme-windows .tmgr-rail.expanded .tmgr-rail-label {
  opacity: 1;
}

/* The page sits on a lighter layer with a rounded top-left corner. */
html:not(.shell-mobile) #os.theme-windows .tmgr[data-os="win"] .tmgr-toolbar:not(#_) {
  grid-area: head;
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 60px;
  margin: 0;
  padding: 8px 16px 8px 24px;
  border: 0 !important;
  border-top: 1px solid var(--w11-card-stroke) !important;
  border-left: 1px solid var(--w11-card-stroke) !important;
  border-radius: 8px 0 0 0;
  background: var(--tm-layer) !important;
  box-shadow: none !important;
  color: var(--w11-win-text) !important;
}

html:not(.shell-mobile) #os.theme-windows .tmgr[data-os="win"] .tmgr-pagetitle {
  display: block;
  flex: 1;
  margin: 0;
  color: var(--w11-win-text);
  font: 600 20px/28px var(--w11-font-display);
}

html:not(.shell-mobile) #os.theme-windows .tmgr[data-os="win"] .tmgr-toolbar .btn:not(#_) {
  height: 32px;
  padding: 0 11px;
  border: 0 !important;
  border-radius: 4px;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--w11-win-text) !important;
  font: 14px var(--w11-font);
  filter: none;
}

html:not(.shell-mobile) #os.theme-windows .tmgr[data-os="win"] .tmgr-toolbar .btn:not(#_):hover:not(:disabled) {
  background: var(--w11-subtle-hover) !important;
}

html:not(.shell-mobile) #os.theme-windows .tmgr[data-os="win"] .tmgr-toolbar .btn:not(#_):disabled {
  color: var(--w11-text-off) !important;
  opacity: 1;
}

html:not(.shell-mobile) #os.theme-windows .tmgr[data-os="win"] .tmgr-toolbar .tmgr-end::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  vertical-align: -3px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='6.5' fill='none' stroke='black'/%3E%3Cpath d='M3.4 12.6 12.6 3.4' stroke='black'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='6.5' fill='none' stroke='black'/%3E%3Cpath d='M3.4 12.6 12.6 3.4' stroke='black'/%3E%3C/svg%3E") center / contain no-repeat;
}

html:not(.shell-mobile) #os.theme-windows .tmgr[data-os="win"][data-page="performance"] .tmgr-toolbar .btn {
  display: none;
}

html:not(.shell-mobile) #os.theme-windows .tmgr[data-os="win"] .tmgr-scroll,
html:not(.shell-mobile) #os.theme-windows .tmgr[data-os="win"] .tmgr-perf {
  grid-area: main;
  min-height: 0;
  margin: 0;
  border-left: 1px solid var(--w11-card-stroke);
  background: var(--tm-layer);
}

html:not(.shell-mobile) #os.theme-windows .tmgr[data-os="win"][data-page="performance"] .tmgr-scroll {
  display: none;
}

html:not(.shell-mobile) #os.theme-windows .tmgr[data-os="win"] .tmgr-note {
  grid-area: note;
  margin: 0;
  padding: 6px 24px 8px;
  border-left: 1px solid var(--w11-card-stroke);
  background: var(--tm-layer);
  color: var(--w11-text-3) !important;
  font-size: 11px;
}

/* Processes: header totals above the labels, heat-shaded cells, groups. */
html:not(.shell-mobile) #os.theme-windows .tmgr[data-os="win"] .tmgr-table {
  font-size: 12px;
}

html:not(.shell-mobile) #os.theme-windows .tmgr[data-os="win"] .tmgr-table th:not(#_) {
  height: 48px;
  padding: 4px 10px 6px;
  border-bottom: 1px solid var(--tm-line);
  border-right: 1px solid var(--tm-line);
  background: var(--tm-layer) !important;
  color: var(--w11-text-2) !important;
  font: 400 12px var(--w11-font);
  letter-spacing: 0;
  text-transform: none;
  vertical-align: bottom;
}

html:not(.shell-mobile) #os.theme-windows .tmgr[data-os="win"] .tmgr-table th:first-child {
  padding-left: 24px;
}

html:not(.shell-mobile) #os.theme-windows .tmgr[data-os="win"] .tmgr-table th:last-child {
  border-right: 0;
}

html:not(.shell-mobile) #os.theme-windows .tmgr[data-os="win"] .tmgr-table th:is([data-sort="cpu"], [data-sort="memory"]) {
  text-align: right;
}

html:not(.shell-mobile) #os.theme-windows .tmgr[data-os="win"] .tmgr-th-pct {
  display: block;
  color: var(--w11-win-text) !important;
  font-size: 16px;
  line-height: 20px;
}

html:not(.shell-mobile) #os.theme-windows .tmgr[data-os="win"] .tmgr-th.sorted .tmgr-th-label::after {
  content: "";
  display: block;
  width: 8px;
  height: 5px;
  margin: 0 auto;
  position: absolute;
  top: 4px;
  left: 50%;
  translate: -50% 0;
  background: var(--w11-text-3);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 5'%3E%3Cpath d='M.5.5 4 4 7.5.5' fill='none' stroke='black'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 5'%3E%3Cpath d='M.5.5 4 4 7.5.5' fill='none' stroke='black'/%3E%3C/svg%3E") center / contain no-repeat;
}

html:not(.shell-mobile) #os.theme-windows .tmgr[data-os="win"] .tmgr-table th {
  position: sticky;
}

html:not(.shell-mobile) #os.theme-windows .tmgr[data-os="win"] .tmgr-table td {
  height: 32px;
  padding: 0 10px;
  border: 0;
  border-right: 1px solid transparent;
  color: var(--w11-win-text);
}

html:not(.shell-mobile) #os.theme-windows .tmgr[data-os="win"] .tmgr-name {
  padding-left: 24px !important;
}

html:not(.shell-mobile) #os.theme-windows .tmgr[data-os="win"] .tmgr-app {
  font-weight: 400;
}

html:not(.shell-mobile) #os.theme-windows .tmgr[data-os="win"] .tmgr-title {
  display: none;
}

html:not(.shell-mobile) #os.theme-windows .tmgr[data-os="win"] .tmgr-icon .icon {
  width: 16px !important;
  height: 16px !important;
}

html:not(.shell-mobile) #os.theme-windows .tmgr[data-os="win"] .tmgr-num,
html:not(.shell-mobile) #os.theme-windows .tmgr[data-os="win"] .tmgr-energy {
  background: color-mix(in srgb, #ffd43b calc(12% + var(--heat, 0) * 70%), transparent);
  text-align: right;
}

html:not(.shell-mobile) #os.theme-windows .tmgr[data-os="win"] .tmgr-energy:not(#_) {
  --heat: 0;
  text-align: left;
  font-weight: 400;
  color: var(--w11-win-text) !important;
}

html:not(.shell-mobile) #os.theme-windows .tmgr[data-os="win"] .tmgr-energy.warm { --heat: 0.45; }
html:not(.shell-mobile) #os.theme-windows .tmgr[data-os="win"] .tmgr-energy.hot { --heat: 1; }

html:not(.shell-mobile) #os.theme-windows .window[data-app-color-tone="dark"] .tmgr[data-os="win"] :is(.tmgr-num, .tmgr-energy) {
  background: color-mix(in srgb, #7a5c00 calc(22% + var(--heat, 0) * 70%), transparent);
}

html:not(.shell-mobile) #os.theme-windows .tmgr[data-os="win"] .tmgr-group {
  display: table-row;
}

html:not(.shell-mobile) #os.theme-windows .tmgr[data-os="win"] .tmgr-group td {
  height: 36px;
  padding: 8px 24px 0 !important;
  color: var(--w11-win-text) !important;
  font: 600 14px var(--w11-font);
  vertical-align: middle;
}

html:not(.shell-mobile) #os.theme-windows .tmgr[data-os="win"] .tmgr-row:hover {
  background: var(--w11-subtle-hover);
}

html:not(.shell-mobile) #os.theme-windows .tmgr[data-os="win"] .tmgr-row.selected {
  background: var(--w11-selection);
}

/* Performance: device list with sparklines, big graph, stat grid. */
html:not(.shell-mobile) #os.theme-windows .tmgr[data-os="win"] .tmgr-perf:not([hidden]) {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 8px;
  padding: 0 16px 16px 16px;
  overflow: auto;
}

html:not(.shell-mobile) #os.theme-windows .tmgr-perf-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

html:not(.shell-mobile) #os.theme-windows .tmgr-perf-item:not(#_) {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border: 0 !important;
  border-radius: 4px;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--w11-win-text) !important;
  text-align: left;
  cursor: default;
}

html:not(.shell-mobile) #os.theme-windows .tmgr-perf-item:not(#_):hover,
html:not(.shell-mobile) #os.theme-windows .tmgr-perf-item.active:not(#_) {
  background: var(--w11-subtle-hover) !important;
}

html:not(.shell-mobile) #os.theme-windows .tmgr-perf-item.active:not(#_) {
  box-shadow: inset 0 0 0 1px var(--w11-control-stroke-2) !important;
}

html:not(.shell-mobile) #os.theme-windows .tmgr-perf-spark {
  width: 64px;
  height: 44px;
  flex: 0 0 64px;
}

html:not(.shell-mobile) #os.theme-windows .tmgr-perf-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

html:not(.shell-mobile) #os.theme-windows .tmgr-perf-name {
  font-size: 14px;
}

html:not(.shell-mobile) #os.theme-windows .tmgr-perf-value {
  color: var(--w11-text-2) !important;
  font-size: 12px;
  white-space: nowrap;
}

html:not(.shell-mobile) #os.theme-windows .tmgr-perf-detail {
  min-width: 0;
  padding: 0 8px;
}

html:not(.shell-mobile) #os.theme-windows .tmgr-perf-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

html:not(.shell-mobile) #os.theme-windows .tmgr-perf-title {
  margin: 0;
  color: var(--w11-win-text);
  font: 600 28px/36px var(--w11-font-display);
}

html:not(.shell-mobile) #os.theme-windows .tmgr-perf-sub {
  color: var(--w11-win-text) !important;
  font-size: 14px;
}

html:not(.shell-mobile) #os.theme-windows .tmgr-perf-axis {
  display: flex;
  justify-content: space-between;
  margin: 4px 0;
  color: var(--w11-text-2);
  font-size: 12px;
}

html:not(.shell-mobile) #os.theme-windows .tmgr-perf-axis span {
  color: var(--w11-text-2) !important;
}

html:not(.shell-mobile) #os.theme-windows .tmgr-perf-graph {
  height: 220px;
}

html:not(.shell-mobile) #os.theme-windows :is(.tmgr-perf-graph, .tmgr-perf-spark) svg {
  width: 100%;
  height: 100%;
  display: block;
}

html:not(.shell-mobile) #os.theme-windows .tmgr[data-os="win"] {
  --tm-cpu: #117dbb;
  --tm-mem: #8b12ae;
}

html:not(.shell-mobile) #os.theme-windows .window[data-app-color-tone="dark"] .tmgr[data-os="win"] {
  --tm-cpu: #3fa3e0;
  --tm-mem: #c56be0;
}

html:not(.shell-mobile) #os.theme-windows :is(.tmgr-perf-graph, .tmgr-perf-spark) svg {
  outline: 1px solid var(--tm-cpu);
  outline-offset: -1px;
}

html:not(.shell-mobile) #os.theme-windows :is(.tmgr-perf-graph[data-kind="memory"], .tmgr-perf-item[data-perf="memory"] .tmgr-perf-spark) svg {
  outline-color: var(--tm-mem);
}

html:not(.shell-mobile) #os.theme-windows .tmgr-grid path {
  stroke: color-mix(in srgb, var(--tm-cpu) 22%, transparent);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

html:not(.shell-mobile) #os.theme-windows .tmgr-perf-spark .tmgr-grid {
  display: none;
}

html:not(.shell-mobile) #os.theme-windows .tmgr-area.is-cpu { fill: color-mix(in srgb, var(--tm-cpu) 14%, transparent); }
html:not(.shell-mobile) #os.theme-windows .tmgr-line.is-cpu { fill: none; stroke: var(--tm-cpu); stroke-width: 1; vector-effect: non-scaling-stroke; }
html:not(.shell-mobile) #os.theme-windows .tmgr-area.is-mem { fill: color-mix(in srgb, var(--tm-mem) 14%, transparent); }
html:not(.shell-mobile) #os.theme-windows .tmgr-line.is-mem { fill: none; stroke: var(--tm-mem); stroke-width: 1; vector-effect: non-scaling-stroke; }

html:not(.shell-mobile) #os.theme-windows .tmgr-perf-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px 24px;
  margin: 16px 0 0;
}

html:not(.shell-mobile) #os.theme-windows .tmgr-perf-stats dt {
  color: var(--w11-text-2) !important;
  font-size: 12px;
}

html:not(.shell-mobile) #os.theme-windows .tmgr-perf-stats dd {
  margin: 0;
  color: var(--w11-win-text) !important;
  font-size: 20px;
  line-height: 28px;
}

/* About: a header card, "Device specifications", then the shortcuts. */
html:not(.shell-mobile) #os.theme-windows .window[data-app="profile"] .profile-about-section:not(#_) {
  padding: 0;
  border: 0;
  background: transparent;
}

html:not(.shell-mobile) #os.theme-windows .window[data-app="profile"] .about-layout:not(#_) {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-areas: "info" "specs" "keys";
  gap: 4px;
  min-height: 0 !important;
}

html:not(.shell-mobile) #os.theme-windows .window[data-app="profile"] :is(.about-info, .about-specs, .about-shortcuts):not(#_) {
  border-radius: 8px;
  border: 1px solid var(--w11-card-stroke) !important;
  background: var(--w11-card-solid);
}

html:not(.shell-mobile) #os.theme-windows .window[data-app="profile"] .about-info {
  grid-area: info;
  margin-bottom: 12px;
}

html:not(.shell-mobile) #os.theme-windows .window[data-app="profile"] .about {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  justify-items: start;
  gap: 2px 20px;
  padding: 16px 20px;
  text-align: left;
}

html:not(.shell-mobile) #os.theme-windows .window[data-app="profile"] .about-logo {
  grid-row: span 3;
  margin: 0;
}

html:not(.shell-mobile) #os.theme-windows .window[data-app="profile"] .about .tagline {
  max-width: none;
  margin: 0;
  color: var(--w11-text-2) !important;
  font-size: 12px;
}

html:not(.shell-mobile) #os.theme-windows .window[data-app="profile"] .about .badges {
  justify-content: flex-start;
  margin: 4px 0 0;
}

html:not(.shell-mobile) #os.theme-windows .window[data-app="profile"] .about .meta {
  grid-column: 2;
  margin: 2px 0 0;
  color: var(--w11-text-2) !important;
}

html:not(.shell-mobile) #os.theme-windows .window[data-app="profile"] .about-specs {
  grid-area: specs;
  display: block;
  margin-bottom: 12px;
}

html:not(.shell-mobile) #os.theme-windows .about-specs-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 0 16px 0 20px;
  border-bottom: 1px solid var(--w11-divider);
}

html:not(.shell-mobile) #os.theme-windows .about-specs-title {
  flex: 1;
  margin: 0;
  color: var(--w11-win-text);
  font: 600 14px var(--w11-font);
}

html:not(.shell-mobile) #os.theme-windows .about-specs-copy:not(#_) {
  height: 32px;
  min-width: 80px;
  padding: 0 12px;
  border: 1px solid var(--w11-control-stroke) !important;
  border-bottom-color: var(--w11-control-stroke-2) !important;
  border-radius: 4px;
  background: var(--w11-control) !important;
  color: var(--w11-win-text) !important;
  font: 14px var(--w11-font);
}

html:not(.shell-mobile) #os.theme-windows .about-specs-grid {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 8px 16px;
  margin: 0;
  padding: 14px 20px 16px 58px;
  font-size: 14px;
}

html:not(.shell-mobile) #os.theme-windows .about-specs-grid dt {
  color: var(--w11-text-2) !important;
}

html:not(.shell-mobile) #os.theme-windows .about-specs-grid dd {
  margin: 0;
  color: var(--w11-win-text) !important;
  user-select: text;
}

html:not(.shell-mobile) #os.theme-windows .window[data-app="profile"] .about-shortcuts:not(#_) {
  grid-area: keys;
  padding: 16px 20px !important;
  overflow: visible !important;
}

html:not(.shell-mobile) #os.theme-windows .window[data-app="profile"] .about-shortcuts-title {
  margin: 0 0 4px;
  color: var(--w11-win-text) !important;
  font: 600 14px var(--w11-font);
  text-transform: none;
  letter-spacing: 0;
}

/* Settings cards: no house accent stripe, no drop shadow, sentence-case titles. */
html:not(.shell-mobile) #os.theme-windows .window[data-app="profile"] :is(.dashboard-section, .profile-section, .admin-section):not(#_) {
  padding: 16px 20px;
  border: 1px solid var(--w11-card-stroke) !important;
  border-radius: 8px;
  background: var(--w11-card-solid) !important;
  box-shadow: none;
}

html:not(.shell-mobile) #os.theme-windows .window[data-app="profile"] :is(.dashboard-section, .profile-section, .admin-section)::before {
  display: none;
}

html:not(.shell-mobile) #os.theme-windows .window[data-app="profile"] :is(.dashboard-section, .profile-section, .admin-section, .about-specs) h3:not(#_) {
  color: var(--w11-win-text) !important;
  font: 600 14px var(--w11-font);
  letter-spacing: 0;
  text-transform: none;
}

html:not(.shell-mobile) #os.theme-windows .window[data-app="profile"] .profile-about-section:not(#_) {
  padding: 0;
  border: 0 !important;
  background: transparent !important;
}

/* ============================================================================
   Widgets — the taskbar corner button and the board that slides in from the left
   ============================================================================ */

html:not(.shell-mobile) #os.theme-windows .taskbar-left {
  display: flex;
  align-items: center;
  padding-left: 4px;
}

html:not(.shell-mobile) #os.theme-windows .tb-widgets {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 4px;
}

html:not(.shell-mobile) #os.theme-windows .tb-widgets svg {
  width: 24px;
  height: 24px;
}

html:not(.shell-mobile) #os.theme-windows .tb-widgets.active {
  background: var(--w11-tb-hover);
  box-shadow: inset 0 0 0 1px var(--w11-tb-hover-stroke);
}

html:not(.shell-mobile) #os.theme-windows .w11-widgets-board {
  position: absolute;
  z-index: 9550;
  left: 12px;
  top: 12px;
  bottom: calc(var(--taskbar-h, 48px) + 12px);
  width: min(784px, calc(100% - 24px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--w11-flyout-stroke);
  background: var(--w11-acrylic);
  box-shadow: var(--w11-dialog-shadow);
  color: var(--w11-text);
  font-family: var(--w11-font);
  backdrop-filter: blur(min(60px, var(--bs-max-blur, 60px))) saturate(1.25);
  -webkit-backdrop-filter: blur(min(60px, var(--bs-max-blur, 60px))) saturate(1.25);
  opacity: 0;
  transform: translateX(-28px);
  transition: transform 0.25s cubic-bezier(0, 0, 0, 1), opacity 0.12s linear;
}

html:not(.shell-mobile) #os.theme-windows .w11-widgets-board.show {
  opacity: 1;
  transform: none;
}

html:not(.shell-mobile) #os.theme-windows .w11-wb-head {
  display: grid;
  grid-template-columns: 1fr minmax(0, 380px) 1fr;
  align-items: center;
  gap: 12px;
  padding: 16px 24px 8px;
}

html:not(.shell-mobile) #os.theme-windows .w11-wb-time {
  font-size: 14px;
  font-weight: 600;
}

html:not(.shell-mobile) #os.theme-windows .w11-wb-search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 32px;
  padding: 0 12px;
  border-radius: 4px;
  border: 1px solid var(--w11-control-stroke);
  border-bottom-color: var(--w11-input-stroke);
  background: var(--w11-control);
  color: var(--w11-text-2);
}

html:not(.shell-mobile) #os.theme-windows .w11-wb-search:focus-within {
  border-bottom: 2px solid var(--w11-accent);
  background: var(--w11-control-solid);
}

html:not(.shell-mobile) #os.theme-windows .w11-wb-search-input {
  flex: 1;
  min-width: 0;
  height: 28px;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--w11-text);
  font: 13px var(--w11-font);
}

html:not(.shell-mobile) #os.theme-windows .w11-wb-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 24px 24px;
}

html:not(.shell-mobile) #os.theme-windows .w11-wb-body .bsw-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 12px;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}

html:not(.shell-mobile) #os.theme-windows .w11-wb-body :is(.bsw-head, .bsw-add, .bsw-panel > .bsw-empty) {
  grid-column: 1 / -1;
}

html:not(.shell-mobile) #os.theme-windows .w11-wb-body .bsw-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
}

html:not(.shell-mobile) #os.theme-windows .w11-wb-body .bsw-head-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

html:not(.shell-mobile) #os.theme-windows .w11-wb-body :is(.bsw-edit-btn, .bsw-add-chip, .bsw-tool) {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--w11-control-stroke);
  border-radius: 4px;
  background: var(--w11-control);
  color: var(--w11-text);
  font: 12px var(--w11-font);
}

html:not(.shell-mobile) #os.theme-windows .w11-wb-body .bsw-tool {
  width: 28px;
  padding: 0;
  justify-content: center;
}

html:not(.shell-mobile) #os.theme-windows .w11-wb-body :is(.bsw-edit-btn, .bsw-add-chip, .bsw-tool):hover:not(:disabled) {
  background: var(--w11-control-hover);
}

html:not(.shell-mobile) #os.theme-windows .w11-wb-body .bsw-widget {
  min-height: 132px;
  padding: 12px 16px 14px;
  border-radius: 8px;
  border: 1px solid var(--w11-card-stroke);
  background: var(--w11-card);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

html:not(.shell-mobile) #os.theme-windows .w11-wb-body .bsw-widget-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--w11-text-2);
}

html:not(.shell-mobile) #os.theme-windows .w11-wb-body .bsw-widget-title {
  flex: 1;
  margin: 0;
  color: var(--w11-text-2);
  font-size: 12px;
  font-weight: 600;
}

html:not(.shell-mobile) #os.theme-windows .w11-wb-body .bsw-widget-glyph {
  color: var(--w11-accent);
}

html:not(.shell-mobile) #os.theme-windows .w11-wb-body .bsw-clock-time {
  font: 600 40px/1.1 var(--w11-font-display);
}

html:not(.shell-mobile) #os.theme-windows .w11-wb-body .bsw-clock-date {
  margin-top: 4px;
  color: var(--w11-text-2);
  font-size: 14px;
}

html:not(.shell-mobile) #os.theme-windows .w11-wb-body .bsw-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
}

html:not(.shell-mobile) #os.theme-windows .w11-wb-body .bsw-stat {
  display: flex;
  flex-direction: column;
}

html:not(.shell-mobile) #os.theme-windows .w11-wb-body .bsw-stat-value {
  font: 600 24px/1.2 var(--w11-font-display);
}

html:not(.shell-mobile) #os.theme-windows .w11-wb-body .bsw-stat-label {
  color: var(--w11-text-2);
  font-size: 12px;
}

html:not(.shell-mobile) #os.theme-windows .w11-wb-body .bsw-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 -8px;
}

html:not(.shell-mobile) #os.theme-windows .w11-wb-body .bsw-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 6px 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--w11-text);
  text-align: left;
}

html:not(.shell-mobile) #os.theme-windows .w11-wb-body .bsw-row:hover {
  background: var(--w11-subtle-hover);
}

html:not(.shell-mobile) #os.theme-windows .w11-wb-body .bsw-row-icon {
  color: var(--w11-accent);
}

html:not(.shell-mobile) #os.theme-windows .w11-wb-body .bsw-row-main {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

html:not(.shell-mobile) #os.theme-windows .w11-wb-body .bsw-row-title {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html:not(.shell-mobile) #os.theme-windows .w11-wb-body .bsw-row-sub {
  color: var(--w11-text-2);
  font-size: 12px;
}

html:not(.shell-mobile) #os.theme-windows .w11-wb-body .bsw-row-caret {
  color: var(--w11-text-3);
}

html:not(.shell-mobile) #os.theme-windows .w11-wb-body .bsw-quick {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}

html:not(.shell-mobile) #os.theme-windows .w11-wb-body .bsw-quick-app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 2px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--w11-text);
  font-size: 11px;
}

html:not(.shell-mobile) #os.theme-windows .w11-wb-body .bsw-quick-app:hover {
  background: var(--w11-subtle-hover);
}

html:not(.shell-mobile) #os.theme-windows .w11-wb-body .bsw-quick-icon .icon {
  width: 32px !important;
  height: 32px !important;
}

html:not(.shell-mobile) #os.theme-windows .w11-wb-body .bsw-quick-name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html:not(.shell-mobile) #os.theme-windows .w11-wb-body .bsw-empty {
  margin: 4px 0 0;
  color: var(--w11-text-2);
  font-size: 13px;
}

html:not(.shell-mobile) #os.theme-windows .w11-wb-body .bsw-add-title {
  margin: 8px 0;
  font-size: 14px;
  font-weight: 600;
}

html:not(.shell-mobile) #os.theme-windows .w11-wb-body .bsw-add-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
