:root {
  color-scheme: light;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --taskbar-core-height: 46px;
  --taskbar-height: calc(var(--taskbar-core-height) + var(--safe-bottom));
  --blue-900: #064a9b;
  --blue-700: #0a65d8;
  --blue-500: #2d89ef;
  --green-600: #2a9d46;
  --cream: #fff9db;
  --ink: #172032;
  --muted: #52606f;
  --edge: rgba(7, 24, 55, 0.3);
  --shadow: 0 20px 50px rgba(0, 20, 60, 0.32);
  font-family: Tahoma, Verdana, Segoe UI, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: #4ea2dc;
  color: var(--ink);
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
}

button,
a {
  font: inherit;
}

button {
  cursor: default;
}

.desktop-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  min-height: 100svh;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0)),
    url("wallpaper.svg") center / cover no-repeat;
}

.desktop {
  position: absolute;
  inset: 0 0 var(--taskbar-height);
  overflow: hidden;
}

.desktop-icons {
  position: absolute;
  top: calc(18px + var(--safe-top));
  left: calc(18px + var(--safe-left));
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, 86px);
  grid-auto-rows: 96px;
  gap: 10px 12px;
  align-content: start;
}

.shortcut {
  width: 86px;
  min-height: 92px;
  padding: 6px 5px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: #fff;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
}

.shortcut:hover,
.shortcut:focus-visible {
  border-color: rgba(255, 255, 255, 0.58);
  background: rgba(43, 120, 225, 0.34);
  outline: none;
}

.shortcut-icon,
.app-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 7px;
  background:
    radial-gradient(circle at 25% 18%, rgba(255, 255, 255, 0.85), transparent 28%),
    linear-gradient(135deg, var(--accent, #2d89ef), color-mix(in srgb, var(--accent, #2d89ef) 58%, #0b2b59));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.64),
    0 7px 15px rgba(0, 21, 60, 0.28);
  overflow: hidden;
}

.app-icon-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: auto;
}

.shortcut-label {
  display: block;
  width: 100%;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.glyph {
  position: relative;
  width: 24px;
  height: 24px;
}

.glyph-id::before {
  content: "";
  position: absolute;
  inset: 4px 6px 13px;
  border-radius: 999px;
  background: #fff;
}

.glyph-id::after {
  content: "";
  position: absolute;
  inset: 14px 3px 3px;
  border-radius: 12px 12px 4px 4px;
  background: #fff;
}

.glyph-apps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
}

.glyph-apps::before,
.glyph-apps::after {
  content: "";
}

.glyph-apps span,
.glyph-apps::before,
.glyph-apps::after {
  border-radius: 3px;
  background: #fff;
}

.glyph-sun::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.35);
}

.glyph-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}

.glyph-board::before,
.glyph-board::after {
  content: "";
}

.glyph-board span,
.glyph-board::before,
.glyph-board::after {
  border-radius: 3px;
  background: #fff;
}

.glyph-spark::before,
.glyph-spark::after {
  content: "";
  position: absolute;
  inset: 10px 2px;
  border-radius: 999px;
  background: #fff;
  transform: rotate(45deg);
}

.glyph-spark::after {
  transform: rotate(-45deg);
}

.glyph-doc::before {
  content: "";
  position: absolute;
  inset: 2px 5px;
  border-radius: 3px;
  background: #fff;
}

.glyph-doc::after {
  content: "";
  position: absolute;
  left: 9px;
  right: 9px;
  top: 9px;
  height: 2px;
  background: var(--accent, #61788f);
  box-shadow: 0 5px 0 var(--accent, #61788f), 0 10px 0 var(--accent, #61788f);
}

.glyph-settings::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 3px solid #fff;
  border-radius: 999px;
  box-shadow:
    0 -8px 0 -5px #fff,
    0 8px 0 -5px #fff,
    8px 0 0 -5px #fff,
    -8px 0 0 -5px #fff;
}

.glyph-settings::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 999px;
  background: #fff;
}

