
    /* ---------- Fonts ---------- */
    @font-face {
      font-family: "Chicago";
      src: url("../fonts/pixChicago.woff2") format("woff2");
      font-weight: normal;
      font-style: normal;
    }

    /* ---------- Global ---------- */
    * {
      font-family: "Chicago", sans-serif !important;
      color: black;
      font-size: 12px;
      font-weight: normal !important;
      margin: 0;
      padding: 0;
      -webkit-font-smoothing: none;
      -moz-osx-font-smoothing: grayscale;
      text-rendering: geometricPrecision;
    }

    a { text-decoration: none; }

    /* ---------- Base ---------- */
    body {
      background: #ffffff; /* desktop background */
      margin: 0;
      overflow: hidden;
      min-height: 100vh; /* prevent html (black) showing at odd viewport sizes */
    }

    /* Out-of-bounds page background (only visible when zooming/overscrolling) */
    html {
      background: #ffffff;
    }

    html, body { height: 100%; }

    body::before {
      content: "";
      position: fixed;
      inset: 0;
      border: 1px solid #000;
      pointer-events: none;
      z-index: 2000;
    }

    /* ---------- Desktop ---------- */
    .desktop {
      position: absolute;
      top: 38px;
      display: flex;
      flex-direction: column;
      align-items: flex-start;
    }

    .desktop.grid-on::before {
      content: "";
      position: fixed;
      left: 0;
      right: 0;
      top: 38px;
      bottom: 0;
      pointer-events: none;
      background-image:
        linear-gradient(to right, rgba(0, 0, 0, 0.18) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.18) 1px, transparent 1px);
      background-size: var(--grid-x, 80px) var(--grid-y, 80px);
      background-position: var(--grid-offset-x, 10px) var(--grid-offset-y, 10px);
      opacity: 0.35;
      z-index: 0;
    }

    .icon {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: flex-start;
      width: 99px;
      height: 120px;
      text-align: center;
      cursor: pointer;
      position: absolute;
      z-index: 1;
      user-select: none;
      padding: 6px;
      box-sizing: border-box;
    }

    .icon img {
      width: 66px;
      height: 66px;
      object-fit: contain;
      image-rendering: pixelated;
      flex: 0 0 auto;
      margin-top: 2px;
    }

    .icon span {
      font-size: 8px;
      width: 78px;
      margin-top: 6px;
      line-height: 1.2;
      height: 24px;               /* fixed label box for baseline alignment */
      display: flex;
      align-items: flex-start;
      justify-content: center;
      word-break: break-word;
      overflow: hidden;
    }

    .icon.selected { opacity: 0.75; }
    .icon.in-trash { display: none; }
    .trash-bin .icon.in-trash { display: flex; }
    .icon.trash-hover img {
      filter: brightness(1.5);
    }

    .trash-bin {
      width: min(420px, calc(100vw - 80px));
      height: 280px;
      position: relative;
      background: #fff;
      border: 0;
      box-shadow: none;
      overflow: visible;
    }

    /* ---------- Taskbar ---------- */
    .taskbar {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 30px;
      display: flex;
      align-items: center;
      padding: 0 22px;
      box-sizing: border-box;
      z-index: 1000;
      background: #dfdfdf;
      border-top: 1px solid #fff;
      border-bottom: 1px solid #000;
      box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 #6e6e6e;
    }

    .taskbar::after {
      content: "";
      position: absolute;
      left: 0;
      right: 0;
      bottom: -1px;
      height: 1px;
      background: #000;
    }

    .left-group,
    .right-group {
      display: flex;
      align-items: center;
    }

    .right-group { margin-left: auto; }

    /* ---------- Menu Items ---------- */
    .menu-item {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      min-height: 22px;
      padding: 2px 6px;
      background: transparent;
      border: 0;
      outline: none;
      cursor: pointer;
      font: inherit;
      white-space: nowrap;
      line-height: normal;
    }

    .menu-item img {
      display: block;
      width: 16px;
      height: 16px;
      image-rendering: pixelated;
      flex: 0 0 auto;
    }

    .menu-item:hover {
      border-top: 1px solid #fff;
      border-left: 1px solid #fff;
      border-right: 1px solid #6f6f6f;
      border-bottom: 1px solid #6f6f6f;
      background: linear-gradient(#efefef, #dcdcdc);
      padding: 1px 5px;
    }

    .menu-item:active {
      border-top: 1px solid #6f6f6f;
      border-left: 1px solid #6f6f6f;
      border-right: 1px solid #fff;
      border-bottom: 1px solid #fff;
      background: linear-gradient(#dcdcdc, #efefef);
      padding: 1px 5px;
    }

    .menubar-clock {
      font-size: 10px;
      padding: 2px 6px;
      white-space: nowrap;
    }

    .taskbar-return .return-long { display: none; }
    .taskbar-return .return-icon,
    .mobile-return .return-icon {
      width: 0;
      height: 0;
      border-top: 5px solid transparent;
      border-bottom: 5px solid transparent;
      border-right: 7px solid #000;
      display: inline-block;
    }
    .mobile-return { display: none; }

    /* ---------- Search ---------- */
    .search-bar {
      display: none;
      position: fixed;
      top: 30px;
      right: 0;
      background: #efefef;
      border: 1px solid #7d7d7d;
      height: 26px;
      align-items: center;
      padding: 0 6px;
      z-index: 1001;
      box-shadow: 1px 1px 0 #6e6e6e, 2px 2px 0 #000;
    }

    .search-bar input {
      width: 240px; /* 1.5x (was 160px) */
      height: 100%;
      border: none;
      background: transparent;
      outline: none;
    }

    /* ---------- Search Results ---------- */
    .search-results {
      position: absolute;
      top: 26px;
      right: -1px;
      left: -1px;
      display: none;
      background: #efefef;
      border: 1px solid #7d7d7d;
      border-top: 0;
      box-shadow: 1px 1px 0 #6e6e6e, 2px 2px 0 #000;
      z-index: 1002;
    }

    .search-result {
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      padding: 3px 6px;
      background: transparent;
      border: 0;
      text-align: left;
      cursor: pointer;
    }

    .search-result:hover,
    .search-result.active {
      background: #dcdcdc;
    }

    .search-result-left {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      min-width: 0;
      flex: 1;
    }

    .search-result-icon {
      width: 16px;
      height: 16px;
      image-rendering: pixelated;
      flex: 0 0 auto;
    }

    .search-result-name {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      min-width: 0;
    }

    .search-hit {
      background: transparent;
      text-decoration: none;
    }

    /* Inverse highlight: dim non-matching characters */
    .search-dim {
      opacity: 0.5;
    }

    .search-result-kind {
      font-size: 10px;
      opacity: 0.8;
      flex: 0 0 auto;
      white-space: nowrap;
    }

    /* ---------- Popup ---------- */

    /* ---------- OS9 Loader ---------- */
    .loader-wrap { margin: 12px 0 4px; }
    .loader-label { font-size: 10px; margin-bottom: 6px; }
    .loader-bar {
      height: 14px;
      background: #ffffff;
      border-top: 1px solid #6f6f6f;
      border-left: 1px solid #6f6f6f;
      border-right: 1px solid #ffffff;
      border-bottom: 1px solid #ffffff;
      box-shadow: inset 0 0 0 1px #000;
      padding: 2px;
      box-sizing: border-box;
    }
    .loader-fill {
      height: 100%;
      width: 0%;
      background: repeating-linear-gradient(90deg, #000 0px, #000 3px, transparent 3px, transparent 6px);
      background-position: 0 0;
    }

    .loader-fill.indeterminate {
      width: 100% !important;
      animation: loaderSlide 0.35s linear infinite;
    }

    @keyframes loaderSlide {
      from { background-position: 0 0; }
      to { background-position: 12px 0; }
    }
    .loader-hint { font-size: 10px; margin-top: 6px; opacity: 0.8; }


    .popup-overlay {
      position: fixed;
      inset: 0;
      display: none;
      background: transparent;
      z-index: 3001;
      pointer-events: none;
    }

    .popup-overlay.show { display: block; }
    .popup-overlay.dim { background: rgba(255, 255, 255, 0.55); }

    .popup-window {
      width: min(520px, calc(100vw - 40px));
      max-height: calc(100vh - 80px);
      background: #efefef;
      border: 1px solid #000;
      box-shadow: 1px 1px 0 #6e6e6e, 2px 2px 0 #000;
      display: flex;
      flex-direction: column;
      position: fixed;
      pointer-events: auto;
    }

    .popup-titlebar {
      height: 22px;
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 0 6px;
      background: #dfdfdf;
      border-top: 1px solid #fff;
      border-bottom: 1px solid #000;
      box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 #6e6e6e;
      cursor: move;
    }

    .popup-title {
      flex: 1;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      font-size: 10px;
    }

    .popup-close {
      width: 14px;
      height: 14px;
      background: #dfdfdf;
      border-top: 1px solid #fff;
      border-left: 1px solid #fff;
      border-right: 1px solid #6f6f6f;
      border-bottom: 1px solid #6f6f6f;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      padding: 0;
      flex: 0 0 auto;
    }

    .popup-close::before {
      content: "";
      width: 8px;
      height: 8px;
      background: #000;
      clip-path: polygon(
        0 10%, 10% 0, 50% 40%, 90% 0, 100% 10%, 60% 50%,
        100% 90%, 90% 100%, 50% 60%, 10% 100%, 0 90%, 40% 50%
      );
    }

    /* active behavior also on hover */
    .popup-close:active,
    .popup-close:hover {
      border-top: 1px solid #6f6f6f;
      border-left: 1px solid #6f6f6f;
      border-right: 1px solid #fff;
      border-bottom: 1px solid #fff;
      background: #dcdcdc;
    }

    .popup-body {
      padding: 10px;
      background: #fff;
      overflow: auto;
      flex: 1;
      border-top: 1px solid #6e6e6e;
      box-shadow: inset 0 1px 0 #fff;
    }

    .popup-window.trash-popup .popup-body {
      overflow: visible;
    }

    .popup-actions {
      padding: 6px 8px;
      background: #efefef;
      border-top: 1px solid #6e6e6e;
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 8px;
    }

    .popup-ok {
      padding: 2px 16px;
      background: #dfdfdf;
      border-top: 1px solid #fff;
      border-left: 1px solid #fff;
      border-right: 1px solid #6f6f6f;
      border-bottom: 1px solid #6f6f6f;
      cursor: pointer; /* pointer cursor like X */
    }

    /* active behavior also on hover */
    .popup-ok:active,
    .popup-ok:hover {
      border-top: 1px solid #6f6f6f;
      border-left: 1px solid #6f6f6f;
      border-right: 1px solid #fff;
      border-bottom: 1px solid #fff;
      background: #dcdcdc;
    }

    .popup-caption { display: none !important; }

    .popup-text {
      white-space: pre-wrap;
      font-size: 12px;
      line-height: 1.8;
      text-align: justify;
      text-align-last: left;
      padding: 0 10px;
    }

    .popup-text.size-sm {
      font-size: 10px;
      line-height: 1.6;
    }

    .popup-content > * + * {
      margin-top: 5px;
    }

    .popup-text.align-justify-last-left {
      text-align: justify;
      text-align-last: left;
    }

    .popup-text.align-last-left {
      text-align: justify;
      text-align-last: left;
    }

    .popup-text.align-center {
      text-align: center;
      text-align-last: center;
    }

    .popup-text.role-welcome {
      margin-bottom: 18px;
    }

    .popup-text.role-welcome.wave span {
      display: inline-block;
      animation: welcomeWave 1.6s ease-in-out infinite;
      animation-delay: calc(var(--i) * 0.06s);
      will-change: transform;
    }

    @keyframes welcomeWave {
      0%, 100% { transform: translateY(0px); }
      50% { transform: translateY(-4px); }
    }

    .popup-text.role-title {
      text-align: center;
      text-align-last: center;
    }

    .popup-text.role-title .welcome-time-image {
      display: block;
      width: 24px;
      height: 24px;
      margin: 0 auto 4px;
      image-rendering: pixelated;
    }

    .popup-text.role-title .welcome-date {
      display: block;
      font-size: 10px;
    }

 

    .popup-media {
      display: flex;
      justify-content: center;
      align-items: center;
      margin: 10px 0;
    }

    .popup-media img {
      image-rendering: pixelated;
      max-width: 100%;
      height: auto;
      border: none;
      box-shadow: none;
      background: transparent;
    }

    .popup-media.size-xs img { max-width: 120px; }
    .popup-media.size-sm img { max-width: 180px; }
    .popup-media.size-md img { max-width: 240px; }
    .popup-media.size-lg img { max-width: 320px; }
    .popup-media.size-xl img { max-width: 420px; }

    .popup-embed {
      display: flex;
      justify-content: center;
      margin: 10px 10px 6px;
    }

    .popup-embed-frame {
      width: 100%;
      max-width: none;
      background: #fff;
      border: 1px solid #000;
      box-shadow: 1px 1px 0 #6e6e6e, 2px 2px 0 #000;
      overflow: hidden;
      display: flex;
      flex-direction: column;
    }

    .popup-embed-bar {
      height: 20px;
      display: flex;
      align-items: center;
      padding: 1px 6px;
      box-sizing: border-box;
      background: #dfdfdf;
      border-bottom: 1px solid #000;
      box-shadow: inset 0 1px 0 #fff;
      font-size: 10px;
    }

    .popup-embed-bar,
    .popup-embed-bar * {
      font-size: 9px;
      line-height: 1.2;
      font-weight: normal;
    }

    .embed-title-italic { font-style: italic; font-size: inherit; }

    .popup-embed-body {
      position: relative;
      background: #fff;
    }

    .popup-embed-body iframe {
      width: 100%;
      height: auto;
      border: 0;
      display: block;
      aspect-ratio: 16 / 9;
    }

    .popup-embed-placeholder {
      width: 100%;
      min-height: 140px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 10px;
      letter-spacing: 0.5px;
    }

    .popup-embed-image {
      width: 100%;
      height: auto;
      object-fit: contain;
      display: block;
      image-rendering: auto;
    }

    .popup-quote {
      background: #dfdfdf;
      margin: 14px 10px 8px;
      padding: 10px;
      font-style: oblique;
      font-size: 9px;
      line-height: 1.6;
      white-space: pre-wrap;
      text-align: justify;
      text-align-last: left;
      border: 1px solid #000;
      box-shadow: 1px 1px 0 #6e6e6e, 2px 2px 0 #000;
    }

    .popup-quote-signature {
      display: block;
      width: 100%;
      text-align: right;
      text-align-last: right;
      font-size: inherit;
    }

    .snake-wrap {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 8px;
    }

    .snake-frame {
      background: #dfdfdf;
      padding: 10px;
      border: 1px solid #000;
      box-shadow: 1px 1px 0 #6e6e6e, 2px 2px 0 #000;
    }

    .snake-canvas {
      display: block;
      background: #fff;
      border: 0;
      image-rendering: pixelated;
    }

    .snake-status {
      font-size: 10px;
      text-align: center;
      white-space: pre-line;
    }

    .snake-actions {
      display: none;
      gap: 8px;
      justify-content: center;
    }

    .snake-actions.show { display: flex; }

    /* Desktop taskbar: pinned to top */
    .taskbar {
      top: 0;
      bottom: auto;
    }

    /* Force top taskbar for any non-mobile width */
    @media (min-width: 769px) {
      body { padding-bottom: 0 !important; }
      .taskbar { top: 0 !important; bottom: auto !important; }
      .search-bar { top: 30px !important; bottom: auto !important; }
      .mobile-return { display: none !important; }
      .taskbar-return { display: inline-flex; }
    }

    /* ---------- Mobile Tweaks ---------- */
    @media (max-width: 768px) {
      html {
        background: #000; /* out-of-bounds */
      }

      /* Show the top taskbar on mobile */
      .taskbar { 
        display: flex !important;
        background: transparent;
        border: 0;
        box-shadow: none;
        padding: 0 10px;
        gap: 0;
        justify-content: center;
        top: auto;
        bottom: 4px;
        height: 30px;
      }
      .left-group,
      .right-group { margin: 0; }
      .search-bar { display: none; }
      .search-bar {
        top: auto;
        bottom: 36px;
      }
      .search-results {
        top: auto;
        bottom: 30px;
        border-top: 1px solid #7d7d7d;
        border-bottom: 0;
      }
      .search-bar { box-sizing: border-box; height: 30px; }
      .search-bar input {
        width: calc(100% / 0.75);
        font-size: 16px;
        line-height: 1;
        height: 100%;
        transform: scale(0.75);
        transform-origin: left center;
      }
      .taskbar .menu-item,
      .taskbar .menubar-clock {
        background: #dfdfdf;
        border-top: 1px solid #fff;
        border-left: 1px solid #fff;
        border-right: 1px solid #6f6f6f;
        border-bottom: 1px solid #6f6f6f;
        box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 #6e6e6e;
        padding: 2px 10px;
        height: 30px;
        display: inline-flex;
        align-items: center;
        line-height: 1;
        box-sizing: border-box;
      }
      .taskbar .menu-item:hover {
        border-top: 1px solid #fff;
        border-left: 1px solid #fff;
        border-right: 1px solid #6f6f6f;
        border-bottom: 1px solid #6f6f6f;
        background: linear-gradient(#efefef, #dcdcdc);
        padding: 1px 9px;
      }
      .taskbar .menu-item:active {
        border-top: 1px solid #6f6f6f;
        border-left: 1px solid #6f6f6f;
        border-right: 1px solid #fff;
        border-bottom: 1px solid #fff;
        background: linear-gradient(#dcdcdc, #efefef);
        padding: 1px 9px;
      }
      .taskbar-return { display: none !important; }
      .taskbar .menu-item,
      .taskbar .menubar-clock { position: relative; }
      .taskbar .menu-item::after,
      .taskbar .menubar-clock::after {
        content: "";
        position: absolute;
        top: -1px;
        right: -1px;
        bottom: -1px;
        left: auto;
        border-right: 1px solid #6e6e6e;
        pointer-events: none;
      }
      .taskbar .left-group > :last-child::after,
      .taskbar .right-group > :last-child::after { display: none; }
      .taskbar::after { display: none; }

      body {
        background: #ffffff !important;
        min-height: 100vh;
        height: auto;
        overflow-y: scroll !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: none;
        padding-bottom: 40px; /* taskbar visible */
        padding-top: 0;
      }

      .desktop {
        top: 0 !important;
        position: relative !important;
        background: transparent;
      }

      /* Tighter icons on mobile so we can fit 4 columns */
      .icon { width: 90px; height: 116px; padding: 4px; }
      .icon img { width: 60px; height: 60px; margin-top: 2px; }
      .icon span { width: 82px; font-size: 8px; margin-top: 6px; height: 26px; }

      body::before { display: none; }
      body.has-mobile-return { padding-top: 36px; }

      .mobile-return {
        display: inline-flex;
        position: fixed;
        left: 50%;
        top: 6px;
        bottom: auto;
        transform: translateX(-50%);
        z-index: 1200;
        background: #dfdfdf;
        border-top: 1px solid #fff;
        border-left: 1px solid #fff;
        border-right: 1px solid #6f6f6f;
        border-bottom: 1px solid #6f6f6f;
        box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 #6e6e6e;
        padding: 2px 10px;
        height: 30px;
        align-items: center;
        gap: 6px;
        line-height: 1;
      }
      .mobile-return:hover {
        border-top: 1px solid #fff;
        border-left: 1px solid #fff;
        border-right: 1px solid #6f6f6f;
        border-bottom: 1px solid #6f6f6f;
        background: linear-gradient(#efefef, #dcdcdc);
        padding: 1px 9px;
      }
      .mobile-return:active {
        border-top: 1px solid #6f6f6f;
        border-left: 1px solid #6f6f6f;
        border-right: 1px solid #fff;
        border-bottom: 1px solid #fff;
        background: linear-gradient(#dcdcdc, #efefef);
        padding: 1px 9px;
      }
    }
