/* ====================================================================
   PedroOS 95 — Authentic Windows 95 Desktop & Application Stylesheet
   ==================================================================== */

:root {
  --win-teal: #008080;
  --win-silver: #c0c0c0;
  --win-dark-gray: #808080;
  --win-light-gray: #dfdfdf;
  --win-black: #000000;
  --win-white: #ffffff;
  --win-navy: #000080;
  --win-active-title: #000080;
  --win-inactive-title: #808080;
  --taskbar-height: 28px;
  --cursor-arrow: url('/PedroOS/assets/cursors/arrow.png') 1 1, url('/PedroOS/assets/cursors/arrow.cur') 1 1, default;
  --cursor-link: url('/PedroOS/assets/cursors/link.png') 6 1, url('/PedroOS/assets/cursors/link.cur') 6 1, pointer;
  --cursor-text: url('/PedroOS/assets/cursors/text.png') 8 11, url('/PedroOS/assets/cursors/text.cur') 8 11, text;
  --cursor-wait: url('/PedroOS/assets/cursors/wait.png') 9 12, url('/PedroOS/assets/cursors/wait.cur') 9 12, wait;
  --cursor-move: url('/PedroOS/assets/cursors/move.png') 15 15, url('/PedroOS/assets/cursors/move.cur') 15 15, move;
  --cursor-size-ew: url('/PedroOS/assets/cursors/size-ew.png') 15 15, url('/PedroOS/assets/cursors/size-ew.cur') 15 15, ew-resize;
  --cursor-size-ns: url('/PedroOS/assets/cursors/size-ns.png') 15 15, url('/PedroOS/assets/cursors/size-ns.cur') 15 15, ns-resize;
  --cursor-size-nwse: url('/PedroOS/assets/cursors/size-nwse.png') 15 15, url('/PedroOS/assets/cursors/size-nwse.cur') 15 15, nwse-resize;
  --cursor-size-nesw: url('/PedroOS/assets/cursors/size-nesw.png') 15 15, url('/PedroOS/assets/cursors/size-nesw.cur') 15 15, nesw-resize;
}

*, *::before, *::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: "Pixelated MS Sans Serif", Arial, sans-serif;
  font-size: 11px;
  background-color: var(--win-teal);
  color: var(--win-black);
  cursor: var(--cursor-arrow);
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: grayscale;
}

/* Boot stays above the SSR desktop until the client has finished starting. */
body:has(#boot-screen:not([hidden])) #desktop { visibility: hidden; }
.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 200000;
  background: #000;
  color: #c0c0c0;
  outline: none;
  cursor: var(--cursor-arrow);
}
.boot-console {
  padding: 16px;
  visibility: hidden;
  font: 400 16px/16px "PedroOS VGA", monospace;
  font-synthesis: none;
  font-kerning: none;
  font-variant-ligatures: none;
}
.boot-screen[data-boot-font-ready] .boot-console { visibility: visible; }
.boot-console pre {
  background: transparent;
  color: inherit;
  border: 0;
  box-shadow: none;
  margin: 0;
  padding: 0;
  font: inherit;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.boot-cursor { animation: boot-blink 1s steps(1) infinite; }
.boot-splash {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.boot-artwork { position: relative; width: min(100%, 960px, calc((100dvh - 8px) * 4 / 3)); }
.boot-artwork img { display: block; width: 100%; height: auto; }
.boot-loading { height: 8px; background: #b6c8dc; overflow: hidden; }
.boot-loading span {
  display: block;
  width: 28%;
  height: 100%;
  background: repeating-linear-gradient(90deg, #008080 0 7px, #000080 7px 10px);
  animation: boot-sweep 2.2s linear infinite;
}
@media (max-width: 480px) { .boot-console { padding: 8px; } }
@keyframes boot-blink { 50% { opacity: 0; } }
@keyframes boot-sweep { from { transform: translateX(-100%); } to { transform: translateX(460%); } }
@media (prefers-reduced-motion: reduce) {
  .boot-cursor, .boot-loading span { animation: none; }
  .boot-loading span { width: 100%; }
}

/* Screen reader only utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Pixel art images */
.pixel-icon {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  flex-shrink: 0;
  object-fit: contain;
}

/* Native cursors keep correct hotspots without a JavaScript mouse overlay. */
button, select, input[type="button"], input[type="submit"], input[type="checkbox"],
input[type="radio"], input[type="range"], label[for] { cursor: var(--cursor-arrow); }
a[href], [role="link"] { cursor: var(--cursor-link); }
a.desktop-icon { cursor: var(--cursor-arrow); }
input:not([type]), input[type="text"], input[type="search"], input[type="email"],
input[type="url"], input[type="password"], input[type="number"], textarea,
[contenteditable="true"] { cursor: var(--cursor-text); }
:disabled, [aria-disabled="true"] { cursor: var(--cursor-arrow); }
.win95-loading, .win95-loading *, [aria-busy="true"], [aria-busy="true"] * { cursor: var(--cursor-wait); }
.desktop.is-window-interacting, .desktop.is-window-interacting * {
  cursor: var(--interaction-cursor) !important;
}
.desktop:has(.explorer-splitter.dragging), .desktop:has(.explorer-splitter.dragging) * {
  cursor: var(--cursor-size-ew) !important;
}

/* 3D Sunken Panel */
.sunken-panel {
  background: var(--win-white);
  box-shadow: inset -1px -1px var(--win-white), inset 1px 1px var(--win-black),
              inset -2px -2px var(--win-light-gray), inset 2px 2px var(--win-dark-gray);
}

.inset-panel {
  background: var(--win-silver);
  box-shadow: inset -1px -1px var(--win-white), inset 1px 1px var(--win-black),
              inset -2px -2px var(--win-light-gray), inset 2px 2px var(--win-dark-gray);
}

/* ====================================================================
   Desktop Shell
   ==================================================================== */
.desktop {
  position: relative;
  width: 100vw;
  height: 100vh;
  background-color: var(--win-teal);
  overflow: hidden;
}

/* Desktop Icons Grid */
.desktop-icons {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 12px 14px;
  height: calc(100vh - var(--taskbar-height) - 16px);
  z-index: 5;
  pointer-events: auto;
}

.desktop-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 76px;
  padding: 4px 2px;
  background: transparent;
  border: 1px dotted transparent;
  color: var(--win-white);
  text-decoration: none;
  cursor: var(--cursor-arrow);
  user-select: none;
  text-align: center;
}

.desktop-icon:hover {
  border-color: transparent;
}

.desktop-icon.selected,
.desktop-icon:focus-visible {
  outline: none;
  border-color: transparent;
}

.desktop-icon.selected .desktop-icon-label,
.desktop-icon:focus-visible .desktop-icon-label {
  background-color: var(--win-navy);
  color: var(--win-white);
}

.desktop-icon-label {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.2;
  word-break: normal;
  overflow-wrap: normal;
  padding: 1px 3px;
  text-shadow: 1px 1px var(--win-black);
}

/* ====================================================================
   Windows Layer
   ==================================================================== */
.desktop-windows {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: var(--taskbar-height);
  pointer-events: none;
  overflow: hidden;
}

.os-window {
  position: absolute;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  min-width: 240px;
  min-height: 140px;
  max-width: 100vw;
  max-height: calc(100vh - var(--taskbar-height));
  box-shadow: inset -1px -1px var(--win-black), inset 1px 1px var(--win-light-gray),
              inset -2px -2px var(--win-dark-gray), inset 2px 2px var(--win-white);
  background: var(--win-silver);
  padding: 3px;
}

.os-window.minimized {
  display: none !important;
}

.os-window.maximized {
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: calc(100vh - var(--taskbar-height)) !important;
  max-width: 100vw !important;
  max-height: calc(100vh - var(--taskbar-height)) !important;
}

.title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--win-navy);
  color: var(--win-white);
  padding: 2px 3px;
  user-select: none;
  cursor: var(--cursor-arrow);
}

.title-bar.inactive {
  background: var(--win-inactive-title);
  color: var(--win-light-gray);
}

.title-bar-text {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: bold;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 8px;
}

.title-bar-controls {
  display: flex;
  gap: 2px;
}

.title-bar-controls button {
  min-width: 16px;
  height: 14px;
  padding: 0;
}

.os-window-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin: 2px 0 0 0;
  overflow: hidden;
  background: var(--win-silver);
}

/* ====================================================================
   Taskbar
   ==================================================================== */
.taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--taskbar-height);
  background: var(--win-silver);
  box-shadow: inset 0 1px var(--win-white), inset 0 2px var(--win-light-gray);
  border-top: 1px solid var(--win-light-gray);
  display: flex;
  align-items: center;
  padding: 2px 3px;
  z-index: 1000;
  user-select: none;
}

.start-button {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 2px 6px;
  font-weight: bold;
  font-size: 11px;
  box-shadow: inset -1px -1px var(--win-black), inset 1px 1px var(--win-white),
              inset -2px -2px var(--win-dark-gray), inset 2px 2px var(--win-light-gray);
}

.start-button:active,
.start-button.active {
  box-shadow: inset 1px 1px var(--win-black), inset -1px -1px var(--win-white),
              inset 2px 2px var(--win-dark-gray), inset -2px -2px var(--win-light-gray);
  padding: 3px 5px 1px 7px;
}

.taskbar-divider {
  width: 2px;
  height: 18px;
  margin: 0 4px;
  border-left: 1px solid var(--win-dark-gray);
  border-right: 1px solid var(--win-white);
}

