/* =================================================
   TASKBAR — pure ink-black + tray + start menu
   ================================================= */
.taskbar {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: var(--ink);
  color: var(--paper);
  border-top: 2px solid var(--accent);
  padding: 0 8px;
  display: flex; align-items: center; gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  z-index: 100;
  height: var(--taskbar-h);
}
.taskbar .start {
  display: flex; align-items: center; gap: 6px;
  background: var(--accent); color: var(--ink);
  padding: 0 10px;
  height: 38px;
  font-family: 'Raster Forge', 'Press Start 2P', monospace;
  font-size: 14px;
  letter-spacing: 0.5px;
}
.taskbar .start .start-logo {
  width: 22px; height: 22px;
  object-fit: contain; flex-shrink: 0;
  image-rendering: pixelated;
}
.taskbar .start:hover { background: var(--hover); }
.taskbar .start.open { background: var(--hover); }

.taskbar .search-btn {
  width: 34px; height: 34px;
  background: transparent;
  border: 1.5px solid var(--paper);
  color: var(--paper);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 14px;
}
.taskbar .search-btn .btn-ico { width: 18px; height: 18px; background-color: var(--paper); -webkit-mask-image: var(--icon); mask-image: var(--icon); -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; -webkit-mask-size: contain; mask-size: contain; display: block; }
.taskbar .search-btn:hover { background: rgba(255,255,255,0.1); border-color: var(--accent); color: var(--accent); }
.taskbar .search-btn:hover .btn-ico { background-color: var(--accent); }
.taskbar .search-btn.active { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.taskbar .search-btn.active .btn-ico { background-color: var(--ink); }

/* Apps launcher button */
.taskbar .apps-btn {
  width: 38px; height: 38px;
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.25);
  color: var(--paper);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.taskbar .apps-btn:hover { background: rgba(255,255,255,0.1); border-color: var(--accent); color: var(--accent); }
.taskbar .apps-btn.active { background: var(--accent); color: var(--ink); border-color: var(--accent); }

/* ===== APP LAUNCHER OVERLAY ===== */
.app-launcher-overlay {
  position: fixed;
  bottom: var(--taskbar-h);
  left: 0;
  background: var(--ink);
  border: 2px solid var(--accent);
  border-bottom: 0;
  z-index: 95;
  display: none;
  padding: 14px;
  gap: 12px;
  grid-template-columns: repeat(3, 1fr);
  width: 452px;
}
.app-launcher-overlay.open { display: grid; }

.al-tile {
  height: 120px;
  background: rgba(255,255,255,0.04);
  border: 2px solid var(--al-c, var(--paper));
  color: var(--al-c, var(--paper));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; cursor: pointer; padding: 10px 6px;
  transition: background 0.12s, transform 0.08s;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 700; letter-spacing: 0.6px;
  text-transform: uppercase;
}
.al-tile:hover { background: color-mix(in srgb, var(--al-c, var(--paper)) 18%, transparent); transform: translateY(-2px); }
.al-tile:active { transform: translateY(0); }
.al-ico { width: 54px; height: 54px; display: flex; align-items: center; justify-content: center; }
.al-ico-img {
  width: 50px; height: 50px; display: block;
  background-color: var(--al-c, var(--paper));
  -webkit-mask-image: var(--icon); mask-image: var(--icon);
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
}
.al-tile[data-app="tech"] .al-ico-img { width: 42px; height: 42px; } /* wide monitor — size down */
.al-lbl { text-align: center; line-height: 1.25; }
.al-tile-ll { --al-c: var(--accent); }

.taskbar .tasks { display: flex; gap: 4px; flex: 1; overflow: hidden; align-items: center; }
/* Task windows — icon only */
.taskbar .task {
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  border: 1.5px solid var(--paper);
  color: var(--paper);
  height: 34px;
  font-size: 10px;
  white-space: nowrap; letter-spacing: 1px;
}
.taskbar .task-icon {
  width: 34px; padding: 0;
}
.taskbar .task-icon .t-ico {
  width: 22px; height: 22px; display: block;
  background-color: var(--paper);
  -webkit-mask-image: var(--icon); mask-image: var(--icon);
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
}
/* Tech Terminal is a wide monitor — size it down so it doesn't fill the button */
.taskbar .task-icon[data-app="tech"] .t-ico { width: 18px; height: 18px; }
.taskbar .task:hover .t-ico,
.taskbar .task.active .t-ico { background-color: var(--accent); }
.taskbar .task-icon .t-letter { font-weight: 700; font-size: 14px; }
/* Cat-app — text button with colored outline */
.taskbar .task-app {
  padding: 0 12px;
  border: 1.5px solid currentColor;
  font-weight: 700;
}
.taskbar .task:hover { background: rgba(255,255,255,0.08); }
.taskbar .task.active { background: rgba(255,255,255,0.12); }
.taskbar .task-app.active { background: rgba(255,255,255,0.1); }
.taskbar .task.min { opacity: 0.5; }

/* ===== AVERY TUNES MINIPLAYER — always-on, sits left of the tray ===== */
.taskbar .now-playing {
  display: flex; align-items: center; gap: 0; flex-shrink: 0;
  border: 1.5px solid var(--primary);
  height: 30px; margin-right: 6px;
  color: var(--primary);
}
.taskbar .now-playing .np-btn {
  background: transparent; border: 0; color: var(--primary);
  cursor: pointer; height: 100%; padding: 0 7px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; line-height: 1; flex-shrink: 0;
  transition: background 0.1s, color 0.1s;
}
.taskbar .now-playing .np-btn:hover { background: var(--primary); color: var(--ink); }
.taskbar .now-playing .np-play { font-size: 13px; }
.taskbar .now-playing .np-text {
  max-width: 132px; min-width: 56px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.5px;
  padding: 0 9px;
  border-left: 1.5px solid rgba(22,224,224,0.4);
  border-right: 1.5px solid rgba(22,224,224,0.4);
}
.taskbar .now-playing .np-expand { font-size: 13px; }

.taskbar .tray {
  display: flex; align-items: center; gap: 2px;
  padding-left: 10px;
  border-left: 1.5px solid rgba(255,255,255,0.25);
  height: 100%;
}
.taskbar .tray-btn {
  background: transparent; border: 0;
  color: var(--paper);
  padding: 4px 4px;
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; letter-spacing: 1px;
  cursor: pointer; height: 100%;
}
.taskbar .tray-btn:hover { background: rgba(255,255,255,0.1); color: var(--hover); }
.taskbar .tray-btn .tray-svg { width: 18px; height: 18px; color: var(--accent); display: block; }
.taskbar .tray-btn:hover .tray-svg { color: var(--hover); }
.taskbar .tray-btn .btn-ico { width: 20px; height: 20px; background-color: var(--accent); -webkit-mask-image: var(--icon); mask-image: var(--icon); -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; -webkit-mask-size: contain; mask-size: contain; display: block; }
.taskbar .tray-btn:hover .btn-ico { background-color: var(--hover); }
.taskbar .tray-btn.muted .btn-ico { background-color: var(--paper); opacity: 0.5; }
.taskbar .tray .weather {
  display: flex; align-items: center;
  line-height: 1; padding: 0 4px; cursor: pointer;
}
.taskbar .tray .weather:hover .w-svg,
.taskbar .tray .weather:hover strong { color: var(--hover); }
.taskbar .tray .weather strong { font-family: 'VT323', monospace; font-size: 26px; color: var(--accent); }
.taskbar .tray .weather .w-row {
  display: flex; align-items: center; gap: 6px; line-height: 1;
}
.taskbar .tray .weather .w-svg { width: 22px; height: 22px; color: var(--accent); flex-shrink: 0; }
.taskbar .tray .clock-cell {
  display: flex; flex-direction: column; align-items: flex-end;
  line-height: 1; font-size: 9px; padding: 0 4px; cursor: pointer;
}
.taskbar .tray .clock-cell strong {
  font-family: 'VT323', monospace; font-size: 18px;
  letter-spacing: 1.5px; color: var(--paper);
}
.taskbar .tray .clock-cell span { font-size: 8px; opacity: 0.65; margin-top: 1px; }

/* ===== START MENU ===== */
.start-menu {
  position: fixed;
  bottom: var(--taskbar-h);
  left: 0;
  width: 580px;
  background: var(--ink);
  color: var(--paper);
  border: 2px solid var(--accent);
  border-bottom: 0;
  z-index: 90;
  display: none;
}
.start-menu.open { display: block; }
.start-menu .top {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: var(--accent);
  color: var(--ink);
}
.start-menu .top .avatar {
  width: 36px; height: 36px;
  background: var(--ink); border: 2px solid var(--ink);
  font-family: 'Geologica', sans-serif; font-weight: 900;
  font-size: 16px; color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.start-menu .top .name {
  font-family: 'Geologica', sans-serif; font-weight: 900;
  font-size: 16px; line-height: 1;
}
.start-menu .top .role { font-size: 9px; letter-spacing: 1.5px; margin-top: 3px; opacity: 0.7; }
.start-menu .cols { display: grid; grid-template-columns: 1fr 1fr; padding: 8px; gap: 12px; }
.start-menu .col h5 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 6px; text-transform: uppercase;
}
.start-menu .col .item {
  display: grid; grid-template-columns: 32px 1fr auto;
  gap: 8px; align-items: center;
  padding: 5px 6px; cursor: pointer; font-size: 13px;
  border-bottom: 1px dotted rgba(198,245,66,0.15);
}
.start-menu .col .item:hover { background: rgba(198,245,66,0.12); }
.start-menu .col .item .ico {
  width: 30px; height: 30px;
  border: 1.5px solid var(--ink); overflow: hidden;
  background: var(--cat, var(--accent));
}
.start-menu .col .item .ico img { width: 100%; height: 100%; object-fit: cover; display: block; }
.start-menu .col .item .ico .btn-ico { width: 100%; height: 100%; background-color: var(--ink); -webkit-mask-image: var(--icon); mask-image: var(--icon); -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; -webkit-mask-size: contain; mask-size: contain; display: block; }
.start-menu .col .item .name { font-weight: 700; }
.start-menu .col .item .meta { font-size: 9px; opacity: 0.55; letter-spacing: 1px; }
.start-menu .footer {
  border-top: 2px solid var(--accent);
  display: flex; font-size: 10px; letter-spacing: 1.5px;
}
.start-menu .footer button {
  flex: 1; background: transparent;
  border: 0; border-right: 1px dashed var(--accent);
  color: var(--paper); padding: 8px; text-transform: uppercase;
}
.start-menu .footer button:last-child { border-right: 0; }
.start-menu .footer button:hover { background: var(--accent); color: var(--ink); }

/* ── Taskbar pins (kids' top-5 favorite sites) ─────────────────────────────── */
.pins { display: flex; align-items: center; gap: 4px; margin-left: 2px; }
.pin-btn {
  width: 30px; height: 30px; padding: 2px;
  display: flex; align-items: center; justify-content: center;
  background: var(--ink); border: 2px solid var(--cat, var(--accent));
  cursor: pointer; color: var(--paper);
}
.pin-btn img { width: 100%; height: 100%; object-fit: contain; }
.pin-btn svg { width: 16px; height: 16px; fill: var(--cat, var(--accent)); }
.pin-btn:hover { background: var(--cat, var(--accent)); }
.pin-btn:hover svg { fill: var(--ink); }
.pin-letter { font-family: Geologica, sans-serif; font-weight: 900; font-size: 13px; color: var(--cat, var(--accent)); }
.pin-btn:hover .pin-letter { color: var(--ink); }
.pin-unpin-pop {
  position: fixed; z-index: 9000;
  background: var(--hover); color: #fff;
  border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink);
  font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 11px;
  padding: 6px 10px; cursor: pointer;
}
