:root {
  --page-bg: #0a1f66;
  --sky-1: #1a49c9;
  --sky-2: #2a62dc;
  --sky-3: #3f7be8;
  --sky-4: #5a95f0;
  --sky-5: #7aaef5;
  --sky-6: #a3c8f9;
  --label: #ffffff;
  --ink: #0a1a4d;
  --window-bg: #f6f1e0;
  --window-bar: #060910;
  --link: #1f46c9;
  --taskbar-bg: #0e1633;
  --taskbar-ink: #ffb347;
  --font-display: "Silkscreen", "Courier New", monospace;
  --font-body: "VT323", "Courier New", monospace;
}

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

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

body {
  background: var(--page-bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 22px;
  overflow: hidden;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

button {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.monitor {
  position: fixed;
  inset: -4%;
}

.crt,
.frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.crt.is-curved {
  filter: url(#fisheye);
}

.frame {
  display: block;
  z-index: 2;
  pointer-events: none;
}

.sky,
.screen {
  position: absolute;
  left: 10.25%;
  top: 9.9%;
  width: 79.7%;
  height: 78%;
  overflow: hidden;
  overflow: clip;
}

.sky {
  background: linear-gradient(var(--sky-1) 0 16%, var(--sky-2) 16% 32%, var(--sky-3) 32% 48%,
      var(--sky-4) 48% 64%, var(--sky-5) 64% 80%, var(--sky-6) 80% 100%);
}

.sky img {
  position: absolute;
  image-rendering: pixelated;
}

.sun {
  position: absolute;
  top: 7%;
  right: 10%;
  width: clamp(130px, 16vw, 210px);
  aspect-ratio: 1;
}

.sun__rays {
  inset: 0;
  width: 100%;
  height: 100%;
  will-change: transform;
}

.sun__disc {
  left: 25.8%;
  top: 25.8%;
  width: 48.4%;
}

.cloud {
  left: 0;
  will-change: transform;
}

.cloud--1 {
  top: 10%;
  width: clamp(100px, 11vw, 160px);
  opacity: .75;
  animation-duration: 150s;
  animation-delay: -90s;
}

.cloud--2 {
  top: 25%;
  width: clamp(160px, 19vw, 280px);
  animation-duration: 115s;
  animation-delay: -30s;
}

.cloud--3 {
  top: 48%;
  width: clamp(200px, 24vw, 360px);
  animation-duration: 95s;
  animation-delay: -60s;
}

.cloud--4 {
  top: 63%;
  width: clamp(120px, 14vw, 200px);
  opacity: .85;
  animation-duration: 130s;
  animation-delay: -10s;
}

@media (prefers-reduced-motion: no-preference) {
  .cloud {
    animation-name: drift;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
  }

  .sun__rays {
    animation: spin 120s linear infinite;
  }
}

@keyframes drift {
  from {
    transform: translateX(-100%);
  }

  to {
    transform: translateX(110vw);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.screen::before,
.screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 50;
}

.screen::before {
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, .5) 100%);
}

.screen::after {
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .10) 0 1px, transparent 1px 3px);
}

.icons {
  position: absolute;
  top: 28px;
  left: 30px;
  max-height: calc(100% - 110px);
}

.icons ul {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 12px 10px;
  max-height: calc(100vh * .78 - 110px);
}

.icon {
  display: block;
  width: 100px;
  padding: 6px 2px;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--label);
  text-align: center;
  text-decoration: none;
  line-height: 1;
}

.icon img {
  display: block;
  width: 64px;
  height: 64px;
  margin: 0 auto 4px;
  image-rendering: pixelated;
  filter: drop-shadow(1px 0 0 rgba(255, 60, 60, .7)) drop-shadow(-1px 0 0 rgba(60, 255, 255, .7));
}

.icon span {
  display: block;
  text-shadow: 1px 0 0 rgba(255, 60, 60, .8), -1px 0 0 rgba(60, 255, 255, .8), 0 2px 0 var(--ink);
}

.icon:hover,
.icon:focus-visible {
  outline: 2px dotted var(--label);
  background: rgba(255, 255, 255, .14);
}

.window {
  position: absolute;
  display: flex;
  flex-direction: column;
  width: min(440px, calc(100% - 16px));
  max-height: calc(100% - 70px);
  background: var(--window-bg);
  border: 3px solid var(--ink);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, .4);
}