.taskbar-windows {
  flex: 1;
  display: flex;
  gap: 3px;
  overflow-x: auto;
  overflow-y: hidden;
  height: 24px;
}

.taskbar-item {
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: 160px;
  min-width: 80px;
  height: 22px;
  padding: 2px 4px;
  background: var(--win-silver);
  font-size: 11px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  box-shadow: inset -1px -1px var(--win-black), inset 1px 1px var(--win-white),
              inset -2px -2px var(--win-dark-gray), inset 2px 2px var(--win-light-gray);
}

.taskbar-item.active {
  background: var(--win-light-gray);
  box-shadow: inset 1px 1px var(--win-black), inset -1px -1px var(--win-white),
              inset 2px 2px var(--win-dark-gray), inset -2px -2px var(--win-light-gray);
  font-weight: bold;
}

.taskbar-item-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.taskbar-tray {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 6px;
  margin-left: 4px;
  box-shadow: inset -1px -1px var(--win-white), inset 1px 1px var(--win-dark-gray);
  background: var(--win-silver);
}

.tray-icon-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: var(--cursor-arrow);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  box-shadow: none;
}

.taskbar-clock {
  font-size: 11px;
  color: var(--win-black);
  min-width: 32px;
  text-align: center;
}

/* ====================================================================
   Start Menu
   ==================================================================== */
.start-menu {
  position: fixed;
  bottom: var(--taskbar-height);
  left: 2px;
  width: 180px;
  display: flex;
  padding: 2px;
  z-index: 1001;
  background: var(--win-silver);
  box-shadow: inset -1px -1px var(--win-black), inset 1px 1px var(--win-white),
              inset -2px -2px var(--win-dark-gray), inset 2px 2px var(--win-light-gray);
}

.start-menu-banner {
  width: 24px;
  background: var(--win-navy);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 8px;
}

.start-menu-banner-text {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: var(--win-white);
  font-size: 14px;
  letter-spacing: 1px;
}

.start-menu-list {
  flex: 1;
  list-style: none;
  margin: 0;
  padding: 2px 0;
}

.start-menu-item {
  position: relative;
}

.start-menu-trigger,
.start-menu-action {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  background: transparent;
  border: none;
  text-align: left;
  font-size: 11px;
  color: var(--win-black);
  text-decoration: none;
  cursor: var(--cursor-arrow);
  box-shadow: none;
  min-width: 0;
  min-height: 26px;
}

.start-menu-trigger:hover,
.start-menu-action:hover,
.start-menu-trigger:focus,
.start-menu-action:focus {
  background: var(--win-navy);
  color: var(--win-white);
  outline: none;
  box-shadow: none;
}

.start-menu-trigger:active, .start-menu-action:active,
.context-menu-item, .context-menu-item:focus, .context-menu-item:active,
.win95-dropdown-item:active, .win95-dropdown-item:focus { box-shadow: none; }

.start-menu-arrow {
  margin-left: auto;
  font-size: 10px;
}

.start-menu-separator {
  height: 2px;
  margin: 3px 2px;
  border-top: 1px solid var(--win-dark-gray);
  border-bottom: 1px solid var(--win-white);
}

/* Submenu */
.start-submenu {
  display: none;
  position: absolute;
  left: 100%;
  top: -3px;
  width: 190px;
  list-style: none;
  margin: 0;
  padding: 2px 0;
  z-index: 1002;
  background: var(--win-silver);
  box-shadow: inset -1px -1px var(--win-black), inset 1px 1px var(--win-white),
              inset -2px -2px var(--win-dark-gray), inset 2px 2px var(--win-light-gray);
}

.start-menu-item.has-submenu:hover > .start-submenu,
.start-menu-item.has-submenu:focus-within > .start-submenu {
  display: block;
}

/* ====================================================================
   Desktop Context Menu
   ==================================================================== */
.context-menu {
  position: fixed;
  width: 160px;
  padding: 2px 0;
  z-index: 2000;
  background: var(--win-silver);
  box-shadow: inset -1px -1px var(--win-black), inset 1px 1px var(--win-white),
              inset -2px -2px var(--win-dark-gray), inset 2px 2px var(--win-light-gray);
}

.context-menu-item {
  width: 100%;
  display: block;
  padding: 4px 12px;
  background: transparent;
  border: none;
  text-align: left;
  font-size: 11px;
  color: var(--win-black);
  cursor: var(--cursor-arrow);
}

.context-menu-item:hover,
.context-menu-item:focus {
  background: var(--win-navy);
  color: var(--win-white);
  outline: none;
}

.context-menu-separator {
  height: 2px;
  margin: 2px 1px;
  border-top: 1px solid var(--win-dark-gray);
  border-bottom: 1px solid var(--win-white);
}

/* ====================================================================
   Common App Shell & Toolbars
   ==================================================================== */
.app-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--win-silver);
}

.win95-menubar {
  display: flex;
  gap: 2px;
  padding: 1px 2px;
  border-bottom: 1px solid var(--win-dark-gray);
  box-shadow: 0 1px 0 var(--win-white);
  user-select: none;
  background: var(--win-silver);
  position: relative;
  z-index: 100;
}

.win95-menubar > .win95-menu-item, .ie-menu { position: relative; font-size: 11px; padding: 0; }
.win95-menubar > span.win95-menu-item { padding: 3px 7px; }
.win95-menu-btn {
  display: block;
  background: transparent;
  border: 1px solid transparent;
  box-shadow: none;
  min-width: 0;
  min-height: 0;
  padding: 2px 7px;
  font-family: inherit;
  font-size: 11px;
  line-height: 16px;
  text-shadow: none;
  color: var(--win-black);
  white-space: nowrap;
}
.win95-menu-btn:hover, .win95-menu-btn.active, .win95-menu-btn[aria-expanded="true"] {
  background: var(--win-navy);
  color: var(--win-white);
  box-shadow: none;
}
.win95-menubar .win95-menu-btn:active { box-shadow: none; text-shadow: none; }
.win95-menu-btn u, .win95-dropdown-item u { border-color: currentColor; }
.win95-menu-btn:focus-visible { outline: 1px dotted currentColor; outline-offset: -3px; }
.win95-menu-dropdown, .classic-menu-popup {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 195px;
  max-width: calc(100vw - 12px);
  width: max-content;
  background: var(--win-silver);
  padding: 3px;
  z-index: 1000;
  box-shadow: inset -1px -1px var(--win-black), inset 1px 1px var(--win-white),
              inset -2px -2px var(--win-dark-gray), inset 2px 2px var(--win-light-gray);
  list-style: none;
  margin: 0;
  overflow-y: auto;
  box-sizing: border-box;
}
.classic-menu-popup[hidden], .win95-menu-dropdown[hidden] { display: none; }
.win95-menu-dropdown.open, .classic-menu-popup.open { display: block; }
.win95-menu-dropdown > li { padding: 0; margin: 0; list-style: none; }
.win95-dropdown-item, .ie-menu-popup > button {
  width: 100%;
  display: block;
  min-width: 0;
  min-height: 22px;
  line-height: 16px;
  text-shadow: none;
  padding: 3px 24px;
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  font-family: inherit;
  font-size: 11px;
  color: var(--win-black);
  text-align: left;
  white-space: nowrap;
  position: relative;
  box-sizing: border-box;
}
.win95-dropdown-item.has-check::before, .ie-menu-popup [aria-checked="true"]::before {
  content: "✓";
  position: absolute;
  left: 7px;
  font-weight: bold;
}
.win95-menu-dropdown > .win95-dropdown-separator { margin: 3px 2px; }
.win95-dropdown-item > .pixel-icon { position: absolute; left: 4px; top: 3px; }
.win95-dropdown-item:hover:not(:disabled), .win95-dropdown-item:focus:not(:disabled),
.ie-menu-popup > button:hover:not(:disabled), .ie-menu-popup > button:focus-visible:not(:disabled) {
  background: var(--win-navy);
  color: var(--win-white);
  box-shadow: none;
  outline: none;
}
.win95-dropdown-item:disabled {
  background: transparent;
  color: var(--win-dark-gray);
  text-shadow: 1px 1px 0 var(--win-white);
}
.win95-dropdown-item .shortcut-key { float: right; margin-left: 28px; font-size: 11px; color: inherit; }

.win95-dropdown-separator {
  height: 2px;
  margin: 2px 1px;
  border-top: 1px solid var(--win-dark-gray);
  border-bottom: 1px solid var(--win-white);
}

.win95-toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px 4px;
  border-bottom: 1px solid var(--win-dark-gray);
  box-shadow: 0 1px 0 var(--win-white);
  background: var(--win-silver);
  overflow-x: auto;
  min-height: 28px;
}

.toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 2px 5px;
  font-family: inherit;
  font-size: 11px;
  background: var(--win-silver);
  border: none;
  min-width: 0;
  min-height: 0;
  color: var(--win-black);
  cursor: var(--cursor-arrow);
  user-select: none;
  text-decoration: none;
  box-shadow: inset -1px -1px var(--win-black), inset 1px 1px var(--win-white),
              inset -2px -2px var(--win-dark-gray), inset 2px 2px var(--win-light-gray);
}