.window-layer {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.app-window {
  position: absolute;
  display: flex;
  flex-direction: column;
  min-width: min(360px, calc(100vw - 24px));
  min-height: 270px;
  overflow: hidden;
  border: 1px solid #064184;
  border-radius: 8px 8px 3px 3px;
  background: #eef4fb;
  box-shadow: var(--shadow);
  pointer-events: auto;
}

.app-window.is-maximized {
  inset: calc(8px + var(--safe-top)) calc(8px + var(--safe-right)) 10px calc(8px + var(--safe-left)) !important;
  width: auto !important;
  height: auto !important;
}

.app-window.is-minimized {
  display: none;
}

.window-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 32px;
  padding: 4px 5px 4px 8px;
  color: #fff;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.04) 48%, rgba(0, 0, 0, 0.16) 49%),
    linear-gradient(90deg, #074ba4, #1d77e0 42%, #0c55b7);
}

.window-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  font-size: 13px;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.55);
}

.window-title-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-icon {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 4px;
  background:
    radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.92), transparent 32%),
    linear-gradient(135deg, var(--accent, #2d89ef), #0c397c);
  flex: 0 0 auto;
}

.window-controls {
  display: flex;
  gap: 3px;
  flex: 0 0 auto;
}

.window-control {
  position: relative;
  width: 24px;
  height: 22px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.05) 50%, rgba(0, 0, 0, 0.1)),
    #2d81df;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.window-control:hover,
.window-control:focus-visible {
  outline: none;
  filter: brightness(1.12);
}

.window-control::before,
.window-control::after {
  content: "";
  position: absolute;
  background: #fff;
}

.window-control.minimize::before {
  left: 7px;
  right: 7px;
  bottom: 6px;
  height: 2px;
}

.window-control.maximize::before {
  left: 7px;
  top: 6px;
  width: 10px;
  height: 8px;
  border: 2px solid #fff;
  background: transparent;
}

.window-control.close {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.03) 50%, rgba(0, 0, 0, 0.12)),
    #d74332;
}

.window-control.close::before,
.window-control.close::after {
  left: 6px;
  top: 10px;
  width: 12px;
  height: 2px;
}

.window-control.close::before {
  transform: rotate(45deg);
}

.window-control.close::after {
  transform: rotate(-45deg);
}

.window-content {
  min-height: 0;
  flex: 1 1 auto;
  border: 3px solid #1659a9;
  border-top: 0;
  background: #f3f7fb;
}

.resize-handle {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 18px;
  height: 18px;
  cursor: nwse-resize;
}

.resize-handle::before {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 10px;
  height: 10px;
  background:
    linear-gradient(135deg, transparent 0 42%, rgba(36, 74, 124, 0.55) 43% 50%, transparent 51%),
    linear-gradient(135deg, transparent 0 62%, rgba(36, 74, 124, 0.55) 63% 70%, transparent 71%);
}

.window-page {
  height: 100%;
  overflow: auto;
  background:
    linear-gradient(180deg, #fff, #ecf4fb 72%, #e1edf8);
}

.native-page {
  padding: 22px;
}

.native-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(23, 32, 50, 0.16);
}

.native-header .app-icon {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
}

.native-title {
  margin: 0;
  font-size: 22px;
  line-height: 1.1;
}

.native-summary {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.4;
}

.native-body {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  color: #25314a;
  line-height: 1.5;
}

