html, body { width: 100%; height: 100%; overflow: hidden; background: transparent; user-select: none; cursor: default; }

/* size presets: --dh dock height, --th tile height, 1em inside tiles = 10px at "m" */
:root { --dh: 56px; --th: 44px; --gap: 5px; --pad: 6px; --gapEdge: 6px; --fs: 10px; }
[data-size="s"]  { --dh: 48px; --th: 38px; --pad: 5px; --gap: 4px; --fs: 8.64px; }
[data-size="l"]  { --dh: 66px; --th: 52px; --pad: 7px; --gap: 6px; --fs: 11.8px; }
[data-size="xl"] { --dh: 76px; --th: 60px; --pad: 8px; --gap: 7px; --fs: 13.6px; }
:root { --tr: calc(var(--th) * .26); }

#stage { position: fixed; inset: 0; pointer-events: none; }

/* ---------------- dock ---------------- */
.dock {
  /* left:0 + right:0 + auto margins centers a fit-content box without the 50%-width cap of left:50% */
  position: absolute;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: fit-content;
  bottom: var(--gapEdge);
  height: var(--dh);
  min-width: calc(var(--dh) * 2);
  max-width: calc(100vw - 24px);
  border-radius: calc(var(--dh) * .34);
  pointer-events: auto;
  isolation: isolate;
  color: var(--fg);
  font-size: var(--fs);
  transition: border-radius .3s var(--ease);
}
[data-pos="top"] .dock { bottom: auto; top: var(--gapEdge); }
[data-align="left"] .dock { margin-left: 12px; }
[data-align="right"] .dock { margin-right: 12px; }
[data-shape="full"] .dock { width: 100vw; max-width: none; margin: 0; border-radius: 0; bottom: 0; }
[data-shape="full"][data-pos="top"] .dock { top: 0; }

.dock-inner {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--gap);
  padding: 0 var(--pad);
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-width: none;
}
.dock-inner::-webkit-scrollbar { display: none; }
[data-shape="full"] .dock-inner { justify-content: center; }
[data-shape="full"][data-align="left"] .dock-inner { justify-content: flex-start; }
[data-shape="full"][data-align="right"] .dock-inner { justify-content: flex-end; }
.dock-inner > .spacer { flex: 1; }

/* ------- the liquid glass ------- */
.glass { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; z-index: -1; pointer-events: none; }
.glass .refr {
  position: absolute; inset: 0;
  background-repeat: no-repeat;
  will-change: transform;
}
.glass .tint { position: absolute; inset: 0; }
.glass .rim  { position: absolute; inset: 0; border-radius: inherit; }
.glass .sheen { position: absolute; inset: 0; border-radius: inherit; }
.dock::after { /* outer shadow, outside the glass clip */
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -2; pointer-events: none;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .55), 0 2px 6px rgba(0, 0, 0, .25);
}
[data-shape="full"] .dock::after { box-shadow: 0 -1px 0 rgba(0,0,0,.2); }

