@font-face {
  font-family: "XP Start";
  src: url("/fonts/Inter-BoldItalic.ttf") format("truetype");
  font-style: italic;
  font-weight: 700;
  font-display: swap;
}

:root {
  --xp-window: #ece9d8;
  --xp-chrome: #ece9d8;
  --xp-creme-60: #c9c7ba;
  --xp-creme-30: #aca899;
  --xp-text: #000000;
  --xp-text-soft: #7f7c73;
  --xp-border: #215ceb;
  --xp-blue-50: #245cda;
  --xp-blue-60: #4f9af3;
  --xp-blue-30: #214fa8;
  --xp-cyan-50: #11a5f0;
  --xp-green-50: #4ab030;
  --xp-selection: #316ac5;
  --xp-input-border: #7f9db9;
  --xp-button-border: #1c5180;
  --xp-start-menu-right: #d3e5fa;
  --xp-start-menu-right-border: #95bdee;
  --xp-title-active: #ffffff;
  --xp-title-inactive: #d8e4f8;
  /* Kit fonts: Tahoma UI/labels, Trebuchet titles, Inter Bold Italic for Start (as in Figma) */
  --font-ui: Tahoma, "Microsoft Sans Serif", "MS Sans Serif", sans-serif;
  --font-title: "Trebuchet MS", Tahoma, sans-serif;
  --font-start: "XP Start", "Franklin Gothic Medium", "Franklin Gothic", Tahoma, sans-serif;
  --taskbar-h: 30px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--xp-text);
  user-select: none;
}

body {
  background-color: #3a6e28;
  background-image: url("/assets/bliss.jpg");
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}

#desktop {
  position: absolute;
  inset: 0 0 var(--taskbar-h) 0;
}

.desktop-icon {
  position: absolute;
  width: 74px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 2px;
  cursor: default;
  border: 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  color: inherit;
  font: inherit;
  box-shadow: none;
  outline: none;
}

.desktop-icon.dragging {
  opacity: 0.95;
  z-index: 50;
}

.desktop-icon.drop-target .icon-img,
.folder-icon.drop-target .icon-img {
  background: rgba(49, 106, 197, 0.55);
  outline: 1px dotted #fff;
}

.desktop-icon.drop-target .icon-label,
.folder-icon.drop-target .icon-label {
  background: var(--xp-selection);
  color: #fff;
  text-shadow: none;
}

.login-dialog-form {
  display: grid;
  gap: 10px;
  padding-bottom: 4px;
}

.login-dialog .dialog-actions {
  margin: 0;
  padding: 4px 0 10px;
}

.desktop-icon .icon-img {
  width: 32px;
  height: 32px;
  padding: 2px;
  image-rendering: auto;
  filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.35));
  background: transparent;
  pointer-events: none;
  box-sizing: content-box;
}

.desktop-icon .icon-label {
  color: #fff;
  font-family: var(--font-ui);
  font-size: 11px;
  text-align: center;
  text-shadow: 1px 1px 0 #000;
  line-height: 1.15;
  max-width: 70px;
  padding: 1px 2px;
  word-break: break-word;
  background: transparent;
  pointer-events: none;
}

/* Kit Item/Selection: #316AC5 + white label (desktop Luna) */
.desktop-icon:focus .icon-img,
.desktop-icon.selected .icon-img {
  background: rgba(49, 106, 197, 0.4);
  outline: 1px dotted #fff;
  outline-offset: 0;
  filter: none;
}

.desktop-icon:focus .icon-label,
.desktop-icon.selected .icon-label {
  background: var(--xp-selection);
  color: #fff;
  text-shadow: none;
}

.desktop-marquee {
  position: absolute;
  z-index: 40;
  box-sizing: border-box;
  border: 1px solid #316ac5;
  background: rgba(49, 106, 197, 0.28);
  pointer-events: none;
}

#windows {
  position: absolute;
  inset: 0 0 var(--taskbar-h) 0;
  pointer-events: none;
}

.window {
  position: absolute;
  min-width: 320px;
  min-height: 200px;
  width: 520px;
  height: 360px;
  display: flex;
  flex-direction: column;
  pointer-events: auto;
  padding: 3px;
  background: linear-gradient(
    180deg,
    #3d95ff 6.7%,
    #0372ff 10.4%,
    #0365f1 13.9%,
    #0053e1 25.8%,
    #0058ee 56.3%,
    #026afe 74.1%,
    #0060fc 90.8%,
    #0043cf 96.4%
  );
  border-radius: 8px 8px 0 0;
  box-shadow: 2px 3px 8px rgba(0, 0, 0, 0.35);
}

.window.minimized {
  display: none;
}