.native-actions,
.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.action-link,
.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid #8aaad4;
  border-radius: 4px;
  background: linear-gradient(180deg, #fff, #dcecff);
  color: #113f78;
  text-decoration: none;
  font-weight: 700;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.action-link:hover,
.action-link:focus-visible,
.action-button:hover,
.action-button:focus-visible {
  outline: none;
  border-color: #3b7bd2;
  filter: brightness(1.03);
}

.project-page {
  height: 100%;
  background: #f7fbff;
}

.project-frame-wrap {
  position: relative;
  display: grid;
  place-items: stretch;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background:
    linear-gradient(45deg, rgba(16, 100, 184, 0.08) 25%, transparent 25% 50%, rgba(16, 100, 184, 0.08) 50% 75%, transparent 75%),
    #e8f1fb;
  background-size: 20px 20px;
}

.project-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.project-frame-wrap.has-fixed-viewport {
  place-items: center;
  padding: 8px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.project-frame-stage {
  position: relative;
  flex: 0 0 auto;
  width: var(--scaled-viewport-width, 100%);
  height: var(--scaled-viewport-height, 100%);
}

.project-frame-stage .project-frame {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--app-viewport-width, 100%);
  height: var(--app-viewport-height, 100%);
  transform: scale(var(--app-scale, 1));
  transform-origin: top left;
}

.project-placeholder {
  display: grid;
  min-height: 100%;
  place-items: center;
  padding: 22px;
}

.project-card {
  width: min(560px, 100%);
  border: 1px solid rgba(35, 70, 115, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 15px 32px rgba(0, 31, 78, 0.12);
  padding: 20px;
}

.project-card h2 {
  margin: 0;
  font-size: 24px;
}

.project-card p {
  color: var(--muted);
  line-height: 1.5;
}

.project-meta {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  font-size: 13px;
}

.project-meta code {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 7px 8px;
  border: 1px solid #d1ddea;
  border-radius: 4px;
  background: #f3f7fc;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.project-tile {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 10px;
  min-height: 150px;
  padding: 14px;
  border: 1px solid rgba(35, 70, 115, 0.18);
  border-radius: 8px;
  background: #fff;
  text-align: left;
  box-shadow: 0 8px 22px rgba(0, 31, 78, 0.08);
}

.project-tile:hover,
.project-tile:focus-visible {
  outline: none;
  border-color: #3b7bd2;
  box-shadow: 0 10px 24px rgba(0, 56, 130, 0.16);
}

.project-tile-head {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.project-tile h3 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 16px;
}

.project-tile p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.project-tile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.project-tile-actions .action-link,
.project-tile-actions .action-button {
  min-height: 34px;
  padding: 5px 10px;
}

.settings-panel {
  margin-top: 18px;
  border-top: 1px solid rgba(23, 32, 50, 0.16);
  padding-top: 18px;
}

.settings-section-header h2,
.settings-section-header p {
  margin: 0;
}

.settings-section-header h2 {
  font-size: 18px;
}

.settings-section-header p {
  margin-top: 4px;
  color: var(--muted);
}

.theme-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.theme-option {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 74px;
  padding: 11px;
  border: 1px solid rgba(35, 70, 115, 0.2);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.theme-option:hover,
.theme-option:focus-visible,
.theme-option[aria-pressed="true"] {
  outline: none;
  border-color: #3b7bd2;
  box-shadow: 0 0 0 2px rgba(59, 123, 210, 0.18);
}

.theme-swatch {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 1px solid rgba(10, 38, 74, 0.24);
  border-radius: 5px;
}

.theme-swatch-xp {
  background:
    linear-gradient(#77bdf2 0 56%, #55a85c 56%),
    #77bdf2;
}

.theme-swatch-win98 {
  background:
    linear-gradient(#008080 0 70%, #c0c0c0 70%),
    #008080;
}

.theme-option-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.theme-option-copy span {
  color: var(--muted);
  line-height: 1.35;
}

.start-menu {
  position: absolute;
  left: 8px;
  bottom: calc(var(--taskbar-height) - 2px);
  z-index: 1000;
  width: min(300px, calc(100vw - 16px));
  overflow: visible;
  border: 1px solid #073c80;
  border-radius: 8px 8px 2px 2px;
  background: #f7fbff;
  box-shadow: 0 24px 55px rgba(0, 15, 45, 0.35);
}

.start-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 74px;
  padding: 12px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0)),
    linear-gradient(90deg, #0b4fa2, #2785e9);
}

.owner-avatar {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 7px;
  background: linear-gradient(135deg, #ffe28a, #4db56d);
  color: #173250;
  font-weight: 800;
  text-shadow: none;
}

.owner-name,
.owner-role {
  margin: 0;
}

.owner-name {
  font-weight: 800;
}

.owner-role {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 12px;
}

.start-body {
  display: block;
  min-height: 0;
}

.start-programs {
  max-height: 420px;
  overflow: visible;
  padding: 10px;
  background: #fff;
}

.program-button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: #172032;
  text-align: left;
  text-decoration: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.program-button:hover,
.program-button:focus-visible {
  outline: none;
  border-color: #8bb9f0;
  background: linear-gradient(180deg, #f8fbff, #dcecff);
}

.program-button .app-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 5px;
}

.program-folder {
  position: relative;
}

.program-folder.is-open,
.program-folder:hover,
.program-folder:focus-visible {
  border-color: #8bb9f0;
  background: linear-gradient(180deg, #f8fbff, #dcecff);
}

.program-caret {
  margin-left: auto;
  color: #4b627b;
  font-weight: 800;
}

.program-copy {
  min-width: 0;
}

.program-title,
.program-summary {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.program-title {
  font-weight: 700;
}

.program-summary {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.programs-submenu {
  position: absolute;
  left: calc(100% - 1px);
  top: 0;
  z-index: 1001;
  width: min(300px, calc(100vw - 24px));
  max-height: min(460px, calc(100vh - var(--taskbar-height) - 28px));
  overflow: auto;
  padding: 8px;
  border: 1px solid #073c80;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(0, 15, 45, 0.28);
}

.programs-submenu[hidden] {
  display: none;
}

.programs-submenu-title {
  margin: 3px 6px 8px;
  color: #6b7280;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.programs-empty {
  margin: 8px 6px;
  color: var(--muted);
}

.taskbar {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 900;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  height: var(--taskbar-height);
  padding-bottom: var(--safe-bottom);
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
  border-top: 1px solid rgba(255, 255, 255, 0.45);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0) 36%, rgba(0, 0, 0, 0.18)),
    linear-gradient(90deg, #0750af, #0f6ce0 32%, #0952b6);
  box-shadow: 0 -2px 12px rgba(0, 22, 65, 0.26);
}

.start-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  min-width: 100px;
  margin: 4px 7px;
  padding: 0 16px 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 999px 8px 8px 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.46), rgba(255, 255, 255, 0.08) 50%, rgba(0, 0, 0, 0.18)),
    linear-gradient(90deg, #31a64a, #7bcf4a);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 2px 7px rgba(0, 0, 0, 0.25);
}

.start-button:hover,
.start-button:focus-visible,
.start-button[aria-expanded="true"] {
  outline: none;
  filter: brightness(1.08);
}

.start-logo {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  width: 18px;
  height: 18px;
  transform: rotate(-7deg);
}

.start-logo span {
  border-radius: 1px;
  background: #fff;
}

.task-list {
  display: flex;
  min-width: 0;
  gap: 5px;
  overflow: hidden;
}

.task-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: min(180px, 22vw);
  min-width: 86px;
  height: 33px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 3px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.04) 50%, rgba(0, 0, 0, 0.14)),
    #2a75cf;
  color: #fff;
  text-align: left;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.55);
}

