@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

:root {
  --desktop: #008080;
  --desktop-dark: #006568;
  --win-gray: #c0c0c0;
  --win-gray-2: #d4d0c8;
  --win-mid: #a0a0a0;
  --win-dark: #808080;
  --win-darker: #404040;
  --win-black: #000000;
  --win-light: #ffffff;
  --win-blue: #000080;
  --win-blue-hi: #1084d0;
  --paper: #fffff2;
  --hot: #ffcc33;
  --pink: #ff77cc;
  --green: #00c853;
  --font-pixel: "Press Start 2P", "Tahoma", "MS Sans Serif", "Arial", sans-serif;
  --font-text: "Press Start 2P", "Tahoma", "MS Sans Serif", "Arial", sans-serif;
  --font-mono: "Lucida Console", "Courier New", monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--desktop);
  color: #111;
  overflow: hidden;
  image-rendering: pixelated;
}

body,
button,
input,
textarea,
select {
  font-family: var(--font-pixel);
}

button {
  color: inherit;
  cursor: pointer;
  user-select: none;
}

.desktop {
  width: 100vw;
  height: 100vh;
  position: relative;
  overflow: hidden;
  padding: 16px 16px 44px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.09) 0 10%, transparent 10% 100%),
    linear-gradient(135deg, #008080 0%, #007777 45%, var(--desktop-dark) 100%);
}

.desktop::before,
.desktop::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.desktop::before {
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 16px 16px;
  opacity: 0.55;
}

.desktop::after {
  background:
    radial-gradient(circle at 20% 18%, rgba(255,255,255,0.14), transparent 20%),
    radial-gradient(circle at 90% 82%, rgba(0,0,0,0.19), transparent 28%);
  mix-blend-mode: soft-light;
}

.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  opacity: 0.07;
  background: repeating-linear-gradient(0deg, #000 0 1px, transparent 1px 4px);
}

.desktop-watermark {
  position: fixed;
  top: 22px;
  right: 26px;
  text-align: right;
  color: rgba(255,255,255,0.18);
  text-shadow: 2px 2px rgba(0,0,0,0.25);
  pointer-events: none;
  z-index: 0;
}

.desktop-watermark span {
  display: block;
  font-family: var(--font-pixel);
  font-size: clamp(22px, 4vw, 64px);
  line-height: 1.25;
}

.desktop-watermark small {
  font-family: var(--font-pixel);
  font-size: clamp(7px, 1.1vw, 12px);
  letter-spacing: 0.5px;
}

.desktop-icons {
  position: absolute;
  left: 13px;
  top: 13px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.desktop-icon {
  width: 104px;
  min-height: 82px;
  padding: 6px 4px;
  border: 1px dotted transparent;
  background: transparent;
  color: #fff;
  text-shadow: 1px 1px #000;
  text-align: center;
}

.desktop-icon:hover,
.desktop-icon:focus-visible {
  background: rgba(0,0,128,0.35);
  border-color: rgba(255,255,255,0.95);
  outline: none;
}

.icon-label,
.file-name,
.titlebar,
.pane-title,
.start-btn,
.task-btn,
.win-button,
.pathline,
.preview-header,
.window .address,
.badge,
.pixel-label,
.iframe-title,
.start-list button,
.statusbar,
.helper-window,
.desktop-watermark {
  font-family: var(--font-pixel);
}

.icon-label {
  display: inline-block;
  padding: 2px 4px;
  font-size: 8px;
  line-height: 1.4;
}

.px-icon {
  display: block;
  width: 46px;
  height: 42px;
  margin: 0 auto 7px;
  position: relative;
  image-rendering: pixelated;
}

.px-folder {
  width: 48px;
  height: 36px;
  margin-top: 6px;
  background: #f0c53a;
  border: 3px solid #2d2200;
  box-shadow:
    inset 3px 3px 0 #fff3a4,
    inset -4px -4px 0 #a77200,
    2px 2px 0 rgba(0,0,0,0.35);
}

.px-folder::before {
  content: "";
  position: absolute;
  left: 3px;
  top: -13px;
  width: 23px;
  height: 13px;
  background: #ffdd69;
  border: 3px solid #2d2200;
  border-bottom: 0;
  box-shadow: inset 2px 2px 0 #fff7bd;
}

.px-folder::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 7px;
  height: 3px;
  background: #8b6200;
  box-shadow: 0 7px 0 #8b6200;
  opacity: 0.6;
}

