@font-face {
  font-family: "MSW98UI";
  src: url("./Assets/Fonts/MSW98UI-Regular.otf") format("opentype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  font-family: "MSW98UI", "MS Sans Serif", Tahoma, Arial, sans-serif;
  --taskbar-height: 52px;
  --accent: #8d7cf6;
  --accent-strong: #a89bff;
  --panel-solid: #201f2d;
  --text: #f5f3ff;
  --muted: #310cd7;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
button, input, textarea { font: inherit; color: inherit; }
button:focus-visible, input:focus-visible { outline: 2px solid #c6bdff; outline-offset: 2px; }
body { color: var(--text); background: #191722; user-select: none; }

.desktop {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: #191722;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
  animation: none;
  filter: brightness(1.18) contrast(1.02) saturate(1.05);
}

.desktop.wallpaper-daiko {
  background-image:
    url("./Assets/grim.png"),
    linear-gradient(
      to bottom,
      rgba(68, 67, 67, 0.367) 40%,
      rgba(84, 162, 153, 0.77) 100%
    ),
    url("./Assets/daikoglobal2.png");

  background-size:
    clamp(180px, 35vw, 500px) auto,
    cover,
    100px auto;

  background-repeat:
    no-repeat,
    no-repeat,
    repeat;

  background-position:
    right top,
    center,
    0 0;

  animation: diag 10s linear infinite;
}

.desktop.wallpaper-bg1 {
  background-image: url("./Assets/bg1.png");
  animation: none;
}

.desktop.wallpaper-bg2 {
  background-image: url("./Assets/bg2.png");
  animation: none;
}

@keyframes diag {
  from {
    background-position:
      right top,
      center,
      0 0;
  }

  to {
    background-position:
      right top,
      center,
      100px 100px;
  }
}

.wallpaper-shade { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 70% 18%, rgba(183,157,255,.22), transparent 34%), linear-gradient(to top, rgba(11,9,18,.32), transparent 42%); }
.desktop-icons { position: absolute; top: 22px; left: 18px; display: grid; gap: 12px; z-index: 2; }
.desktop-icon { width: 92px; min-height: 92px; border: 1px solid transparent; border-radius: 10px; background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; cursor: default; text-shadow: 0 2px 5px rgba(0,0,0,.8); }
.desktop-icon:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.12); }
.icon-tile, .start-icon, .mini-app-icon, .task-app-icon { display: inline-grid; place-items: center; border-radius: 9px; font-weight: 800; letter-spacing: -.04em; background: linear-gradient(145deg,#a99cff,#6452d0); }
.icon-tile { width: 46px; height: 46px; font-size: 15px; }
.image-icon, .info-icon { background-color: transparent; 
  background-repeat: 
  no-repeat; 
  background-position: center; 
  background-size: contain; }
.computer-icon { background-image: url("./Assets/desktop.png"); }
.disk-icon { background-image: url("./Assets/disk.png"); }
.info-icon { background-image: url("./Assets/info.png"); }
.viewer-icon { 
  background-image: url("./Assets/viewer.png"); 
  background-color: transparent; 
  background-repeat: no-repeat; 
  background-position: center; 
  background-size: contain; 
  color: transparent; 
  box-shadow: none;
}
.notes-icon {
  background-image: url("./Assets/notes.png"); 
  background-color: transparent; 
  background-repeat: no-repeat; 
  background-position: center; 
  background-size: contain; 
  color: transparent; 
  box-shadow: none;
}
.folder-icon, .image-file-icon {
  background-image: url("./Assets/folder.png");
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  color: transparent;
  box-shadow: none;
}

.mail-icon {
  background-image: url("./Assets/mail.png");
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  color: transparent;
  box-shadow: none;
}

.app-window { position: absolute; 
  left: var(--x); 
  top: var(--y); 
  width: var(--w); 
  height: var(--h); 
  min-width: 360px; 
  min-height: 260px; 
  display: flex; 
  flex-direction: column; 
  overflow: hidden; 
  background: rgba(20,19,29,.88); 
  border: 1px solid rgba(255,255,255,.19); 
  border-radius: 12px; 
  box-shadow: 0 28px 75px rgba(0,0,0,.52), inset 0 1px rgba(255,255,255,.08); 
  backdrop-filter: blur(25px) saturate(1.25); 
  z-index: 10; 
}
.app-window.is-active { border-color: rgba(216,208,255,.36); }
.app-window.is-maximized { left: 0 !important; top: 0 !important; width: 100vw !important; height: calc(100vh - var(--taskbar-height)) !important; border-radius: 0; }
.app-window.is-minimized, .app-window[hidden] { display: none; }
.titlebar { height: 43px; flex: 0 0 43px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,.09); background: linear-gradient(rgba(255,255,255,.055),rgba(255,255,255,.01)); cursor: default; }
.window-title { display: flex; align-items: center; gap: 9px; padding-left: 13px; font-size: 13px; font-weight: 600; }
.mini-app-icon { width: 23px; height: 23px; border-radius: 6px; font-size: 9px; }
.window-controls { align-self: stretch; display: flex; }
.window-control { width: 48px; border: 0; background: transparent; font-size: 18px; color: #dedbe8; }
.window-control:hover { background: rgba(255,255,255,.11); }
.window-control.close:hover { background: #c42b3d; }
.app-toolbar { min-height: 53px; display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-bottom: 1px solid rgba(255,255,255,.08); background: rgba(18,17,26,.45); overflow-x: auto; }
.toolbar-button { border: 1px solid rgba(255,255,255,.13); border-radius: 7px; background: rgba(255,255,255,.075); padding: 7px 11px; font-size: 12px; white-space: nowrap; cursor: pointer; }
.toolbar-button:hover { background: rgba(255,255,255,.13); }
.toolbar-button.primary, .toolbar-button.active { background: var(--accent); color: white; }
#fileInput, #musicInput { display: none; }
.status { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.viewer-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; background: radial-gradient(circle at 50% 36%,rgba(125,109,189,.19),rgba(8,8,13,.27) 58%,rgba(4,4,7,.65)); }
#three-canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.viewer-hint { position: absolute; left: 50%; bottom: 13px; transform: translateX(-50%); padding: 6px 10px; border: 1px solid rgba(255,255,255,.1); border-radius: 999px; background: rgba(10,9,15,.48); color: rgba(255,255,255,.62); font-size: 11px; pointer-events: none; white-space: nowrap; }
#dropOverlay { position: absolute; inset: 10px; z-index: 20; display: none; place-items: center; border: 2px dashed var(--accent-strong); border-radius: 10px; background: rgba(13,11,20,.88); color: #d7d0ff; font-size: 14px; text-transform: uppercase; letter-spacing: .08em; }
#dropOverlay.active { display: grid; }
.resize-handle { position: absolute; right: 0; bottom: 0; width: 18px; height: 18px; cursor: nwse-resize; z-index: 30; }
.resize-handle::after { content: ""; position: absolute; right: 4px; bottom: 4px; width: 7px; height: 7px; border-right: 2px solid rgba(255,255,255,.42); border-bottom: 2px solid rgba(255,255,255,.42); }

.computer-content { flex: 1; overflow: auto; padding: 26px; background: radial-gradient(circle at 10% 10%,rgba(141,124,246,.18),transparent 45%); }
.computer-hero { display: flex; align-items: center; gap: 18px; margin-bottom: 24px; }
.large-app-image { width: 86px; height: 86px; flex: 0 0 auto; display: block; background-size: contain; background-repeat: no-repeat; background-position: center; }
.computer-hero h1 { margin: 0 0 6px; font-size: 23px; }
.computer-hero p { margin: 0; color: var(--muted); font-size: 13px; }
.spec-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 0; }
.spec-grid div { padding: 13px; border: 1px solid rgba(255,255,255,.1); border-radius: 9px; background: rgba(255,255,255,.045); }
.spec-grid dt { color: var(--muted); font-size: 11px; margin-bottom: 5px; }
.spec-grid dd { margin: 0; font-size: 13px; }


.wallpaper-settings { margin-top: 22px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1); }
.settings-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 13px; }
.settings-heading h2 { margin: 0 0 5px; font-size: 16px; }
.settings-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.wallpaper-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.wallpaper-choice { min-width: 0; padding: 6px; border: 2px solid transparent; border-radius: 10px; background: rgba(255,255,255,.045); color: var(--text); cursor: pointer; text-align: left; }
.wallpaper-choice:hover { background: rgba(255,255,255,.09); }
.wallpaper-choice.active { border-color: var(--accent-strong); background: rgba(141,124,246,.14); }
.wallpaper-preview { display: block; width: 100%; aspect-ratio: 16 / 9; margin-bottom: 7px; border-radius: 7px; background-color: #15131e; background-position: center; background-repeat: no-repeat; background-size: cover; }
.wallpaper-choice > span:last-child { display: block; padding: 0 3px 2px; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.wallpaper-status { margin: 11px 0 0; color: var(--muted); font-size: 11px; }

.music-content { flex: 1; min-height: 0; display: grid; grid-template-columns: 220px 1fr; }
.album-panel { padding: 22px; border-right: 1px solid rgba(255,255,255,.09); background: radial-gradient(circle at 40% 20%,rgba(141,124,246,.18),transparent 50%); text-align: center; }
.album-art { width: 150px; height: 150px; display: block; margin: 0 auto 16px; background-repeat: no-repeat; background-position: center; background-size: contain; }
.album-panel h2 { margin: 0 0 7px; font-size: 16px; overflow-wrap: anywhere; }
.album-panel p { margin: 0 0 16px; color: var(--muted); font-size: 11px; }
.player-panel { min-width: 0; display: flex; flex-direction: column; }
.playlist-header { height: 47px; display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid rgba(255,255,255,.08); }
.playlist { flex: 1; min-height: 0; overflow: auto; list-style: none; margin: 0; padding: 8px; }
.playlist li { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 7px; font-size: 12px; cursor: pointer; }
.playlist li:hover, .playlist li.active { background: rgba(255,255,255,.09); }
.playlist li.active { color: #1831b0; }
.playlist-empty { color: var(--muted); cursor: default !important; }
.player-controls { padding: 14px; border-top: 1px solid rgba(255,255,255,.08); background: rgba(8,8,12,.2); }
.progress-row, .transport-row { display: flex; align-items: center; gap: 10px; }
.progress-row { margin-bottom: 14px; font-size: 10px; color: var(--muted); }
.progress-row input { flex: 1; }
.transport-row { justify-content: center; }
.transport-button { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; background: rgba(255,255,255,.07); cursor: pointer; }
.transport-button:hover, .transport-button.active { background: rgba(141,124,246,.35); }
.play-button { width: 46px; height: 46px; background: var(--accent); }
.volume-control { margin-left: auto; display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; }
.volume-control input { width: 80px; }

.about-content { flex: 1; display: flex; gap: 22px; align-items: center; padding: 34px; background: radial-gradient(circle at 20% 20%,rgba(141,124,246,.16),transparent 48%); }
.about-mark { width: 84px; height: 84px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 22px; background: linear-gradient(145deg,#b5aaff,#5d49c4); font-size: 40px; font-weight: 800; }
.about-content h1 { margin: 0 0 10px; font-size: 22px; }
.about-content p { margin: 0 0 9px; color: var(--muted); line-height: 1.5; font-size: 13px; }

.taskbar { position: absolute; left: 0; right: 0; bottom: 0; height: var(--taskbar-height); z-index: 1000; display: flex; align-items: center; gap: 8px; padding: 6px 9px; background: rgba(20,18,29,.76); border-top: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(28px) saturate(1.35); }
.start-button { width: 42px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; cursor: pointer; }
.start-button:hover, .start-button.open { background: rgba(255,255,255,.1); }
.start-grid { width: 19px; height: 19px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.start-grid i { background: linear-gradient(145deg,#c1b8ff,#7362df); border-radius: 1px; }
.task-items { display: flex; align-items: center; gap: 5px; flex: 1; min-width: 0; }
.task-item { position: relative; height: 40px; max-width: 180px; display: flex; align-items: center; gap: 9px; border: 0; border-radius: 8px; padding: 0 12px; background: transparent; color: #ddd9ea; cursor: pointer; }
.task-item:hover, .task-item.active { background: rgba(255,255,255,.095); }
.task-item.active::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: 1px; height: 3px; border-radius: 3px; background: var(--accent-strong); }
.task-app-icon { width: 24px; height: 24px; font-size: 9px; border-radius: 6px; }
.tray { height: 40px; display: flex; align-items: center; gap: 11px; padding: 0 8px; color: #d7d4df; }
.tray-symbol { font-size: 12px; opacity: .8; }
.clock { min-width: 67px; border: 0; background: transparent; text-align: right; font-size: 11px; line-height: 1.3; white-space: pre-line; }
.start-menu { position: absolute; left: 9px; bottom: calc(var(--taskbar-height) + 8px); width: min(390px,calc(100vw - 18px)); z-index: 900; overflow: hidden; border: 1px solid rgba(255,255,255,.16); border-radius: 13px; background: rgba(27,25,38,.9); backdrop-filter: blur(30px) saturate(1.3); box-shadow: 0 24px 70px rgba(0,0,0,.52); }
.start-profile { display: flex; align-items: center; gap: 12px; padding: 18px; border-bottom: 1px solid rgba(255,255,255,.09); }
.profile-avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(145deg,#b4a9ff,#5f4bc8); font-weight: 800; }
.start-profile div:last-child { display: grid; gap: 2px; }
.start-profile span { color: var(--muted); font-size: 11px; }
.start-apps { display: grid; gap: 4px; padding: 10px; }
.start-apps button { display: flex; align-items: center; gap: 12px; border: 0; border-radius: 9px; padding: 10px; text-align: left; background: transparent; cursor: pointer; }
.start-apps button:hover { background: rgba(255,255,255,.09); }
.start-icon { width: 38px; height: 38px; font-size: 12px; }
.start-apps button > span:last-child { display: grid; gap: 2px; }
.start-apps small { color: var(--muted); font-size: 11px; }
.start-footer { display: flex; justify-content: space-between; align-items: center; padding: 10px 15px; border-top: 1px solid rgba(255,255,255,.08); color: var(--muted); font-size: 11px; }
.start-footer button { border: 1px solid rgba(255,255,255,.12); border-radius: 7px; background: rgba(255,255,255,.07); padding: 6px 10px; cursor: pointer; }
.sleep-screen { position: absolute; inset: 0; z-index: 2000; display: grid; place-content: center; justify-items: center; gap: 18px; background: #08070c; cursor: pointer; }
.sleep-screen[hidden] { display: none; }
.sleep-logo { width: 76px; height: 76px; display: grid; place-items: center; border-radius: 22px; background: linear-gradient(145deg,#b6acff,#5744ba); font-size: 34px; font-weight: 800; }
.sleep-screen p { color: #918ca0; font-size: 12px; }

@media (max-width: 700px) {
  .desktop-icons { display: none; }
  .app-window { left: 0 !important; top: 0 !important; width: 100vw !important; height: calc(100vh - var(--taskbar-height)) !important; min-width: 0; border-radius: 0; }
  .status, .task-item span:last-child, .tray-symbol { display: none; }
  .music-content { grid-template-columns: 1fr; }
  .album-panel { display: none; }
  .spec-grid { grid-template-columns: 1fr; }
}

:root {
  --win98-gray: #c0c0c0;
  --win98-light: #ffffff;
  --win98-mid-light: #dfdfdf;
  --win98-dark: #808080;
  --win98-black: #000000;
  --win98-blue: #000080;
  --win98-blue-light: #1084d0;
  --taskbar-height: 46px;
}

body {
  font-family: "MSW98UI", "MS Sans Serif", Tahoma, Arial, sans-serif;
  color: #000;
}

.app-window {
  background: var(--win98-gray);
  border: 2px solid;
  border-color:
    var(--win98-light)
    var(--win98-black)
    var(--win98-black)
    var(--win98-light);
  border-radius: 0;
  box-shadow:
    inset 1px 1px var(--win98-mid-light),
    inset -1px -1px var(--win98-dark),
    3px 3px 0 rgba(0, 0, 0, 0.45);
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transform: translateZ(0);
  will-change: left, top;
}

.app-window.is-dragging {
  box-shadow:
    inset 1px 1px var(--win98-mid-light),
    inset -1px -1px var(--win98-dark),
    2px 2px 0 rgba(0, 0, 0, 0.35);

  outline: 1px solid transparent;
}

.app-window.is-active {
  border-color:
    var(--win98-light)
    var(--win98-black)
    var(--win98-black)
    var(--win98-light);
}

.titlebar {
  height: 30px;
  flex: 0 0 30px;
  margin: 2px;
  padding-left: 3px;
  border: 0;
  background: var(--win98-blue);
  color: #fff;
}

.app-window.is-active .titlebar {
  background: linear-gradient(
    to right,
    var(--win98-blue),
    var(--win98-blue-light)
  );
}

.window-title {
  padding-left: 2px;
  gap: 6px;
  font-size: 13px;
  font-weight: bold;
  color: #fff;
}

.mini-app-icon {
  width: 20px;
  height: 20px;
  border-radius: 0;
  background-color: transparent;
  box-shadow: none;
}

.window-controls {
  height: 24px;
  align-items: center;
  gap: 2px;
  padding-right: 2px;
}

.window-control {
  width: 24px;
  height: 22px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 2px solid;
  border-color:
    var(--win98-light)
    var(--win98-black)
    var(--win98-black)
    var(--win98-light);
  border-radius: 0;
  background: var(--win98-gray);
  color: #000;
  font-family: Arial, sans-serif;
  font-size: 16px;
  font-weight: bold;
  line-height: 1;
}

.window-control.maximize {
  font-size: 0;
  position: relative;
}

.window-control.maximize::after {
  content: "❐";
  font-size: 20px;
  font-weight: 900;
  line-height: 1;

  position: relative;
  left: 0px;
  top: -3px;
}

.window-control:hover,
.window-control.close:hover {
  background: var(--win98-gray);
  color: #000;
}

.window-control:active {
  border-color:
    var(--win98-black)
    var(--win98-light)
    var(--win98-light)
    var(--win98-black);
  padding-top: 2px;
  padding-left: 2px;
}

.app-toolbar {
  min-height: 44px;
  padding: 6px;
  gap: 6px;
  border-top: 1px solid var(--win98-light);
  border-bottom: 2px solid var(--win98-dark);
  background: var(--win98-gray);
}

.toolbar-button,
.wallpaper-upload-button,
.wallpaper-reset-button,
.start-footer button {
  padding: 5px 10px;
  border: 2px solid;
  border-color:
    var(--win98-light)
    var(--win98-black)
    var(--win98-black)
    var(--win98-light);
  border-radius: 0;
  background: var(--win98-gray);
  color: #000;
  box-shadow: none;
}

.toolbar-button:hover,
.wallpaper-upload-button:hover,
.wallpaper-reset-button:hover,
.start-footer button:hover {
  background: var(--win98-gray);
}

.toolbar-button:active,
.wallpaper-upload-button:active,
.wallpaper-reset-button:active,
.start-footer button:active {
  border-color:
    var(--win98-black)
    var(--win98-light)
    var(--win98-light)
    var(--win98-black);
  padding-top: 6px;
  padding-left: 11px;
}

.toolbar-button.primary,
.toolbar-button.active {
  background: var(--win98-gray);
  color: #000;
  border-color:
    var(--win98-black)
    var(--win98-light)
    var(--win98-light)
    var(--win98-black);
}

.status {
  color: #222;
}

.status .name {
  color: #000080;
}

.viewer-stage {
  margin: 4px;
  border: 2px solid;
  border-color:
    var(--win98-dark)
    var(--win98-light)
    var(--win98-light)
    var(--win98-dark);
  background: #000;
}

.viewer-hint {
  border: 1px solid var(--win98-dark);
  border-radius: 0;
  background: var(--win98-gray);
  color: #000;
}

.resize-handle::after {
  border-color: #000;
}

.taskbar {
  height: var(--taskbar-height);
  padding: 4px;
  gap: 5px;
  background: var(--win98-gray);
  border-top: 2px solid var(--win98-light);
  box-shadow: none;
  backdrop-filter: none;
}

.start-button {
  width: 88px;
  height: 36px;
  padding: 4px 8px;
  display: flex;
  justify-content: flex-start;
  gap: 7px;
  border: 2px solid;
  border-color:
    var(--win98-light)
    var(--win98-black)
    var(--win98-black)
    var(--win98-light);
  border-radius: 0;
  background: var(--win98-gray);
  color: #000;
  font-weight: bold;
}

.start-button::after {
  content: "Start";
  font-size: 14px;
}

.start-button:hover,
.start-button.open {
  background: var(--win98-gray);
}

.start-button:active,
.start-button.open {
  border-color:
    var(--win98-black)
    var(--win98-light)
    var(--win98-light)
    var(--win98-black);
}

.start-grid {
  width: 20px;
  height: 20px;
  transform: none;
}

.start-grid i {
  border-radius: 0;
  background: var(--win98-blue);
}

.task-items {
  gap: 4px;
}

.task-item {
  height: 36px;
  max-width: 190px;
  padding: 0 9px;
  border: 2px solid;
  border-color:
    var(--win98-light)
    var(--win98-black)
    var(--win98-black)
    var(--win98-light);
  border-radius: 0;
  background: var(--win98-gray);
  color: #000;
}

.task-item:hover {
  background: var(--win98-gray);
}

.task-item.active {
  border-color:
    var(--win98-black)
    var(--win98-light)
    var(--win98-light)
    var(--win98-black);
  background-color: #fff;
  background-image:
    linear-gradient(45deg, #c0c0c0 25%, transparent 25%),
    linear-gradient(-45deg, #c0c0c0 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #c0c0c0 75%),
    linear-gradient(-45deg, transparent 75%, #c0c0c0 75%);
  background-size: 4px 4px;
  background-position: 0 0, 0 2px, 2px -2px, -2px 0;
}

.task-item.active::after {
  display: none;
}

.task-app-icon {
  width: 22px;
  height: 22px;
  border-radius: 0;
  background-color: transparent;
  box-shadow: none;
}

.tray {
  height: 36px;
  padding: 0 9px;
  gap: 8px;
  border: 2px solid;
  border-color:
    var(--win98-dark)
    var(--win98-light)
    var(--win98-light)
    var(--win98-dark);
  background: var(--win98-gray);
  color: #000;
}

.clock {
  color: #000;
}

.start-menu {
  left: 4px;
  bottom: var(--taskbar-height);
  width: 320px;
  border: 2px solid;
  border-color:
    var(--win98-light)
    var(--win98-black)
    var(--win98-black)
    var(--win98-light);
  border-radius: 0;
  background: var(--win98-gray);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.45);
  backdrop-filter: none;
}

.start-profile {
  border-bottom: 1px solid var(--win98-dark);
  background: var(--win98-gray);
  color: #000;
}

.profile-avatar {
  border-radius: 0;
  background: var(--win98-blue);
  color: #fff;
}

.start-profile span {
  color: #333;
}

.start-apps {
  padding: 4px;
}

.start-apps button {
  border-radius: 0;
  color: #000;
}

.start-apps button:hover {
  background: var(--win98-blue);
  color: #fff;
}

.start-apps button:hover small {
  color: #fff;
}

.start-apps small {
  color: #444;
}

.start-icon {
  width: 34px;
  height: 34px;
  border-radius: 0;
  background-color: transparent;
  box-shadow: none;
}

.start-footer {
  border-top: 1px solid var(--win98-light);
  color: #000;
}

.desktop-icon {
  border: 1px dotted transparent;
  border-radius: 0;
}

.desktop-icon:hover,
.desktop-icon.is-selected {
  border-color: #fff;
  background: rgba(0, 0, 128, 0.55);
}

.icon-tile {
  border-radius: 0;
  background-color: transparent;
  box-shadow: none;
}

.about-content,
.wallpaper-content {
  background: var(--win98-gray);
  color: #000;
}

.about-content p,
.wallpaper-section p,
.wallpaper-control-group label,
.wallpaper-toggle-text small {
  color: #333;
}

.about-mark {
  border-radius: 0;
  background: var(--win98-blue);
  color: #fff;
  box-shadow: none;
}

.wallpaper-option,
.custom-wallpaper-preview,
.wallpaper-toggle-row,
.wallpaper-select {
  border-radius: 0;
}

.wallpaper-option {
  border: 2px solid;
  border-color:
    var(--win98-light)
    var(--win98-black)
    var(--win98-black)
    var(--win98-light);
}

.wallpaper-option.active,
.wallpaper-option[aria-pressed="true"] {
  border-color:
    var(--win98-black)
    var(--win98-light)
    var(--win98-light)
    var(--win98-black);
  box-shadow: none;
}

.wallpaper-option span {
  border-radius: 0;
  background: var(--win98-gray);
  color: #000;
}

.wallpaper-select {
  background: #fff;
  color: #000;
  border: 2px solid;
  border-color:
    var(--win98-dark)
    var(--win98-light)
    var(--win98-light)
    var(--win98-dark);
}

.sleep-screen {
  background: #000080;
}

.sleep-logo {
  border-radius: 0;
  background: var(--win98-gray);
  color: #000;
  box-shadow: none;
}

/* CRT monitor effect */

html {
  background: #050505;
}

body {
  position: relative;
  padding: 10px;
  background: #050505;
}

/* Curved screen area */
.desktop {
  width: calc(100vw - 20px);
  height: calc(100vh - 20px);

  border-radius: 28px;
  overflow: hidden;

  box-shadow:
    inset 0 0 35px rgba(0, 0, 0, 0.65),
    inset 0 0 90px rgba(0, 0, 0, 0.35),
    0 0 0 5px #111,
    0 0 30px rgba(0, 0, 0, 0.9);

  transform: perspective(1200px) scale(0.995);
  transform-origin: center;
}

/* Horizontal CRT scanlines */
body::before {
  content: "";

  position: fixed;
  inset: 10px;
  z-index: 99999;

  border-radius: 28px;

  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, 0.16) 3px,
    rgba(0, 0, 0, 0.16) 4px
  );

  pointer-events: none;
}

/* Glass tint, vignette, and RGB texture */
body::after {
  content: "";

  position: fixed;
  inset: 10px;
  z-index: 100000;

  border-radius: 28px;

  background:
    linear-gradient(
      90deg,
      rgba(255, 0, 0, 0.025),
      rgba(0, 255, 0, 0.012),
      rgba(0, 0, 255, 0.025)
    ),
    radial-gradient(
      ellipse at center,
      transparent 50%,
      rgba(0, 0, 0, 0.18) 90%,
      rgba(0, 0, 0, 0.62) 100%
    );

  box-shadow:
    inset 0 0 25px rgba(255, 255, 255, 0.04),
    inset 0 0 80px rgba(0, 0, 0, 0.42);

  opacity: 0.92;
  pointer-events: none;

  animation: crt-flicker 0.12s infinite;
}

/* Subtle screen flicker */
@keyframes crt-flicker {
  0% {
    opacity: 0.9;
  }

  50% {
    opacity: 0.94;
  }

  100% {
    opacity: 0.91;
  }
}


@keyframes crt-refresh {
  from {
    transform: translateY(-20vh);
  }

  to {
    transform: translateY(130vh);
  }
}

/* Keep maximized windows inside the curved display */
.app-window.is-maximized {
  width: calc(100vw - 20px) !important;
  height: calc(100vh - var(--taskbar-height) - 20px) !important;
}

/* Reduce effects for smaller screens */
@media (max-width: 700px) {
  body {
    padding: 4px;
  }

  .desktop {
    width: calc(100vw - 8px);
    height: calc(100vh - 8px);
    border-radius: 14px;
  }

  body::before,
  body::after {
    inset: 4px;
    border-radius: 14px;
  }
}

/* Respect reduced motion settings */
@media (prefers-reduced-motion: reduce) {
  body::after,
  .desktop::after {
    animation: none;
  }
}

/* Notes app */

.notes-toolbar {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 6px;
  border-top: 1px solid var(--win98-light);
  border-bottom: 2px solid var(--win98-dark);
  background: var(--win98-gray);
}

#noteSaveStatus {
  margin-left: auto;
  padding-right: 6px;
  color: #333;
  font-size: 11px;
}

.notes-content {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 3px;
  padding: 3px;
  background: var(--win98-gray);
}

.notes-sidebar,
.note-editor {
  min-height: 0;
  border: 2px solid;
  border-color: var(--win98-dark) var(--win98-light) var(--win98-light) var(--win98-dark);
  background: #fff;
}

.notes-sidebar { overflow: auto; }
.notes-list { display: grid; align-content: start; }

.note-list-item {
  width: 100%;
  padding: 8px;
  border: 0;
  border-bottom: 1px solid #c0c0c0;
  border-radius: 0;
  background: #fff;
  color: #000;
  text-align: left;
  cursor: pointer;
}

.note-list-item:hover,
.note-list-item.active {
  background: var(--win98-blue);
  color: #fff;
}

.note-list-title {
  display: block;
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.note-list-date {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  opacity: .8;
}

.note-editor {
  display: flex;
  flex-direction: column;
}

.note-title {
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-bottom: 1px solid #808080;
  border-radius: 0;
  background: #fff;
  color: #000;
  font-size: 16px;
  font-weight: 700;
  outline: none;
}

.note-body {
  flex: 1;
  width: 100%;
  min-height: 0;
  padding: 12px;
  resize: none;
  border: 0;
  border-radius: 0;
  background: #ffffdf;
  color: #000;
  font: 14px/1.5 "MSW98UI", "MS Sans Serif", Tahoma, Arial, sans-serif;
  outline: none;
}

@media (max-width: 700px) {
  .notes-content { grid-template-columns: 130px 1fr; }
}

/* Fixed Disk playlist */
.playlist-header > span {
  color: #333;
  font-size: 11px;
}

.playlist li {
  align-items: flex-start;
}

.track-number {
  width: 24px;
  flex: 0 0 24px;
  color: #666;
  font-family: "Courier New", monospace;
}

.track-details {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.track-details strong,
.track-details small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-details small {
  color: #555;
  font-size: 10px;
}

.playlist li.active .track-number,
.playlist li.active .track-details small {
  color: inherit;
}

/* Square Windows 98 music controls */
.music-window .transport-button,
.music-window .play-button {
  border-radius: 0;

  border: 2px solid;
  border-color:
    var(--win98-light)
    var(--win98-black)
    var(--win98-black)
    var(--win98-light);

  background: var(--win98-gray);
  color: #000;
  box-shadow: none;
}

.music-window .transport-button:active,
.music-window .play-button:active,
.music-window .transport-button.active {
  border-color:
    var(--win98-black)
    var(--win98-light)
    var(--win98-light)
    var(--win98-black);
}

.music-window .play-button {
  width: 46px;
  height: 38px;
}

/* Square music slider handles */
.music-window input[type="range"] {
  appearance: none;
  -webkit-appearance: none;
  height: 18px;
  background: transparent;
}

/* Track */
.music-window input[type="range"]::-webkit-slider-runnable-track {
  height: 5px;
  background: #808080;
  border: 1px solid #000;
}

.music-window input[type="range"]::-moz-range-track {
  height: 5px;
  background: #808080;
  border: 1px solid #000;
}

/* Square handle */
.music-window input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 18px;
  margin-top: -7px;
  border: 2px solid;
  border-color:
    #ffffff
    #000000
    #000000
    #ffffff;
  border-radius: 0;
  background: #c0c0c0;
}

.music-window input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 18px;
  border: 2px solid;
  border-color:
    #ffffff
    #000000
    #000000
    #ffffff;
  border-radius: 0;
  background: #c0c0c0;
}

/* Keep Disk controls fixed at the bottom */
.music-window .music-content {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.music-window .player-panel {
  min-width: 0;
  min-height: 0;
  overflow: hidden;

  display: flex;
  flex-direction: column;
}

.music-window .playlist-header {
  flex: 0 0 auto;
}

.music-window .playlist {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.music-window .player-controls {
  flex: 0 0 auto;
  width: 100%;
  margin-top: auto;
  padding: 10px;
  background: var(--win98-gray);
}

/* Keep the progress slider aligned */
.music-window .progress-row {
  width: 100%;
  display: grid;
  grid-template-columns: 38px minmax(60px, 1fr) 38px;
  align-items: center;
  gap: 8px;
}

.music-window #seekBar {
  width: 100%;
  min-width: 0;
}

/* Keep buttons and volume controls inside the window */
.music-window .transport-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-width: 0;
}

.music-window .transport-button {
  flex: 0 0 auto;
}

.music-window .volume-control {
  min-width: 0;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 5px;
}

.music-window #volumeBar {
  width: clamp(60px, 10vw, 100px);
  min-width: 50px;
}

/* Puzzle folder app */

.image-file-icon {
  background-image: url("./Assets/puzzle1.png");
}

.folder-toolbar {
  flex: 0 0 28px;
  padding: 6px 8px;
  border-top: 1px solid var(--win98-light);
  border-bottom: 2px solid var(--win98-dark);
  background: var(--win98-gray);
  color: #000;
  font-size: 11px;
}

.folder-content {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, 110px);
  align-content: start;
  gap: 12px;
  padding: 14px;
  margin: 3px;
  border: 2px solid;
  border-color: var(--win98-dark) var(--win98-light) var(--win98-light) var(--win98-dark);
  background: #fff;
}

.puzzle-file {
  width: 110px;
  min-height: 125px;
  padding: 6px;
  border: 1px dotted transparent;
  border-radius: 0;
  background: transparent;
  color: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  cursor: default;
}

.puzzle-file:hover,
.puzzle-file:focus {
  border-color: #000;
  background: #000080;
  color: #fff;
}

.puzzle-file img {
  width: 82px;
  height: 82px;
  object-fit: cover;
  border: 1px solid #808080;
  background: #fff;
}

.puzzle-file span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.puzzle-viewer-content {
  flex: 1;
  min-height: 0;
  overflow: auto;
  margin: 3px;
  border: 2px solid;
  border-color: var(--win98-dark) var(--win98-light) var(--win98-light) var(--win98-dark);
  background: #202020;
  display: grid;
  place-items: center;
}

.puzzle-viewer-content img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Prevent black drag artifacts */
.desktop {
  transform: none !important;
}

.app-window {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  contain: layout paint;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.app-window.is-dragging {
  box-shadow: none;
}

/* Interactive puzzle hotspots and trivia */
.puzzle-test-toolbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 7px;
  border-top: 1px solid var(--win98-light);
  border-bottom: 2px solid var(--win98-dark);
  background: var(--win98-gray);
  color: #000;
  font-size: 11px;
}

.puzzle-test-toolbar label {
  display: flex;
  align-items: center;
  gap: 5px;
}

.puzzle-viewer-content {
  position: relative;
  overflow: auto;
}

.puzzle-map {
  position: relative;
  display: block;
  height: 100%;
  width: auto;
  max-width: 100%;
  aspect-ratio: 897 / 1478;
  line-height: 0;
}

.puzzle-map > img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
}

.puzzle-hotspot {
  position: absolute;
  z-index: 5;
  padding: 0;
  box-sizing: border-box;
  border: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  outline: none;
}

.hotspot-red { left: 15%; top: 14.5%; width: 7%; height: 4.2%; transform: rotate(55deg);}
.hotspot-yellow { left: 85.8%; top: 19.1%; width: 8%; height: 5%; }
.hotspot-orange { left: 22.1%; top: 72%; width: 7.5%; height: 4.5%; transform: rotate(54deg); }
.hotspot-green { left: 73.7%; top: 80.8%; width: 8.2%; height: 4.9%; transform: rotate(-7deg);}
.hotspot-white { left: 87.2%; top: 50.2%; width: 9.1%; height: 5.8%; border-radius: 50%; }


/* Pulse stays inside the exact clickable hotspot dimensions. */
.puzzle-hotspot:not(.is-complete) {
  animation: subway-hotspot-pulse 1.8s ease-in-out infinite;
}

.puzzle-hotspot {
  --pulse-color: 255, 255, 255;
}

.hotspot-white {
  --pulse-color: 255, 0, 0;
}

@keyframes subway-hotspot-pulse {
  0%,
  100% {
    border-color: rgba(var(--pulse-color), 0.25);
    box-shadow: inset 0 0 0 1px rgba(var(--pulse-color), 0.15);
    background: rgba(var(--pulse-color), 0.02);
  }

  50% {
    border-color: rgba(var(--pulse-color), 0.9);
    box-shadow: inset 0 0 0 1px rgba(var(--pulse-color), 0.65);
    background: rgba(var(--pulse-color), 0.12);
  }
}

.puzzle-hotspot:hover,
.puzzle-hotspot:focus-visible {
  animation: none;
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.25);
  box-shadow: inset 0 0 0 1px #000080;
}

.puzzle-map.show-hotspots .puzzle-hotspot {
  border-color: #ff00ff;
  background: rgba(255, 0, 255, 0.28);
}

.puzzle-map.show-hotspots .puzzle-hotspot::after {
  content: attr(data-puzzle);
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translateX(-50%);
  padding: 2px 4px;
  background: #000;
  color: #fff;
  font: 10px "MS Sans Serif", Tahoma, sans-serif;
  line-height: 1.2;
  white-space: nowrap;
}

.puzzle-hotspot.is-complete {
  pointer-events: none;
}

.puzzle-map.show-hotspots .puzzle-hotspot.is-complete {
  border-color: #00ff00;
  background: rgba(0, 255, 0, 0.28);
}

.puzzle-hotspot.is-complete::before {
  content: "✓";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(0, 128, 0, 0.62);
  font-size: 22px;
  font-weight: bold;
  line-height: 1;
}

.puzzle-hotspot:focus-visible {
  outline: 3px solid #ffff00;
  outline-offset: 2px;
}

.trivia-icon {
  display: inline-grid;
  place-items: center;
  background: #fff;
  color: #000;
  border: 1px solid #000;
  font-weight: bold;
}

.trivia-content {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 14px;
  background: var(--win98-gray);
  color: #000;
}

.trivia-progress {
  margin: 0 0 12px;
  padding: 5px 7px;
  border: 2px solid;
  border-color: var(--win98-dark) var(--win98-light) var(--win98-light) var(--win98-dark);
  background: #fff;
  font-size: 11px;
}

.trivia-content h2 {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.35;
}

.trivia-answers {
  display: grid;
  gap: 7px;
}

.trivia-answer {
  width: 100%;
  padding: 7px 9px;
  border: 2px solid;
  border-color: var(--win98-light) var(--win98-black) var(--win98-black) var(--win98-light);
  border-radius: 0;
  background: var(--win98-gray);
  color: #000;
  text-align: left;
  cursor: pointer;
}

.trivia-answer:active {
  border-color: var(--win98-black) var(--win98-light) var(--win98-light) var(--win98-black);
}

.trivia-answer:disabled {
  color: #777;
  cursor: not-allowed;
}

.trivia-message {
  min-height: 20px;
  margin: 12px 0 0;
  font-weight: bold;
}

.trivia-message.correct { color: #006400; }
.trivia-message.wrong { color: #a00000; }

.trivia-lockout {
  margin-top: 10px;
  padding: 8px;
  border: 1px solid #800000;
  background: #fff;
  color: #800000;
  font-size: 12px;
}


/* Completed puzzle hotspots remain clickable */
.puzzle-hotspot.is-complete {
  pointer-events: auto;
}

/* Clue image window */
.clue-viewer-content {
  flex: 1;
  min-height: 0;
  overflow: auto;
  margin: 3px;
  border: 2px solid;
  border-color: var(--win98-dark) var(--win98-light) var(--win98-light) var(--win98-dark);
  background: #fff;
  display: grid;
  place-items: center;
}

.clue-viewer-content img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.trivia-answer.correct-answer,
.trivia-answer.correct-answer:disabled {
  background: #008000;
  color: #fff;
  border-color: #ffffff #000000 #000000 #ffffff;
}


/* Picture slideshow app */
.picture-icon {
  background-image: url("./Assets/picture.png");
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  color: transparent;
  box-shadow: none;
}

.picture-toolbar {
  flex: 0 0 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 4px 7px;
  border-top: 1px solid var(--win98-light);
  border-bottom: 2px solid var(--win98-dark);
  background: var(--win98-gray);
  color: #000;
  font: 12px "MS Sans Serif", Tahoma, sans-serif;
}

.picture-arrow {
  min-width: 42px;
  font-weight: 700;
}

.picture-toolbar-separator {
  width: 1px;
  height: 24px;
  margin-left: 2px;
  background: var(--win98-dark);
  box-shadow: 1px 0 var(--win98-light);
}

.picture-zoom-button {
  min-width: 66px;
}

.picture-zoom-value {
  min-width: 38px;
  text-align: center;
  font: 11px "MS Sans Serif", Tahoma, sans-serif;
}

.picture-stage {
  position: relative;
  container-type: size;
  flex: 1;
  min-height: 0;
  margin: 3px;
  overflow: auto;
  border: 2px solid;
  border-color: var(--win98-dark) var(--win98-light) var(--win98-light) var(--win98-dark);
  background: #000;
}

.picture-slide {
  position: absolute;
  inset: 0;
  display: none;
  overflow: hidden;
  background: #000;
}

.picture-slide.active {
  display: block;
  transform: scale(var(--picture-zoom, 1));
  transform-origin: top left;
}

.picture-background,
.guide-picture {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
}

.picture-puzzle-frame {
  position: relative;
  width: 900px;
  height: 560px;
  flex: 0 0 auto;
  overflow: hidden;
  transform-origin: top left;
}

.picture-puzzle-frame img.puzzle-background {
  position: absolute;
  inset: 0;
  width: 900px;
  height: 560px;
  object-fit: contain;
}

.picture-puzzle-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#pictureWindow .resize-handle {
  display: none;
}

.fish-piece {
  position: absolute;
  z-index: 3;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.hidden-cipher-text {
  position: absolute;
  z-index: 2;
  width: 120px;
  overflow: hidden;
  color: #000;
  background: #fff;
  font-size: 18px;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.cipher-secret {
  position: absolute;
  left: 50%;
  top: 53%;
  z-index: 2;
  transform: translate(-50%, -50%);
  padding: 15px 20px;
  border: 3px solid #000;
  background: #fff8b8;
  color: #000;
  font: 700 clamp(18px, 3vw, 34px) "Courier New", monospace;
  letter-spacing: .08em;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

.draggable-fish {
  position: absolute;
  z-index: 4;
  width: 58%;
  height: 58%;
  object-fit: contain;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.draggable-fish.is-dragging {
  z-index: 6;
  cursor: grabbing;
}

.fish-one {
  left: 4%;
  top: 6%;
}

.fish-two {
  right: 3%;
  bottom: 4%;
}

.fish-instruction {
  position: absolute;
  left: 50%;
  bottom: 8px;
  z-index: 8;
  transform: translateX(-50%);
  margin: 0;
  padding: 5px 9px;
  border: 1px solid #000;
  background: var(--win98-gray);
  color: #000;
  font: 11px "MS Sans Serif", Tahoma, sans-serif;
  white-space: nowrap;
  pointer-events: none;
}

@media (max-width: 700px) {
  .cipher-secret {
    max-width: 90%;
    white-space: normal;
  }

  .draggable-fish {
    width: 68%;
    height: 58%;
  }
}

/* Keep the fish, clues, and background on one 4:3 coordinate surface. */
.interactive-fish-slide.active {
  display: grid;
  place-items: center;
}

.fish-puzzle-canvas {
  position: relative;
  height: 100%;
  max-width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  container-type: size;
}

.fish-puzzle-canvas .picture-background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
}

/* Six-image Picture slideshow and three-part fish puzzle */
.interactive-fish-slide .cipher-secret {
  z-index: 2;
  padding: clamp(1px, 0.55cqi, 4px) clamp(2px, 0.8cqi, 6px);
  border: clamp(1px, 0.18cqi, 2px) solid #111;
  background: #fff8b8;
  color: #000;
  font: 700 clamp(4px, 2.2cqi, 14px) "Courier New", monospace;
  letter-spacing: .04em;
  line-height: 1;
  white-space: nowrap;
}

.interactive-fish-slide .secret-one {
  left: 21%;
  top: 31%;
}

.interactive-fish-slide .secret-two {
  left: 50%;
  top: 51%;
}

.interactive-fish-slide .secret-three {
  left: 79%;
  top: 70%;
}

.interactive-fish-slide .draggable-fish {
  width: 38%;
  height: 38%;
}

.interactive-fish-slide .fish-one {
  left: 2%;
  top: 12%;
  right: auto;
  bottom: auto;
}

.interactive-fish-slide .fish-two {
  left: 31%;
  top: 32%;
  right: auto;
  bottom: auto;
}

.interactive-fish-slide .fish-three {
  left: 60%;
  top: 51%;
  right: auto;
  bottom: auto;
  transform: scaleX(-1);
}

.interactive-fish-slide .fish-four {
  left: 55%;
  top: 8%;
  width: 30%;
  height: auto;
  transform: scaleX(-1);
}

.interactive-fish-slide .fish-three.is-dragging {
  transform: scaleX(-1);
}

@media (max-width: 700px) {
  .interactive-fish-slide .cipher-secret {
    font-size: clamp(4px, 2.2cqi, 9px);
    padding: clamp(1px, 0.55cqi, 3px) clamp(2px, 0.8cqi, 4px);
    white-space: nowrap;
  }

  .interactive-fish-slide .draggable-fish {
    width: 42%;
    height: 40%;
  }
}


/* Locked Notepad clue and in-desktop error dialog */
.note-title[readonly],
.note-body[readonly] {
  cursor: default;
}

.note-list-item.locked-note .note-list-title {
  font-weight: 700;
}

.note-error-window {
  min-width: 280px;
  min-height: 145px;
  z-index: 1500;
}

.note-error-icon {
  background: transparent;
  color: #fff;
  font-weight: 700;
}

.note-error-content {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px 8px;
  background: var(--win98-gray);
  color: #000;
}

.note-error-content p {
  margin: 0;
  font-size: 13px;
}

.note-error-symbol {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #d40000;
  color: #fff;
  font: 700 27px/1 Arial, sans-serif;
}

.note-error-actions {
  display: flex;
  justify-content: center;
  padding: 8px 10px 12px;
  background: var(--win98-gray);
}

.note-error-actions .toolbar-button {
  min-width: 76px;
}

.note-error-window .resize-handle {
  display: none;
}


/* About app locked details flow */
.about-system-content {
  align-items: flex-start;
  overflow: auto;
}

.about-system-copy {
  min-width: 0;
}

.about-system-copy .toolbar-button {
  margin-top: 8px;
}

.about-keyword-window,
.about-download-window {
  min-width: 320px;
  min-height: 180px;
}

.about-keyword-content,
.about-download-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  background: var(--win98-gray);
  color: #000;
}

.about-keyword-content label {
  font-weight: 700;
}

#aboutKeywordInput {
  width: 100%;
  padding: 6px 7px;
  border: 2px solid;
  border-color: var(--win98-dark) var(--win98-light) var(--win98-light) var(--win98-dark);
  border-radius: 0;
  background: #fff;
  color: #000;
}

#aboutKeywordMessage {
  min-height: 16px;
  margin: 0;
  color: #800000;
  font-size: 12px;
}

.about-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: auto;
}

.about-download-content strong {
  font-size: 15px;
}

.about-download-content p {
  margin: 0;
  line-height: 1.4;
}

.about-download-content .toolbar-button {
  align-self: flex-start;
  margin-top: auto;
}

.about-keyword-window .resize-handle,
.about-download-window .resize-handle {
  display: none;
}


/* Static image files opened from New Folder */
.puzzle-map.static-puzzle {
  width: 100%;
  height: 100%;
  max-width: 100%;
  aspect-ratio: auto;
  display: grid;
  place-items: center;
}

.puzzle-map.static-puzzle > img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.puzzle-map.static-puzzle .puzzle-hotspot {
  display: none;
}


/* Typed SF Subway puzzle answers */
.trivia-answer-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
}

.trivia-answer-input {
  min-width: 0;
  width: 100%;
  padding: 7px 8px;
  border: 2px solid;
  border-color: var(--win98-dark) var(--win98-light) var(--win98-light) var(--win98-dark);
  border-radius: 0;
  background: #fff;
  color: #000;
  font: 13px "MS Sans Serif", Tahoma, Arial, sans-serif;
  user-select: text;
}

.trivia-answer-input:focus {
  outline: 1px dotted #000;
  outline-offset: -4px;
}

.trivia-answer-input.correct-answer {
  background: #008000;
  color: #fff;
  font-weight: bold;
}

.trivia-completed-answer {
  padding: 9px;
  border: 2px solid;
  border-color: var(--win98-dark) var(--win98-light) var(--win98-light) var(--win98-dark);
  background: #fff;
  color: #006400;
  font-weight: bold;
}

#triviaQuestion {
  white-space: pre-line;
}

@media (max-width: 520px) {
  .trivia-answer-form {
    grid-template-columns: 1fr;
  }
}


/* Separate number cipher window so it can remain open beside SF Subway. */
.number-viewer-content {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: auto;
  margin: 4px;
  border: 2px solid;
  border-color: var(--win98-dark) var(--win98-light) var(--win98-light) var(--win98-dark);
  background: #000;
}

.number-viewer-content img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

/* Keep app windows inside the CRT desktop on smaller displays */
.app-window {
  max-width: calc(100% - 24px);
  max-height: calc(100% - var(--taskbar-height) - 24px);
}

/* Medium screens */
@media (max-width: 1100px), (max-height: 750px) {
  .app-window {
    left: clamp(8px, var(--x), calc(100% - min(var(--w), 92vw) - 8px));
    top: clamp(8px, var(--y), calc(100% - min(var(--h), 82vh) - var(--taskbar-height) - 8px));

    width: min(var(--w), 92vw);
    height: min(var(--h), calc(82vh - var(--taskbar-height)));

    min-width: min(360px, calc(100vw - 36px));
    min-height: min(260px, calc(100vh - var(--taskbar-height) - 36px));
  }
}

/* Tablets and smaller laptops */
@media (max-width: 800px), (max-height: 600px) {
  .app-window {
    left: 8px !important;
    top: 8px !important;

    width: calc(100% - 16px) !important;
    height: calc(100% - var(--taskbar-height) - 16px) !important;

    min-width: 0;
    min-height: 0;
  }

  .puzzle-viewer-window,
  .number-viewer-window {
    width: min(48%, 520px) !important;
    height: calc(100% - var(--taskbar-height) - 16px) !important;
  }

  .puzzle-viewer-window {
    left: 8px !important;
  }

  .number-viewer-window {
    left: auto !important;
    right: 8px !important;
  }
}
/* Responsive desktop shortcuts: keep every app icon on screen */
.desktop-icons {
  top: clamp(8px, 2.5vh, 22px);
  left: clamp(6px, 1.8vw, 18px);
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  grid-auto-flow: row;
  align-content: start;
  gap: clamp(2px, 1.1vh, 12px);
  max-height: calc(100% - var(--taskbar-height) - 16px);
}

.desktop-icon {
  width: clamp(66px, 10vh, 92px);
  min-height: clamp(66px, 10vh, 92px);
  gap: clamp(2px, 0.7vh, 7px);
  padding: 2px;
  font-size: clamp(11px, 1.65vh, 16px);
  line-height: 1.05;
}

.desktop-icon > span:last-child {
  max-width: 100%;
  text-align: center;
  overflow-wrap: anywhere;
}

.desktop-icon .icon-tile {
  width: clamp(34px, 5.4vh, 46px);
  height: clamp(34px, 5.4vh, 46px);
}

/* Short screens: use two columns instead of pushing icons below the taskbar. */
@media (max-height: 720px) {
  .desktop-icons {
    grid-template-columns: repeat(2, minmax(64px, 78px));
    grid-auto-flow: row;
    gap: 3px 6px;
  }

  .desktop-icon {
    width: 78px;
    min-height: 72px;
    font-size: 11px;
  }

  .desktop-icon .icon-tile {
    width: 36px;
    height: 36px;
  }
}

/* Narrow phones: keep shortcuts visible and compact. */
@media (max-width: 700px) {
  .desktop-icons {
    display: grid;
    top: 8px;
    left: 6px;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: clamp(1px, 0.7vh, 7px);
    max-height: calc(100% - var(--taskbar-height) - 10px);
  }

  .desktop-icon {
    width: clamp(60px, 9.2vh, 78px);
    min-height: clamp(60px, 9.2vh, 78px);
    font-size: clamp(10px, 1.55vh, 13px);
  }

  .desktop-icon .icon-tile {
    width: clamp(31px, 4.8vh, 40px);
    height: clamp(31px, 4.8vh, 40px);
  }
}

/* Very short phones use two compact columns. */
@media (max-width: 700px) and (max-height: 620px) {
  .desktop-icons {
    grid-template-columns: repeat(2, 64px);
    gap: 1px 4px;
  }

  .desktop-icon {
    width: 64px;
    min-height: 58px;
    font-size: 10px;
  }

  .desktop-icon .icon-tile {
    width: 30px;
    height: 30px;
  }
}


/* Mail app and key-rack puzzle */
.mail-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 3px;
  padding: 3px;
  background: var(--win98-gray);
}

.mail-sidebar,
.mail-list,
.mail-reader {
  border: 2px solid;
  border-color: var(--win98-dark) var(--win98-light) var(--win98-light) var(--win98-dark);
  background: #fff;
  color: #000;
}

.mail-sidebar {
  padding: 8px 5px;
}

.mail-sidebar > strong {
  display: block;
  margin: 2px 6px 8px;
}

.mail-folder {
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 7px 8px;
  border: 0;
  background: transparent;
  color: #000;
  text-align: left;
}

.mail-folder.active {
  background: var(--win98-blue);
  color: #fff;
}

.mail-main {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 3px;
}

.mail-list {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  height: auto;
  min-height: 0;
  overflow: auto;
}

.mail-message {
  width: 100%;
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 10px;
  padding: 10px;
  min-height: 48px;
  border: 0;
  border-bottom: 1px solid #c0c0c0;
  background: #fff;
  color: #000;
  text-align: left;
}

.mail-message.active {
  background: #e8e8ff;
}

.mail-reader {
  min-height: 0;
  overflow: auto;
}

.mail-reader-header {
  padding: 12px 14px;
  border-bottom: 1px solid #808080;
  background: #f2f2f2;
}

.mail-reader-header h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.mail-reader-header p {
  margin: 3px 0;
  font-size: 12px;
}

.mail-reader-body {
  padding: 14px 18px 24px;
  font: 14px/1.5 "MSW98UI", "MS Sans Serif", Tahoma, Arial, sans-serif;
}

.mail-attachment-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 7px 9px;
  border: 1px solid transparent;
  background: transparent;
  color: #0000ee;
  text-decoration: underline;
  cursor: pointer;
}

.mail-attachment-link:hover {
  border-color: #808080;
  background: #e8e8e8;
}

.mail-attachment-link .image-file-icon {
  width: 24px;
  height: 24px;
  display: inline-block;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.key-puzzle-toolbar {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 7px;
  border-top: 1px solid var(--win98-light);
  border-bottom: 2px solid var(--win98-dark);
  background: var(--win98-gray);
  color: #000;
}

.key-puzzle-toolbar > span {
  margin-right: auto;
  font-size: 12px;
}

.key-puzzle-content {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 8px;
  background: #dedede;
  color: #000;
}


.key-rack-stage {
  position: relative;
  width: min(100%, 760px);
  margin: 0 auto;
  aspect-ratio: 1351 / 920;
  border: 2px solid;
  border-color:
    var(--win98-dark)
    var(--win98-light)
    var(--win98-light)
    var(--win98-dark);
  overflow: hidden;
  background: #c6b18e;
}


.key-rack-background {
  position: absolute;
  left: 50%;
  top: 2%;
  width: 75%;
  height: auto;
  object-fit: contain;
  transform: translateX(-50%);
  pointer-events: none;
}

.key-rack-slots {
  position: absolute;
  inset: 0;
}

/* Small target areas centered on the actual hook pegs */
.key-slot {
  position: absolute;
  top: 48%;
  width: 8%;
  height: 12%;
  transform: translateX(-50%);
  border: 2px dashed rgba(0, 0, 0, 0.65);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  z-index: 3;
}

.key-slot:nth-child(1) { left: 19.5%; }
.key-slot:nth-child(2) { left: 32.5%; }
.key-slot:nth-child(3) { left: 45.5%; }
.key-slot:nth-child(4) { left: 57.5%; }
.key-slot:nth-child(5) { left: 72.5%; }
.key-slot:nth-child(6) { left: 82.5%; }

.key-slot.selected-target {
  border-color: rgba(0, 0, 128, 0.8);
  background: rgba(255, 255, 255, 0.22);
}

.key-slot.drag-over {
  background: rgba(255, 255, 255, 0.42);
  outline: 2px solid #000080;
}

.key-slot.filled {
  border-color: transparent;
  background: transparent;
}

/* Loose keys remain close to their original size */
.key-piece {
  position: relative;
  width: clamp(72px, 10vw, 105px);
  height: clamp(165px, 23vw, 235px);
  padding: 0;
  border: 1px solid transparent;
  background: transparent;
  cursor: grab;
}

.key-piece:active {
  cursor: grabbing;
}

.key-piece.selected {
  border: 2px dotted #000080;
  background: rgba(255, 255, 255, 0.35);
}

.key-piece img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(3px 4px 2px rgba(0, 0, 0, 0.4));
  pointer-events: none;
}

/* A key placed on a hook hangs below the small target box */
.key-slot .key-piece {
  position: absolute;
  left: 50%;
  top: -58%;
  width: clamp(72px, 10vw, 105px);
  height: clamp(165px, 23vw, 235px);
  transform: translateX(-50%);
  border: 0;
  z-index: 4;
}

/* More vertical room for the original-size keys */
.key-pool {
  width: min(100%, 760px);
  min-height: 245px;
  margin: 8px auto 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 7px;
  border: 2px solid;
  border-color:
    var(--win98-dark)
    var(--win98-light)
    var(--win98-light)
    var(--win98-dark);
  background: #fff;
}

.key-puzzle-message {
  width: min(100%, 760px);
  min-height: 28px;
  margin: 8px auto 8px;
  padding: 6px 8px;
  border: 2px solid;
  border-color:
    var(--win98-dark)
    var(--win98-light)
    var(--win98-light)
    var(--win98-dark);
  background: #fff8c6;
  color: #000;
  font-weight: bold;
}

.key-rack-stage.solved {
  outline: 3px solid #008000;
  outline-offset: -5px;
}

/* Smaller displays */
@media (max-width: 700px) {
  .key-rack-stage {
    aspect-ratio: 4 / 5;
  }

  .key-rack-background {
    width: 94%;
    max-height: 52%;
  }

  .key-slot {
    top: 40%;
    width: 10%;
    height: 9%;
  }

  .key-slot:nth-child(1) { left: 10%; }
  .key-slot:nth-child(2) { left: 26%; }
  .key-slot:nth-child(3) { left: 42%; }
  .key-slot:nth-child(4) { left: 58%; }
  .key-slot:nth-child(5) { left: 74%; }
  .key-slot:nth-child(6) { left: 90%; }

  .key-piece,
  .key-slot .key-piece {
    width: clamp(58px, 17vw, 82px);
    height: clamp(135px, 36vw, 185px);
  }

  .key-slot .key-piece {
    top: -70%;
  }

  .key-pool {
    min-height: 220px;
  }
}

@media (max-width: 700px) {
  .mail-layout {
    grid-template-columns: 105px 1fr;
  }

  .mail-main {
    grid-template-rows: auto 1fr;
  }

  .mail-message {
    grid-template-columns: 70px 1fr;
    font-size: 11px;
  }

  .mail-message small {
    display: none;
  }

  .key-puzzle-window {
    overflow: auto;
  }

  .key-puzzle-toolbar {
    flex-wrap: wrap;
  }

  .key-piece {
    width: 58px;
    height: 132px;
  }

  .key-pool {
    min-height: 150px;
  }
}


/* Mail completion email and paper clue */
.mail-message.unread {
  font-weight: bold;
  background: #ffffd8;
}

.mail-message.unread small {
  color: #000080;
  font-weight: bold;
}

.mail-reader[hidden] {
  display: none;
}

.paper-viewer-content {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 10px;
  background: #808080;
}

.paper-viewer-content img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: #fff;
}

/* Keep the thank-you email hidden until the key puzzle is completed. */
.mail-message[hidden] {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}


/* Disk Morse-code unlock puzzle */
.music-window .album-panel {
  overflow-y: auto;
}

.music-window #trackTitle {
  margin: 0 0 4px;
  color: #000;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.music-window #trackMeta {
  min-height: 30px;
  margin: 0 0 12px;
  color: #333;
  font-size: 11px;
  line-height: 1.35;
}

.music-code-panel {
  width: 100%;
  margin-top: 8px;
  padding: 8px;
  border: 2px solid;
  border-color: var(--win98-dark) var(--win98-light) var(--win98-light) var(--win98-dark);
  background: var(--win98-gray);
  color: #000;
  text-align: left;
}

.music-code-panel > label {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 700;
}

.music-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px;
}

#musicCodeInput {
  min-width: 0;
  width: 100%;
  padding: 5px 6px;
  border: 2px solid;
  border-color: var(--win98-dark) var(--win98-light) var(--win98-light) var(--win98-dark);
  border-radius: 0;
  background: #fff;
  color: #000;
  font: 700 16px "Courier New", monospace;
  letter-spacing: .18em;
  text-align: center;
  user-select: text;
}

#musicCodeMessage {
  min-height: 28px;
  margin: 7px 0 0;
  color: #222;
  font-size: 10px;
  line-height: 1.35;
}

#musicCodeInput:disabled,
#addMusicBtn:disabled {
  color: #666;
}