.task-button.is-active {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(0, 0, 0, 0.18)),
    #1656ad;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.28);
}

.task-button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 3px;
  background: var(--accent, #fff);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.tray {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: stretch;
  min-width: 110px;
  padding: 0 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.32);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0)),
    #0d87d6;
  color: #fff;
  font-size: 12px;
}

.tray-status {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #8ff075;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.22), 0 0 12px rgba(143, 240, 117, 0.75);
}

.clock {
  white-space: nowrap;
}

[data-theme="win98"] body {
  background: #008080;
}

[data-theme="win98"] .desktop-shell {
  background: #008080;
}

[data-theme="win98"] .shortcut:hover,
[data-theme="win98"] .shortcut:focus-visible {
  border-color: #fff;
  background: #000080;
}

[data-theme="win98"] .shortcut-icon,
[data-theme="win98"] .app-icon {
  border-radius: 0;
  border-color: #000;
  background:
    linear-gradient(135deg, #fff 0 18%, transparent 19%),
    linear-gradient(135deg, var(--accent, #808080), color-mix(in srgb, var(--accent, #808080) 55%, #000));
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.35);
}

[data-theme="win98"] .app-icon-image {
  image-rendering: pixelated;
}

[data-theme="win98"] .app-window {
  border-width: 2px;
  border-style: solid;
  border-color: #fff #404040 #404040 #fff;
  border-radius: 0;
  background: #c0c0c0;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.35);
}

[data-theme="win98"] .window-titlebar {
  height: 24px;
  padding: 2px 3px 2px 5px;
  background: #000080;
  color: #fff;
}

[data-theme="win98"] .window-title {
  font-size: 12px;
  text-shadow: none;
}

[data-theme="win98"] .mini-icon {
  width: 16px;
  height: 16px;
  border-radius: 0;
  border-color: #000;
  box-shadow: none;
}

[data-theme="win98"] .window-controls {
  gap: 2px;
}

[data-theme="win98"] .window-control {
  width: 18px;
  height: 18px;
  border-radius: 0;
  border-width: 2px;
  border-style: solid;
  border-color: #fff #404040 #404040 #fff;
  background: #c0c0c0;
}

[data-theme="win98"] .window-control:active {
  border-color: #404040 #fff #fff #404040;
}

[data-theme="win98"] .window-control::before,
[data-theme="win98"] .window-control::after {
  background: #000;
}

[data-theme="win98"] .window-control.minimize::before {
  left: 4px;
  right: 4px;
  bottom: 4px;
}

[data-theme="win98"] .window-control.maximize::before {
  left: 4px;
  top: 4px;
  width: 8px;
  height: 7px;
  border-color: #000;
}

[data-theme="win98"] .window-control.close {
  background: #c0c0c0;
}

[data-theme="win98"] .window-control.close::before,
[data-theme="win98"] .window-control.close::after {
  left: 3px;
  top: 7px;
  width: 10px;
}

[data-theme="win98"] .window-content {
  border: 2px solid;
  border-color: #808080 #fff #fff #808080;
  background: #c0c0c0;
}

[data-theme="win98"] .window-page,
[data-theme="win98"] .native-page,
[data-theme="win98"] .project-page {
  background: #c0c0c0;
}

[data-theme="win98"] .native-header {
  border-bottom-color: #808080;
}

[data-theme="win98"] .native-summary,
[data-theme="win98"] .theme-option-copy span,
[data-theme="win98"] .settings-section-header p,
[data-theme="win98"] .program-summary,
[data-theme="win98"] .project-tile p {
  color: #303030;
}

[data-theme="win98"] .action-link,
[data-theme="win98"] .action-button,
[data-theme="win98"] .theme-option,
[data-theme="win98"] .project-tile {
  border-radius: 0;
  border-width: 2px;
  border-style: solid;
  border-color: #fff #404040 #404040 #fff;
  background: #c0c0c0;
  color: #000;
  box-shadow: none;
}

[data-theme="win98"] .action-link:active,
[data-theme="win98"] .action-button:active,
[data-theme="win98"] .theme-option:active {
  border-color: #404040 #fff #fff #404040;
}

[data-theme="win98"] .theme-option[aria-pressed="true"] {
  outline: 1px dotted #000;
  outline-offset: -6px;
}

[data-theme="win98"] .project-frame-wrap {
  background: #808080;
}

[data-theme="win98"] .start-menu {
  border-width: 2px;
  border-style: solid;
  border-color: #fff #404040 #404040 #fff;
  border-radius: 0;
  background: #c0c0c0;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.35);
}

[data-theme="win98"] .start-profile {
  min-height: 48px;
  background: #000080;
  color: #fff;
}

[data-theme="win98"] .owner-avatar {
  width: 34px;
  height: 34px;
  border-radius: 0;
  border-color: #fff;
  background: #c0c0c0;
  color: #000;
}

[data-theme="win98"] .start-programs {
  background: #c0c0c0;
}

[data-theme="win98"] .program-button {
  border-radius: 0;
  color: #000;
}

[data-theme="win98"] .program-button:hover,
[data-theme="win98"] .program-button:focus-visible,
[data-theme="win98"] .program-folder.is-open {
  border-color: transparent;
  background: #000080;
  color: #fff;
}

[data-theme="win98"] .program-folder.is-open .program-caret,
[data-theme="win98"] .program-button:hover .program-caret,
[data-theme="win98"] .program-button:focus-visible .program-caret {
  color: #fff;
}

[data-theme="win98"] .programs-submenu {
  border-width: 2px;
  border-style: solid;
  border-color: #fff #404040 #404040 #fff;
  border-radius: 0;
  background: #c0c0c0;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.35);
}

[data-theme="win98"] .programs-submenu-title {
  color: #303030;
}

[data-theme="win98"] .taskbar {
  border-top: 2px solid #fff;
  background: #c0c0c0;
  box-shadow: none;
}

[data-theme="win98"] .start-button,
[data-theme="win98"] .task-button {
  border-radius: 0;
  border-width: 2px;
  border-style: solid;
  border-color: #fff #404040 #404040 #fff;
  background: #c0c0c0;
  color: #000;
  text-shadow: none;
  box-shadow: none;
}

[data-theme="win98"] .start-button {
  min-width: 84px;
  font-size: 15px;
}

[data-theme="win98"] .start-logo span {
  background: #0a65d8;
}

[data-theme="win98"] .task-button.is-active,
[data-theme="win98"] .start-button[aria-expanded="true"] {
  border-color: #404040 #fff #fff #404040;
  background: #b8b8b8;
}

[data-theme="win98"] .tray {
  border-left: 2px solid #808080;
  background: #c0c0c0;
  color: #000;
}

[data-theme="win98"] .tray-status {
  background: #008000;
  box-shadow: inset 0 0 0 1px #004000;
}

.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  background: #05070f;
  color: #fff;
  transition: opacity 360ms ease, visibility 360ms ease;
}

.boot-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.boot-card {
  width: min(430px, calc(100vw - 40px));
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.04));
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.58);
}