.window[hidden] {
  display: none;
}

.window__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 8px;
  background: var(--window-bar);
  color: var(--window-bg);
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.window__bar h2 {
  margin: 0;
  font: 14px var(--font-display);
}

.window__close {
  width: 26px;
  height: 24px;
  padding: 0;
  line-height: 1;
  background: var(--window-bg);
  color: var(--ink);
  border: 2px solid var(--ink);
  cursor: pointer;
}

.window__body {
  padding: 14px 16px;
  overflow: auto;
  line-height: 1.15;
}

.window__body h3 {
  margin: 0 0 8px;
  font: 18px var(--font-display);
}

.window__body p {
  margin: 0 0 10px;
  max-width: 60ch;
}

.window__body a {
  color: var(--link);
}

.window__body ul:not(.tags):not(.menu) {
  list-style: disc;
  padding-left: 20px;
  margin-bottom: 10px;
}

.address {
  margin: 0 0 12px;
  padding: 2px 8px;
  background: #fff;
  border: 2px solid var(--ink);
}

.links,
.tracks {
  margin: 0 0 10px;
}

.links li {
  padding: 4px 0;
}

.tracks {
  list-style: decimal;
  padding-left: 26px;
}

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

.gallery li {
  aspect-ratio: 1;
  background: var(--sky-5);
  border: 2px solid var(--ink);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tags li {
  padding: 0 8px;
  border: 2px solid var(--ink);
}

.taskbar {
  position: absolute;
  left: 36px;
  right: 36px;
  bottom: 14px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 46px;
  padding: 0 22px 0 14px;
  background: var(--taskbar-bg);
  color: var(--taskbar-ink);
  border: 2px solid #000;
  border-radius: 4px;
  box-shadow: inset 0 0 0 2px #2b3560;
}

.taskbar__status {
  margin: 0;
  font: 12px var(--font-display);
  white-space: nowrap;
}

.taskbar__tasks {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 6px;
  padding: 0 24px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 22px, #000 calc(100% - 22px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 22px, #000 calc(100% - 22px), transparent);
}

.taskbar__tasks::-webkit-scrollbar {
  display: none;
}

.taskbar__tasks::before,
.taskbar__tasks::after {
  content: "";
  margin: auto;
}

.taskbar__tasks button {
  flex: none;
  white-space: nowrap;
  height: 24px;
  padding: 0 8px;
  background: none;
  color: inherit;
  border: 1px solid currentColor;
  cursor: pointer;
}

.taskbar__clock {
  flex: none;
  display: flex;
  align-items: center;
  gap: 20px;
  padding-left: 16px;
  line-height: 1;
  white-space: nowrap;
}

#clock-date {
  font-size: 24px;
  opacity: .85;
}

#clock-time {
  font-size: 28px;
  letter-spacing: 1px;
}

.window--wide {
  width: min(640px, calc(100% - 16px));
}

.window--menu {
  width: min(340px, calc(100% - 16px));
}

.window--flush .window__body {
  padding: 0;
}

.browser {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

.browser__toolbar {
  display: flex;
  gap: 6px;
  padding: 6px;
  background: #d9d4c0;
  border-bottom: 2px solid var(--ink);
}

.browser__btn {
  height: 30px;
  padding: 0 10px;
  background: var(--window-bg);
  color: var(--ink);
  border: 2px solid var(--ink);
  cursor: pointer;
}

.browser__btn:disabled {
  opacity: .45;
  cursor: default;
}

.browser__address {
  flex: 1;
  min-width: 0;
  display: flex;
}

.browser__address input {
  flex: 1;
  min-width: 0;
  height: 30px;
  padding: 0 8px;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--ink);
}

.browser__progress {
  height: 6px;
  background: #c9c4ae;
  border-bottom: 2px solid var(--ink);
}

.browser__progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--window-bar);
}

.browser__progress.is-loading span {
  animation: load .9s steps(8) forwards;
}

@keyframes load {
  to {
    width: 100%;
  }
}

.browser__page {
  flex: 1;
  min-height: 140px;
  padding: 16px;
  overflow: auto;
  background: #fff;
}

.browser__page h3 {
  margin: 0 0 8px;
  font: 18px var(--font-display);
}

.shortcuts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}