.px-file {
  width: 36px;
  height: 44px;
  background: #f8f8f8;
  border: 3px solid #102c61;
  box-shadow:
    inset 3px 3px 0 #fff,
    inset -4px -4px 0 #b4c7dd,
    2px 2px 0 rgba(0,0,0,0.35);
}

.px-file::before {
  content: "";
  position: absolute;
  right: -3px;
  top: -3px;
  width: 15px;
  height: 15px;
  background: linear-gradient(135deg, #d9eaff 0 48%, #102c61 50% 62%, transparent 64%);
  border-left: 3px solid #102c61;
  border-bottom: 3px solid #102c61;
}

.px-file::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 20px;
  width: 17px;
  height: 3px;
  background: #2f6fc1;
  box-shadow: 0 7px 0 #2f6fc1, 0 14px 0 #2f6fc1;
}

.px-certificate {
  width: 42px;
  height: 45px;
  background: #fffdf0;
  border: 3px solid #3a2b00;
  box-shadow:
    inset 3px 3px 0 #ffffff,
    inset -4px -4px 0 #c4b27d,
    2px 2px 0 rgba(0,0,0,0.35);
}

.px-certificate::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 8px;
  width: 20px;
  height: 3px;
  background: #000080;
  box-shadow: 0 7px 0 #000080, 0 14px 0 #000080;
}

.px-certificate::after {
  content: "";
  position: absolute;
  left: 13px;
  bottom: -9px;
  width: 16px;
  height: 22px;
  background: #d71920;
  clip-path: polygon(0 0,100% 0,100% 100%,50% 74%,0 100%);
  border: 2px solid #6a0000;
}

.px-smile {
  width: 42px;
  height: 42px;
  background: #ffe34f;
  border: 3px solid #1d1d1d;
  box-shadow:
    inset 3px 3px 0 #fff6a6,
    inset -4px -4px 0 #c58d00,
    2px 2px 0 rgba(0,0,0,0.35);
}

.px-smile::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 12px;
  width: 5px;
  height: 5px;
  background: #111;
  box-shadow: 14px 0 0 #111;
}

.px-smile::after {
  content: "";
  position: absolute;
  left: 10px;
  bottom: 10px;
  width: 22px;
  height: 9px;
  border-bottom: 4px solid #111;
}

.window {
  position: absolute;
  z-index: 5;
  left: clamp(110px, 11vw, 160px);
  top: clamp(20px, 5vh, 58px);
  width: min(1240px, calc(100vw - 135px));
  height: min(780px, calc(100vh - 92px));
  min-width: 360px;
  min-height: 360px;
  background: var(--win-gray);
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-black);
  border-bottom: 2px solid var(--win-black);
  box-shadow:
    inset 1px 1px 0 #dfdfdf,
    inset -1px -1px 0 var(--win-dark),
    8px 8px 0 rgba(0,0,0,0.28);
  display: grid;
  grid-template-rows: 25px 25px 38px minmax(0, 1fr) 24px;
  padding: 3px;
}

.window.closed,
.window.minimized {
  display: none;
}

.window.maximized {
  position: fixed;
  left: 0 !important;
  top: 0 !important;
  width: 100vw !important;
  height: calc(100vh - 34px) !important;
  min-width: 0;
  min-height: 0;
  box-shadow: none;
}

.titlebar,
.mini-titlebar {
  min-height: 22px;
  background: linear-gradient(90deg, var(--win-blue), var(--win-blue-hi));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 3px 3px 6px;
  font-size: 9px;
  line-height: 1;
  text-shadow: 1px 1px #000;
}

.titlebar {
  cursor: move;
}

.window.maximized .titlebar {
  cursor: default;
}

.title-left {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  white-space: nowrap;
}

.title-left span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.title-icon {
  width: 16px;
  height: 14px;
  flex: 0 0 auto;
  background: var(--win-gray);
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #000;
  border-bottom: 2px solid #000;
  position: relative;
}