.window-titlebar {
  height: 29px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 3px 0 5px;
  margin-bottom: 2px;
  color: var(--xp-title-active);
  font-family: var(--font-title);
  font-size: 13px;
  font-weight: 700;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.35);
  background: linear-gradient(
    180deg,
    #3d95ff 6.7%,
    #0372ff 10.4%,
    #0365f1 13.9%,
    #0053e1 25.8%,
    #0058ee 56.3%,
    #026afe 74.1%,
    #026afe 84.7%,
    #0060fc 90.8%,
    #0043cf 96.4%
  );
  border-radius: 6px 6px 0 0;
  cursor: move;
  flex-shrink: 0;
}

.window-titlebar .title-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

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

.window-controls {
  display: flex;
  gap: 0;
  margin-left: 4px;
}

.window-controls button {
  width: 21px;
  height: 21px;
  border: 0;
  padding: 0;
  background: transparent center / 21px 21px no-repeat;
  cursor: pointer;
}

.window-controls button[data-action="minimize"] {
  background-image: url("/assets/xp-kit/window/minimize-active.png");
}

.window-controls button[data-action="maximize"] {
  background-image: url("/assets/xp-kit/window/maximize-active.png");
}

.window-controls button[data-action="close"] {
  background-image: url("/assets/xp-kit/window/close-active.png");
}

.window-controls button:hover {
  filter: brightness(1.08);
}

.window-controls button:active {
  filter: brightness(0.92);
}

.window-chrome {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  background: var(--xp-chrome);
  border: 1px solid #0143cf;
}

.window-menubar {
  display: flex;
  gap: 10px;
  padding: 1px 6px;
  font-size: 11px;
  background: var(--xp-chrome);
  border-bottom: 1px solid var(--xp-creme-60);
}

.window-menubar span {
  padding: 1px 2px;
}

.window-menubar span:hover {
  background: #316ac5;
  color: #fff;
}

.window-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 6px;
  background: linear-gradient(180deg, #f3f4f7, #e9e5cb);
  border-bottom: 1px solid var(--xp-creme-60);
}

.tb-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  font: inherit;
  font-size: 11px;
  cursor: default;
}