/* Computer identity recovery */
.identity-recovery-panel {
  margin-top: 18px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 2px solid;
  border-color: var(--win98-dark) var(--win98-light) var(--win98-light) var(--win98-dark);
  background: var(--win98-gray);
  color: #000;
}

.identity-recovery-panel h2 {
  margin: 0 0 4px;
  font-size: 15px;
}

.identity-recovery-panel p {
  margin: 0;
  color: #333;
  font-size: 11px;
  line-height: 1.35;
}

.identity-recovery-panel .toolbar-button {
  flex: 0 0 auto;
}

.identity-recovery-window,
.identity-result-window {
  min-width: 320px;
  min-height: 210px;
  z-index: 1550;
}

.identity-recovery-form,
.identity-result-content {
  flex: 1;
  min-height: 0;
  padding: 16px;
  background: var(--win98-gray);
  color: #000;
}

.identity-recovery-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.identity-recovery-form > p:first-child {
  margin: 0 0 3px;
}

.identity-recovery-form label {
  font-size: 11px;
  font-weight: 700;
}

#identityRecoveryInput {
  width: 100%;
  padding: 7px 8px;
  border: 2px solid;
  border-color: var(--win98-dark) var(--win98-light) var(--win98-light) var(--win98-dark);
  border-radius: 0;
  background: #fff;
  color: #000;
  font: 700 18px "Courier New", monospace;
  letter-spacing: .18em;
  text-transform: uppercase;
  user-select: text;
}