.shortcuts a {
  display: block;
  padding: 12px 8px;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  background: var(--window-bg);
  border: 2px solid var(--ink);
  transition: background-color .15s;
}

.shortcuts a:hover,
.shortcuts a:focus-visible {
  background: var(--sky-6);
}

.browser__status {
  margin: 0;
  padding: 2px 8px;
  font-size: 18px;
  background: #d9d4c0;
  border-top: 2px solid var(--ink);
}

#music .window__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

#music .window__body h3 {
  flex: none;
}

ol.playlist {
  margin: 0;
  padding: 0;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  list-style: none;
}

.track {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 10px;
  cursor: pointer;
  border-bottom: 2px dashed rgba(10, 26, 77, .25);
  transition: background-color .15s;
}

.track:hover,
.track.is-playing {
  background: var(--sky-6);
}

.track__play {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  background: #fff;
  border: 2px solid var(--ink);
  cursor: pointer;
}

.track__play::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 3px;
  border-left: 11px solid var(--window-bar);
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
}

.track.is-playing .track__play::before,
.music-player__toggle.is-playing::before {
  width: 11px;
  height: 14px;
  margin: 0;
  border: 0;
  border-left: 4px solid var(--window-bar);
  border-right: 4px solid var(--window-bar);
}

.track__title {
  color: var(--ink);
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
  transition: background-size .28s ease;
}

.track__title:hover,
.track__title:focus-visible {
  background-size: 100% 2px;
}

.track__meta {
  margin-left: auto;
  opacity: .65;
  text-align: right;
  white-space: nowrap;
}

.music-player {
  display: grid;
  flex: none;
  gap: 8px;
  margin: 10px -16px -14px;
  padding: 10px 16px;
  background: #d9d4c0;
  border-top: 2px solid var(--ink);
}

.music-player__track {
  overflow: hidden;
  font: 16px var(--font-display);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.music-player__controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.music-player__button {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  background: var(--window-bg);
  border: 2px solid var(--ink);
  color: var(--ink);
  cursor: pointer;
  line-height: 1;
  box-shadow: 2px 2px 0 rgba(10, 26, 77, .35);
  transition: background-color .12s, transform .12s, box-shadow .12s;
}

.music-player__button:hover:not(:disabled),
.music-player__button:focus-visible {
  background: var(--sky-6);
  outline: 2px dotted var(--ink);
  outline-offset: 2px;
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 rgba(10, 26, 77, .4);
}

.music-player__button:active:not(:disabled) {
  transform: translate(2px, 2px);
  box-shadow: none;
}

.music-player__button:disabled {
  opacity: .5;
  cursor: default;
  box-shadow: none;
}

.music-player__skip::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
}

.music-player__skip--previous::before {
  border-right: 10px solid var(--window-bar);
}

.music-player__skip--next::before {
  border-left: 10px solid var(--window-bar);
}

.music-player__skip::after {
  content: "";
  position: absolute;
  top: 9px;
  width: 3px;
  height: 12px;
  background: var(--window-bar);
}

.music-player__skip--previous::after {
  left: 7px;
}

.music-player__skip--next::after {
  right: 7px;
}