.tb-btn:hover {
  border-color: var(--xp-creme-30);
  background: linear-gradient(180deg, #fff, #e8e4d4);
}

.tb-btn.back {
  font-weight: 700;
  color: #003399;
}

.window-address {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 6px;
  background: var(--xp-chrome);
  border-bottom: 1px solid var(--xp-creme-60);
  font-size: 11px;
}

.window-address input {
  flex: 1;
  height: 20px;
  padding: 0 4px;
  border: 1px solid #7f9db9;
  background: #fff;
  font: inherit;
  font-size: 11px;
}

.window-body {
  flex: 1;
  overflow: auto;
  background: #fff;
  position: relative;
  min-height: 0;
}

.window-body.explorer {
  display: grid;
  grid-template-columns: 186px 1fr;
  overflow: hidden;
}

.explorer-side {
  overflow: auto;
  padding: 14px 10px 10px;
  background: linear-gradient(180deg, #7ba2e7 0%, #6375d6 55%, #6b85dc 100%);
  border-right: 1px solid #fff;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.xp-card {
  width: 100%;
  flex: 0 0 auto;
}

.xp-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-height: 23px;
  padding: 2px 4px 2px 8px;
  border: 0;
  border-radius: 3px 3px 0 0;
  cursor: pointer;
  width: 100%;
  text-align: left;
  font: 700 11px/1.1 Arial, Tahoma, sans-serif;
}

.xp-card-header.primary {
  background: linear-gradient(90deg, #0049b5 0%, #295dce 100%);
  color: #fff;
}

.xp-card-header.default {
  background: linear-gradient(90deg, #ffffff 0%, #c6d3f7 100%);
  color: #215dc6;
}

.xp-card-header-title {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  min-width: 0;
}

.xp-card-header-title img {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.xp-card-header.primary .xp-card-header-title img.xp-card-header-badge {
  width: 28px;
  height: 28px;
  margin: -8px 0 -4px -6px;
}

.xp-expander {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 1px solid #aeb8da;
  box-shadow: 1px 1px 2px rgba(169, 178, 215, 0.9);
  background: linear-gradient(135deg, #fff 0%, #e7eef4 100%);
  color: #003ca5;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font: 700 10px/1 Tahoma, sans-serif;
  transform: rotate(-90deg);
}

.xp-card-header.primary .xp-expander {
  border-color: #73a1e2;
  box-shadow: 1px 1px 2px rgba(37, 87, 192, 0.55);
  background: linear-gradient(135deg, #5980d0 0%, #2e60c1 100%);
  color: #fff;
}

.xp-card.is-collapsed .xp-expander {
  transform: rotate(90deg);
}

.xp-card-body {
  border: 1px solid #fff;
  border-top: 0;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.xp-card-body.primary {
  background: #eff3ff;
}

.xp-card-body.default {
  background: #d6dff7;
}

.xp-card.is-collapsed .xp-card-body {
  display: none;
}

.xp-card-link {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #215dc6;
  font: 11px/1.25 Tahoma, "MS Sans Serif", sans-serif;
  text-align: left;
  cursor: pointer;
  width: 100%;
}

.xp-card-link img {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin-top: 1px;
}

.xp-card-link span {
  flex: 1 1 auto;
  min-width: 0;
}

.xp-card-link:hover span,
.xp-card-link:focus-visible span {
  text-decoration: underline;
}

.xp-card-link:focus-visible {
  outline: 1px dotted #215dc6;
  outline-offset: 1px;
}

.xp-card-link[disabled] {
  opacity: 0.55;
  cursor: default;
}

.xp-card-link[disabled]:hover span {
  text-decoration: none;
}

.xp-details-line {
  margin: 0;
  color: #000;
  font: 11px/1.3 Tahoma, "MS Sans Serif", sans-serif;
}

.xp-details-line strong {
  font-weight: 700;
}

.explorer-main {
  overflow: auto;
  padding: 10px;
  background: #fff;
}

.window-body:has(.notepad-toolbar) {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.window-body:has(.notepad-toolbar) .notepad {
  flex: 1;
  height: auto;
}

.window-body textarea.notepad {
  width: 100%;
  height: 100%;
  border: 0;
  resize: none;
  padding: 8px;
  font-family: "Lucida Console", "Courier New", monospace;
  font-size: 13px;
  outline: none;
  background: #fff;
}

.notepad-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  border-bottom: 1px solid var(--xp-creme-60);
  background: var(--xp-chrome);
  font-size: 11px;
}

.notepad-toolbar button {
  padding: 2px 8px;
  border: 1px solid var(--xp-creme-30);
  background: linear-gradient(180deg, #fff, #e7e1d2);
  font: inherit;
  cursor: pointer;
}

.folder-empty {
  padding: 12px;
  color: var(--xp-text-soft);
  font-size: 11px;
}

.context-menu {
  position: fixed;
  z-index: 20000;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 184px;
  padding: 3px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #aca899;
  box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.5);
  font-family: var(--font-ui);
  font-size: 11px;
  color: #000;
}

.context-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 17px;
  min-height: 17px;
  padding: 2px;
  border: 0;
  background: transparent;
  color: #000;
  font: inherit;
  font-size: 11px;
  line-height: normal;
  text-align: left;
  cursor: default;
}

.context-menu-item:hover,
.context-menu-item:focus {
  background: #316ac5;
  color: #fff;
  outline: none;
}

.context-menu-item:disabled,
.context-menu-item.is-disabled {
  color: #aca899;
  text-shadow: 1px 1px 1px #fff;
  pointer-events: none;
}

.context-menu-item:disabled:hover,
.context-menu-item.is-disabled:hover {
  background: transparent;
  color: #aca899;
}

.context-menu-leading {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

.context-menu-decorator {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.context-menu-label {
  padding: 0 4px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.context-menu-trailing {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
  margin-left: 12px;
}

.context-menu-shortcut {
  white-space: nowrap;
}

.context-menu-arrow {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  background: center / 7px 7px no-repeat url("/assets/xp-kit/menu/arrow.svg");
}

.context-menu-item:hover .context-menu-arrow,
.context-menu-item:focus .context-menu-arrow {
  filter: brightness(10);
}

.context-menu-sep {
  height: 9px;
  margin: 0;
  padding: 3px 0;
  background:
    linear-gradient(#aca899, #aca899) center / calc(100% - 4px) 1px no-repeat;
  pointer-events: none;
}

.dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30000;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.2);
}

.dialog {
  width: min(360px, calc(100vw - 24px));
  padding: 3px;
  background: linear-gradient(180deg, #3d95ff, #0043cf);
  border-radius: 8px 8px 0 0;
  box-shadow: 2px 3px 10px rgba(0, 0, 0, 0.35);
}

.dialog-inner {
  background: var(--xp-chrome);
}

.dialog-title {
  padding: 5px 8px;
  color: #fff;
  font-family: var(--font-title);
  font-size: 13px;
  font-weight: 700;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3);
  background: linear-gradient(180deg, #3d95ff, #0053e1 40%, #0043cf);
  border-radius: 6px 6px 0 0;
}

.dialog-label,
.dialog-message {
  display: grid;
  gap: 6px;
  margin: 14px 14px 0;
  font-size: 11px;
}

.dialog-input {
  height: 21px;
  padding: 2px 3px;
  border: 1px solid var(--xp-input-border);
  background: #fff;
  color: var(--xp-text);
  font: inherit;
  font-size: 11px;
  outline: none;
}

.dialog-input:focus {
  outline: 1px dotted #000;
  outline-offset: -3px;
}

.dialog-input::selection {
  background: var(--xp-selection);
  color: #fff;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px;
}

.dialog-actions button,
.xp-button {
  min-width: 75px;
  height: 23px;
  padding: 0 14px;
  border: 1px solid var(--xp-button-border);
  border-radius: 3px;
  background: linear-gradient(180deg, #fff 0%, #f0f0ea 100%);
  box-shadow:
    inset 1.5px 1.5px 2px #fff,
    inset -1.5px -2.5px 2px rgba(83, 55, 0, 0.2),
    1px 1px 0 rgba(255, 255, 255, 0.75);
  color: var(--xp-text);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.dialog-actions button:hover,
.xp-button:hover {
  filter: brightness(1.03);
}

.dialog-actions button:active,
.xp-button:active {
  background: linear-gradient(180deg, #ece9d8, #fff);
  box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.dialog-actions button:focus,
.xp-button:focus {
  outline: 1px dotted #000;
  outline-offset: -4px;
}

.window-body .media-frame {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: #111;
  color: #ddd;
  padding: 8px;
}

.window-body .media-frame img,
.window-body .media-frame video {
  max-width: 100%;
  max-height: 100%;
}

.window-body .media-frame audio {
  width: min(100%, 420px);
}

.window-resize {
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 14px;
  height: 14px;
  cursor: nwse-resize;
  background:
    linear-gradient(135deg, transparent 45%, rgba(255, 255, 255, 0.8) 46%) 1px 1px / 5px 5px,
    linear-gradient(135deg, transparent 45%, rgba(0, 0, 0, 0.28) 46%) 4px 4px / 5px 5px;
  background-repeat: no-repeat;
  z-index: 2;
}

.folder-icon {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  width: 78px;
  margin: 4px;
  padding: 4px;
  vertical-align: top;
  border: 1px dotted transparent;
  cursor: default;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  color: inherit;
}

.folder-icon.selected,
.folder-icon:focus {
  background: transparent;
  border-color: transparent;
  color: inherit;
  outline: none;
}

.folder-icon .icon-img {
  width: 32px;
  height: 32px;
  padding: 2px;
  box-sizing: content-box;
}

.folder-icon .icon-label {
  font-family: var(--font-ui);
  font-size: 11px;
  text-align: center;
  margin-top: 2px;
  padding: 1px 2px;
  word-break: break-word;
}

.folder-icon.selected .icon-img,
.folder-icon:focus .icon-img {
  background: rgba(49, 106, 197, 0.4);
  outline: 1px dotted #fff;
}

.folder-icon.selected .icon-label,
.folder-icon:focus .icon-label {
  background: var(--xp-selection);
  color: #fff;
}

#taskbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--taskbar-h);
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 0;
  background: linear-gradient(
    180deg,
    #3168d5 2.8%,
    #4993e6 7%,
    #286add 14.1%,
    #2359d6 19.9%,
    #2157d7 36.3%,
    #245ddb 57.2%,
    #2662df 75.3%,
    #2663e0 90.7%,
    #1e50c4 94.9%,
    #3155b0 100%
  );
  border-top: 1px solid #0831d9;
  z-index: 10000;
}

#start-btn {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: flex-end;
  gap: 6px;
  width: 99px;
  height: 30px;
  margin: 0 -12px 0 0;
  padding: 6px 22px 7px 10px;
  border: 0;
  outline: 0;
  cursor: pointer;
  flex-shrink: 0;
  color: #fff;
  overflow: visible;
  background: transparent;
  background-image: url("/assets/xp-kit/start/button-shape-clean.svg");
  background-repeat: no-repeat;
  background-size: 99px 30px;
  background-position: left top;
}

#start-btn .start-flag {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  image-rendering: auto;
  pointer-events: none;
  filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.5));
  margin-bottom: 1px;
}

#start-btn .start-label {
  font-family: var(--font-start);
  font-size: 18px;
  font-weight: 700;
  font-style: italic;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 1px 1.5px 3px #2b3100;
  pointer-events: none;
  transform: translateY(-1px);
}

#start-btn:hover {
  filter: brightness(1.05);
}

#start-btn[aria-expanded="true"],
#start-btn:active {
  filter: brightness(0.92);
}

.start-menu {
  position: absolute;
  left: 0;
  bottom: var(--taskbar-h);
  width: 380px;
  z-index: 10001;
  border: 1px solid var(--xp-border);
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  overflow: hidden;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.35);
  background: #fff;
}

.start-menu-user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 8px 10px;
  color: #fff;
  background: linear-gradient(
    180deg,
    #74aae8 0%,
    #1969d2 0.8%,
    #2183ec 13%,
    #478bfc 28%,
    #448be3 92%,
    #2577df 96%,
    #0d5bc7 100%
  );
}

.start-avatar {
  width: 46px;
  height: 46px;
  border: 2px solid #fff;
  border-radius: 3px;
  box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.35);
  object-fit: cover;
  background:
    linear-gradient(45deg, #cfcfcf 25%, transparent 25%) 0 0 / 8px 8px,
    linear-gradient(-45deg, #cfcfcf 25%, transparent 25%) 0 4px / 8px 8px,
    linear-gradient(45deg, transparent 75%, #cfcfcf 75%) 4px -4px / 8px 8px,
    linear-gradient(-45deg, transparent 75%, #cfcfcf 75%) -4px 0 / 8px 8px,
    #efefef;
}

.start-user-name {
  font-size: 14px;
  font-weight: 700;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.35);
}

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

.start-menu-columns::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ff8a1d, transparent);
  z-index: 1;
}

.start-col-left {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 10px 8px 6px;
  background: #fff;
  border-right: 1px solid var(--xp-start-menu-right-border);
  min-height: 374px;
}

.start-col-right {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 10px 8px;
  background: var(--xp-start-menu-right);
}

.start-sep {
  height: 1px;
  margin: 6px 4px;
  background: linear-gradient(90deg, transparent, #d6d3c6 12%, #d6d3c6 88%, transparent);
}

.start-sep-right {
  background: linear-gradient(90deg, transparent, #95bdee 12%, #95bdee 88%, transparent);
}

.start-section-title {
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #003399;
}

.start-app-item {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 6px 4px;
  border-radius: 2px;
}

button.start-app-btn {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.start-app-item:hover,
button.start-app-btn:hover {
  background: #316ac5;
  color: #fff;
}

.start-app-item strong {
  display: block;
  font-size: 11px;
}

.start-app-item small {
  display: block;
  font-size: 10px;
  color: var(--xp-text-soft);
}

.start-app-item:hover small {
  color: #e8f0ff;
}

.start-app-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  object-fit: contain;
}

.start-place {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 4px 6px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  text-align: left;
  font: inherit;
  color: #00008b;
  cursor: pointer;
}

.start-place img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
}

.start-place span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  font-size: 11px;
}

.start-place:hover {
  background: #316ac5;
  color: #fff;
}

.start-place strong {
  font-size: 11px;
  font-weight: 700;
}

.start-place em {
  font-style: normal;
  font-size: 9px;
  opacity: 0.85;
}

.start-app-pinned strong {
  font-weight: 700;
}

.start-panel {
  display: grid;
  gap: 8px;
}

.start-login-form {
  display: grid;
  gap: 8px;
}

.start-login-form label {
  display: grid;
  gap: 3px;
  font-size: 11px;
  color: var(--xp-text);
}

.start-login-form input {
  height: 21px;
  padding: 2px 3px;
  border: 1px solid var(--xp-input-border);
  background: #fff;
  color: var(--xp-text);
  font: inherit;
  font-size: 11px;
  outline: none;
}

.start-login-form input:focus {
  outline: 1px dotted #000;
  outline-offset: -3px;
}

.start-login-form input::selection {
  background: var(--xp-selection);
  color: #fff;
}

.start-primary-btn {
  justify-self: start;
  min-width: 75px;
  height: 23px;
  padding: 0 14px;
  border: 1px solid var(--xp-button-border);
  border-radius: 3px;
  background: linear-gradient(180deg, #fff 0%, #f0f0ea 100%);
  box-shadow:
    inset 1.5px 1.5px 2px #fff,
    inset -1.5px -2.5px 2px rgba(83, 55, 0, 0.2);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.start-primary-btn:focus {
  outline: 1px dotted #000;
  outline-offset: -4px;
}

.start-error {
  margin: 0;
  color: #b33a2b;
  font-size: 11px;
}

.start-menu-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  min-height: 40px;
  padding: 7px 10px;
  background: linear-gradient(
    180deg,
    #74aae8 0%,
    #1969d2 0.8%,
    #2183ec 13%,
    #478bfc 28%,
    #448be3 92%,
    #2577df 96%,
    #0d5bc7 100%
  );
}

.start-footer-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 6px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 11px;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

.start-footer-btn[hidden],
.volume-popup[hidden],
.xp-tooltip[hidden],
#start-menu[hidden],
#context-menu[hidden] {
  display: none !important;
}

.start-footer-btn img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.start-footer-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

#taskbar-windows {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 3px;
  flex: 1;
  overflow: hidden;
  padding: 0 4px 0 12px;
}

.task-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 160px;
  height: 25px;
  padding: 0 10px;
  border: 1px solid rgba(8, 41, 111, 0.5);
  border-radius: 3px;
  background: linear-gradient(180deg, #4892f7 0%, #397df3 30%, #3980f4 66%, #3981f4 100%);
  color: #fff;
  font-size: 11px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  cursor: pointer;
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.35);
}

.task-btn img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex-shrink: 0;
}