.title-icon::before {
  content: "";
  position: absolute;
  inset: 3px 2px 2px 2px;
  background: #00a1a1;
  border: 1px solid #000;
}

.title-buttons {
  display: flex;
  gap: 2px;
  flex: 0 0 auto;
}

.title-btn,
.mini-titlebar button {
  width: 20px;
  height: 18px;
  padding: 0;
  background: var(--win-gray);
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #000;
  border-bottom: 2px solid #000;
  box-shadow: inset -1px -1px 0 var(--win-dark);
  display: grid;
  place-items: center;
}

.title-btn:active,
.mini-titlebar button:active,
.win-button:active,
.start-btn:active,
.task-btn:active,
.start-list button:active {
  border-top-color: #000;
  border-left-color: #000;
  border-right-color: #fff;
  border-bottom-color: #fff;
  box-shadow: inset 1px 1px 0 var(--win-dark);
  transform: translate(1px, 1px);
}

.min-btn span {
  width: 10px;
  height: 3px;
  background: #000;
  align-self: end;
  margin-bottom: 2px;
}

.max-btn span {
  width: 11px;
  height: 10px;
  border: 2px solid #000;
  border-top-width: 3px;
}

.close-btn span,
.mini-titlebar button {
  font-family: var(--font-pixel);
  font-weight: 700;
  font-size: 10px;
  line-height: 1;
}

.menubar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px 4px;
  background: var(--win-gray);
  border-bottom: 1px solid var(--win-dark);
}

.menubar button {
  background: transparent;
  border: 1px solid transparent;
  padding: 4px 7px 3px;
  font-size: 8px;
  line-height: 1.35;
}

.menubar button:hover,
.menubar button:focus-visible {
  border-top-color: #fff;
  border-left-color: #fff;
  border-right-color: var(--win-dark);
  border-bottom-color: var(--win-dark);
  outline: none;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 6px;
  border-top: 1px solid #fff;
  border-bottom: 2px solid var(--win-dark);
  background: var(--win-gray);
  min-width: 0;
}

.win-button,
.start-btn,
.task-btn,
.start-list button {
  background: var(--win-gray);
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #000;
  border-bottom: 2px solid #000;
  box-shadow: inset -1px -1px 0 var(--win-dark);
}

.win-button {
  min-height: 26px;
  padding: 4px 9px;
  font-size: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-arrow,
.btn-home {
  width: 14px;
  height: 12px;
  display: inline-block;
  position: relative;
}

.btn-arrow::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 13px;
  height: 4px;
  background: #111;
}

.btn-arrow::after {
  content: "";
  position: absolute;
  left: 0;
  top: 1px;
  width: 8px;
  height: 8px;
  border-left: 4px solid #111;
  border-bottom: 4px solid #111;
  transform: rotate(45deg);
}

.btn-home::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 4px;
  width: 12px;
  height: 8px;
  background: #f0c53a;
  border: 2px solid #111;
}

.btn-home::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 0;
  width: 9px;
  height: 9px;
  background: #df3333;
  border-left: 2px solid #111;
  border-top: 2px solid #111;
  transform: rotate(45deg);
}

.address-label {
  margin-left: 4px;
  font-size: 8px;
  line-height: 1.35;
}

.address {
  min-width: 0;
  flex: 1 1 auto;
  height: 25px;
  padding: 3px 7px;
  background: #fff;
  border-top: 2px solid var(--win-dark);
  border-left: 2px solid var(--win-dark);
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  font-size: 9px;
}

.workspace {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(145px, 16%) minmax(230px, 34%) minmax(360px, 50%);
  gap: 3px;
  padding: 4px 3px 3px;
  background: var(--win-gray);
}

.win-pane {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-top: 2px solid var(--win-dark);
  border-left: 2px solid var(--win-dark);
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  box-shadow: inset 1px 1px 0 #000, inset -1px -1px 0 #e7e7e7;
}

.pane-title {
  min-height: 25px;
  padding: 6px 8px;
  background: var(--win-gray-2);
  border-bottom: 1px solid var(--win-dark);
  font-size: 8px;
  line-height: 1.2;
}

