@font-face {
  font-family: 'Fusion Pixel';
  src: url('/assets/fonts/fusion-pixel-12px.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
:root {
  font-family: 'Fusion Pixel', 'SimSun', monospace;
  font-size: 14px;
  font-synthesis: none;
  color: #111;
  background: #829593;
  --face: #c0c0c0;
  --blue: #000080;
}
* { box-sizing: border-box; }
html, body { width: 100%; min-width: 320px; height: 100%; margin: 0; overflow: hidden; }
button, a, [tabindex] { -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; }
button { border-radius: 0; color: inherit; cursor: default; touch-action: manipulation; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 1px dotted currentColor; outline-offset: -4px; }
button:disabled { color: #808080; text-shadow: 1px 1px #fff; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: #0000c0; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.pixel-icon { width: 48px; height: 48px; flex: none; image-rendering: pixelated; overflow: visible; }
.bevel { background: var(--face); border: 1px solid #000; box-shadow: inset 1px 1px #fff, inset -1px -1px #808080; }
.bevel:active { box-shadow: inset 1px 1px #808080, inset -1px -1px #fff; }

#desktop { position: relative; width: 100%; height: 100%; overflow: hidden; background: #829593; isolation: isolate; }
#desktop::before { content: ''; position: absolute; inset: 0; z-index: -1; background: url('/assets/wallpapers/gray-green-weave.png') repeat 0 0 / 256px 256px; opacity: 0.28; image-rendering: pixelated; pointer-events: none; }
.desktop-shortcuts { position: absolute; left: 22px; top: 35px; display: flex; flex-direction: column; gap: 26px; z-index: 1; }
.desktop-icon { width: 88px; padding: 5px 1px; display: flex; flex-direction: column; align-items: center; gap: 9px; border: 0; background: none; text-align: center; user-select: none; }
.desktop-icon > span { max-width: 100%; padding: 3px 4px; background: #829593; line-height: 20px; color: #102b29; }
.desktop-icon:hover > span { outline: 1px dotted #254343; }
.desktop-icon.selected > span, .desktop-icon:focus-visible > span { color: #fff; background: var(--blue); outline: 1px dotted #fff; outline-offset: -2px; }
.desktop-icon.selected .pixel-icon { filter: brightness(0.8); }
#windows { position: absolute; inset: 0; pointer-events: none; }
.window { position: absolute; display: flex; flex-direction: column; padding: 4px; border: 1px solid #000; background: var(--face); box-shadow: inset 1px 1px #fff, inset -1px -1px #808080, 3px 3px 0 #3b5353; pointer-events: auto; min-width: 0; }
.titlebar { height: 25px; min-height: 25px; display: flex; background: #808080; color: #fff; border: 1px solid #000; align-items: stretch; user-select: none; touch-action: none; }
.window.active .titlebar { background: var(--blue); }
.window-title { flex: 1; text-align: center; align-self: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; line-height: 21px; padding: 0 4px; letter-spacing: 0.5px; }
.titlebar button { width: 26px; flex: none; padding: 0; border-top: none; border-bottom: none; display: flex; align-items: center; justify-content: center; }
.titlebar .system-button { border-left: 0; width: 25px; }
.system-button span { width: 12px; height: 5px; background: #fff; border: 1px solid #000; box-shadow: 0 1px #808080; }
.window-maximize, .window-minimize { border-right: 0; }
.triangle { width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; }
.triangle.up { border-bottom: 7px solid #000; }
.triangle.down { border-top: 7px solid #000; }
.restore-symbol { width: 11px; height: 11px; border: 1px solid #000; box-shadow: inset 0 2px #000, -3px 3px #c0c0c0, -4px 4px #000; }
.menu-popup { position: absolute; z-index: 20000; min-width: 215px; padding: 3px; box-shadow: inset 1px 1px #fff, inset -1px -1px #808080, 3px 3px #333; }
.menu-popup button { display: flex; justify-content: space-between; align-items: center; width: 100%; border: 0; background: none; text-align: left; padding: 7px 14px; gap: 20px; }
.menu-popup button:not(:disabled):is(:hover, :focus) { color: #fff; background: var(--blue); outline: none; }
.menu-popup kbd { font: inherit; }
.menu-popup hr { border: 0; border-top: 1px solid #808080; border-bottom: 1px solid #fff; margin: 3px 2px; }
.window-content { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; margin-top: 3px; }
.resize-handle { position: absolute; bottom: 5px; right: 5px; width: 13px; height: 13px; cursor: nwse-resize; background: repeating-linear-gradient(135deg, transparent 0 2px, #808080 2px 3px, #fff 3px 4px); clip-path: polygon(100% 0, 100% 100%, 0 100%); touch-action: none; }
.animation-outline, .drag-outline { position: absolute; z-index: 30000; pointer-events: none; border: 2px solid #fff; box-shadow: inset 0 0 0 1px #111, 0 0 0 1px #111; mix-blend-mode: difference; }
.drag-outline { border-width: 3px; }
#minimized-windows { position: absolute; display: flex; gap: 16px; bottom: 18px; left: 22px; max-width: calc(100% - 44px); overflow: auto; z-index: 4; }
.minimized-icon { min-width: 94px; width: 110px; }

.program-manager { flex: 1; min-height: 0; overflow: auto; background: var(--face); }
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, 84px); gap: 10px 0; padding: 12px 8px; align-content: start; min-height: 100%; }
.project-icon { min-width: 0; display: flex; flex-direction: column; align-items: center; border: 0; background: none; padding: 4px 2px; user-select: none; gap: 5px; }
.project-icon .pixel-icon { width: 32px; height: 32px; }
.project-label { display: block; line-height: 18px; padding: 2px 4px; white-space: nowrap; }
.project-icon.selected .project-label { background: var(--blue); color: #fff; outline: 1px dotted #fff; outline-offset: -2px; }
.project-icon:hover .project-label { outline: 1px dotted #555; outline-offset: -1px; }
.project-icon.selected .pixel-icon { filter: brightness(0.8); }
.project-icon:focus-visible { outline-offset: -1px; }

.contact-document { height: 100%; display: flex; flex-direction: column; }
.notepad-page { background: #fff; border: 1px solid; border-color: #808080 #fff #fff #808080; flex: 1; min-height: 0; padding: 23px 24px; overflow: auto; line-height: 1.6; }
.readme-title { color: #000080; font-size: 18px; line-height: 24px; letter-spacing: 1px; white-space: nowrap; }
.readme-intro { margin: 6px 0 5px; color: #3b3b3b; }
.text-caret { display: inline-block; width: 7px; height: 15px; margin-left: 4px; background: #000080; vertical-align: -1px; animation: caret 1.2s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.text-divider { color: #a2a2a2; white-space: nowrap; overflow: hidden; line-height: 18px; letter-spacing: 1px; }
.contact-links { margin: 9px 0 0; }
.contact-links > div { display: flex; gap: 12px; padding: 2px 0; min-height: 24px; align-items: baseline; }
.contact-links dt { width: 66px; min-width: 66px; color: #555; }
.contact-links dd { margin: 0; min-width: 0; display: flex; gap: 8px; align-items: baseline; }
.contact-links a { text-decoration: none; overflow-wrap: anywhere; }
.contact-links a:hover { text-decoration: underline; }
.link-arrow, .copy-mark { color: #777; margin-left: auto; font-size: 14px; }
.text-copy { border: 0; background: none; padding: 0; text-align: left; color: #000080; line-height: inherit; }
.text-copy:hover { text-decoration: underline; text-underline-offset: 3px; }
.contact-notes { margin-top: 38px; color: #808080; font-size: 14px; line-height: 1.8; }
.contact-notes p { margin: 3px 0; }
.contact-notes a { color: inherit; text-decoration: none; }
.contact-notes a:hover { text-decoration: underline; }

.project-document { display: flex; flex-direction: column; height: 100%; }
.document-scroll { flex: 1; min-height: 0; overflow: auto; border: 1px solid; border-color: #808080 #fff #fff #808080; background: #fff; }
.project-screenshot { margin: 0; padding: 15px 15px 0; }
.project-screenshot canvas, .screenshot-fallback { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: contain; background: #c0c0c0; border: 1px solid #000; image-rendering: pixelated; }
.project-screenshot canvas[data-state='ready'] { aspect-ratio: auto; }
.project-screenshot canvas.portrait-screenshot { width: auto; max-width: 100%; max-height: min(380px, 50vh); margin: 0 auto; }
.screenshot-fallback { filter: saturate(0.6) contrast(1.25); }
.project-writing { padding: 22px 30px 30px; line-height: 2; }
.project-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid #c0c0c0; padding-bottom: 13px; margin-bottom: 17px; }
.project-heading h1 { font-size: 24px; line-height: 1.5; font-weight: 400; margin: 0; color: var(--blue); }
.type-label { font-size: 14px; white-space: nowrap; border: 1px solid #808080; padding: 1px 7px; color: #555; line-height: 22px; }
.project-writing p { margin: 0 0 18px; font-size: 14px; line-height: 2.15; }
.project-writing ul { margin: 8px 0 22px; padding-left: 22px; }
.project-writing li { margin: 5px 0; padding-left: 3px; }
.project-writing h3 { margin: 18px 0 8px; font-size: 14px; font-weight: 400; color: #000080; }
.project-link { display: flex; align-items: center; gap: 16px; margin-top: 25px; flex-wrap: wrap; }
.project-link > span { color: #777; }
.launch-button { display: inline-block; color: #000; text-decoration: none; padding: 5px 22px; line-height: 24px; }
.launch-button:hover { color: #000080; }
.pico-status { display: flex; align-items: center; gap: 8px; margin-top: 22px; color: #555; }
.tiny-square { width: 7px; height: 7px; background: #008080; border: 1px solid #000; }
.classic-button { min-width: 88px; padding: 6px 20px; line-height: 18px; }
.error-content { padding: 24px; line-height: 1.8; }
.help-content { padding: 20px 26px; line-height: 1.9; overflow: auto; }
.help-content h2 { font-size: 18px; color: #000080; font-weight: 400; margin: 0 0 14px; }
.help-content dl { margin: 0 0 20px; }
.help-content dl > div { display: flex; gap: 12px; margin-bottom: 6px; }
.help-content dt { min-width: 100px; }
.help-content dd { margin: 0; color: #555; }
.help-content .classic-button { display: block; margin: auto; }

* { scrollbar-width: auto; scrollbar-color: #c0c0c0 #e2e2e2; }
::-webkit-scrollbar { width: 17px; height: 17px; }
::-webkit-scrollbar-track { background: repeating-conic-gradient(#ddd 0% 25%, #fff 0% 50%) 0 / 2px 2px; border-left: 1px solid #808080; }
::-webkit-scrollbar-thumb { background: #c0c0c0; border: 1px solid; border-color: #fff #000 #000 #fff; box-shadow: inset -1px -1px #808080; }
::-webkit-scrollbar-button:single-button { display: block; width: 17px; height: 17px; background-color: #c0c0c0; border: 1px solid; border-color: #fff #000 #000 #fff; background-position: center; background-repeat: no-repeat; }
::-webkit-scrollbar-button:single-button:vertical:decrement { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='6'%3E%3Cpath d='M0 6L4 1l5 5'/%3E%3C/svg%3E"); }
::-webkit-scrollbar-button:single-button:vertical:increment { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='6'%3E%3Cpath d='M0 0L4 5l5-5'/%3E%3C/svg%3E"); }
::-webkit-scrollbar-corner { background: #c0c0c0; }

@media (max-width: 850px) {
  .notepad-page { padding: 20px 16px; }
  .readme-title { font-size: 14px; }
  .contact-links > div { gap: 5px; }
  .contact-links dt { width: 56px; min-width: 56px; }
}
@media (max-width: 699px) {
  .desktop-shortcuts { top: 18px; left: 12px; right: 12px; flex-direction: row; gap: 20px; }
  .desktop-shortcuts .desktop-icon { flex-direction: row; width: auto; gap: 5px; }
  .desktop-shortcuts .pixel-icon { width: 28px; height: 28px; }
  .desktop-shortcuts .desktop-icon > span { padding-left: 0; padding-right: 0; }
  .project-label { padding: 1px 2px; }
  .notepad-page { padding: 22px 15px; }
  .contact-links > div { gap: 5px; }
  .contact-links dt { width: 55px; min-width: 55px; }
  .contact-links dd { gap: 4px; }
  .contact-notes { margin-top: 34px; }
  .project-writing { padding: 19px 18px 25px; }
  .project-heading { align-items: flex-start; flex-direction: column; gap: 6px; }
  .project-heading h1 { font-size: 24px; }
  .project-screenshot { padding: 10px 10px 0; }
  .help-content { padding: 20px 17px; }
  #minimized-windows { bottom: 14px; left: 10px; gap: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; }
}