.task-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-btn.active {
  background: linear-gradient(180deg, #164dbc, #184eb8);
  box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.25);
}

#tray {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 100%;
  min-width: 86px;
  padding: 0 8px 0 6px;
  background: linear-gradient(
    180deg,
    #095bc9 2.5%,
    #19b9f3 5.4%,
    #19b9f3 9.8%,
    #149eed 10.6%,
    #1290e8 19.5%,
    #0d8dea 60.2%,
    #0f9eef 80.9%,
    #119deb 90.3%,
    #226bce 97.2%
  );
  border-left: 1px solid #0660a0;
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.25);
}

.tray-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.tray-icon:hover {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
}

.tray-icon img {
  display: block;
  width: 16px;
  height: 16px;
  image-rendering: pixelated;
}

#clock {
  min-width: 48px;
  margin-left: 4px;
  color: #fff;
  font-size: 11px;
  text-align: center;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.2);
  cursor: default;
}

.xp-tooltip {
  position: absolute;
  z-index: 10050;
  max-width: 240px;
  padding: 3px 6px;
  background: #ffffe1;
  border: 1px solid #000;
  color: #000;
  font-family: var(--font-ui);
  font-size: 11px;
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

.volume-popup {
  position: absolute;
  left: 0;
  top: 0;
  width: 78px;
  height: 122px;
  padding: 0;
  background: #ece9d8;
  border: 1px solid #0054e3;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.35);
  z-index: 10020;
  box-sizing: border-box;
  overflow: hidden;
}

.xp-volume {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  height: 100%;
  padding: 8px 4px 10px;
  box-sizing: border-box;
}

.xp-volume-label {
  width: 100%;
  text-align: center;
  font-family: var(--font-ui);
  font-size: 11px;
  line-height: 1.1;
  color: #000;
  white-space: nowrap;
  overflow: hidden;
}

.xp-volume-slider {
  position: relative;
  width: 34px;
  height: 75px;
  min-width: 34px;
  margin: 0 auto;
  cursor: pointer;
  outline: none;
  flex: 0 0 auto;
}

.xp-volume-track {
  position: absolute;
  left: 5px;
  top: 0;
  width: 24px;
  height: 75px;
  pointer-events: none;
  user-select: none;
}

.xp-volume-thumb {
  position: absolute;
  left: 6px;
  top: 0;
  width: 22px;
  height: 11px;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.12));
}

