#taskbar {
  background: linear-gradient(var(--taskbar-1), var(--taskbar-2));
  border-top: 1px solid var(--taskbar-top-line);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 4px 6px;
  color: var(--color-white);
  min-height: 34px;
  position: relative;
  z-index: 40;
}

html:not(.shell-vista) #clock,
html:not(.shell-vista) #taskbar-brand {
  color: var(--ui-btn-text, var(--text-primary));
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}

#start-btn {
  background: linear-gradient(var(--titlebar-1), var(--titlebar-2));
  color: var(--color-white);
  border-top: 1px solid var(--surface-highlight);
  border-left: 1px solid var(--surface-highlight);
  border-right: 1px solid var(--border-hot);
  border-bottom: 1px solid var(--border-hot);
  border-radius: 16px;
  font-weight: 700;
  font-style: italic;
  padding: 5px 16px;
  text-transform: lowercase;
  cursor: pointer;
  text-shadow: 0 1px 0 var(--overlay-shadow);
}

#start-btn:active,
#start-btn.active {
  border-top-color: var(--border-hot);
  border-left-color: var(--border-hot);
  border-right-color: var(--surface-highlight);
  border-bottom-color: var(--surface-highlight);
  background: linear-gradient(var(--titlebar-2), var(--titlebar-1));
}

#taskbar-windows {
  display: flex;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  padding: 1px;
}

.taskbar-btn {
  flex: 0 1 auto;
  min-width: 38px;
  max-width: 160px;
  width: auto;
  height: 26px;
  background: linear-gradient(var(--task-btn-top), var(--task-btn-bottom));
  color: var(--ui-btn-text, var(--text-primary));
  border-top: 1px solid var(--surface-window-alt);
  border-left: 1px solid var(--surface-window-alt);
  border-right: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-strong);
  padding: 0 8px;
  gap: 6px;
  font-size: 11px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  border-radius: 3px;
}

.taskbar-btn-icon {
  font-size: 14px;
  line-height: 1;
}

.taskbar-btn-icon-img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  image-rendering: pixelated;
}

.taskbar-btn-label {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}



.taskbar-btn.active {
  background: linear-gradient(var(--task-btn-active-top), var(--task-btn-active-bottom));
  border-top-color: var(--border-strong);
  border-left-color: var(--border-strong);
  border-right-color: var(--surface-window-alt);
  border-bottom-color: var(--surface-window-alt);
}

.taskbar-preview {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 2600;
  width: 220px;
  pointer-events: none;
}

.taskbar-preview.hidden {
  display: none;
}

.taskbar-preview-glass {
  border: 1px solid var(--border-strong);
  background: var(--surface-window);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.36);
  padding: 7px;
}

.taskbar-preview-header {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  margin-bottom: 7px;
}

.taskbar-preview-icon,
.taskbar-preview-icon-img {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.taskbar-preview-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.taskbar-preview-icon-img {
  object-fit: contain;
  image-rendering: pixelated;
}

.taskbar-preview-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.taskbar-preview-copy strong,
.taskbar-preview-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.taskbar-preview-copy strong {
  font-size: 12px;
  color: var(--text-primary);
}

.taskbar-preview-copy span {
  font-size: 10px;
  color: var(--text-muted);
}

.taskbar-preview-thumb {
  height: 92px;
  border: 1px solid var(--divider);
  background: var(--surface-window-soft);
  overflow: hidden;
}

.taskbar-preview-thumb-bar {
  height: 16px;
  background: linear-gradient(var(--titlebar-1), var(--titlebar-2));
}

.taskbar-preview-thumb-body {
  height: calc(100% - 16px);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.48) 0 34%, transparent 34%),
    linear-gradient(var(--surface-panel-top), var(--surface-panel-bottom));
}

#taskbar-right {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

#taskbar-brand {
  font-size: 11px;
  font-weight: 700;
  color: var(--taskbar-brand-text);
  text-shadow: 0 1px 0 var(--overlay-shadow);
  white-space: nowrap;
}

#taskbar-tray-buttons {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

