:root {
  --win-gray: #c0c0c0;
  --win-gray-dark: #808080;
  --win-gray-light: #dfdfdf;
  --win-white: #ffffff;
  --win-black: #000000;
  --win-blue: #000080;
  --desktop-teal: #008080;
  --focus-blue: #0000aa;
  --font-system: "MS Sans Serif", "Tahoma", "Geneva", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body,
.os-shell,
.screen {
  width: 100%;
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  background: var(--win-black);
  color: var(--win-black);
  font-family: var(--font-system);
  font-size: 14px;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

.hidden {
  display: none !important;
}

.screen {
  position: fixed;
  inset: 0;
}

.boot-screen {
  display: grid;
  place-items: center;
  background: #050505;
  color: #d8d8d8;
}

.boot-box {
  width: min(640px, calc(100vw - 32px));
  padding: 28px;
  border: 2px solid #777;
  background: #000;
  box-shadow: 0 0 0 2px #111;
  color: #f2f2f2;
  font-family: "Courier New", monospace;
  line-height: 1.7;
}

.boot-box p {
  margin: 0 0 4px;
}

.boot-loader {
  width: 100%;
  height: 22px;
  margin-top: 20px;
  padding: 3px;
  border: 1px solid #aaa;
  background: #111;
}

.boot-loader span {
  display: block;
  width: 38%;
  height: 100%;
  background: repeating-linear-gradient(
    90deg,
    #fff 0 8px,
    #aaa 8px 14px
  );
  animation: boot-load 1.2s steps(8) infinite;
}

@keyframes boot-load {
  0% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(160%);
  }
  100% {
    transform: translateX(0);
  }
}

.login-screen {
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12) 25%, transparent 25%) 0 0 / 32px 32px,
    var(--desktop-teal);
}

.login-panel,
.window,
.start-menu,
.taskbar,
.desktop-icon,
.taskbar-button,
.start-button {
  background: var(--win-gray);
  border-top: 2px solid var(--win-white);
  border-left: 2px solid var(--win-white);
  border-right: 2px solid var(--win-gray-dark);
  border-bottom: 2px solid var(--win-gray-dark);
}

.login-panel {
  width: min(420px, calc(100vw - 28px));
  padding: 18px;
  box-shadow: 2px 2px 0 #000;
}

.login-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.login-logo {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  background: var(--win-blue);
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 2px 2px 0 var(--win-gray-dark);
  font-weight: 700;
}

.login-panel h1,
.login-panel p {
  margin: 0;
}

.login-panel p {
  margin-top: 4px;
}

.login-panel label {
  display: block;
  margin-bottom: 6px;
}

.login-panel input {
  width: 100%;
  height: 32px;
  margin-bottom: 12px;
  padding: 4px 7px;
  border-top: 2px solid var(--win-gray-dark);
  border-left: 2px solid var(--win-gray-dark);
  border-right: 2px solid var(--win-white);
  border-bottom: 2px solid var(--win-white);
  background: #fff;
}

.login-panel button,
.window-button,
.start-button,
.taskbar-button,
.start-app,
.desktop-icon {
  cursor: pointer;
}

.login-panel button,
.window-button,
.start-app {
  border-top: 2px solid var(--win-white);
  border-left: 2px solid var(--win-white);
  border-right: 2px solid var(--win-gray-dark);
  border-bottom: 2px solid var(--win-gray-dark);
  background: var(--win-gray);
}

.login-panel button {
  min-width: 92px;
  min-height: 32px;
}

.desktop {
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.12) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(rgba(255,255,255,0.12) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, transparent 0 62px, rgba(245, 78, 78, 0.38) 62px 64px, transparent 64px),
    #246f65;
}

.desktop-icons {
  position: absolute;
  top: 24px;
  left: 18px;
  z-index: 1;
  display: grid;
  gap: 18px;
}

.desktop-icon {
  display: grid;
  justify-items: center;
  gap: 6px;
  width: 92px;
  min-height: 82px;
  padding: 8px 5px;
  color: #fff;
  text-align: center;
  text-shadow: 1px 1px 0 #000;
  background: transparent;
  border-color: transparent;
}

.desktop-icon:focus,
.desktop-icon:hover {
  outline: 1px dotted #fff;
  background: rgba(0, 0, 128, 0.35);
}

.icon-art {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #000;
  text-shadow: none;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #404040;
  border-bottom: 2px solid #404040;
  background: #f7e27a;
  font-weight: 700;
}

.window-layer {
  position: absolute;
  inset: 0 0 40px 0;
  pointer-events: none;
}

.window {
  position: absolute;
  z-index: 2;
  width: min(560px, calc(100vw - 36px));
  min-height: 230px;
  box-shadow: 2px 2px 0 #000;
  pointer-events: auto;
}

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

.window-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 3px 4px 3px 8px;
  background: var(--win-blue);
  color: #fff;
  font-weight: 700;
  user-select: none;
  touch-action: none;
}

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

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

.window-button {
  display: grid;
  place-items: center;
  width: 22px;
  height: 20px;
  padding: 0;
  color: #000;
  line-height: 1;
}

.window-content {
  padding: 16px;
  border-top: 2px solid var(--win-gray-dark);
  background: var(--win-gray);
  line-height: 1.45;
}

.window-content h2 {
  margin: 0 0 10px;
  font-size: 20px;
}

.window-content p {
  margin: 0 0 10px;
}