.music-player__time {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.music-player__seek {
  flex: 1;
  min-width: 24px;
  accent-color: var(--window-bar);
}

.window--dark {
  background: #2b2b2e;
  border-color: #0d0d0f;
  color: #e9e9ee;
}

.window--dark .window__bar {
  background: #1d1d20;
  color: #e9e9ee;
}

.window--dark .window__close {
  background: #2b2b2e;
  color: #e9e9ee;
  border-color: #55555c;
}

.affinity {
  display: flex;
  flex: 1;
  min-height: 0;
}

.affinity__side {
  flex: none;
  width: 150px;
  padding: 12px 0;
  background: #232326;
  border-right: 2px solid #0d0d0f;
}

.affinity__side p {
  margin: 0 14px 8px;
  font: 12px var(--font-display);
  color: #8d8d96;
  text-transform: uppercase;
}

.affinity__side li {
  padding: 6px 14px;
  color: #c9c9d0;
}

.affinity__side .is-active {
  background: #3a3a40;
  box-shadow: inset 3px 0 0 #4c8dff;
  color: #fff;
}

.affinity__main {
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
  overflow: auto;
}

.affinity__main h3 {
  margin: 0 0 12px;
  font: 18px var(--font-display);
}

.recents {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}

.recents a {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: transform .15s;
}

.recents a:hover,
.recents a:focus-visible {
  transform: translateY(-3px);
}

.thumb {
  display: block;
  aspect-ratio: 4 / 3;
  margin-bottom: 6px;
  background: var(--sky-4);
  border: 2px solid #0d0d0f;
}

.recents li:nth-child(2) .thumb {
  background: #e8478b;
}

.recents li:nth-child(3) .thumb {
  background: #ffd23f;
}

.recents li:nth-child(4) .thumb {
  background: #7b61ff;
}

.recents li:nth-child(5) .thumb {
  background: #4dd0e1;
}

.recents li:nth-child(6) .thumb {
  background: #f2a516;
}

.recents .name {
  display: block;
  font-size: 18px;
  line-height: 1;
  word-break: break-all;
}

.recents .date {
  display: block;
  color: #8d8d96;
  font-size: 16px;
}

.window--menu .window__body {
  padding: 10px;
}

.menu__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 96px;
  padding: 24px 22px;
  margin-bottom: 10px;
  font-size: 30px;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
  background: #fff;
  border: 2px solid var(--ink);
  transition: transform .2s ease,
    background-color .2s ease;
}

.menu__arrow {
  opacity: .4;
  transition: transform .2s ease, opacity .2s ease;
}

.menu__item:hover,
.menu__item:focus-visible {
  transform: translateX(4px);
  background: var(--sky-6);
}

.menu__item:hover .menu__arrow,
.menu__item:focus-visible .menu__arrow {
  transform: translateX(4px);
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .browser__progress.is-loading span {
    animation: none;
    width: 100%;
  }

  .track,
  .track__title,
  .menu__item,
  .menu__arrow,
  .recents a,
  .shortcuts a {
    transition: none;
  }
}

.glass {
  position: absolute;
  left: 11%;
  top: 11.3%;
  width: 77.8%;
  height: 75.6%;
  overflow: hidden;
  border-radius: 3.5% / 4.5%;
  pointer-events: none;
  z-index: 3;
}

.glass__field {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 3px);
}

.glass__roll {
  position: absolute;
  left: 0;
  right: 0;
  top: -22%;
  height: 22%;
  background: linear-gradient(transparent, rgba(255, 255, 255, .07) 50%, transparent);
  will-change: transform;
}

@media (prefers-reduced-motion: no-preference) {
  .glass__field {
    animation: fields 1s steps(1) infinite;
  }

  .glass__roll {
    animation: roll 8s linear infinite;
  }
}

@keyframes fields {
  50% {
    background-position: 0 1px;
  }
}

@keyframes roll {
  to {
    transform: translateY(560%);
  }
}

@media (max-width: 700px) {
  body {
    font-size: 26px;
  }

  .icons {
    top: 18px;
    left: 14px;
    right: 14px;
    max-height: none;
  }

  .icons ul {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px 6px;
    max-height: none;
  }

  .icon {
    width: 100%;
    padding: 8px 2px;
  }

  .icon img {
    width: 96px;
    height: 96px;
    margin-bottom: 6px;
  }

  .window {
    max-height: calc(100% - 90px);
  }

  .window__bar {
    padding: 8px 10px;
  }

  .window__bar h2 {
    font-size: 17px;
  }

  .window__close {
    width: 40px;
    height: 36px;
    font-size: 26px;
  }

  .window__body h3 {
    font-size: 22px;
  }

  .taskbar {
    left: 16px;
    right: 16px;
    bottom: 10px;
    height: 58px;
    padding-right: 16px;
  }

  .taskbar__status {
    display: none;
  }

  .taskbar__tasks button {
    height: 34px;
    padding: 0 12px;
  }

  .taskbar__clock {
    gap: 12px;
    padding-left: 8px;
  }

  #clock-date {
    font-size: 20px;
  }

  #clock-time {
    font-size: 24px;
  }

  .browser__toolbar {
    flex-wrap: wrap;
  }

  .browser__btn {
    height: 40px;
  }

  .browser__address {
    flex-basis: 100%;
  }

  .browser__address input {
    height: 40px;
  }

  .affinity__side {
    display: none;
  }

  .track {
    padding-top: 16px;
    padding-bottom: 16px;
  }
}