.app-stub {
  padding: 16px;
  font-size: 11px;
  line-height: 1.45;
  background: #fff;
  height: 100%;
}

.app-stub h3 {
  margin: 0 0 8px;
  font-size: 13px;
}

.ie-chrome {
  display: grid;
  grid-template-rows: auto auto 1fr;
  height: 100%;
  background: #ece9d8;
}

.ie-toolbar,
.ie-address {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border-bottom: 1px solid #aca899;
  font-size: 11px;
}

.ie-address input {
  flex: 1;
  height: 21px;
  border: 1px solid #7f9db9;
  padding: 0 4px;
  font: inherit;
}

.ie-page {
  background: #fff;
  padding: 18px;
  overflow: auto;
}

.calc-body {
  display: grid;
  gap: 8px;
  padding: 10px;
  background: #ece9d8;
  height: 100%;
}

.calc-display {
  height: 28px;
  padding: 2px 6px;
  border: 1px solid #7f9db9;
  background: #fff;
  text-align: right;
  font: 14px "Lucida Console", monospace;
}

.calc-keys {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.calc-keys button {
  height: 28px;
  border: 1px solid #1c5180;
  border-radius: 2px;
  background: linear-gradient(180deg, #fff, #f0f0ea);
  font: inherit;
  cursor: pointer;
}

.control-panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px 12px;
  padding: 16px;
  background: #fff;
  height: 100%;
  overflow: auto;
  align-content: start;
}

.control-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border: none;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  color: inherit;
  cursor: default;
  outline: none;
  width: 84px;
  justify-self: center;
}