.toolbar-btn:active:not(:disabled),
.toolbar-btn.active {
  box-shadow: inset 1px 1px var(--win-black), inset -1px -1px var(--win-white),
              inset 2px 2px var(--win-dark-gray), inset -2px -2px var(--win-light-gray);
  background: var(--win-light-gray);
  padding: 3px 4px 1px 6px;
}

.toolbar-btn:disabled {
  color: var(--win-dark-gray);
  text-shadow: 1px 1px 0 var(--win-white);
  box-shadow: inset -1px -1px var(--win-dark-gray), inset 1px 1px var(--win-light-gray);
  opacity: 0.65;
  cursor: var(--cursor-arrow);
}

.toolbar-btn:disabled img {
  opacity: 0.5;
  filter: grayscale(100%);
}

.toolbar-sep {
  width: 2px;
  height: 20px;
  margin: 0 3px;
  border-left: 1px solid var(--win-dark-gray);
  border-right: 1px solid var(--win-white);
  flex-shrink: 0;
}

.win95-addressbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 6px;
  border-bottom: 1px solid var(--win-dark-gray);
  box-shadow: 0 1px 0 var(--win-white);
  background: var(--win-silver);
}

.addressbar-label {
  font-size: 11px;
  color: var(--win-black);
  user-select: none;
}

.addressbar-combobox {
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--win-white);
  height: 22px;
  box-shadow: inset 1px 1px var(--win-black), inset -1px -1px var(--win-white),
              inset 2px 2px var(--win-dark-gray), inset -2px -2px var(--win-light-gray);
  padding: 1px 4px;
}

.addressbar-icon {
  margin-right: 4px;
  flex-shrink: 0;
}

.addressbar-field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  height: 20px;
  background: var(--win-white);
  overflow: hidden;
  white-space: nowrap;
}

.addressbar-input {
  flex: 1;
  height: 18px;
  padding: 1px 4px;
  font-family: inherit;
  font-size: 11px;
  border: none;
  outline: none;
  background: transparent;
  color: var(--win-black);
}

.addressbar-go {
  height: 22px;
  padding: 2px 10px;
  font-family: inherit;
  font-size: 11px;
  min-width: 0;
  min-height: 0;
}

.status-bar {
  display: flex;
  gap: 2px;
  margin-top: auto;
  padding: 2px 3px;
  border-top: 1px solid var(--win-white);
  background: var(--win-silver);
  user-select: none;
}

.status-bar-field {
  margin: 0;
  padding: 2px 6px;
  font-size: 11px;
  background: var(--win-silver);
  box-shadow: inset 1px 1px var(--win-dark-gray), inset -1px -1px var(--win-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 18px;
  line-height: 14px;
}

.status-bar-field:first-child {
  flex: 1.5;
}

.status-bar-field:nth-child(2) {
  flex: 1;
}

.status-bar-field:last-child {
  min-width: 100px;
}

/* ====================================================================
   Windows Explorer App
   ==================================================================== */
.explorer-split {
  flex: 1;
  display: flex;
  min-height: 0;
  gap: 0;
  padding: 3px;
  background: var(--win-silver);
  position: relative;
  overflow: hidden;
}

.explorer-tree-pane {
  width: 200px;
  min-width: 120px;
  max-width: 450px;
  overflow-y: auto;
  overflow-x: auto;
  padding: 4px;
  background: var(--win-white);
  flex-shrink: 0;
  user-select: none;
}

.explorer-splitter {
  width: 5px;
  background: var(--win-silver);
  cursor: var(--cursor-size-ew);
  position: relative;
  flex-shrink: 0;
  user-select: none;
  box-shadow: inset 1px 0 var(--win-white), inset -1px 0 var(--win-dark-gray);
}

.explorer-splitter:hover,
.explorer-splitter.dragging {
  background: var(--win-dark-gray);
}

.explorer-files-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--win-white);
  min-width: 0;
}

.explorer-pane-header {
  font-size: 11px;
  font-weight: bold;
  padding: 2px 4px;
  background: var(--win-silver);
  border-bottom: 1px solid var(--win-dark-gray);
  box-shadow: 0 1px 0 var(--win-white);
  flex-shrink: 0;
}

.explorer-tree {
  list-style: none;
  margin: 0;
  padding: 2px 0 2px 4px;
  font-size: 11px;
}

.explorer-tree ul {
  list-style: none;
  margin: 0;
  padding-left: 16px;
  position: relative;
}

.explorer-tree ul::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 8px;
  left: 6px;
  border-left: 1px dotted var(--win-dark-gray);
}

.explorer-tree li {
  position: relative;
  margin: 1px 0;
}

.explorer-tree li::before {
  content: "";
  position: absolute;
  top: 9px;
  left: -10px;
  width: 9px;
  border-top: 1px dotted var(--win-dark-gray);
}

.tree-row {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  cursor: var(--cursor-arrow);
  white-space: nowrap;
}

.tree-expander {
  width: 9px;
  height: 9px;
  border: 1px solid var(--win-dark-gray);
  background: var(--win-white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  line-height: 7px;
  cursor: var(--cursor-arrow);
  user-select: none;
  margin-right: 2px;
  color: var(--win-black);
}

.tree-expander.empty {
  visibility: hidden;
}

.explorer-tree-btn {
  background: none;
  border: 1px dotted transparent;
  padding: 1px 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: var(--cursor-arrow);
  font-size: 11px;
  color: var(--win-black);
  min-width: 0;
  min-height: 0;
  font-family: inherit;
  text-align: left;
}

.explorer-tree-btn:hover {
  border-color: var(--win-dark-gray);
}

.explorer-tree-btn.selected,
.explorer-tree-btn:focus-visible {
  background: var(--win-navy);
  color: var(--win-white);
  border-color: var(--win-white);
  outline: none;
}

/* Explorer items area */
.explorer-items-viewport {
  flex: 1;
  overflow-y: auto;
  overflow-x: auto;
  padding: 4px;
  background: var(--win-white);
  outline: none;
}

/* 1. Large Icons View */
.explorer-items.view-large-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: flex-start;
}

.explorer-items.view-large-icons .explorer-item {
  width: 96px;
  min-height: 78px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: none;
  border: 1px dotted transparent;
  padding: 4px 2px;
  cursor: var(--cursor-arrow);
  text-align: center;
  user-select: none;
}

.explorer-items.view-large-icons .explorer-item-name {
  margin-top: 4px;
  font-size: 11px;
  word-break: normal;
  overflow-wrap: normal;
  padding: 1px 3px;
  line-height: 1.2;
}

.explorer-items.view-large-icons .explorer-item.selected {
  border-color: transparent;
}

.explorer-items.view-large-icons .explorer-item.selected .explorer-item-name {
  background: var(--win-navy);
  color: var(--win-white);
}

/* 2. Small Icons View */
.explorer-items.view-small-icons {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  align-content: start;
  gap: 2px 8px;
}

.explorer-items.view-small-icons .explorer-item {
  width: 160px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px dotted transparent;
  padding: 2px 4px;
  cursor: var(--cursor-arrow);
  text-align: left;
  user-select: none;
}

.explorer-items.view-small-icons .explorer-item.selected {
  background: var(--win-navy);
  color: var(--win-white);
  border-color: var(--win-white);
}

/* 3. List View */
.explorer-items.view-list {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 2px 12px;
  height: 100%;
}

.explorer-items.view-list .explorer-item {
  width: 140px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px dotted transparent;
  padding: 2px 4px;
  cursor: var(--cursor-arrow);
  text-align: left;
  user-select: none;
}

.explorer-items.view-list .explorer-item.selected {
  background: var(--win-navy);
  color: var(--win-white);
  border-color: var(--win-white);
}

/* 4. Details View */
.explorer-details-table,
.projects-details-table,
.find-table,
.ie-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  text-align: left;
}

.explorer-details-table thead,
.projects-details-table thead,
.find-table thead,
.ie-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
}

.explorer-details-table th,
.projects-details-table th,
.find-table th,
.ie-table th {
  background: var(--win-silver);
  box-shadow: inset -1px -1px var(--win-black), inset 1px 1px var(--win-white),
              inset -2px -2px var(--win-dark-gray), inset 2px 2px var(--win-light-gray);
  padding: 2px 8px;
  font-weight: normal;
  user-select: none;
  cursor: var(--cursor-arrow);
  white-space: nowrap;
}

.explorer-details-table th:active {
  box-shadow: inset 1px 1px var(--win-black), inset -1px -1px var(--win-white);
  padding: 3px 7px 1px 9px;
}

.sort-indicator {
  display: inline-block;
  margin-left: 4px;
  font-size: 8px;
}

.explorer-details-table td,
.projects-details-table td,
.find-table td,
.ie-table td {
  padding: 2px 8px;
  border-bottom: 1px solid #f0f0f0;
  white-space: nowrap;
}

.explorer-row {
  cursor: var(--cursor-arrow);
  user-select: none;
}

.explorer-row:hover {
  background: #f4f4f4;
}

.explorer-row.selected {
  background: var(--win-navy) !important;
  color: var(--win-white) !important;
}

.explorer-row.selected td {
  color: var(--win-white) !important;
}

.explorer-row-name-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Explorer Context Menu */
.explorer-context-menu {
  position: absolute;
  width: 170px;
  padding: 2px 0;
  z-index: 3000;
  background: var(--win-silver);
  box-shadow: inset -1px -1px var(--win-black), inset 1px 1px var(--win-white),
              inset -2px -2px var(--win-dark-gray), inset 2px 2px var(--win-light-gray);
}