/* Glass – dark tinted liquid glass (default) */
[data-style="glass"] .refr { filter: url(#liquid) saturate(1.5) brightness(.78) contrast(1.05); }
[data-style="glass"] .tint { background: linear-gradient(180deg, rgba(18, 20, 26, .42), rgba(8, 9, 12, .55)); }
[data-style="glass"] .rim { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16), inset 0 1px 0 rgba(255, 255, 255, .28), inset 0 -1px 0 rgba(255, 255, 255, .06); }
[data-style="glass"] .sheen { background: radial-gradient(120% 140% at 15% -30%, rgba(255,255,255,.16), transparent 55%), radial-gradient(90% 120% at 100% 130%, rgba(255,255,255,.08), transparent 60%); }

/* iOS Glass – clear, bright, heavier refraction */
[data-style="ios"] .refr { filter: url(#liquid-strong) saturate(1.9) brightness(1.08); }
[data-style="ios"] .tint { background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .06)); }
[data-style="ios"] .rim { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .32), inset 0 1.5px 0 rgba(255, 255, 255, .6), inset 0 -1px 1px rgba(255, 255, 255, .2); }
[data-style="ios"] .sheen { background: linear-gradient(115deg, rgba(255,255,255,.28) 0%, rgba(255,255,255,0) 32%, rgba(255,255,255,0) 70%, rgba(255,255,255,.14) 100%); }
[data-style="ios"] .dock { text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
[data-style="ios"] { --tile: rgba(255,255,255,.14); --tile-b: rgba(255,255,255,.2); --tile-hover: rgba(255,255,255,.22); }

/* White – frosted white */
[data-style="white"] .refr { filter: url(#frost) saturate(1.3) brightness(1.15); }
[data-style="white"] .tint { background: rgba(250, 250, 252, .8); }
[data-style="white"] .rim { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .9), inset 0 0 0 1.5px rgba(0, 0, 0, .05); }
[data-style="white"] .dock::after { box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .35), 0 1px 3px rgba(0, 0, 0, .15); }

/* Midnight – deep blue */
[data-style="midnight"] .refr { filter: url(#frost) saturate(1.4) brightness(.6); }
[data-style="midnight"] .tint { background: linear-gradient(180deg, rgba(14, 24, 58, .74), rgba(6, 10, 30, .84)); }
[data-style="midnight"] .rim { box-shadow: inset 0 0 0 1px rgba(120, 150, 255, .2), inset 0 1px 0 rgba(160, 190, 255, .28); }
[data-style="midnight"] { --tile: rgba(130, 160, 255, .08); --tile-b: rgba(140, 170, 255, .1); --tile-hover: rgba(140, 170, 255, .16); }

/* Black – solid */
[data-style="black"] .refr { display: none; }
[data-style="black"] .tint { background: #0a0a0b; }
[data-style="black"] .rim { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }

/* Clear – refraction only */
[data-style="clear"] .refr { filter: url(#liquid-strong) saturate(1.2); }
[data-style="clear"] .tint { background: rgba(0, 0, 0, .08); }
[data-style="clear"] .rim { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22), inset 0 1px 0 rgba(255, 255, 255, .4); }
[data-style="clear"] .dock { text-shadow: 0 1px 3px rgba(0, 0, 0, .5); }
[data-style="clear"] { --tile: rgba(255, 255, 255, .07); --tile-b: rgba(255,255,255,.16); --tile-hover: rgba(255,255,255,.14); }

/* Rosé — pastel blush, light scheme with pink-tinted tokens */
[data-style="rose"] .refr { filter: url(#frost) saturate(1.2) brightness(1.15); }
[data-style="rose"] .tint { background: linear-gradient(180deg, rgba(255, 240, 245, .86), rgba(252, 228, 237, .9)); }
[data-style="rose"] .rim { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .95), inset 0 0 0 1.5px rgba(214, 120, 155, .14); }
[data-style="rose"] .dock::after { box-shadow: 0 10px 30px -10px rgba(150, 60, 95, .35), 0 1px 3px rgba(150, 60, 95, .15); }
[data-style="rose"] {
  --fg: #4a2333; --fg2: rgba(90, 35, 60, .6); --fg3: rgba(90, 35, 60, .38);
  --tile: rgba(236, 140, 175, .13); --tile-b: rgba(220, 120, 160, .12); --tile-hover: rgba(236, 140, 175, .22); --tile-hl: rgba(255, 255, 255, .75);
  --track: rgba(200, 90, 135, .16); --sep: rgba(200, 90, 135, .14);
  --panel: rgba(255, 246, 249, .985); --panel-b: rgba(220, 120, 160, .16);
  --panel-tile: #fde8ef; --panel-tile-b: rgba(220, 120, 160, .1); --panel-hover: rgba(236, 140, 175, .14);
  --input: rgba(236, 140, 175, .12); --chip: rgba(236, 140, 175, .16);
  --dot: rgba(200, 90, 135, .2); --dot-on: #d6517f;
  --shadow: 0 24px 60px -12px rgba(150, 60, 95, .3), 0 4px 14px rgba(150, 60, 95, .1);
  --blue: #e0679a; --teal: #f08bb4; --pink: #e0558a;
}
:root[data-style="rose"] .slider:not(.blue)::-webkit-slider-thumb { box-shadow: -400px 0 0 400px #d6517f; }

/* Gamer — near-black with a neon edge in the accent color you pick */
:root { --accent: #ff2d55; }
[data-style="gamer"] .refr { display: none; }
[data-style="gamer"] .tint { background: linear-gradient(180deg, rgba(20, 18, 24, .96), rgba(10, 9, 13, .98)), radial-gradient(120% 160% at 50% 140%, color-mix(in srgb, var(--accent) 35%, transparent), transparent 60%); background-blend-mode: screen; }
[data-style="gamer"] .rim { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 70%, transparent), inset 0 1px 0 rgba(255, 255, 255, .08); }
[data-style="gamer"] .sheen { background: linear-gradient(90deg, transparent 0%, color-mix(in srgb, var(--accent) 22%, transparent) 50%, transparent 100%) top / 100% 1px no-repeat; }
[data-style="gamer"] .dock::after { box-shadow: 0 0 18px -2px color-mix(in srgb, var(--accent) 55%, transparent), 0 10px 30px -10px rgba(0, 0, 0, .7); }
[data-style="gamer"] {
  --tile: rgba(255, 255, 255, .05); --tile-b: rgba(255, 255, 255, .07); --tile-hover: color-mix(in srgb, var(--accent) 16%, rgba(255, 255, 255, .05));
  --panel: rgba(16, 14, 20, .985); --panel-b: color-mix(in srgb, var(--accent) 45%, transparent);
  --panel-tile: rgba(255, 255, 255, .045); --panel-tile-b: rgba(255, 255, 255, .06); --panel-hover: color-mix(in srgb, var(--accent) 14%, transparent);
  --blue: var(--accent); --dot-on: var(--accent);
  --mb-bg: rgba(12, 11, 15, .96); --mb-b: color-mix(in srgb, var(--accent) 40%, transparent);
}
[data-style="gamer"] .app.active { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 55%, transparent); }
[data-style="gamer"] .panel { box-shadow: 0 0 0 1px var(--panel-b), 0 0 30px -6px color-mix(in srgb, var(--accent) 40%, transparent), var(--shadow); }
[data-style="gamer"] .gmode.on .gm-b { background: var(--accent); box-shadow: 0 0 .9em var(--accent); }

/* ---------------- items ---------------- */
.item {
  position: relative;
  flex: none;
  height: var(--th);
  display: flex;
  align-items: center;
  border-radius: var(--tr);
  transition: transform .22s var(--spring), background-color .15s, opacity .2s;
  transform-origin: 50% 100%;
}
[data-pos="top"] .item { transform-origin: 50% 0; }
.item.enter { animation: item-in .45s var(--spring) both; }
@keyframes item-in { from { opacity: 0; transform: scale(.6); } }
.anim-off .item, .anim-off .item.enter { animation: none !important; transition: none !important; }

.item.press { transform: scale(.93) !important; transition-duration: .08s; }
.item.dragging { opacity: .35; }
.item.drop-before::before, .item.drop-after::after {
  content: ""; position: absolute; top: 10%; bottom: 10%; width: 3px; border-radius: 3px; background: var(--blue);
}
.item.drop-before::before { left: calc(var(--gap) / -2 - 1.5px); }
.item.drop-after::after { right: calc(var(--gap) / -2 - 1.5px); }

.tile {
  height: var(--th);
  border-radius: var(--tr);
  background: var(--tile);
  box-shadow: inset 0 0 0 1px var(--tile-b);
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
  transition: background-color .15s;
}
.item:hover > .tile { background: var(--tile-hover); }
.tile.sq { width: var(--th); justify-content: center; }
:where(.tile.pad) { padding: 0 1.1em; gap: .9em; } /* zero specificity: a widget's own padding/gap wins */
.tile.flat { background: transparent; box-shadow: none; }

/* group separator */
.sep { width: 1px; height: calc(var(--th) * .55); background: var(--sep); flex: none; margin: 0 2px; }

/* ---------------- apps ---------------- */
.apps { display: flex; align-items: center; gap: var(--gap); height: 100%; }
.app {
  position: relative; width: var(--th); height: var(--th); flex: none;
  display: grid; place-items: center; border-radius: var(--tr);
  transition: transform .22s var(--spring), background-color .15s;
  transform-origin: 50% 100%;
}
[data-pos="top"] .app { transform-origin: 50% 0; }
.app:hover { background: var(--tile-hover); }
.hover-mag .app:hover { transform: scale(1.12) translateY(-2px); }
.hover-mag[data-pos="top"] .app:hover { transform: scale(1.12) translateY(2px); }
.app.active { background: var(--tile); box-shadow: inset 0 0 0 1px var(--tile-b); }
.app .ico { width: 64%; height: 64%; display: grid; place-items: center; pointer-events: none; }
.app img { width: 100%; height: 100%; object-fit: contain; display: block; filter: drop-shadow(0 1px 1.5px rgba(0,0,0,.25)); }
.app .ph { width: 100%; height: 100%; border-radius: 22%; background: var(--track); display: grid; place-items: center; font-weight: 700; font-size: 1.4em; color: var(--fg2); }
.app .dots { position: absolute; bottom: 1px; left: 50%; transform: translateX(-50%); display: flex; gap: 2px; }
[data-pos="top"] .app .dots { bottom: auto; top: 1px; }
.app .dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--fg2); }
.app.active .dots i:first-child { background: var(--blue); width: 10px; border-radius: 3px; }
.app.flash { animation: bounce 1s var(--ease) 3; }
.app.flash .dots i { background: var(--orange) !important; }
.app.launching img { animation: launch .9s var(--ease) 2; }
@keyframes bounce { 0%, 100% { transform: none; } 30% { transform: translateY(-28%); } 55% { transform: translateY(0); } 70% { transform: translateY(-10%); } }
@keyframes launch { 0%, 100% { transform: none; opacity: 1; } 50% { transform: translateY(-14%); opacity: .7; } }
.app .badge { position: absolute; top: 1px; right: 1px; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 8px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; }

/* ---------------- tooltip ---------------- */
.tip {
  position: absolute; z-index: 50; pointer-events: none;
  padding: 5px 10px; border-radius: 9px; font-size: 12px; font-weight: 550; white-space: nowrap;
  background: var(--panel); color: var(--fg); box-shadow: var(--shadow); border: 1px solid var(--panel-b);
  opacity: 0; transform: translateY(4px) scale(.96); transition: opacity .14s, transform .18s var(--ease);
  max-width: 420px; overflow: hidden; text-overflow: ellipsis;
}
.tip.show { opacity: 1; transform: none; }

/* ---------------- window previews (live DWM thumbnails are drawn into .slot) ---------------- */
.thumbs {
  position: absolute; z-index: 45; pointer-events: auto; display: flex; gap: 6px; padding: 6px;
  background: var(--panel); color: var(--fg); border: 1px solid var(--panel-b); border-radius: 16px; box-shadow: var(--shadow);
  font-size: 12px; opacity: 0; transition: opacity .12s; /* no transform: thumbnails are placed at fixed pixels */
}
.thumbs.show { opacity: 1; }
.tcard { display: flex; flex-direction: column; gap: 6px; padding: 6px 6px 7px; border-radius: 11px; cursor: default; }
.tcard:hover { background: var(--panel-hover); }
.tcard.act .th span { font-weight: 650; }
.tcard .th { display: flex; align-items: center; gap: 7px; height: 20px; padding: 0 2px; max-width: 216px; }
.tcard .th img { width: 16px; height: 16px; object-fit: contain; flex: none; }
.tcard .th span { flex: 1; min-width: 0; }
.tcard .tx { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; flex: none; opacity: 0; color: var(--fg2); }
.tcard:hover .tx { opacity: 1; }
.tcard .tx:hover { background: var(--red); color: #fff; }
.tcard .slot { border-radius: 6px; background: rgba(127, 127, 127, .08); }

/* ---------------- panels ---------------- */
.panel {
  position: absolute; z-index: 40; pointer-events: auto;
  background: var(--panel); color: var(--fg);
  border: 1px solid var(--panel-b); border-radius: 22px; box-shadow: var(--shadow);
  font-size: 13px;
  transform-origin: var(--ox, 50%) 100%;
  animation: panel-in .32s var(--spring) both;
  overflow: hidden;
}
[data-pos="top"] .panel { transform-origin: var(--ox, 50%) 0; }
.panel.closing { animation: panel-out .16s var(--ease) both; }
@keyframes panel-in { from { opacity: 0; transform: translateY(10px) scale(.94); } }
@keyframes panel-out { to { opacity: 0; transform: translateY(6px) scale(.97); } }
.anim-off .panel { animation: none; }
.panel-body { padding: 16px; max-height: calc(100vh - var(--dh) - 40px); overflow-y: auto; }
.panel h3 { margin: 0 0 12px; font-size: 15px; font-weight: 650; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.panel h3 .sub { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--fg2); }
.panel .muted { color: var(--fg2); }
.panel .row { display: flex; align-items: center; gap: 10px; }
.panel .card { background: var(--panel-tile); border: 1px solid var(--panel-tile-b); border-radius: 14px; padding: 12px; }
.panel .list { display: flex; flex-direction: column; gap: 2px; }
.panel .li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; min-height: 36px; }
.panel .li:hover { background: var(--panel-hover); }
.panel .li img { width: 20px; height: 20px; object-fit: contain; }
.panel .li .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel .li .r { color: var(--fg2); font-variant-numeric: tabular-nums; }
.panel .btn { height: 32px; padding: 0 14px; border-radius: 10px; background: var(--input); font-weight: 550; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.panel .btn:hover { background: var(--panel-hover); filter: brightness(1.1); }
.panel .btn.primary { background: var(--blue); color: #fff; }
.panel .btn.danger { color: var(--red); }
.panel .btn.round { width: 36px; height: 36px; padding: 0; border-radius: 50%; }
.panel input[type=text], .panel input[type=number], .panel input[type=time], .panel textarea, .panel select {
  background: var(--input); border: 1px solid transparent; border-radius: 10px; padding: 8px 11px; outline: none; width: 100%;
}
.panel input:focus, .panel textarea:focus { border-color: var(--blue); }
.panel textarea { resize: none; min-height: 160px; line-height: 1.5; }
.panel .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.panel .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.panel .stat { font-size: 26px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.panel .empty { padding: 20px; text-align: center; color: var(--fg2); }
.panel .hint { font-size: 11.5px; color: var(--fg3); margin-top: 10px; }
.panel .seg { display: inline-flex; background: var(--input); border-radius: 10px; padding: 3px; gap: 2px; }
.panel .seg button { height: 26px; padding: 0 10px; border-radius: 8px; font-weight: 550; color: var(--fg2); }
.panel .seg button.on { background: var(--panel); color: var(--fg); box-shadow: 0 1px 3px rgba(0,0,0,.15); }

/* range slider */
.slider { -webkit-appearance: none; appearance: none; width: 100%; height: 30px; border-radius: 10px; background: var(--input); overflow: hidden; outline: none; }
.slider::-webkit-slider-thumb { -webkit-appearance: none; width: 0; height: 30px; box-shadow: -400px 0 0 400px var(--fg); }
[data-scheme="light"] .slider::-webkit-slider-thumb { box-shadow: -400px 0 0 400px #1c1c1e; }
.slider.blue::-webkit-slider-thumb { box-shadow: -400px 0 0 400px var(--blue); }

/* ---------------- context menu ---------------- */
.menu { position: absolute; z-index: 60; pointer-events: auto; min-width: 210px; padding: 6px; border-radius: 14px; background: var(--panel); color: var(--fg); border: 1px solid var(--panel-b); box-shadow: var(--shadow); font-size: 13px; animation: panel-in .2s var(--ease) both; }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; height: 32px; padding: 0 10px; border-radius: 8px; text-align: left; white-space: nowrap; }
.menu button:hover { background: var(--blue); color: #fff; }
.menu button.danger { color: var(--red); }
.menu button.danger:hover { background: var(--red); color: #fff; }
.menu button svg { width: 16px; height: 16px; opacity: .8; }
.menu hr { border: 0; height: 1px; background: var(--sep); margin: 5px 6px; }
.menu .hdr { padding: 6px 10px 4px; font-size: 11px; font-weight: 600; color: var(--fg3); text-transform: uppercase; letter-spacing: .04em; }

/* ---------------- toasts ---------------- */
.toasts { position: absolute; right: 12px; bottom: calc(var(--dh) + var(--gapEdge) + 10px); display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; z-index: 70; }
[data-pos="top"] .toasts { bottom: auto; top: calc(var(--dh) + var(--gapEdge) + 10px); }
.toast { pointer-events: auto; width: 360px; position: relative; padding: 14px 40px 14px 16px; border-radius: 18px; background: var(--panel); color: var(--fg); border: 1px solid var(--panel-b); box-shadow: var(--shadow); animation: toast-in .4s var(--spring) both; }
.toast.out { animation: toast-out .25s var(--ease) both; }
.toast b { display: block; font-size: 13.5px; font-weight: 650; }
.toast span { display: block; font-size: 12px; color: var(--fg2); margin-top: 3px; }
.toast .x { position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: var(--fg3); }
.toast .x:hover { background: var(--panel-hover); color: var(--fg); }
.toast .acts { display: flex; gap: 6px; margin-top: 10px; }
.toast .acts button { height: 28px; padding: 0 12px; border-radius: 8px; background: var(--input); font-size: 12px; font-weight: 600; }
.toast .acts button.primary { background: var(--blue); color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translateX(30px) scale(.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(30px); } }

/* edit mode */
.editing .item { animation: wiggle .3s ease-in-out infinite alternate; }
.editing .item:nth-child(2n) { animation-delay: -.15s; }
@keyframes wiggle { from { transform: rotate(-1.2deg); } to { transform: rotate(1.2deg); } }
.editing .item .rm { display: grid; }
.item .rm { display: none; position: absolute; top: -5px; left: -5px; width: 18px; height: 18px; border-radius: 50%; background: #3a3a3c; color: #fff; place-items: center; z-index: 3; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.item .rm svg { width: 10px; height: 10px; }
.edit-done { position: absolute; pointer-events: auto; z-index: 45; height: 30px; padding: 0 14px; border-radius: 15px; background: var(--blue); color: #fff; font-size: 12.5px; font-weight: 650; box-shadow: var(--shadow); }

.dock button:focus, .dock button:focus-visible, .panel button:focus { outline: none; }

/* wallpaper strip that hides Windows' own taskbar while we press its Start button */
.barcover { position: absolute; left: 0; right: 0; bottom: 0; height: 90px; background-color: #000; background-repeat: no-repeat; pointer-events: none; }

/* widgets that hide themselves (e.g. mini player while nothing plays) keep their slot and fold away */
.item.collapsed { width: 0 !important; min-width: 0; margin-right: calc(var(--gap) * -1); opacity: 0; transform: scale(.6); pointer-events: none; overflow: hidden; }
.item { transition: transform .22s var(--spring), background-color .15s, opacity .2s, width .25s var(--ease), margin .25s var(--ease); }

/* auto-hide: slide away, an invisible strip at the screen edge brings the dock back */
.edge-trigger { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; pointer-events: auto; display: none; }
[data-pos="top"] .edge-trigger { bottom: auto; top: 0; }
.autohide .edge-trigger { display: block; }
.autohide .dock { transition: transform .28s var(--ease), opacity .22s, border-radius .3s var(--ease); }
.autohide.dock-away .dock { transform: translateY(calc(100% + var(--gapEdge) + 12px)); opacity: 0; pointer-events: none; }
[data-pos="top"].autohide.dock-away .dock { transform: translateY(calc(-100% - var(--gapEdge) - 12px)); }
.autohide.dock-away .toasts { bottom: 12px; }

/* auto-hide mini status bar: a thin phone-like strip while the dock is away */
:root { --mbh: 24px; --mb-bg: rgba(14, 15, 19, .9); --mb-b: rgba(255, 255, 255, .08); }
[data-scheme="light"] { --mb-bg: rgba(248, 248, 250, .92); --mb-b: rgba(0, 0, 0, .07); }
[data-style="midnight"] { --mb-bg: rgba(8, 13, 36, .92); --mb-b: rgba(140, 170, 255, .14); }
[data-style="black"] { --mb-bg: #0a0a0b; }
[data-style="rose"] { --mb-bg: rgba(253, 234, 241, .95); --mb-b: rgba(214, 120, 155, .2); }
.minibar {
  position: absolute; left: 0; right: 0; bottom: 0; height: var(--mbh);
  display: none; align-items: center; justify-content: space-between; padding: 0 12px;
  background: var(--mb-bg); box-shadow: inset 0 1px 0 var(--mb-b);
  color: var(--fg); font-size: 11.5px; font-weight: 600; letter-spacing: .01em;
  backdrop-filter: blur(20px) saturate(1.4);
  pointer-events: auto; z-index: 1;
}
[data-mbpos="top"] .minibar { bottom: auto; top: 0; box-shadow: inset 0 -1px 0 var(--mb-b); }
.minibar-on .minibar { display: flex; }
.minibar { transition: opacity .22s, transform .26s var(--ease); }
.minibar-on:not(.mb-show) .minibar { opacity: 0; pointer-events: none; transform: translateY(100%); }
[data-mbpos="top"].minibar-on:not(.mb-show) .minibar { transform: translateY(-100%); }
/* on the dock's edge the strip is the trigger; the dock keeps its edge gap and floats over it */
.minibar-on .dock { z-index: 2; }
.minibar-on.mb-same .edge-trigger { display: none; }
.minibar .mb-l, .minibar .mb-r { display: flex; align-items: center; gap: 10px; min-width: 0; }
.minibar .mb-l { flex: 1; }
.minibar .mb-date { color: var(--fg2); font-weight: 500; }
.minibar svg { width: 14px; height: 14px; }
.minibar .mb-net { display: flex; align-items: center; gap: 5px; color: var(--fg2); font-weight: 500; }
.minibar .mb-net svg { color: var(--fg); }
.minibar .mb-net .off { opacity: .4; }
.minibar .mb-ssid { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.minibar .mb-bat { display: flex; align-items: center; gap: 4px; }
.minibar .mb-bat svg.mb-bsvg { width: 22px; height: 11px; }
.minibar .mb-bat .ic { width: 10px; height: 10px; color: var(--green); }
.minibar .mb-pw { display: grid; place-items: center; width: 20px; height: 18px; border-radius: 6px; color: var(--fg2); margin-right: -4px; }
.minibar .mb-pw:hover { background: var(--tile-hover); color: var(--red); }
.autohide.mb-same.dock-away .toasts { bottom: calc(var(--mbh) + 10px); }

/* mini bar unread badges */
.minibar .mb-n { display: none; align-items: center; gap: 4px; height: calc(var(--mbh) - 4px); padding: 0 4px; margin-left: -2px; }
.minibar .mb-n.has { display: flex; }
.minibar .mb-n .nbi { position: relative; display: grid; place-items: center; width: 22px; height: 18px; border-radius: 6px; }
.minibar .mb-n .nbi:hover { background: var(--tile-hover); }
.minibar .mb-n .nbi img, .minibar .mb-n .nbi svg { width: 14px; height: 14px; object-fit: contain; }
.minibar .mb-n .nbi i { position: absolute; font-style: normal; background: var(--red); color: #fff; border-radius: 8px; box-shadow: 0 0 0 1.5px var(--mb-bg); }
.minibar .mb-n .nbi i.num { right: 0; top: 1px; min-width: 9px; height: 9px; padding: 0 2px; font-size: 6.5px; font-weight: 800; line-height: 9px; text-align: center; box-shadow: 0 0 0 1px var(--mb-bg); }
.minibar .mb-n .nbi i.dot { right: 2px; top: 2px; width: 5px; height: 5px; box-shadow: 0 0 0 1px var(--mb-bg); }

.minibar .mb-bt { display: flex; color: var(--fg); margin-right: -4px; }
.minibar .mb-bt:empty { display: none; }
/* unread badge on dock app icons */
.app .bdg { display: none; position: absolute; font-style: normal; background: var(--red); color: #fff; pointer-events: none; z-index: 2; box-shadow: 0 0 0 1.5px rgba(0,0,0,.25); }
.app .bdg.num { display: block; top: 3px; right: 3px; min-width: 13px; height: 13px; padding: 0 3px; border-radius: 7px; font-size: 8.5px; font-weight: 700; line-height: 13px; text-align: center; }
.app .bdg.dot { display: block; top: 3px; right: 3px; width: 8px; height: 8px; border-radius: 50%; }