.control-tile:hover,
.control-tile:focus,
.control-tile:focus-visible,
.control-tile:active {
  background: transparent;
  outline: none;
  box-shadow: none;
}

.control-tile img {
  width: 32px;
  height: 32px;
  padding: 2px;
  box-sizing: content-box;
  pointer-events: none;
}

.control-tile span {
  text-align: center;
  font-size: 11px;
  font-family: var(--font-ui);
  padding: 1px 2px;
  max-width: 76px;
  word-break: break-word;
  pointer-events: none;
}

.control-tile.selected img,
.control-tile:focus img {
  background: rgba(49, 106, 197, 0.4);
  outline: 1px dotted #fff;
}

.control-tile.selected span,
.control-tile:focus span {
  background: var(--xp-selection);
  color: #fff;
}

.shutdown-dialog .dialog-inner {
  padding: 12px 16px 0;
}

/* XP "Log Off Windows" dialog */
.dialog-backdrop.logoff-backdrop {
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: grayscale(1) brightness(0.85);
}

.logoff-dialog {
  width: min(413px, calc(100vw - 24px));
  padding: 0;
  border: 0;
  outline: 0;
  border-radius: 0;
  background: #00309c;
  box-shadow: 3px 4px 14px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.logoff-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px 9px;
  background: #00309c;
  color: #fff;
  font: 700 18px/1.1 Tahoma, "MS Sans Serif", sans-serif;
}