.boot-mark {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  width: 58px;
  height: 58px;
  transform: rotate(-7deg);
}

.boot-mark span {
  border-radius: 4px;
}

.boot-mark span:nth-child(1) {
  background: #f05a47;
}

.boot-mark span:nth-child(2) {
  background: #64bb4b;
}

.boot-mark span:nth-child(3) {
  background: #36a1e8;
}

.boot-mark span:nth-child(4) {
  background: #f3cf38;
}

.boot-copy {
  margin-top: 20px;
}

.boot-title {
  margin: 0;
  font-size: 32px;
  font-weight: 800;
}

.boot-subtitle {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.7);
}

.boot-meter {
  height: 10px;
  margin-top: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.boot-meter span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2b7de0, #7bdd5b);
  animation: boot-pulse 900ms ease-in-out infinite alternate;
}

@keyframes boot-pulse {
  from {
    transform: translateX(-10%);
  }
  to {
    transform: translateX(150%);
  }
}

@media (max-width: 720px) {
  :root {
    --taskbar-core-height: 54px;
  }

  .desktop-icons {
    top: calc(12px + var(--safe-top));
    left: calc(10px + var(--safe-left));
    grid-template-columns: repeat(2, 78px);
    grid-auto-rows: 90px;
    gap: 7px;
  }

  .shortcut {
    width: 78px;
  }

  .shortcut-icon {
    width: 38px;
    height: 38px;
  }

  .app-window {
    min-width: 0;
    border-radius: 7px 7px 3px 3px;
  }

  .window-titlebar {
    height: 44px;
    padding: 4px 6px 4px 10px;
  }

  .window-title {
    font-size: 14px;
  }

  .window-controls {
    gap: 5px;
  }

  .window-control {
    width: 42px;
    height: 34px;
  }

  .window-control.minimize::before {
    left: 14px;
    right: 14px;
    bottom: 9px;
  }

  .window-control.maximize::before {
    left: 14px;
    top: 10px;
    width: 12px;
    height: 10px;
  }

  .window-control.close::before,
  .window-control.close::after {
    left: 13px;
    top: 16px;
    width: 15px;
  }

  .window-content {
    border-width: 2px;
    border-top: 0;
  }

  .resize-handle {
    display: none;
  }

  .start-menu {
    right: calc(8px + var(--safe-right));
    left: calc(8px + var(--safe-left));
    width: auto;
    overflow: hidden;
  }

  .programs-submenu {
    position: static;
    width: auto;
    max-height: 220px;
    margin: 0 10px 10px;
    border-radius: 4px;
    box-shadow: none;
  }

  .taskbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .start-button {
    min-width: 82px;
    padding-right: 10px;
    font-size: 13px;
  }

  .start-logo {
    width: 22px;
    height: 22px;
  }

  .task-button {
    width: 118px;
    min-width: 58px;
    padding: 0 8px;
  }

  .task-button span {
    display: none;
  }

  .tray {
    min-width: 78px;
    padding: 0 8px;
  }

  .project-actions {
    margin-top: 0;
  }

  .project-tile-actions .action-link,
  .project-tile-actions .action-button {
    min-height: 42px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