/* ====================================================================
   Projects.exe & Project Details
   ==================================================================== */
.project-details-app { min-height: 0; min-width: 0; }
.project-details-app [hidden] { display: none !important; }
.project-details-app > .win95-toolbar { padding: 3px 4px; gap: 3px; flex-wrap: wrap; }
.project-details-app > .win95-toolbar .toolbar-btn { min-height: 24px; height: auto; padding: 3px 6px; }
.project-details-body { flex: 1; min-height: 0; overflow: auto; margin: 3px; padding: 12px; line-height: 1.35; background: var(--win-silver); }
.project-content { width: 100%; max-width: 860px; margin: 0 auto; min-width: 0; }
.project-banner { display: flex; align-items: flex-start; gap: 12px; padding: 4px 5px 12px; margin-bottom: 10px; border-bottom: 1px solid #808080; box-shadow: 0 1px #fff; }
.project-banner-icon { margin-top: 2px; }
.project-banner-meta { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.project-banner-title { margin: 0; color: #000; font: bold 16px "Pixelated MS Sans Serif", Arial, sans-serif; line-height: 1.25; }
.project-banner-summary { margin: 6px 0 10px; font-size: 11px; line-height: 1.35; }
.project-properties { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 3px 12px; font-size: 11px; margin: 0; }
.project-properties dt, .project-properties dd { margin: 0; }
.project-grid-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.project-content .win95-fieldset { min-width: 0; margin: 8px 0; padding: 10px; background: var(--win-silver); font: inherit; }
.project-content .win95-fieldset legend { font-weight: normal; }
.project-content .win95-fieldset p { margin: 4px 0 8px; }
.project-content .win95-list li { margin-bottom: 5px; }
.project-technology-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); list-style: none; padding: 7px; margin: 0; background: #fff; gap: 4px 12px; }
.project-technology-list li { display: flex; align-items: center; gap: 6px; overflow-wrap: anywhere; min-width: 0; }
.project-footer-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; padding: 10px 0 2px; border-top: 1px solid #808080; box-shadow: inset 0 1px #fff; margin-top: 12px; }
.project-footer-links .button { display: inline-flex; align-items: center; min-height: 23px; padding: 4px 9px; box-sizing: border-box; }
.project-details-app > .status-bar .status-bar-field { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.win95-fieldset {
  margin: 6px 0;
  padding: 8px;
  border: 2px groove var(--win-white);
}

.win95-fieldset legend {
  font-weight: bold;
  padding: 0 4px;
}

.win95-callout {
  padding: 6px 8px;
  margin: 6px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.win95-callout-warning {
  background: #ffffe0;
  border: 1px solid #d4a017;
}

.project-gallery { padding: 0; background: var(--win-silver); }
.project-preview-stage { display: grid; place-items: center; background: #808080; min-height: 150px; padding: 6px; }
.project-preview-link { display: flex; align-items: center; justify-content: center; width: 100%; }
.project-preview-image { display: block; width: auto; height: auto; max-width: 100%; max-height: 260px; object-fit: contain; }
.project-preview-link:focus-visible { outline: 1px dotted var(--win-navy); outline-offset: 3px; }
.project-gallery-controls { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; padding-bottom: 6px; }
.project-gallery-navigation { display: flex; align-items: center; gap: 7px; }
.project-gallery-navigation button { min-width: 28px; padding: 0 6px; }
.project-gallery-navigation [data-project-counter] { min-width: 45px; text-align: center; }
.project-gallery-caption { margin: 5px 0; min-height: 16px; padding: 3px 5px; font-size: 11px; border: 1px solid; border-color: #808080 #fff #fff #808080; }
.project-thumbnails { display: flex; gap: 6px; justify-content: safe center; overflow-x: auto; padding: 4px 2px 6px; }
.project-thumbnail { flex: 0 0 88px; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 5px; }
.project-thumbnail img { display: block; width: 76px; height: 48px; object-fit: contain; background: #808080; }
.project-thumbnail span { font-size: 10px; }
.project-thumbnail[aria-pressed="true"] { background: #c0c0c0; outline: 1px dotted var(--win-navy); outline-offset: -4px; box-shadow: inset 1px 1px #000, inset -1px -1px #fff, inset 2px 2px #808080; }
.project-gallery-hint { font-size: 10px; color: #000; margin: 5px 0 0; }
.project-gallery-empty { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px; background: var(--win-silver); }
.project-gallery-empty p { margin: 8px 0; }
.project-gallery-empty span { flex-basis: 100%; font-size: 11px; }
.project-image-error { max-width: 400px; text-align: center; padding: 15px; line-height: 1.6; }
.project-image-viewer { position: fixed; inset: 0; margin: auto; padding: 3px; border: 0; width: min(1200px, calc(100vw - 24px)); height: min(850px, calc(100dvh - 60px)); max-width: none; max-height: none; background: var(--win-silver); box-sizing: border-box; color: #000; }
.project-image-viewer[open] { display: flex; flex-direction: column; gap: 3px; }
.project-image-viewer::backdrop { background: #0003; }
.project-image-viewer .title-bar { flex-shrink: 0; }
.project-viewer-toolbar { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; padding: 5px; flex-shrink: 0; }
.project-viewer-toolbar button, .project-viewer-toolbar .button { min-width: 0; padding: 3px 8px; min-height: 23px; box-sizing: border-box; }
.project-viewer-stage { flex: 1; min-height: 0; min-width: 0; display: flex; align-items: center; justify-content: center; padding: 8px; overflow: auto; background: #808080; }
.project-viewer-stage img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.project-image-viewer.is-original .project-viewer-stage { display: block; }
.project-image-viewer.is-original .project-viewer-stage img { max-width: none; max-height: none; margin: 0 auto; }
.project-image-viewer .status-bar { flex-shrink: 0; }
.project-image-viewer .status-bar-field { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.project-image-viewer .status-bar-field:first-child { flex: 1; }
.project-image-viewer .status-bar-field:last-child { flex: 0 0 auto; }
@media (max-width: 640px) {
  .project-details-body { padding: 9px; }
  .project-banner { padding: 3px 2px 10px; gap: 10px; }
  .project-banner-title { font-size: 14px; }
  .project-technology-list { grid-template-columns: minmax(0, 1fr); }
  .project-grid-two { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .project-preview-image { max-height: 240px; }
  .project-thumbnail { flex-basis: 72px; }
  .project-thumbnail img { width: 60px; height: 40px; }
  .project-image-viewer { width: calc(100vw - 12px); height: calc(100dvh - 46px); }
  .project-viewer-toolbar { gap: 4px; padding: 4px; }
  .project-viewer-toolbar .toolbar-sep { display: none; }
  .project-viewer-toolbar button, .project-viewer-toolbar .button { font-size: 10px; padding: 5px 6px; }
  .project-content .win95-fieldset { padding: 10px; }
}

/* ====================================================================
   WordPad (Resume.doc)
   ==================================================================== */
.resume-app {
  background: var(--win-silver);
}

.wordpad-ruler {
  background: var(--win-silver);
  border-bottom: 1px solid var(--win-dark-gray);
  box-shadow: 0 1px 0 var(--win-white);
  height: 18px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  color: var(--win-dark-gray);
  font-size: 9px;
  line-height: 16px;
  user-select: none;
  padding: 0 16px;
}

.wordpad-sheet {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  background: var(--win-dark-gray);
}

.wordpad-document {
  max-width: 680px;
  margin: 0 auto;
  font-family: Arial, "Helvetica Neue", sans-serif;
  font-size: 12px;
  line-height: 1.5;
  background: var(--win-white);
  padding: 24px 32px;
  box-shadow: 1px 1px 0 var(--win-black);
}

.resume-header {
  border-bottom: 2px solid var(--win-navy);
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.resume-name {
  margin: 0;
  font-size: 20px;
  color: var(--win-navy);
}

.resume-headline {
  margin: 4px 0;
  font-size: 13px;
  font-weight: bold;
}

.resume-section {
  margin-bottom: 16px;
}

.resume-section h3 {
  font-size: 13px;
  color: var(--win-navy);
  border-bottom: 1px solid var(--win-light-gray);
  padding-bottom: 2px;
  margin-bottom: 8px;
}

.resume-item {
  margin-bottom: 10px;
}

.win95-badge-placeholder {
  background: #ffff00;
  color: #c00000;
  font-weight: bold;
  padding: 1px 4px;
  font-size: 9px;
  border: 1px solid #c00000;
  margin-left: 6px;
}

/* ====================================================================
   System Properties
   ==================================================================== */
.sysprops-tabs,
.display-tabs {
  display: flex;
  list-style: none;
  margin: 4px 6px -1px 6px;
  padding: 0;
  gap: 0;
  position: relative;
  z-index: 10;
}

.sysprops-tabs li,
.display-tabs li {
  padding: 3px 10px;
  background: var(--win-silver);
  border-top-left-radius: 2px;
  border-top-right-radius: 2px;
  box-shadow: inset -1px 0 var(--win-black), inset 1px 1px var(--win-white),
              inset -2px 0 var(--win-dark-gray), inset 2px 2px var(--win-light-gray);
  cursor: var(--cursor-arrow);
  user-select: none;
  margin-right: -1px;
}

.sysprops-tabs li[aria-selected="true"],
.display-tabs li[aria-selected="true"] {
  font-weight: bold;
  background: var(--win-silver);
  margin-top: -2px;
  padding-bottom: 5px;
  z-index: 15;
}

.sysprops-panel {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  background: var(--win-silver);
  box-shadow: inset -1px -1px var(--win-black), inset 1px 1px var(--win-white),
              inset -2px -2px var(--win-dark-gray), inset 2px 2px var(--win-light-gray);
  position: relative;
  z-index: 5;
}

.sysprops-devmgr-split {
  display: flex;
  gap: 8px;
  height: 260px;
}

.sysprops-tree {
  width: 220px;
  overflow-y: auto;
  background: var(--win-white);
  padding: 4px;
}

.tree-skill-btn {
  background: none;
  border: none;
  padding: 1px 2px;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: var(--cursor-arrow);
  font-size: 11px;
  min-width: 0;
  min-height: 0;
}

.tree-skill-btn.selected {
  background: var(--win-navy);
  color: var(--win-white);
}

.sysprops-device-inspector {
  flex: 1;
  padding: 8px;
  overflow-y: auto;
  background: var(--win-white);
}

/* ====================================================================
   Minesweeper
   ==================================================================== */
.minesweeper-app {
  padding: 4px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.minesweeper-options {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 6px;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.minesweeper-options select { min-width: 0; max-width: 100%; }
.minesweeper-app > .win95-menubar { flex-shrink: 0; }

.mine-field-wrapper {
  padding: 6px;
  background: var(--win-silver);
  display: inline-flex;
  flex-direction: column;
  margin: 0 auto;
  box-sizing: border-box;
  width: min(100%, var(--mine-field-width, 164px));
  height: var(--mine-field-height, 204px);
  min-height: 0;
  flex: 0 1 auto;
  overflow: hidden;
}

.mine-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 6px;
  margin-bottom: 6px;
  background: var(--win-silver);
  width: 100%;
  flex-shrink: 0;
  box-sizing: border-box;
}

.mine-digit-display {
  background: var(--win-black);
  color: #ff0000;
  font-family: "Courier New", monospace;
  font-weight: bold;
  font-size: 18px;
  padding: 1px 4px;
  letter-spacing: 2px;
}

.mine-face-btn {
  min-width: 26px;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mine-grid-container {
  overflow: hidden;
  flex: 1;
  min-height: 0;
  min-width: 0;
  padding: 2px;
}

.mine-grid {
  display: grid;
  gap: 0;
  width: max-content;
  margin: 0 auto;
  flex-shrink: 0;
  background: var(--win-dark-gray);
  border: 2px solid var(--win-dark-gray);
}

.mine-cell {
  width: var(--mine-cell-size, 16px);
  height: var(--mine-cell-size, 16px);
  min-width: var(--mine-cell-size, 16px) !important;
  min-height: var(--mine-cell-size, 16px) !important;
  max-width: var(--mine-cell-size, 16px) !important;
  max-height: var(--mine-cell-size, 16px) !important;
  box-sizing: border-box;
  padding: 0;
  margin: 0;
  border: none;
  font-family: "Pixelated MS Sans Serif", Arial, sans-serif;
  font-size: min(10px, calc(var(--mine-cell-size, 16px) * .625));
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--win-silver);
  box-shadow: inset -1px -1px var(--win-black), inset 1px 1px var(--win-white),
              inset -2px -2px var(--win-dark-gray), inset 2px 2px var(--win-light-gray);
  cursor: var(--cursor-arrow);
  user-select: none;
}

.mine-cell .pixel-icon { width: 100%; height: 100%; }

.mine-cell.revealed {
  box-shadow: inset 1px 1px var(--win-dark-gray);
  background: var(--win-silver);
}

.mine-cell.exploded {
  background: #ff0000;
}

.mine-cell.adj-1 { color: #0000ff; }
.mine-cell.adj-2 { color: #008000; }
.mine-cell.adj-3 { color: #ff0000; }
.mine-cell.adj-4 { color: #000080; }
.mine-cell.adj-5 { color: #800000; }
.mine-cell.adj-6 { color: #008080; }
.mine-cell.adj-7 { color: #000000; }
.mine-cell.adj-8 { color: #808080; }

.mine-flag-toggle.active {
  background: var(--win-navy);
  color: var(--win-white);
}

.cheat-radar-dot {
  position: absolute;
  top: 1px;
  left: 1px;
  width: 2px;
  height: 2px;
  z-index: 9999;
}

/* ====================================================================
   Internet Explorer
   ==================================================================== */
.ie-favorites-bar {
  display: flex;
  gap: 4px;
  padding: 2px 4px;
  border-bottom: 1px solid var(--win-dark-gray);
  overflow-x: auto;
}

.ie-fav-chip {
  padding: 1px 4px;
  font-size: 10px;
  background: var(--win-silver);
  border: 1px solid var(--win-dark-gray);
  cursor: var(--cursor-arrow);
  text-decoration: none;
  color: var(--win-black);
  white-space: nowrap;
}

.ie-viewport {
  flex: 1;
  overflow-y: auto;
  background: var(--win-white);
  padding: 12px;
}

.ie-page {
  max-width: 680px;
  margin: 0 auto;
  font-family: "Times New Roman", Times, serif;
  font-size: 13px;
  line-height: 1.4;
}

.ie-page h2 {
  color: var(--win-navy);
  font-size: 18px;
}

.ie-page h3 {
  font-size: 14px;
  color: var(--win-navy);
}

.ie-hero {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ie-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.ie-mozilla-egg {
  background: #800000;
  color: var(--win-white);
  padding: 24px;
  font-size: 16px;
  font-style: italic;
  text-align: center;
}

/* ====================================================================
   Notepad
   ==================================================================== */
.notepad-body {
  flex: 1;
  display: flex;
}

.notepad-textarea {
  flex: 1;
  width: 100%;
  height: 100%;
  resize: none;
  font-family: "Lucida Console", "Courier New", monospace;
  font-size: 12px;
  padding: 4px;
  border: none;
  outline: none;
  background: var(--win-white);
}

/* ====================================================================
   System failure diagnostics & Safe Power Off
   ==================================================================== */
.bsod-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #0000aa;
  color: var(--win-white);
  font-family: "Courier New", Courier, monospace;
  font-size: 14px;
  line-height: 1.5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 99999;
  cursor: var(--cursor-arrow);
  user-select: none;
}

.bsod-box {
  width: 100%;
  max-width: 720px;
}
.bsod-overlay { height: 100dvh; overflow: auto; }
.bsod-overlay:focus { outline: none; }
.bsod-diagnostics { overflow-wrap: anywhere; }
@media (max-height: 540px), (max-width: 480px) {
  .bsod-overlay { padding: 18px; align-items: flex-start; font-size: 12px; }
  .bsod-banner { margin-bottom: 8px; }
}

.bsod-banner {
  background: var(--win-silver);
  color: #0000aa;
  display: inline-block;
  padding: 2px 8px;
  font-weight: bold;
  margin-bottom: 16px;
}

.bsod-cursor {
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.safe-power-off-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--win-black);
  color: #ff8000;
  font-family: "Pixelated MS Sans Serif", Arial, sans-serif;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99998;
  text-align: center;
}

.safe-power-off-wake {
  margin-top: 16px;
  font-size: 12px;
  padding: 4px 12px;
}

/* ====================================================================
   Mobile & Responsive Adaptations
   ==================================================================== */
@media (max-width: 640px) {
  .desktop-icons {
    flex-direction: row;
    flex-wrap: wrap;
    height: auto;
    width: 100%;
    gap: 8px;
  }

  .desktop-icon {
    width: 64px;
  }

  .desktop-icon-label {
    font-size: 11px;
  }

  .explorer-split {
    flex-direction: column;
  }

  .explorer-tree-pane {
    width: 100%;
    height: 120px;
  }

  .project-grid-two,
  .ie-columns {
    grid-template-columns: 1fr;
  }

  .os-window {
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: calc(100vh - var(--taskbar-height)) !important;
    max-width: 100vw !important;
    max-height: calc(100vh - var(--taskbar-height)) !important;
  }

  .mobile-background-hidden {
    display: none !important;
  }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ====================================================================
   LinkedIn App
   ==================================================================== */
.linkedin-app {
  background: var(--win-silver);
}

.linkedin-viewport {
  flex: 1;
  overflow-y: auto;
  background: var(--win-white);
  padding: 12px;
}

.linkedin-page {
  max-width: 600px;
  margin: 0 auto;
}

.linkedin-banner {
  background: var(--win-navy);
  color: var(--win-white);
  padding: 12px 16px;
  margin-bottom: 12px;
  box-shadow: inset -1px -1px var(--win-black), inset 1px 1px var(--win-white),
              inset -2px -2px var(--win-dark-gray), inset 2px 2px var(--win-light-gray);
}

.linkedin-banner-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.linkedin-logo {
  border: 2px solid var(--win-white);
}

.linkedin-banner-title h2 {
  margin: 0;
  font-size: 18px;
  color: var(--win-white);
}

.linkedin-headline {
  margin: 4px 0;
  font-size: 11px;
  font-weight: bold;
}

.linkedin-location {
  margin: 2px 0;
  font-size: 10px;
  color: #dfdfdf;
}

.linkedin-connections {
  color: #a0e0ff;
  font-weight: bold;
}

.linkedin-cta-buttons {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ====================================================================
   GitHub App
   ==================================================================== */
.github-app {
  background: var(--win-silver);
}

.github-viewport {
  flex: 1;
  overflow-y: auto;
  background: var(--win-white);
  padding: 12px;
}

.github-page {
  max-width: 620px;
  margin: 0 auto;
}

.github-banner {
  background: #24292e;
  color: var(--win-white);
  padding: 12px 16px;
  margin-bottom: 12px;
  box-shadow: inset -1px -1px var(--win-black), inset 1px 1px var(--win-white),
              inset -2px -2px var(--win-dark-gray), inset 2px 2px var(--win-light-gray);
}

.github-banner-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.github-avatar {
  border: 2px solid var(--win-white);
  background: var(--win-black);
}

.github-banner-title h2 {
  margin: 0;
  font-size: 18px;
  color: var(--win-white);
}

.github-handle {
  font-size: 12px;
  color: #8b949e;
  font-weight: normal;
}

.github-headline {
  margin: 4px 0;
  font-size: 11px;
  font-weight: bold;
}

.github-location {
  margin: 2px 0;
  font-size: 10px;
  color: #c9d1d9;
}

.github-external-link {
  color: #58a6ff;
  text-decoration: none;
}

.github-external-link:hover {
  text-decoration: underline;
}

.github-cta-buttons {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.github-repos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 8px;
}

.github-repo-card {
  padding: 8px;
  background: var(--win-silver);
  display: flex;
  flex-direction: column;
}

.github-repo-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.github-repo-desc {
  font-size: 10px;
  line-height: 1.3;
  margin: 0 0 6px 0;
  flex: 1;
}

.github-repo-actions {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}

/* File surfaces are not push buttons. Explicitly reset 98.css button relief
   in every state, including :active and :focus. */
.desktop-icon,
.desktop-icon:hover,
.desktop-icon:focus,
.desktop-icon:active,
.explorer-item,
.explorer-item:hover,
.explorer-item:focus,
.explorer-item:active,
.explorer-tree-btn,
.explorer-tree-btn:focus,
.explorer-tree-btn:active {
  box-shadow: none;
  outline: none;
  min-width: 0;
  min-height: 0;
  font: inherit;
}

.desktop-icon:focus-visible .desktop-icon-label,
.explorer-item:focus-visible .explorer-item-name,
.explorer-items-viewport:focus-visible .selected .explorer-item-name {
  outline: 1px dotted currentColor;
  outline-offset: -1px;
}

.desktop-icon.selected > .pixel-icon,
.explorer-item.selected > .pixel-icon {
  filter: brightness(.65) sepia(.3) saturate(1.5);
}

.desktop-icon > .pixel-icon { width: 32px; height: 32px; }
.desktop-icon-label { max-width: 100%; }

.title-bar-text, .title-bar-label, .taskbar-item-label { min-width: 0; }
.title-bar-label { overflow: hidden; text-overflow: ellipsis; }
.title-bar-controls { flex-shrink: 0; }
.title-bar-icon, .taskbar-item .pixel-icon { width: 16px; height: 16px; }
.taskbar-windows { min-width: 0; scrollbar-width: none; }
.taskbar-item { flex: 0 1 160px; }
.taskbar-tray, .start-button { flex-shrink: 0; }

.explorer-item { color: var(--win-black); text-decoration: none; }
.explorer-items.view-large-icons .explorer-item-name {
  max-width: 100%;
  height: 30px;
  line-height: 14px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.filename-token { white-space: nowrap; display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: top; }
.explorer-items.view-small-icons .explorer-item,
.explorer-items.view-list .explorer-item { height: 22px; flex-shrink: 0; }
.explorer-items.view-small-icons .explorer-item-name,
.explorer-items.view-list .explorer-item-name,
.explorer-row-name-cell span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.explorer-details-table { table-layout: fixed; min-width: 440px; }
.explorer-details-table th:first-child { width: 40%; }
.explorer-details-table th:nth-child(2) { width: 22%; }
.explorer-details-table th:nth-child(3) { width: 12%; }
.explorer-details-table td { overflow: hidden; text-overflow: ellipsis; border-bottom: 0; }
.explorer-details-table th:focus-visible { outline: 1px dotted black; outline-offset: -3px; }
.explorer-row-name-cell { min-width: 0; }
.explorer-tree.tree-view { box-shadow: none; border: 0; }
.explorer-tree-btn:hover { border-color: transparent; }
.status-bar-field { min-width: 0; }
.explorer-app .status-bar-field:first-child { flex: 0 0 100px; }
.explorer-app .status-bar-field:nth-child(2) { flex: 0 0 80px; }
.explorer-app .status-bar-field:last-child { flex: 1; min-width: 0; }
.win95-toolbar, .win95-menubar, .win95-addressbar, .status-bar { flex-shrink: 0; }

@media (max-width: 640px) {
  .desktop-icons { width: calc(100% - 16px); }
  .start-submenu { left: calc(100% - 16px); }
  .desktop-icon { width: 76px; }
  .explorer-tree-pane { width: 100% !important; max-width: none; height: 112px; }
  .explorer-splitter { display: none; }
  .explorer-files-pane { min-height: 0; }
  .win95-toolbar { flex-wrap: wrap; }
  .explorer-app .toolbar-sep { margin: 0 1px; }
  .status-bar-field:last-child { min-width: 0; flex: 2; }
}

/* Clickable surfaces must show the classic hand, including nested icon images.
   Keep these semantic rules after the component defaults above. */
button:not(:disabled):not([aria-disabled="true"]),
a[href]:not([aria-disabled="true"]),
[role="button"]:not([aria-disabled="true"]),
[role="menuitem"]:not(:disabled):not([aria-disabled="true"]),
[data-node-path], .tree-expander:not(.empty), .tree-row,
.explorer-details-table th, label[for], input[type="checkbox"], input[type="radio"] {
  cursor: var(--cursor-link);
}
.win95-loading, .win95-loading *, [aria-busy="true"], [aria-busy="true"] * {
  cursor: var(--cursor-wait);
}

/* ====================================================================
   MS-DOS Prompt
   ==================================================================== */
/* Original 8x16 cell size preserves the VGA glyphs' pixel grid.
   The font and its license are bundled locally; see THIRD_PARTY_NOTICES.md. */
@font-face {
  font-family: "PedroOS VGA";
  src: url('../assets/fonts/WebPlus_IBM_VGA_8x16.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

.terminal-app {
  --term-bg: #000000;
  --term-fg: #c0c0c0;
  background: var(--win-silver);
  color: var(--win-black);
  min-height: 0;
  padding: 0;
}

.terminal-screen {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  margin: 2px;
  padding: 6px;
  background: var(--term-bg);
  color: var(--term-fg);
  font-family: "PedroOS VGA", monospace;
  font-size: 16px;
  font-weight: 400;
  font-synthesis: none;
  font-kerning: none;
  font-variant-ligatures: none;
  line-height: 16px;
  cursor: text;
  outline: none;
}

.terminal-app .status-bar-field:last-child {
  flex: 1.5;
  min-width: 0;
}

.terminal-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  min-height: 1em;
}

.terminal-line {
  display: flex;
  align-items: center;
  margin: 0;
  min-height: 1em;
}

.terminal-prompt {
  white-space: pre;
}

.terminal-app .terminal-input {
  flex: 1;
  min-width: 0;
  width: 0;
  height: auto;
  min-height: 0;
  line-height: inherit;
  margin: 0;
  padding: 0;
  border: none;
  outline: none;
  background: transparent;
  color: inherit;
  font: inherit;
  caret-color: var(--term-fg);
  box-shadow: none;
  border-radius: 0;
  appearance: none;
}

}

/* Internet Explorer: classic chrome and personal intranet portal. */
.iexplore-app { min-width: 0; min-height: 0; position: relative; background: #c0c0c0; }
.iexplore-app [hidden] { display: none !important; }
.iexplore-app .win95-menubar { flex-wrap: wrap; flex-shrink: 0; }
.ie-toolbar { flex-wrap: wrap; flex-shrink: 0; border-top: 1px solid #fff; border-bottom: 1px solid #808080; padding: 4px; gap: 3px; }
.ie-toolbar .toolbar-btn { height: auto; min-height: 42px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 48px; padding: 4px; }
.ie-brand { margin-left: auto; padding: 4px; border-left: 1px solid #808080; }
.iexplore-app .win95-addressbar { flex-shrink: 0; min-width: 0; border-top: 1px solid #fff; }
.iexplore-app .addressbar-input { min-width: 0; background: #fff; box-shadow: inset -1px -1px #fff, inset 1px 1px #808080, inset -2px -2px #ddd, inset 2px 2px #000; padding: 4px 5px; }
.ie-workspace { flex: 1; display: flex; min-height: 0; min-width: 0; position: relative; }
.iexplore-app .ie-viewport { min-width: 0; min-height: 0; overflow: auto; padding: 0; background: #fffdf0; }
.ie-sidebar { width: 205px; flex-shrink: 0; background: #fff; overflow: auto; padding: 5px; overflow-wrap: anywhere; }
.ie-sidebar-heading { display: flex; align-items: center; justify-content: space-between; padding: 3px; background: #c0c0c0; }
.ie-sidebar-heading button { min-width: 22px; padding: 0; }
.ie-sidebar ul, .ie-sidebar ol { padding-left: 20px; }
.ie-sidebar li { margin: 9px 0; }
.ie-sidebar small { display: block; color: #666; }
.ie-sidebar input { width: 100%; box-sizing: border-box; }
.ie-sidebar form { margin-top: 8px; }
.ie-sidebar a { color: #000080; text-decoration: underline; }
.ie-site-header { font: 14px 'Times New Roman', serif; background: #000080; color: #fff; text-align: center; padding: 16px 10px 0; border-bottom: 4px double #808000; }
.ie-site-header b { display: block; font-size: 26px; letter-spacing: 4px; color: #ffff99; }
.ie-site-header span { display: block; margin: 5px; }
.ie-site-header nav { background: #e8e8ce; color: #000; padding: 8px 4px; margin: 10px -10px 0; line-height: 1.8; }
.ie-site-header a { color: #000080; text-decoration: underline; white-space: nowrap; }
.ie-site-header [aria-current] { font-weight: bold; color: #800000; }
.iexplore-app .ie-page { padding: 18px; max-width: 820px; font-size: calc(15px * var(--ie-text-scale, 1)); box-sizing: border-box; overflow-wrap: anywhere; }
.iexplore-app .ie-page h2 { font-size: 1.5em; border-bottom: 3px double #808080; padding-bottom: 8px; }
.iexplore-app .ie-page h3 { font-size: 1.15em; }
.ie-page a { color: #0000aa; text-decoration: underline; }
.ie-page a:visited { color: #800080; }
.ie-box { padding: 10px; border: 1px solid #808000; background: #ffffe5; box-shadow: 2px 2px #c0c0c0; }
.ie-table-scroll { max-width: 100%; overflow-x: auto; }
.iexplore-app .ie-projects-table { min-width: 600px; }
.iexplore-app .ie-table { font-family: "Times New Roman", Times, serif; width: 100%; border: 2px ridge #c0c0c0; border-collapse: separate; font-size: inherit; table-layout: auto; }
.iexplore-app .ie-table th, .iexplore-app .ie-table td { border: 1px inset #ddd; padding: 7px; vertical-align: top; white-space: normal; overflow-wrap: anywhere; }
.iexplore-app .ie-table thead { position: static; z-index: auto; background: #000080; color: #fff; }
.iexplore-app .ie-table th { box-shadow: none; font-weight: bold; background: #eeeec9; }
.iexplore-app .ie-table thead th { color: #fff; background: #000080; }
.ie-project-preview { width: 150px; max-width: 100%; height: auto; border: 2px ridge #c0c0c0; }
.ie-page figure { margin: 10px 0; }
.ie-page figcaption { font-size: .8em; }
.ie-actions-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ie-site-footer { padding: 8px 12px 18px; text-align: center; font: 12px 'Times New Roman', serif; color: #555; }
.iexplore-app .status-bar { flex-shrink: 0; min-width: 0; }
.iexplore-app .status-bar-field { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ie-dialog { color: #000; padding: 3px; border: 0; width: 370px; max-width: calc(100vw - 30px); max-height: calc(100dvh - 70px); overflow: auto; background: #c0c0c0; }
.ie-dialog::backdrop { background: #0004; }
.ie-dialog .window-body { margin: 14px; }
.ie-dialog label { display: block; margin: 10px 0; }
.ie-dialog label input:not([type="checkbox"]), .ie-dialog select { display: block; width: 100%; box-sizing: border-box; margin-top: 5px; }
.ie-dialog-buttons { display: flex; justify-content: flex-end; gap: 8px; padding: 0 12px 12px; }
@media (max-width: 600px) {
  .ie-toolbar .toolbar-btn { min-width: 38px; font-size: 10px; padding: 3px; gap: 2px; }
  .ie-toolbar { gap: 0; }
  .ie-brand { display: none; }
  .ie-sidebar { position: absolute; z-index: 5; top: 0; bottom: 0; left: 0; width: min(245px, 80%); box-shadow: 3px 0 #808080; }
  .iexplore-app .ie-page { padding: 12px; }
  .iexplore-app .ie-table { font-size: .85em; }
  .ie-project-preview { width: 80px; }
  .iexplore-app .ie-table th, .iexplore-app .ie-table td { padding: 4px; }
  .ie-columns { grid-template-columns: 1fr; }
  .iexplore-app .status-bar-field:last-child { max-width: 95px; }
}
.ie-toolbar .toolbar-btn:active:not(:disabled) { padding: 5px 3px 3px 5px; }
.ie-remove-row { margin: 10px 0; }
.ie-remove-row label { display: inline-block; }

/* Explorer: one classic frame around the folder tree and file views. */
.explorer-app { position: relative; min-width: 0; min-height: 0; }
.explorer-app [hidden] { display: none !important; }
.explorer-app .win95-toolbar { border-top: 1px solid var(--win-white); padding: 4px; gap: 3px; }
.explorer-app .toolbar-btn { height: 26px; padding: 3px 6px; flex-shrink: 0; }
.explorer-app .toolbar-btn span { margin-left: 3px; }
.explorer-app .addressbar-combobox { min-width: 0; }
.explorer-app .addressbar-input { min-width: 0; }
.explorer-app .explorer-tree-pane { padding: 0; }
.explorer-app .explorer-tree { padding: 7px 6px; }
.explorer-app .explorer-pane-header { font-weight: normal; padding: 3px 5px; }
.explorer-tree-btn.selected, .explorer-tree-btn:focus-visible { outline: 1px dotted currentColor; outline-offset: -2px; }
.explorer-items.view-large-icons { column-gap: 8px; row-gap: 2px; }
.explorer-items.view-large-icons .explorer-item { min-height: 74px; }
.explorer-app .status-bar-field { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.explorer-context-menu { width: max-content; min-width: 175px; max-width: 100%; padding: 3px; }
.explorer-properties-heading { display: flex; align-items: center; gap: 12px; }
.explorer-properties { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 14px; }
.explorer-properties dt, .explorer-properties dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .explorer-app .win95-toolbar { gap: 2px; }
  .explorer-app .toolbar-btn { padding: 3px 5px; }
  .explorer-app .status-bar-field:first-child { flex-basis: 75px; }
  .explorer-app .status-bar-field:nth-child(2) { flex-basis: 65px; }
}

.project-viewer-toolbar .button, .project-footer-links .button {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--win-silver); color: #000; text-decoration: none;
  box-shadow: inset -1px -1px #000, inset 1px 1px #fff, inset -2px -2px #808080, inset 2px 2px #dfdfdf;
}
.project-viewer-toolbar .button:focus-visible, .project-footer-links .button:focus-visible { outline: 1px dotted #000; outline-offset: -4px; }
.project-viewer-toolbar [aria-pressed="true"] { background: #ddd; box-shadow: inset 1px 1px #000, inset -1px -1px #fff, inset 2px 2px #808080; }

/* System property sheets: compact 1995 dialog proportions and controls. */
.about-app, .sysprops-app { min-height: 0; padding: 8px; gap: 0; box-sizing: border-box; font: 11px "Pixelated MS Sans Serif", Arial, sans-serif; }
.info-tabs { display: flex; flex-wrap: wrap; flex-shrink: 0; gap: 0; padding: 2px 3px 0; }
.info-tabs [role="tab"] { min-width: 0; min-height: 22px; margin-right: -1px; white-space: nowrap; border-radius: 2px 2px 0 0; padding: 3px 8px; position: relative; font-weight: normal; }
.info-tabs [aria-selected="true"] { box-shadow: inset -1px 0 #0a0a0a, inset 1px 1px #fff, inset -2px 0 #808080, inset 2px 2px #dfdfdf; z-index: 1; }
.info-tabs [role="tab"]:focus-visible { outline: 1px dotted #000; outline-offset: -5px; }
.info-panel { min-height: 0; flex: 1; overflow: auto; padding: 14px; background: #c0c0c0; box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px #808080, inset 2px 2px #dfdfdf; line-height: 1.35; }
.info-panel[hidden] { display: none !important; }
.info-panel h3, .info-panel h4 { font: bold 11px "Pixelated MS Sans Serif", Arial, sans-serif; color: #000; margin: 0 0 8px; }
.info-panel h4 { margin-top: 14px; }
.info-panel p { margin: 0 0 10px; }
.info-panel fieldset { margin: 0 0 12px; padding: 10px; min-width: 0; font: inherit; }
.info-panel fieldset > :last-child { margin-bottom: 0; }
.info-panel code { overflow-wrap: anywhere; font-size: 11px; }
.system-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.system-actions button { padding: 3px 9px; }
.system-dialog-footer { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding-top: 8px; flex-shrink: 0; }
.system-dialog-footer button { min-width: 75px; }
.about-dialog-footer { justify-content: space-between; }
.about-classic-layout { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; padding: 9px 8px; }
.about-classic-logo { margin-top: 3px; }
.about-classic-copy h2 { margin: 0 0 8px; color: #000; font: bold 26px Arial, sans-serif; letter-spacing: -1px; }
.about-classic-copy h2 span { font-weight: normal; }
.about-classic-copy p { margin-bottom: 12px; }
.about-licensee { padding-left: 12px; }
.system-rule { border: 0; border-top: 1px solid #808080; border-bottom: 1px solid #fff; margin: 12px 0; }
.system-secrets { padding-left: 18px; }
.system-secrets li { margin-bottom: 12px; }
.system-note { font-size: 11px; }
.system-general-layout { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 18px; padding: 10px 12px 0; }
.system-computer-picture { display: flex; flex-direction: column; align-items: center; gap: 12px; padding-top: 15px; }
.system-general-section { margin-bottom: 16px; }
.system-general-section h3 { margin-bottom: 6px; }
.system-general-section p { margin-left: 14px; }
.system-subsystems .system-actions { gap: 5px; }
.system-subsystems button { min-width: 0; }
.system-device-layout { display: grid; grid-template-columns: minmax(150px, 38%) minmax(0, 1fr); gap: 8px; flex: 1; min-height: 0; }
.system-devices-panel { display: flex; flex-direction: column; padding: 10px; }
.system-device-tree, .system-device-inspector { padding: 7px; overflow: auto; }
.system-device-tree { background: #fff; font-size: 11px; }
.system-device-inspector { background: #c0c0c0; box-shadow: none; }
.system-tree-root { display: block; margin: 0 0 8px; }
.system-device-tree details { margin: 4px 0; }
.system-device-tree summary { cursor: pointer; padding: 2px 0; white-space: nowrap; list-style: none; }
.system-device-tree summary::-webkit-details-marker { display: none; }
.system-device-tree summary::before { content: "+"; display: inline-block; width: 9px; height: 9px; line-height: 7px; text-align: center; border: 1px solid #808080; margin-right: 4px; font: 9px/7px monospace; vertical-align: middle; }
.system-device-tree details[open] > summary::before { content: "−"; }
.system-device-tree summary img { vertical-align: middle; margin-right: 4px; }
.system-device-tree ul { list-style: none; padding-left: 10px; margin: 3px 0 6px 4px; border-left: 1px dotted #888; }
.system-device-tree .tree-skill-btn { text-align: left; width: 100%; padding: 2px; white-space: normal; }
.system-device-tree .tree-skill-btn, .system-device-tree .tree-skill-btn:active { box-shadow: none; border: 0; min-height: 0; }
.system-device-tree .tree-skill-btn:focus-visible, .system-device-tree summary:focus-visible { outline: 1px dotted currentColor; outline-offset: -2px; }
.tree-skill-btn[aria-pressed="true"] { background: #000080; color: #fff; text-shadow: none; }
.system-skill-detail { overflow-wrap: anywhere; }
.system-skill-detail header { margin-bottom: 10px; }
.system-skill-detail ul { padding-left: 18px; }
.system-skill-detail li { margin-bottom: 6px; }
.system-driver { font-size: 11px; }
.system-skill-cards { display: grid; gap: 0; }
.system-skill-cards > fieldset { background: #c0c0c0; }
.system-skill-cards .system-skill-detail header h3 { display: none; }
.system-category-heading { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.system-category-heading p { margin-bottom: 0; }
@media (max-width: 600px) {
  .about-app, .sysprops-app { padding: 6px; }
  .info-panel { padding: 10px; }
  .system-general-layout { grid-template-columns: 76px minmax(0, 1fr); gap: 10px; padding: 8px 2px 0; }
  .about-classic-layout { grid-template-columns: 48px minmax(0, 1fr); gap: 12px; padding: 8px 2px; }
  .about-dialog-footer { flex-wrap: wrap; }
  .system-device-layout { display: flex; flex-direction: column; flex: none; }
  .system-device-tree { max-height: 185px; flex-shrink: 0; }
  .system-device-inspector { overflow: visible; padding: 10px 2px; }
}

/* Welcome property dialog, composed with original PedroOS desktop artwork. */
.welcome-app { min-height: 0; padding: 12px; font: 11px "Pixelated MS Sans Serif", Arial, sans-serif; }
.welcome-heading { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.welcome-heading h2 { margin: 0; font: normal 19px Arial, sans-serif; }
.welcome-intro { margin: 12px 0; line-height: 1.4; flex-shrink: 0; }
.welcome-main { display: grid; grid-template-columns: minmax(0, 1fr) 136px; gap: 14px; flex: 1; min-height: 0; overflow: auto; padding: 4px 0 10px; }
.welcome-discovery { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: start; gap: 10px; }
.welcome-tip h3 { margin: 0 0 12px; font: bold 15px "Pixelated MS Sans Serif", Arial, sans-serif; }
.welcome-tip h4 { margin: 0 0 8px; font: bold 11px "Pixelated MS Sans Serif", Arial, sans-serif; }
.welcome-tip p { line-height: 1.4; margin: 0; }
.welcome-actions { display: flex; flex-direction: column; gap: 8px; align-self: start; }
.welcome-actions button { min-height: 27px; padding: 4px 7px; }
.welcome-actions [data-welcome-next] { margin-top: 8px; }
.welcome-footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-shrink: 0; border-top: 1px solid #808080; box-shadow: inset 0 1px #fff; padding-top: 12px; }
.welcome-footer .field-row { min-width: 0; }
.welcome-footer label { line-height: 1.3; }
.welcome-footer button { min-width: 75px; }
.welcome-illustration { position: relative; padding: 8px 0 30px; }
.welcome-monitor { padding: 7px 7px 11px; border: 2px solid #000; background: #c0c0c0; box-shadow: inset 2px 2px #fff, inset -2px -2px #808080; }
.welcome-mini-screen { position: relative; height: 66px; background: #008080; border: 2px solid; border-color: #808080 #fff #fff #808080; }
.welcome-mini-window { position: absolute; top: 8px; left: 19px; width: 49px; height: 35px; padding: 3px; background: #c0c0c0; border: 1px solid #fff; box-shadow: 1px 1px #000; }
.welcome-mini-window span { display: block; height: 5px; background: #000080; }
.welcome-mini-window i { display: block; height: 2px; background: #808080; width: 30px; margin: 5px 0 0; }
.welcome-mini-taskbar { position: absolute; bottom: 0; left: 0; right: 0; height: 10px; background: #c0c0c0; border-top: 1px solid #fff; }
.welcome-mini-taskbar b { display: block; font: 6px Arial, sans-serif; width: 24px; height: 8px; padding-left: 2px; border: 1px solid; border-color: #fff #000 #000 #fff; }
.welcome-monitor-neck { margin: 0 auto; width: 24px; height: 8px; border: 2px solid #000; border-top: 0; background: #808080; }
.welcome-monitor-foot { margin: 0 auto; width: 70px; height: 8px; border: 2px solid #000; background: #c0c0c0; box-shadow: inset 1px 1px #fff; }
.welcome-arrow { position: absolute; top: 55px; left: 2px; transform: rotate(-35deg); transform-origin: left center; }
@media (max-width: 600px) {
  .welcome-app { padding: 10px; }
  .welcome-main { display: flex; flex-direction: column; gap: 14px; }
  .welcome-discovery { grid-template-columns: 100px minmax(0, 1fr); }
  .welcome-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; width: 100%; }
  .welcome-actions [data-welcome-next] { margin-top: 0; }
  .welcome-footer { padding-top: 9px; }
  .welcome-heading h2 { font-size: 17px; }
}

/* DOOM runs in its own document so its engine and input die with the window. */
.doom-app { min-height: 0; min-width: 0; }
.neon-fist-app { min-height: 0; min-width: 0; background: #000; }
.neon-fist-app iframe { display: block; border: 0; width: 100%; min-height: 0; flex: 1; background: #05040a; }
.retro-game-app { min-height: 0; min-width: 0; background: #000; }
.retro-game-app iframe { display: block; border: 0; width: 100%; min-height: 0; flex: 1; background: #000; }
.pedroos-screen-saver { position: fixed; inset: 0; z-index: 2147483647; overflow: hidden; background: #000; cursor: none; touch-action: none; }
.screen-saver-logo { position: absolute; top: 0; left: 0; width: 210px; padding: 12px; color: #0ff; border: 4px double currentColor; font-family: "PedroOS VGA", monospace; box-sizing: border-box; will-change: transform; }
.screen-saver-logo strong { display: block; font-size: 38px; line-height: 1; font-weight: normal; }
.screen-saver-logo span { display: block; font-size: 26px; text-align: right; }
.saver-preview { height: 110px; display: grid; place-items: center; background: #000; color: #0ff; border: 4px ridge #808080; margin: 8px 0 16px; font: 24px "PedroOS VGA", monospace; }
.display-tabs [role="tab"] { min-width: 0; padding: 5px 8px; border-bottom: 0; }
.display-tabs [role="tab"][aria-selected="true"] { position: relative; z-index: 1; background: #c0c0c0; font-weight: bold; }
.doom-app [hidden] { display: none !important; }
.doom-app .win95-toolbar { flex-wrap: wrap; flex-shrink: 0; gap: 3px; padding: 4px; }
.doom-app .win95-toolbar button { min-width: 0; padding: 4px 8px; }
.doom-stage { flex: 1; min-height: 0; min-width: 0; margin: 3px; background: #000; position: relative; overflow: hidden; }
.doom-stage iframe { display: block; width: 100%; height: 100%; border: 0; background: #000; }
.doom-launcher { height: 100%; padding: 22px; overflow: auto; background: #c0c0c0; line-height: 1.5; }
.doom-launcher h2 { font: bold 30px "Pixelated MS Sans Serif", Arial, sans-serif; margin: 0 0 12px; color: #800000; }
.doom-launcher p { max-width: 520px; margin: 10px 0; }
.doom-controls { border: 2px groove #fff; padding: 10px; }
.doom-app .status-bar { flex-shrink: 0; }
.doom-app .status-bar-field { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width:600px) { .doom-launcher { padding: 14px; } .doom-app .status-bar-field:last-child { display: none; } }