.identity-recovery-message {
  min-height: 16px;
  margin: 0;
  color: #800000;
  font-size: 11px;
}

.identity-recovery-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  margin-top: auto;
}

.identity-result-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.identity-result-content h2 {
  margin: 0;
  color: #000080;
  font: 700 17px "MS Sans Serif", Tahoma, sans-serif;
}

.identity-result-content dl {
  margin: 0;
  border: 2px solid;
  border-color: var(--win98-dark) var(--win98-light) var(--win98-light) var(--win98-dark);
  background: #fff;
}

.identity-result-content dl div {
  display: grid;
  grid-template-columns: 145px 1fr;
  padding: 7px 9px;
  border-bottom: 1px solid #c0c0c0;
}

.identity-result-content dl div:last-child {
  border-bottom: 0;
}

.identity-result-content dt {
  font-weight: 700;
}

.identity-result-content dd {
  margin: 0;
  font-family: "Courier New", monospace;
}

.identity-result-content > p {
  margin: 0;
  font-weight: 700;
  line-height: 1.4;
}

.identity-result-content .toolbar-button {
  align-self: flex-end;
  margin-top: auto;
}

.identity-recovery-window .resize-handle,
.identity-result-window .resize-handle {
  display: none;
}

@media (max-width: 520px) {
  .identity-recovery-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .identity-result-content dl div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}