.tree,
.contents-grid,
.preview-card {
  min-height: 0;
  overflow: auto;
}

.tree {
  padding: 9px 7px;
  background: #fff;
}

.tree-item {
  width: 100%;
  min-height: 26px;
  padding: 4px 4px;
  display: flex;
  align-items: center;
  gap: 5px;
  border: 1px dotted transparent;
  background: transparent;
  text-align: left;
  font-size: 8px;
  line-height: 1.35;
}

.tree-item:hover,
.tree-item.active {
  color: #fff;
  background: var(--win-blue);
}

.tree-item:focus-visible {
  outline: 1px dotted #000;
}

.tree-children {
  margin-left: 16px;
  padding-left: 8px;
  border-left: 1px dotted #777;
}

.twisty {
  width: 12px;
  flex: 0 0 12px;
  font-family: var(--font-pixel);
}

.twisty.blank {
  opacity: 0;
}

.tiny-folder,
.tiny-file {
  width: 18px;
  height: 14px;
  display: inline-block;
  flex: 0 0 auto;
  position: relative;
  background: #f0c53a;
  border: 2px solid #2d2200;
  box-shadow: inset 1px 1px 0 #fff3a4, inset -2px -2px 0 #a77200;
}

.tiny-folder::before {
  content: "";
  position: absolute;
  left: 1px;
  top: -7px;
  width: 8px;
  height: 7px;
  background: #ffdd69;
  border: 2px solid #2d2200;
  border-bottom: 0;
}

.tiny-file {
  width: 14px;
  height: 17px;
  background: #fff;
  border-color: #102c61;
  box-shadow: inset -2px -2px 0 #b4c7dd;
}

.pathline {
  padding: 8px 10px 2px;
  font-size: 8px;
  color: #555;
  min-height: 25px;
}

.contents-grid {
  padding: 16px 14px 22px;
  display: grid;
  align-content: start;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 18px 12px;
}

.file-tile {
  min-height: 104px;
  padding: 8px 6px;
  border: 1px dotted transparent;
  background: transparent;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.file-tile:hover,
.file-tile.selected,
.file-tile:focus-visible {
  background: rgba(0,0,128,0.12);
  border-color: #000;
  outline: none;
}

.file-tile.selected .file-name {
  background: var(--win-blue);
  color: #fff;
  text-shadow: 1px 1px #000;
}

.file-name {
  max-width: 100%;
  padding: 3px 4px;
  font-size: 8px;
  line-height: 1.45;
  word-break: break-word;
}

.preview-card {
  padding: 10px;
  background: #fff;
}

.preview-file {
  min-height: 100%;
  background: var(--paper);
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #4b4b4b;
  border-bottom: 2px solid #4b4b4b;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.18);
}

.preview-header {
  padding: 7px 9px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  background: var(--win-blue-hi);
  color: #fff;
  font-size: 8px;
  line-height: 1.25;
  text-shadow: 1px 1px #000;
  overflow-wrap: anywhere;
}

.preview-body {
  padding: 14px;
  font-family: var(--font-pixel);
  font-size: 9px;
  line-height: 1.75;
}

.preview-body h2,
.preview-body h3,
.preview-body h4 {
  margin: 0 0 10px;
  font-family: var(--font-pixel);
  line-height: 1.45;
}

.preview-body h2 {
  font-size: 13px;
}

.preview-body h3 {
  font-size: 10px;
}

.preview-body p {
  margin: 0 0 12px;
}

.preview-list {
  padding-left: 19px;
  margin: 0 0 14px;
}

.preview-list li {
  margin: 5px 0;
}

.info-hero,
.cert-photo-layout {
  display: grid;
  grid-template-columns: minmax(130px, 190px) 1fr;
  gap: 16px;
  align-items: start;
}

.photo-frame,
.cert-photo-frame,
.project-thumb-frame {
  margin: 0;
  background: var(--win-gray);
  padding: 7px;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #000;
  border-bottom: 2px solid #000;
  box-shadow: inset -1px -1px 0 var(--win-dark);
}

.photo-frame img,
.cert-photo-frame img,
.project-thumb-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #fff;
  border-top: 2px solid var(--win-dark);
  border-left: 2px solid var(--win-dark);
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
}