.logoff-dialog-flag {
  width: 40px;
  height: auto;
  object-fit: contain;
  image-rendering: auto;
  flex: 0 0 auto;
  background: transparent;
  border: 0;
}

.logoff-dialog-body {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 56px;
  min-height: 148px;
  padding: 26px 28px 18px;
  background:
    radial-gradient(ellipse at 50% 40%, #8eb0f4 0%, #6286df 45%, #3d66c6 100%);
}

.logoff-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 110px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font: 13px/1.25 Tahoma, "MS Sans Serif", sans-serif;
  text-align: center;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  padding: 0;
}

.logoff-choice:focus-visible {
  outline: 1px dotted #fff;
  outline-offset: 4px;
}

.logoff-choice img {
  width: 32px;
  height: 32px;
  border: 0;
  outline: 0;
  border-radius: 0;
  box-shadow: 1px 2px 2px rgba(0, 0, 0, 0.4);
  image-rendering: auto;
  background: transparent;
}

.logoff-choice u {
  text-decoration: underline;
  text-underline-offset: 1px;
}

.logoff-dialog-footer {
  display: flex;
  justify-content: flex-end;
  padding: 10px 14px 12px;
  background: #00309c;
}

.logoff-dialog-footer button {
  min-width: 78px;
  height: 23px;
  border: 1px solid #003c74;
  border-radius: 3px;
  background: linear-gradient(180deg, #fff, #ece9d8);
  font: 11px Tahoma, sans-serif;
  cursor: pointer;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #b4b4a8;
}

.logoff-dialog-footer button:focus-visible {
  outline: 1px dotted #000;
  outline-offset: -4px;
}

.shutdown-choices {
  display: flex;
  justify-content: center;
  gap: 28px;
  padding: 18px 10px 8px;
}

.shutdown-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.shutdown-choice img {
  width: 32px;
  height: 32px;
}

.paint-canvas-wrap {
  height: 100%;
  background: #808080;
  padding: 8px;
}

.paint-canvas-wrap canvas {
  display: block;
  background: #fff;
  cursor: crosshair;
  box-shadow: 1px 1px 0 #000;
}

@media (max-width: 640px) {
  .window {
    min-width: 220px;
  }

  .start-menu {
    width: min(380px, calc(100vw - 4px));
  }

  .window-body.explorer {
    grid-template-columns: 1fr;
  }

  .explorer-side {
    display: none;
  }
}

/* —— Boot splash (authentic XP layout) —— */
body.startup-pending #desktop,
body.startup-pending #windows,
body.startup-pending #taskbar,
body.startup-pending #start-menu,
body.startup-pending #volume-popup,
body.startup-pending #context-menu,
body.startup-pending #dialog-root,
body.startup-pending #tooltip {
  visibility: hidden !important;
  pointer-events: none !important;
}

body.startup-pending {
  background: #000 !important;
  background-image: none !important;
}

.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.boot-screen[hidden] {
  display: none !important;
}

.boot-frame {
  position: relative;
  width: min(100vw, calc(100vh * 4 / 3));
  aspect-ratio: 4 / 3;
  max-height: 100vh;
}

.boot-shot {
  width: 100%;
  height: 100%;
  object-fit: fill;
  image-rendering: pixelated;
  display: block;
}