/* Postcard reveal after identity recovery */
.postcard-viewer-content {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: auto;
  margin: 3px;
  border: 2px solid;
  border-color:
    var(--win98-dark)
    var(--win98-light)
    var(--win98-light)
    var(--win98-dark);
  background: #000;
}

.postcard-viewer-content img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}


/* Unknown sender Morse-code attachment viewer */
.code-viewer-content {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: auto;
  margin: 3px;
  border: 2px solid;
  border-color:
    var(--win98-dark)
    var(--win98-light)
    var(--win98-light)
    var(--win98-dark);
  background: #000;
}

.code-viewer-content img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

/* Login screen and connection mode */
.login-screen {
  position: fixed;
  inset: 0;
  z-index: 200000;
  display: grid;
  place-items: center;
  background: #008080;
  color: #000;
}

.login-screen[hidden] { display: none; }

.login-dialog {
  width: min(520px, calc(100vw - 28px));
  border: 2px solid;
  border-color: #fff #000 #000 #fff;
  background: var(--win98-gray, #c0c0c0);
  box-shadow: 2px 2px 0 #000;
}

.login-titlebar {
  margin: 2px;
  padding: 5px 7px;
  background: linear-gradient(to right, #000080, #1084d0);
  color: #fff;
  font-weight: bold;
}

.login-content {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 16px;
  padding: 22px;
}

.login-computer-icon {
  width: 64px;
  height: 64px;
  display: block;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.login-copy h1 {
  margin: 0 0 6px;
  font-size: 18px;
}

.login-copy > p {
  margin: 0 0 16px;
}

.login-option {
  width: 100%;
  display: grid;
  gap: 3px;
  margin-top: 8px;
  padding: 10px 12px;
  text-align: left;
  border: 2px solid;
  border-color: #fff #000 #000 #fff;
  background: #c0c0c0;
  color: #000;
  cursor: pointer;
}

.login-option:active {
  border-color: #000 #fff #fff #000;
  padding: 11px 11px 9px 13px;
}

.login-option span {
  font-size: 12px;
}

.model-delivery-message {
  min-height: 30px;
  margin: 10px 0 0;
  font-size: 12px;
}

@media (max-width: 520px) {
  .login-content { grid-template-columns: 1fr; }
  .login-computer-icon { margin: 0 auto; }
}

/* Mail readability update: unread, selected, and New states */
.mail-message {
  background: #d6d6d6;
}

.mail-message.active {
  background: #ffffff;
}

.mail-message.unread {
  background: #87e3d1;
  font-weight: bold;
}

.mail-message.unread.active {
  background: #99ffd5;
}

.mail-message.unread small {
  color: #ff0000;
  font-weight: bold;
  font-style: italic;
}

/* Mail selection/read-state update */
#mailWindow .mail-message {
  background: #d6d6d6;
}

#mailWindow .mail-message.unread {
  background: #87afe3;
  font-weight: bold;
}

#mailWindow .mail-message.active {
  background: #c2c2c2 !important;
  outline: 2px dotted #074fd4;
  outline-offset: -2px;
}

#mailWindow .mail-message.unread.active {
  background: #b9ddff !important;
}

#mailWindow .mail-message small {
  font-family: "MSW98UI", "MS Sans Serif", Tahoma, Arial, sans-serif !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  font-style: normal !important;
  line-height: 1 !important;
}

#mailWindow .mail-message.unread small {
  color: #ff0000 !important;
  font-family: "MSW98UI", "MS Sans Serif", Tahoma, Arial, sans-serif !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  font-style: normal !important;
}

#mailWindow .mail-message.seen small {
  color: #333 !important;
  font-family: "MSW98UI", "MS Sans Serif", Tahoma, Arial, sans-serif !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  font-style: normal !important;
}