.cert-photo-frame img {
  aspect-ratio: 4 / 3;
}

.caption,
.cert-caption {
  padding: 6px 3px 0;
  font-family: var(--font-pixel);
  font-size: 7px;
  line-height: 1.4;
  text-align: center;
  overflow-wrap: anywhere;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 0;
}

.badge {
  display: inline-block;
  padding: 4px 6px;
  font-size: 7px;
  line-height: 1.35;
  background: #e8e8e8;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #000;
  border-bottom: 2px solid #000;
}

.project-card,
.cert-card,
.folder-card {
  padding: 12px;
  background: #fff;
  border-top: 2px solid var(--win-dark);
  border-left: 2px solid var(--win-dark);
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
}

.project-meta {
  margin: 0 0 10px;
  font-family: var(--font-pixel);
  font-size: 7px;
  line-height: 1.5;
  color: #555;
}

.pixel-progress {
  height: 20px;
  padding: 3px;
  background: #fff;
  border-top: 2px solid var(--win-dark);
  border-left: 2px solid var(--win-dark);
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
}

.pixel-progress span {
  display: block;
  width: var(--p, 55%);
  height: 100%;
  background: repeating-linear-gradient(90deg, #000080 0 8px, #1084d0 8px 16px);
}

.project-preview-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.iframe-window {
  min-height: 440px;
  display: grid;
  grid-template-rows: 24px minmax(0, 1fr) auto;
  background: var(--win-gray);
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #000;
  border-bottom: 2px solid #000;
  padding: 3px;
}

.iframe-title {
  padding: 6px 7px;
  background: var(--win-blue);
  color: #fff;
  font-size: 7px;
  line-height: 1.2;
  text-shadow: 1px 1px #000;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.iframe-window iframe {
  width: 100%;
  height: 100%;
  min-height: 380px;
  border-top: 2px solid var(--win-dark);
  border-left: 2px solid var(--win-dark);
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  background: #fff;
}

.iframe-fallback {
  padding: 6px 4px 2px;
  font-size: 7px;
  line-height: 1.55;
}

.iframe-fallback a,
.preview-body a {
  color: #0000ee;
}

.project-links,
.cert-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.win-link-button {
  display: inline-block;
  padding: 7px 9px;
  color: #111;
  text-decoration: none;
  background: var(--win-gray);
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #000;
  border-bottom: 2px solid #000;
  box-shadow: inset -1px -1px 0 var(--win-dark);
  font-family: var(--font-pixel);
  font-size: 7px;
  line-height: 1.35;
}

.win-link-button:active {
  border-top-color: #000;
  border-left-color: #000;
  border-right-color: #fff;
  border-bottom-color: #fff;
  box-shadow: inset 1px 1px 0 var(--win-dark);
  transform: translate(1px, 1px);
}

.folder-card {
  margin-top: 10px;
}

.statusbar {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) minmax(120px, 1fr) minmax(100px, 1fr);
  gap: 3px;
  padding-top: 3px;
  font-size: 8px;
  line-height: 1.2;
}

.statusbar div {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 4px 7px;
  background: var(--win-gray);
  border-top: 2px solid var(--win-dark);
  border-left: 2px solid var(--win-dark);
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
}

.resize-grip {
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 16px;
  height: 16px;
  background:
    linear-gradient(135deg, transparent 0 45%, var(--win-dark) 46% 55%, transparent 56%),
    linear-gradient(135deg, transparent 0 62%, var(--win-dark) 63% 70%, transparent 71%);
  opacity: 0.8;
}

.taskbar {
  position: fixed;
  z-index: 30;
  left: 0;
  right: 0;
  bottom: 0;
  height: 34px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 6px;
  background: var(--win-gray);
  border-top: 2px solid #fff;
  box-shadow: inset 0 1px 0 #dfdfdf;
}

.start-btn,
.task-btn {
  height: 27px;
  padding: 4px 9px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 8px;
  line-height: 1;
}

.task-btn {
  min-width: 205px;
  justify-content: flex-start;
}

.task-btn.active {
  border-top-color: #000;
  border-left-color: #000;
  border-right-color: #fff;
  border-bottom-color: #fff;
  background: #bdbdbd;
}