#clock {
  font-size: 11px;
  padding: 2px 8px;
  border-top: 1px solid var(--overlay-card);
  border-left: 1px solid var(--overlay-card);
  border-right: 1px solid var(--overlay-card-border);
  border-bottom: 1px solid var(--overlay-card-border);
  background: var(--clock-bg);
  min-height: 30px;
  min-width: 72px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.05;
}

#clock .clock-time {
  font-weight: 700;
}

#clock .clock-date {
  font-size: 10px;
  opacity: 0.95;
}

#start-menu {
  position: absolute;
  left: 8px;
  bottom: 36px;
  width: 420px;
  border-top: 1px solid var(--accent-fill);
  border-left: 1px solid var(--accent-fill);
  border-right: 1px solid var(--startmenu-border-dark);
  border-bottom: 1px solid var(--startmenu-border-dark);
  border-radius: 7px 7px 0 0;
  overflow: hidden;
  background: var(--surface-window-soft);
  box-shadow: 0 10px 30px var(--startmenu-shadow);
  z-index: 1200;
}

.start-menu-top {
  background: linear-gradient(var(--titlebar-1), var(--titlebar-2));
  color: var(--color-white);
  padding: 10px 14px;
  font-size: 16px;
  font-weight: 700;
  text-shadow: 0 1px 0 var(--title-shadow-strong);
}

.start-menu-body {
  display: grid;
  grid-template-columns: 1fr 0.95fr;
  min-height: 280px;
}

.start-col {
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.start-col-left {
  background: var(--startmenu-col-left, var(--color-white));
  border-right: 1px solid var(--startmenu-divider);
}

.start-col-right {
  background: var(--startmenu-col-right);
}

.start-item {
  border: none;
  background: transparent;
  text-align: left;
  font-size: 12px;
  padding: 7px 8px;
  color: var(--text-accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.start-item img,
.start-footer-btn img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  image-rendering: pixelated;
}

.start-item.secondary {
  color: var(--text-muted);
}

.start-item:hover {
  background: linear-gradient(var(--titlebar-1), var(--titlebar-2));
  color: var(--color-white);
}

.start-item[hidden] {
  display: none;
}

.start-menu-footer {
  background: linear-gradient(var(--titlebar-2), var(--startmenu-footer-bottom));
  padding: 7px;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.start-menu-search {
  padding: 6px 7px;
  background: var(--startmenu-col-right);
  border-top: 1px solid var(--startmenu-divider);
}

#start-search {
  width: 100%;
  height: 25px;
  border: 1px solid var(--border-strong);
  background: var(--color-white);
  color: var(--text-primary);
  font: inherit;
  padding: 3px 8px;
  outline: none;
}

#start-search:focus-visible {
  border-color: var(--accent-stroke);
  box-shadow: 0 0 0 1px var(--accent-soft);
}

.start-footer-btn {
  background: linear-gradient(var(--surface-panel-top), var(--surface-panel-bottom));
  color: var(--text-primary);
  border-top: 1px solid var(--color-white);
  border-left: 1px solid var(--color-white);
  border-right: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-strong);
  padding: 4px 9px;
  font-size: 11px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.start-footer-btn:active {
  border-top-color: var(--border-strong);
  border-left-color: var(--border-strong);
  border-right-color: var(--color-white);
  border-bottom-color: var(--color-white);
}

/* Start button glyph/label, user picture, All Programs (index.html) */
#start-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.start-glyph {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.start-menu-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.start-user-picture {
  width: 40px;
  height: 40px;
  border-radius: 3px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  flex: 0 0 auto;
}

.start-col-left {
  position: relative;
}

.start-all-programs {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-top: 1px solid var(--startmenu-divider);
  background: transparent;
  color: var(--text-accent);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 8px 4px;
  cursor: pointer;
}

.start-all-arrow {
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 7px solid currentColor;
}

.start-all-heading {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 4px 8px;
}

.start-all-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.start-all-list[hidden] {
  display: none;
}

/* Default (classic + Vista): the list replaces the pinned items in place. */
#start-menu.show-all-programs .start-col-left > .start-item {
  display: none;
}