/* Figma Progress Bar / Marquee, recolored blue for the XP boot splash. */
.boot-progress-overlay {
  position: absolute;
  left: 50%;
  top: 73.125%;
  transform: translateX(-50%);
  width: 26.5%;
  height: auto;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.xp-progress-marquee {
  position: relative;
  container-type: inline-size;
  box-sizing: border-box;
  width: 100%;
  height: 13px;
  padding: 3px;
  overflow: hidden;
  border: 1px solid #686868;
  border-radius: 3px;
  background: #000;
  box-shadow: inset 1px 1px 3px 1px rgba(0, 0, 0, 0.55);
}

.xp-progress-runner {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 0;
  display: flex;
  align-items: stretch;
  gap: 2px;
  animation: boot-progress-marquee 1.35s linear infinite;
}

.xp-progress-marquee .xp-progress-block {
  flex: 0 0 6px;
  width: 6px;
  border-radius: 1px;
  /* Figma Progress Bar Block gradient, painted boot-blue */
  background: linear-gradient(
    180deg,
    #9ec4ff 0%,
    #6ea0f5 33%,
    #3b78ef 34%,
    #2155ce 50%,
    #3d7cf0 75%,
    #8eb8ff 100%
  );
}

.xp-progress-marquee .xp-progress-block.is-dim {
  opacity: 0.33;
}

.xp-progress-marquee .xp-progress-block.is-mid {
  opacity: 0.66;
}

@keyframes boot-progress-marquee {
  from { transform: translateX(-28px); }
  to { transform: translateX(calc(100cqw + 28px)); }
}

/* —— Welcome / login screen —— */
.welcome-screen {
  position: fixed;
  inset: 0;
  z-index: 9990;
  display: grid;
  grid-template-rows: 8% 2px 1fr 2px 10%;
  color: #fff;
  font-family: Tahoma, "Microsoft Sans Serif", sans-serif;
  background: #5a7edc;
}

.welcome-screen[hidden] {
  display: none !important;
}

.welcome-header {
  background: #00309c;
}

.welcome-header-stripe {
  background: linear-gradient(90deg, #466dcd, #c7ddff, #b0c9f7, #5a7edc);
}

.welcome-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2%;
  min-height: 0;
  background: radial-gradient(circle at 8% 12%, #91b1ef 0%, #7698e6 8%, #5a7edc 18%);
  padding: 0 4%;
}

.welcome-left {
  flex: 1 1 0;
  text-align: right;
  padding-right: 2%;
}

.welcome-logo {
  width: min(200px, 36vw);
  height: auto;
  display: inline-block;
}

.welcome-hint {
  margin: 16px calc(min(200px, 36vw) * 0.12) 0 0;
  font-size: 18px;
  text-shadow: 0 0 1px #fff;
}

.welcome-divider {
  width: 1px;
  align-self: stretch;
  background: linear-gradient(180deg, #5a7edc, #90aded, #5a7edc);
}

.welcome-right {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding-left: 2%;
  max-width: 420px;
}

.welcome-user {
  display: grid;
  grid-template-columns: 52px 1fr;
  grid-template-rows: auto auto;
  column-gap: 8px;
  row-gap: 4px;
  align-items: center;
  width: min(360px, 100%);
  padding: 8px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.welcome-user:hover,
.welcome-user:focus-visible,
.welcome-user.is-active {
  outline: none;
  background: linear-gradient(90deg, #0e3997, #5a7edc);
}

.welcome-user-pic-wrap {
  grid-row: 1 / span 2;
  width: 52px;
  height: 52px;
  border-radius: 6px;
  border: 2px solid #fff;
  box-sizing: border-box;
  overflow: hidden;
  background: #111;
}

.welcome-user:hover .welcome-user-pic-wrap,
.welcome-user:focus-visible .welcome-user-pic-wrap,
.welcome-user.is-active .welcome-user-pic-wrap {
  border-color: #ffee00;
  box-shadow: 0 0 0 2px #ffb600;
}

.welcome-user-pic {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.welcome-user-name {
  grid-column: 2;
  font-size: 18px;
  text-shadow: 0 0 1px #fff;
}

.welcome-pass-row {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.welcome-pass-row[hidden] {
  display: none !important;
}

.welcome-pass-row input {
  width: 164px;
  height: 24px;
  border: 1px solid #7f9db9;
  padding: 2px 4px;
  font: 12px Tahoma, sans-serif;
}

.welcome-pass-go {
  width: 24px;
  height: 24px;
  border: 1px solid #003c74;
  border-radius: 3px;
  background: linear-gradient(180deg, #fff, #d6d3c6);
  color: #003c74;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
}

.welcome-pass-error {
  grid-column: 2;
  font-size: 11px;
  color: #ffe9a8;
}

.welcome-pass-error[hidden] {
  display: none !important;
}

.welcome-footer-stripe {
  background: linear-gradient(90deg, #003399, #f99736, #c2814d, #00309c);
}

.welcome-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding: 18px 24px 0;
  background: linear-gradient(90deg, #3833ac, #00309c);
}

.welcome-shutdown {
  display: flex;
  align-items: center;
  gap: 4px;
  border: none;
  background: transparent;
  color: #fff;
  font: 14px/1.15 Tahoma, sans-serif;
  cursor: pointer;
  padding: 0;
}

.welcome-shutdown img {
  width: 28px;
  height: 28px;
  display: block;
  flex: 0 0 auto;
}

.welcome-shutdown-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
  text-align: left;
}

.welcome-footer-note {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-size: 12px;
  text-align: right;
  line-height: 1.35;
}

.welcome-footer-line {
  display: block;
  white-space: nowrap;
}

.welcome-off {
  position: fixed;
  inset: 0;
  z-index: 10050;
  background: #000;
}