.win-logo,
.task-icon {
  width: 17px;
  height: 16px;
  display: inline-block;
  position: relative;
  border: 1px solid #111;
  background:
    linear-gradient(90deg, #f00 0 50%, #00f 50% 100%);
  box-shadow: inset 0 8px 0 rgba(255,255,255,0.35);
}

.task-icon {
  background: #00a1a1;
}

.tray {
  margin-left: auto;
  height: 26px;
  min-width: 180px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 3px 8px;
  font-size: 8px;
  line-height: 1.2;
  font-family: var(--font-pixel);
  border-top: 2px solid var(--win-dark);
  border-left: 2px solid var(--win-dark);
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
}

.start-menu {
  position: fixed;
  left: 4px;
  bottom: 34px;
  z-index: 40;
  width: 310px;
  min-height: 244px;
  display: none;
  background: var(--win-gray);
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #000;
  border-bottom: 2px solid #000;
  box-shadow: 5px 5px 0 rgba(0,0,0,0.28);
}

.start-menu.open {
  display: grid;
  grid-template-columns: 42px 1fr;
}

.start-rail {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  background: linear-gradient(#000080, #1084d0);
  color: #fff;
  font-family: var(--font-pixel);
  font-size: 10px;
  letter-spacing: 1px;
  padding: 12px 10px;
  text-shadow: 1px 1px #000;
}

.start-list {
  padding: 7px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.start-list button {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px;
  text-align: left;
  font-size: 8px;
  line-height: 1.4;
}

.menu-mini {
  width: 24px;
  height: 22px;
  display: inline-block;
  flex: 0 0 auto;
  position: relative;
}

.folder-mini {
  background: #f0c53a;
  border: 2px solid #2d2200;
  box-shadow: inset 2px 2px 0 #fff3a4, inset -2px -2px 0 #a77200;
}

.file-mini,
.cert-mini,
.spark-mini {
  background: #fff;
  border: 2px solid #102c61;
  box-shadow: inset -2px -2px 0 #b4c7dd;
}

.cert-mini::after {
  content: "";
  position: absolute;
  left: 7px;
  bottom: -7px;
  width: 9px;
  height: 12px;
  background: #d71920;
}

.spark-mini {
  background: #ffe34f;
  border-color: #111;
}

.spark-mini::before {
  content: "★";
  position: absolute;
  left: 2px;
  top: 0;
  font-size: 16px;
  color: #000;
}

.helper-window {
  position: fixed;
  z-index: 7;
  right: 18px;
  bottom: 52px;
  width: min(370px, calc(100vw - 36px));
  background: var(--win-gray);
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #000;
  border-bottom: 2px solid #000;
  box-shadow: 5px 5px 0 rgba(0,0,0,0.24);
  font-size: 8px;
  line-height: 1.5;
}

.helper-body {
  padding: 11px;
  display: grid;
  gap: 8px;
}

.helper-body code {
  font-family: var(--font-mono);
  font-size: 12px;
}

.confetti {
  position: fixed;
  z-index: 60;
  top: -20px;
  font-family: var(--font-pixel);
  font-size: 12px;
  color: #fff;
  text-shadow: 1px 1px #000;
  pointer-events: none;
  animation: fall 1.8s linear forwards;
}

@keyframes fall {
  from { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  to { transform: translateY(110vh) rotate(360deg); opacity: 0; }
}

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

  .desktop {
    min-height: 100vh;
    height: auto;
    overflow: visible;
    padding: 116px 10px 54px;
  }

  .desktop-icons {
    position: absolute;
    left: 8px;
    right: 8px;
    top: 8px;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 7px;
    overflow-x: auto;
    padding-bottom: 5px;
  }

  .desktop-icon {
    flex: 0 0 88px;
    width: 88px;
    min-height: 76px;
  }

  .window,
  .window.maximized {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: calc(100vh - 165px);
    grid-template-rows: 25px auto auto auto 24px;
  }

  .titlebar {
    cursor: default;
  }

  .workspace {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  .folders-panel {
    max-height: 190px;
  }

  .contents-panel {
    min-height: 260px;
  }

  .preview-panel {
    min-height: 360px;
  }

  .project-preview-shell,
  .info-hero,
  .cert-photo-layout {
    grid-template-columns: 1fr;
  }

  .project-preview-shell {
    gap: 12px;
  }

  .toolbar {
    flex-wrap: wrap;
  }

  .address-label {
    width: 100%;
  }

  .address {
    flex-basis: 100%;
  }

  .helper-window {
    display: none;
  }

  .tray {
    min-width: 94px;
  }

  #funStatus {
    display: none;
  }

  .task-btn {
    min-width: 0;
    flex: 1 1 auto;
  }
}

@media (max-width: 560px) {
  .desktop {
    padding-top: 105px;
  }

  .desktop-watermark {
    display: none;
  }

  .window {
    min-width: 0;
  }

  .contents-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px 7px;
    padding: 12px 7px;
  }

  .file-tile {
    min-height: 96px;
  }

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

  .statusbar div:nth-child(2) {
    display: none;
  }

  .preview-body {
    padding: 10px;
    font-size: 8px;
  }

  .iframe-window {
    min-height: 255px;
  }

  .iframe-window iframe {
    min-height: 205px;
  }

  .start-menu {
    width: calc(100vw - 8px);
  }
}


/* v4: every native UI label uses the same Cyrillic-capable pixel font */
.menubar button,
.toolbar,
.tree-item,
.preview-body,
.helper-body,
.start-list button,
.statusbar,
.address,
.address-label,
.iframe-fallback,
.cert-card,
.project-card,
.folder-card {
  font-family: var(--font-pixel);
}

.preview-body strong,
.preview-body em,
.preview-body code {
  font-family: var(--font-pixel);
}


/* v5: жорстко підтягуємо один піксельний шрифт для всього інтерфейсу */
body,
body *,
body *::before,
body *::after {
  font-family: var(--font-pixel) !important;
}

.preview-body {
  letter-spacing: 0;
}

.preview-body a,
.contact-link,
.win-link-button,
.iframe-fallback a {
  color: #000080;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.preview-body a:focus-visible,
.contact-link:focus-visible,
.win-link-button:focus-visible,
.iframe-fallback a:focus-visible {
  outline: 2px dotted #000;
  outline-offset: 2px;
}

.hobby-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 0 0 14px;
}

.hobby-grid article {
  background: #fff;
  padding: 10px;
  border-top: 2px solid var(--win-dark);
  border-left: 2px solid var(--win-dark);
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
}

.hobby-grid h4 {
  margin: 0 0 7px;
  font-size: 8px;
  line-height: 1.5;
  color: #000080;
}

.hobby-grid p {
  margin: 0;
  font-size: 8px;
  line-height: 1.75;
}

.achievements-list li {
  margin-bottom: 8px;
}

.event-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 14px;
}

.event-gallery figure {
  margin: 0;
  background: var(--win-gray);
  padding: 7px;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #000;
  border-bottom: 2px solid #000;
}

.event-gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #fff;
  border-top: 2px solid var(--win-dark);
  border-left: 2px solid var(--win-dark);
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  image-rendering: pixelated;
}

.event-gallery figcaption {
  padding: 6px 3px 0;
  font-size: 7px;
  line-height: 1.45;
  text-align: center;
}

.contact-list {
  display: grid;
  gap: 7px;
  margin-top: 6px;
}

.contact-link {
  display: block;
  padding: 7px 8px;
  background: #fff;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #000;
  border-bottom: 2px solid #000;
  font-size: 8px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.contact-link:hover,
.win-link-button:hover,
.iframe-fallback a:hover {
  background: #000080;
  color: #fff;
}

.cert-photo-layout {
  grid-template-columns: minmax(180px, 46%) 1fr;
}

.cert-photo-frame img {
  height: auto;
  max-height: 520px;
  object-fit: contain;
}

@media (max-width: 980px) {
  .hobby-grid,
  .event-gallery,
  .cert-photo-layout {
    grid-template-columns: 1fr;
  }

  .event-gallery img {
    aspect-ratio: 16 / 10;
  }
}

@media (max-width: 560px) {
  .hobby-grid p,
  .contact-link {
    font-size: 7px;
  }
}