.window-content ul {
  margin: 10px 0 0;
  padding-left: 20px;
}

.contact-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.contact-list a {
  color: var(--win-blue);
}

.booking-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.booking-form label {
  display: grid;
  gap: 4px;
  font-weight: 700;
}

.booking-form input,
.booking-form select,
.booking-form textarea {
  width: 100%;
  padding: 6px;
  border-top: 2px solid var(--win-gray-dark);
  border-left: 2px solid var(--win-gray-dark);
  border-right: 2px solid var(--win-white);
  border-bottom: 2px solid var(--win-white);
  background: #fff;
  font-weight: 400;
}

.booking-form button {
  width: fit-content;
  min-width: 120px;
  min-height: 32px;
  border-top: 2px solid var(--win-white);
  border-left: 2px solid var(--win-white);
  border-right: 2px solid var(--win-gray-dark);
  border-bottom: 2px solid var(--win-gray-dark);
  background: var(--win-gray);
  cursor: pointer;
}

.subject-grid,
.price-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.subject-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.subject-grid div,
.price-list div {
  padding: 10px;
  border-top: 2px solid var(--win-white);
  border-left: 2px solid var(--win-white);
  border-right: 2px solid var(--win-gray-dark);
  border-bottom: 2px solid var(--win-gray-dark);
  background: var(--win-gray-light);
}

.subject-grid strong,
.subject-grid span,
.price-list strong,
.price-list span {
  display: block;
}

.subject-grid span,
.price-list p {
  margin-top: 4px;
}

.price-list span {
  margin-top: 4px;
  color: var(--win-blue);
  font-weight: 700;
}

details {
  margin-top: 8px;
  padding: 8px;
  border-top: 2px solid var(--win-white);
  border-left: 2px solid var(--win-white);
  border-right: 2px solid var(--win-gray-dark);
  border-bottom: 2px solid var(--win-gray-dark);
  background: var(--win-gray-light);
}

summary {
  cursor: pointer;
  font-weight: 700;
}

.progress-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.progress-row meter {
  width: 100%;
  height: 20px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--win-gray-dark);
}

.taskbar {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 4px;
}

.start-button {
  min-width: 76px;
  height: 30px;
  padding: 3px 10px;
  font-weight: 700;
}

.start-button::before {
  content: "";
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-right: 6px;
  vertical-align: -3px;
  background:
    linear-gradient(90deg, #e33 0 50%, #0a4 50%) top / 100% 50% no-repeat,
    linear-gradient(90deg, #26f 0 50%, #fc0 50%) bottom / 100% 50% no-repeat;
  border: 1px solid #fff;
}

.taskbar-apps {
  display: flex;
  gap: 4px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
}

.taskbar-button {
  min-width: 118px;
  max-width: 190px;
  height: 30px;
  padding: 3px 9px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-align: left;
}

.taskbar-button.is-active {
  border-top-color: var(--win-gray-dark);
  border-left-color: var(--win-gray-dark);
  border-right-color: var(--win-white);
  border-bottom-color: var(--win-white);
}

.clock {
  min-width: 78px;
  height: 30px;
  padding: 6px 9px;
  text-align: center;
  border-top: 2px solid var(--win-gray-dark);
  border-left: 2px solid var(--win-gray-dark);
  border-right: 2px solid var(--win-white);
  border-bottom: 2px solid var(--win-white);
  background: var(--win-gray);
}

.start-menu {
  position: absolute;
  left: 4px;
  bottom: 39px;
  z-index: 30;
  display: flex;
  width: min(260px, calc(100vw - 8px));
  min-height: 190px;
  box-shadow: 2px 2px 0 #000;
}

.start-menu__rail {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 42px;
  padding: 10px 0;
  background: var(--win-gray-dark);
  color: #fff;
  font-weight: 700;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.start-menu__apps {
  flex: 1;
  padding: 5px;
}

.start-app {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 38px;
  margin-bottom: 4px;
  padding: 5px 8px;
  text-align: left;
}

.start-app:hover,
.start-app:focus {
  background: var(--focus-blue);
  color: #fff;
}

.start-app .icon-art {
  width: 24px;
  height: 24px;
  font-size: 12px;
}

@media (max-width: 680px) {
  body {
    overflow: auto;
  }

  .desktop {
    min-height: 100vh;
    overflow: auto;
    padding-bottom: 48px;
  }

  .desktop-icons {
    position: relative;
    top: auto;
    left: auto;
    grid-template-columns: repeat(3, minmax(96px, 1fr));
    gap: 12px;
    width: 100%;
    padding: 16px 12px 8px;
  }

  .desktop-icon {
    width: 100%;
    min-height: 88px;
  }

  .window-layer {
    position: relative;
    inset: auto;
    display: grid;
    gap: 12px;
    padding: 8px 12px 56px;
  }

  .window {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: 100%;
    min-height: 210px;
  }

  .subject-grid {
    grid-template-columns: 1fr;
  }

  .progress-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .window-titlebar {
    height: 36px;
  }

  .window-button {
    width: 30px;
    height: 28px;
  }

  .taskbar {
    position: fixed;
    height: 46px;
  }

  .taskbar-button {
    min-width: 96px;
  }

  .clock {
    min-width: 66px;
    padding-inline: 6px;
  }
}

@media (max-width: 430px) {
  .desktop-icons {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .start-button {
    min-width: 64px;
    padding-inline: 6px;
  }
}
