/* ============================================================
   dialup.exe — Windows 98 time capsule
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --win-face: #c0c0c0;
  --win-shadow: #808080;
  --win-dkshadow: #0a0a0a;
  --win-hilite: #ffffff;
  --win-light: #dfdfdf;
  --title-a: #000080;
  --title-b: #1084d0;
  --title-inactive-a: #808080;
  --title-inactive-b: #b5b5b5;
  --desktop: #008080;
  --sel: #000080;
}

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  font-family: Tahoma, "MS Sans Serif", Geneva, sans-serif;
  font-size: 11px;
  background: #000;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
}

/* ---------- bevels ---------- */
.bevel-out, .win, .btn, #taskbar, .task-btn, .dun-dialog, .msgbox {
  box-shadow: inset -1px -1px var(--win-dkshadow), inset 1px 1px var(--win-hilite),
              inset -2px -2px var(--win-shadow), inset 2px 2px var(--win-light);
}
.bevel-in {
  box-shadow: inset -1px -1px var(--win-hilite), inset 1px 1px var(--win-dkshadow),
              inset -2px -2px var(--win-light), inset 2px 2px var(--win-shadow);
}
.bevel-field {
  box-shadow: inset -1px -1px var(--win-hilite), inset 1px 1px var(--win-shadow),
              inset -2px -2px var(--win-light), inset 2px 2px var(--win-dkshadow);
  background: #fff;
}
.bevel-thin-in {
  box-shadow: inset -1px -1px var(--win-hilite), inset 1px 1px var(--win-shadow);
}
.bevel-thin-out {
  box-shadow: inset -1px -1px var(--win-shadow), inset 1px 1px var(--win-hilite);
}

.btn {
  background: var(--win-face);
  border: none;
  font-family: inherit;
  font-size: 11px;
  padding: 4px 14px;
  min-width: 75px;
  cursor: pointer;
  color: #000;
}
.btn:active {
  box-shadow: inset 1px 1px var(--win-dkshadow), inset -1px -1px var(--win-hilite),
              inset 2px 2px var(--win-shadow), inset -2px -2px var(--win-light);
  padding: 5px 13px 3px 15px;
}
.btn:focus { outline: 1px dotted #000; outline-offset: -5px; }
.btn[disabled] { color: var(--win-shadow); text-shadow: 1px 1px 0 var(--win-hilite); }

/* ============================================================
   CRT overlay + flicker
   ============================================================ */
#crt-overlay {
  position: fixed; inset: 0; z-index: 99999; pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,0.11) 0px, rgba(0,0,0,0.11) 1px, transparent 1px, transparent 3px);
  mix-blend-mode: multiply;
}
#crt-overlay::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 58%, rgba(0,0,0,0.28) 100%);
}
.crt-flicker {
  position: absolute; inset: 0; pointer-events: none;
  animation: flicker 4s infinite;
  background: rgba(180, 255, 220, 0.012);
}
@keyframes flicker {
  0%, 100% { opacity: 1; } 96% { opacity: 1; } 97% { opacity: 0.6; } 98% { opacity: 1; } 99% { opacity: 0.8; }
}

/* ============================================================
   Mobile blocker
   ============================================================ */
#mobile-blocker {
  position: fixed; inset: 0; z-index: 100000;
  background: #000080; color: #fff;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  font-family: "Courier New", monospace;
  padding: 20px;
}
#mobile-blocker[hidden] { display: none; }
.blocker-art { color: #ffff55; font-size: 12px; line-height: 1.1; margin-bottom: 24px; }
#mobile-blocker h1 { font-size: 22px; margin-bottom: 14px; }
#mobile-blocker p { font-size: 14px; line-height: 1.6; color: #c0c0ff; }

/* ============================================================
   Landing
   ============================================================ */
#landing {
  position: fixed; inset: 0; z-index: 5000;
  background: #050505;
  background-image: radial-gradient(ellipse at 50% 40%, #0d1a0d 0%, #050505 70%);
  color: #33ff66;
  display: flex; align-items: center; justify-content: center;
  font-family: "Courier New", "Lucida Console", monospace;
  text-align: center;
}
#landing[hidden] { display: none; }
.landing-inner { max-width: 720px; padding: 24px; }
.landing-title {
  font-size: 44px; font-weight: bold; letter-spacing: 2px;
  text-shadow: 0 0 12px rgba(51,255,102,0.6);
  margin-bottom: 6px;
}
.blink-cursor { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.landing-sub { color: #1d9944; font-size: 15px; margin-bottom: 42px; letter-spacing: 4px; }

.volume-warning h1 {
  font-size: 30px; color: #ffff55; margin: 16px 0 6px;
  text-shadow: 0 0 14px rgba(255,255,85,0.5);
  animation: pulse-warn 1.4s infinite;
}
@keyframes pulse-warn { 50% { opacity: 0.65; } }
.vol-big { font-size: 17px; color: #ffff99; margin-bottom: 14px; }
.volume-warning p { font-size: 13px; line-height: 1.7; color: #2fcc5c; }

.speaker-icon { display: inline-block; }
.sound-wave { opacity: 0; }
.w1 { animation: wave 1.5s infinite 0s; }
.w2 { animation: wave 1.5s infinite 0.25s; }
.w3 { animation: wave 1.5s infinite 0.5s; }
@keyframes wave { 0% { opacity: 0; } 30% { opacity: 1; } 100% { opacity: 0; } }

.big-retro-btn {
  margin-top: 40px;
  font-family: inherit;
  font-size: 19px; font-weight: bold;
  padding: 16px 34px;
  background: #001a00;
  color: #33ff66;
  border: 2px solid #33ff66;
  box-shadow: 0 0 18px rgba(51,255,102,0.35), inset 0 0 12px rgba(51,255,102,0.15);
  cursor: pointer;
  letter-spacing: 1px;
}
.big-retro-btn:hover { background: #33ff66; color: #001a00; }
.landing-fineprint { margin-top: 46px; font-size: 11px; color: #1a7a38; line-height: 1.8; }

/* ============================================================
   BIOS + splash
   ============================================================ */
#boot-screen {
  position: fixed; inset: 0; z-index: 5000; background: #000;
  padding: 30px 40px;
}
#boot-screen[hidden] { display: none; }
#bios-text {
  color: #aaaaaa; font-family: "Courier New", monospace;
  font-size: 15px; line-height: 1.35; white-space: pre-wrap;
}
#win-splash {
  position: fixed; inset: 0; z-index: 5000;
  background: #000;
  display: flex; align-items: center; justify-content: center;
}
#win-splash[hidden] { display: none; }
.splash-imgwrap { position: relative; width: min(100vw, 133.3vh); }
.splash-imgwrap img { width: 100%; display: block; image-rendering: auto; }
.splash-bar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 3.2%;
  background: #29295a; overflow: hidden;
}
.splash-bar-chunk {
  position: absolute; width: 22%; height: 100%;
  background: repeating-linear-gradient(90deg, #2f2f8f 0 10px, #5555cc 10px 14px, #8888ee 14px 20px);
  animation: splashslide 1.6s linear infinite;
}
@keyframes splashslide { from { left: -22%; } to { left: 100%; } }

/* ============================================================
   Desktop
   ============================================================ */
#desktop-root { position: fixed; inset: 0; z-index: 100; }
#desktop-root[hidden] { display: none; }
#desktop {
  position: absolute; inset: 0 0 28px 0;
  background: var(--desktop);
  overflow: hidden;
}
#desktop-icons {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; flex-wrap: wrap;
  align-content: flex-start;
  gap: 2px; padding: 4px;
}
.desk-icon {
  width: 75px; height: 74px;
  display: flex; flex-direction: column; align-items: center;
  padding-top: 4px; gap: 3px;
  cursor: pointer;
}
.desk-icon canvas, .desk-icon img { image-rendering: pixelated; }
.desk-icon .di-label {
  color: #fff; text-align: center; font-size: 11px;
  padding: 1px 3px; line-height: 1.15;
  text-shadow: 1px 1px 1px #000;
}
.desk-icon.selected .di-label { background: var(--sel); outline: 1px dotted #ffff00; }
.desk-icon.selected canvas, .desk-icon.selected img { filter: brightness(0.7) sepia(1) hue-rotate(180deg) saturate(3); }

#windows-layer { position: absolute; inset: 0; pointer-events: none; }
#windows-layer > * { pointer-events: auto; }

/* ---------- windows ---------- */
.win {
  position: absolute;
  background: var(--win-face);
  padding: 3px;
  display: flex; flex-direction: column;
  min-width: 180px; min-height: 100px;
}
.win.maximized { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; }
.titlebar {
  height: 18px; flex: none;
  background: linear-gradient(90deg, var(--title-inactive-a), var(--title-inactive-b));
  color: #d8d8d8;
  display: flex; align-items: center;
  padding: 1px 2px 1px 3px; gap: 4px;
  font-weight: bold; font-size: 11px;
  cursor: default;
}
.win.active .titlebar {
  background: linear-gradient(90deg, var(--title-a), var(--title-b));
  color: #fff;
}
.titlebar canvas, .titlebar img { image-rendering: pixelated; flex: none; }
.titlebar .tb-text { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tb-btn {
  width: 16px; height: 14px; flex: none;
  background: var(--win-face);
  border: none; padding: 0;
  font-family: "Marlett", Tahoma, sans-serif;
  font-size: 9px; font-weight: bold; color: #000;
  box-shadow: inset -1px -1px var(--win-dkshadow), inset 1px 1px var(--win-hilite),
              inset -2px -2px var(--win-shadow), inset 2px 2px var(--win-light);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}
.tb-btn:active {
  box-shadow: inset 1px 1px var(--win-dkshadow), inset -1px -1px var(--win-hilite);
}
.win-body {
  flex: 1; overflow: hidden; position: relative;
  display: flex; flex-direction: column;
}
.win.resizable { resize: both; overflow: hidden; }

/* menu bar inside windows */
.menubar {
  display: flex; gap: 0; padding: 1px 0; flex: none;
  background: var(--win-face);
}
.menubar .menu-item { padding: 3px 7px; cursor: pointer; }
.menubar .menu-item:hover { background: var(--sel); color: #fff; }
.menu-popup {
  position: absolute; z-index: 500;
  background: var(--win-face);
  box-shadow: inset -1px -1px var(--win-dkshadow), inset 1px 1px var(--win-hilite),
              inset -2px -2px var(--win-shadow), inset 2px 2px var(--win-light),
              2px 2px 4px rgba(0,0,0,0.4);
  padding: 3px; min-width: 140px;
}
.menu-popup .mp-item { padding: 4px 18px 4px 22px; cursor: pointer; white-space: nowrap; }
.menu-popup .mp-item:hover { background: var(--sel); color: #fff; }
.menu-popup .mp-sep { height: 1px; background: var(--win-shadow); border-bottom: 1px solid var(--win-hilite); margin: 3px 2px; }
.mp-item.disabled { color: var(--win-shadow); }
.mp-item.disabled:hover { background: none; color: var(--win-shadow); }

/* ---------- taskbar ---------- */
#taskbar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 28px;
  background: var(--win-face);
  display: flex; align-items: center;
  padding: 2px 3px;
  gap: 3px;
  z-index: 3000;
}
#start-btn {
  height: 22px;
  background: var(--win-face);
  border: none;
  font-weight: bold; font-size: 11px; font-family: inherit;
  display: flex; align-items: center; gap: 4px;
  padding: 0 8px 0 4px;
  box-shadow: inset -1px -1px var(--win-dkshadow), inset 1px 1px var(--win-hilite),
              inset -2px -2px var(--win-shadow), inset 2px 2px var(--win-light);
  cursor: pointer;
}
#start-btn.open, #start-btn:active {
  box-shadow: inset 1px 1px var(--win-dkshadow), inset -1px -1px var(--win-hilite),
              inset 2px 2px var(--win-shadow), inset -2px -2px var(--win-light);
}
#start-flag canvas, #start-flag img { image-rendering: pixelated; display: block; }
.taskbar-sep {
  width: 1px; height: 20px; flex: none;
  background: var(--win-shadow); border-right: 1px solid var(--win-hilite);
}
#quicklaunch { display: flex; gap: 2px; padding: 0 2px; }
.ql-btn {
  width: 22px; height: 22px; border: none; background: transparent;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.ql-btn:hover { box-shadow: inset -1px -1px var(--win-shadow), inset 1px 1px var(--win-hilite); }
.ql-btn:active { box-shadow: inset 1px 1px var(--win-shadow), inset -1px -1px var(--win-hilite); }
.ql-btn canvas, .ql-btn img { image-rendering: pixelated; }
#task-buttons { flex: 1; display: flex; gap: 3px; overflow: hidden; }
.task-btn {
  height: 22px; max-width: 160px; min-width: 110px; flex: 1 1 0;
  background: var(--win-face);
  border: none; font-family: inherit; font-size: 11px;
  display: flex; align-items: center; gap: 4px;
  padding: 0 6px; cursor: pointer;
  overflow: hidden; white-space: nowrap;
}
.task-btn canvas, .task-btn img { image-rendering: pixelated; flex: none; }
.task-btn span { overflow: hidden; text-overflow: ellipsis; }
.task-btn.pressed {
  box-shadow: inset 1px 1px var(--win-dkshadow), inset -1px -1px var(--win-hilite),
              inset 2px 2px var(--win-shadow), inset -2px -2px var(--win-light);
  background: repeating-conic-gradient(var(--win-hilite) 0% 25%, var(--win-face) 0% 50%) 50%/2px 2px;
  font-weight: bold;
}
#systray {
  height: 22px; flex: none;
  display: flex; align-items: center; gap: 6px;
  padding: 0 8px 0 4px;
  box-shadow: inset 1px 1px var(--win-shadow), inset -1px -1px var(--win-hilite);
}
#tray-icons { display: flex; align-items: center; gap: 3px; }
#tray-icons canvas, #tray-icons img { image-rendering: pixelated; cursor: pointer; display: block; }
#tray-clock { font-size: 11px; padding-left: 2px; }

/* ---------- start menu ---------- */
#startmenu {
  position: absolute; left: 2px; bottom: 30px; z-index: 4000;
  background: var(--win-face);
  box-shadow: inset -1px -1px var(--win-dkshadow), inset 1px 1px var(--win-hilite),
              inset -2px -2px var(--win-shadow), inset 2px 2px var(--win-light),
              3px 3px 6px rgba(0,0,0,0.4);
  display: flex;
  padding: 3px;
}
#startmenu[hidden] { display: none; }
.sm-banner {
  width: 24px;
  background: linear-gradient(0deg, var(--title-b), var(--title-a));
  color: #c0c0c0; font-size: 16px; font-weight: bold;
  writing-mode: vertical-rl; transform: rotate(180deg);
  display: flex; align-items: center; padding: 8px 2px;
  letter-spacing: 1px;
}
.sm-banner b { color: #fff; }
.sm-items { min-width: 180px; }
.sm-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; font-size: 12px;
  cursor: pointer; position: relative;
}
.sm-item:hover { background: var(--sel); color: #fff; }
.sm-item canvas, .sm-item img { image-rendering: pixelated; flex: none; }
.sm-item .sm-arrow { margin-left: auto; font-size: 9px; }
.sm-sep { height: 1px; background: var(--win-shadow); border-bottom: 1px solid var(--win-hilite); margin: 2px 4px; }
.sm-sub {
  position: absolute; left: 100%; top: -4px;
  background: var(--win-face);
  box-shadow: inset -1px -1px var(--win-dkshadow), inset 1px 1px var(--win-hilite),
              inset -2px -2px var(--win-shadow), inset 2px 2px var(--win-light),
              3px 3px 6px rgba(0,0,0,0.4);
  padding: 3px; min-width: 160px;
  display: none;
}
.sm-item:hover > .sm-sub { display: block; }
.sm-sub .sm-item { color: #000; }
.sm-sub .sm-item:hover { color: #fff; }

/* ============================================================
   Message box / dialogs
   ============================================================ */
.msgbox {
  position: absolute; z-index: 2500;
  background: var(--win-face); padding: 3px;
  min-width: 280px; max-width: 420px;
}
.msgbox .titlebar { cursor: move; }
.msgbox-body { padding: 14px 12px; display: flex; gap: 14px; align-items: flex-start; }
.msgbox-body canvas, .msgbox-body img { image-rendering: pixelated; flex: none; }
.msgbox-text { padding-top: 4px; line-height: 1.5; }
.msgbox-buttons { display: flex; justify-content: center; gap: 8px; padding: 4px 0 12px; }

/* ============================================================
   Explorer
   ============================================================ */
.explorer-toolbar {
  display: flex; align-items: center; gap: 2px; padding: 2px 4px; flex: none;
  border-bottom: 1px solid var(--win-shadow);
  box-shadow: 0 1px 0 var(--win-hilite);
}
.explorer-toolbar .btn { min-width: 0; padding: 3px 8px; display: flex; align-items: center; gap: 4px; }
.explorer-address {
  display: flex; align-items: center; gap: 6px; padding: 3px 4px; flex: none;
}
.explorer-address .addr-field {
  flex: 1; background: #fff; padding: 2px 4px;
  box-shadow: inset -1px -1px var(--win-hilite), inset 1px 1px var(--win-shadow),
              inset -2px -2px var(--win-light), inset 2px 2px var(--win-dkshadow);
  display: flex; align-items: center; gap: 5px;
}
.explorer-body {
  flex: 1; background: #fff; overflow: auto;
  box-shadow: inset -1px -1px var(--win-hilite), inset 1px 1px var(--win-shadow),
              inset -2px -2px var(--win-light), inset 2px 2px var(--win-dkshadow);
  margin: 0 2px;
  padding: 8px;
  display: flex; flex-wrap: wrap; align-content: flex-start; gap: 4px;
}
.fs-icon {
  width: 84px; height: 76px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding-top: 4px; cursor: pointer;
}
.fs-icon canvas, .fs-icon img { image-rendering: pixelated; }
.fs-icon .fs-label { text-align: center; font-size: 11px; line-height: 1.15; padding: 1px 2px; color: #000; }
.fs-icon.selected .fs-label { background: var(--sel); color: #fff; outline: 1px dotted #000; }
.statusbar {
  flex: none; display: flex; gap: 3px; padding: 2px; font-size: 11px;
}
.statusbar > div {
  box-shadow: inset -1px -1px var(--win-hilite), inset 1px 1px var(--win-shadow);
  padding: 2px 6px;
}
.statusbar .sb-main { flex: 1; }

/* ============================================================
   Notepad / viewer / mail
   ============================================================ */
.notepad-area {
  flex: 1; resize: none; border: none; outline: none;
  font-family: "Courier New", monospace; font-size: 13px;
  padding: 4px; background: #fff;
  box-shadow: inset -1px -1px var(--win-hilite), inset 1px 1px var(--win-shadow),
              inset -2px -2px var(--win-light), inset 2px 2px var(--win-dkshadow);
  margin: 0 2px 2px;
  white-space: pre-wrap;
  user-select: text; -webkit-user-select: text;
}
.viewer-body {
  flex: 1; background: #3a3a3a; display: flex; align-items: center; justify-content: center;
  overflow: auto; margin: 0 2px 2px;
  box-shadow: inset 1px 1px var(--win-dkshadow);
}
.viewer-body canvas { image-rendering: pixelated; box-shadow: 0 0 0 1px #000, 4px 4px 8px rgba(0,0,0,0.5); }

.mail-layout { flex: 1; display: flex; overflow: hidden; margin: 0 2px 2px; gap: 3px; }
.mail-folders {
  width: 120px; flex: none; background: #fff; padding: 4px;
  box-shadow: inset -1px -1px var(--win-hilite), inset 1px 1px var(--win-shadow),
              inset -2px -2px var(--win-light), inset 2px 2px var(--win-dkshadow);
}
.mail-folder { padding: 3px 6px; cursor: pointer; display: flex; gap: 5px; align-items: center; }
.mail-folder.sel { background: var(--sel); color: #fff; }
.mail-main { flex: 1; display: flex; flex-direction: column; gap: 3px; overflow: hidden; }
.mail-list {
  height: 40%; flex: none; background: #fff; overflow-y: auto;
  box-shadow: inset -1px -1px var(--win-hilite), inset 1px 1px var(--win-shadow),
              inset -2px -2px var(--win-light), inset 2px 2px var(--win-dkshadow);
}
.mail-list-header, .mail-row {
  display: grid; grid-template-columns: 24px 150px 1fr 70px;
  padding: 2px 4px; align-items: center;
}
.mail-list-header {
  background: var(--win-face); font-size: 11px; position: sticky; top: 0;
  box-shadow: inset -1px -1px var(--win-shadow), inset 1px 1px var(--win-hilite);
}
.mail-row { cursor: pointer; }
.mail-row.unread { font-weight: bold; }
.mail-row.sel { background: var(--sel); color: #fff; }
.mail-preview {
  flex: 1; background: #fff; overflow-y: auto; padding: 8px;
  box-shadow: inset -1px -1px var(--win-hilite), inset 1px 1px var(--win-shadow),
              inset -2px -2px var(--win-light), inset 2px 2px var(--win-dkshadow);
  font-size: 12px; line-height: 1.5;
  user-select: text; -webkit-user-select: text;
  white-space: pre-wrap;
  font-family: Arial, sans-serif;
}
.mail-preview .mail-head { border-bottom: 1px solid #ccc; padding-bottom: 6px; margin-bottom: 8px; color: #333; white-space: normal; }
.mail-preview a { color: #0000ee; cursor: pointer; text-decoration: underline; }

/* ============================================================
   Minesweeper
   ============================================================ */
.mines-wrap { padding: 6px; background: var(--win-face); flex: 1; }
.mines-top {
  display: flex; justify-content: space-between; align-items: center;
  padding: 4px 6px; margin-bottom: 6px;
  box-shadow: inset 2px 2px var(--win-shadow), inset -2px -2px var(--win-hilite);
}
.mines-lcd {
  background: #000; color: #ff0000;
  font-family: "Courier New", monospace; font-weight: bold;
  font-size: 20px; padding: 0 3px; letter-spacing: 2px;
  box-shadow: inset 1px 1px var(--win-shadow);
}
.mines-face {
  width: 26px; height: 26px; font-size: 15px;
  background: var(--win-face); border: none; cursor: pointer;
  box-shadow: inset -1px -1px var(--win-dkshadow), inset 1px 1px var(--win-hilite),
              inset -2px -2px var(--win-shadow), inset 2px 2px var(--win-light);
}
.mines-face:active { box-shadow: inset 1px 1px var(--win-shadow); }
.mines-grid {
  display: grid; gap: 0;
  box-shadow: inset 3px 3px var(--win-shadow), inset -3px -3px var(--win-hilite);
  padding: 3px;
  width: max-content;
}
.mcell {
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  font-weight: bold; font-size: 13px; font-family: "Courier New", monospace;
  background: var(--win-face);
  box-shadow: inset -2px -2px var(--win-shadow), inset 2px 2px var(--win-hilite);
  cursor: pointer;
}
.mcell.open {
  box-shadow: inset 1px 0 0 var(--win-shadow), inset 0 1px 0 var(--win-shadow);
}
.mcell.boom { background: #ff0000; }
.m1 { color: #0000ff; } .m2 { color: #008000; } .m3 { color: #ff0000; } .m4 { color: #000080; }
.m5 { color: #800000; } .m6 { color: #008080; } .m7 { color: #000; } .m8 { color: #808080; }

/* ============================================================
   Solitaire
   ============================================================ */
.sol-table { flex: 1; background: #008000; position: relative; overflow: hidden; margin: 0 2px 2px; }
.card, .card-slot {
  position: absolute; width: 71px; height: 96px; border-radius: 5px;
}
.card-slot { border: 1px solid #006000; box-shadow: inset 1px 1px 3px rgba(0,0,0,0.3); }
.card {
  background: #fff; border: 1px solid #333;
  box-shadow: 1px 1px 1px rgba(0,0,0,0.35);
  cursor: pointer;
  font-family: Arial, sans-serif;
}
.card.facedown {
  background:
    repeating-linear-gradient(45deg, #0000a8 0 6px, #0000d0 6px 12px);
  background-color: #0000a8;
  border: 1px solid #fff; outline: 1px solid #333;
}
.card .c-corner {
  position: absolute; top: 2px; left: 4px; font-size: 14px; font-weight: bold;
  line-height: 1; text-align: center;
}
.card .c-corner small { display: block; font-size: 13px; }
.card .c-big {
  position: absolute; bottom: 6px; right: 6px; font-size: 30px; line-height: 1;
}
.card.red { color: #cc0000; } .card.black { color: #000; }
.card.dragging { box-shadow: 3px 3px 6px rgba(0,0,0,0.5); z-index: 1000 !important; }

/* ============================================================
   Paint
   ============================================================ */
.paint-layout { flex: 1; display: flex; overflow: hidden; margin: 0 2px 2px; }
.paint-tools {
  width: 56px; flex: none; padding: 4px;
  display: flex; flex-wrap: wrap; gap: 2px; align-content: flex-start;
}
.paint-tool {
  width: 24px; height: 24px; background: var(--win-face); border: none;
  font-size: 13px; cursor: pointer;
  box-shadow: inset -1px -1px var(--win-shadow), inset 1px 1px var(--win-hilite);
}
.paint-tool.sel { box-shadow: inset 1px 1px var(--win-shadow), inset -1px -1px var(--win-hilite); background: #fff; }
.paint-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.paint-canvas-wrap {
  flex: 1; overflow: auto; background: #808080; padding: 4px;
  box-shadow: inset 1px 1px var(--win-dkshadow);
}
.paint-canvas-wrap canvas { background: #fff; cursor: crosshair; box-shadow: 1px 1px 0 #000; }
.paint-palette { flex: none; display: flex; flex-wrap: wrap; padding: 3px; gap: 1px; align-items: center; }
.paint-swatch { width: 16px; height: 16px; cursor: pointer; box-shadow: inset 1px 1px var(--win-shadow); }
.paint-current { width: 26px; height: 26px; margin-right: 6px; box-shadow: inset 1px 1px var(--win-dkshadow); }

/* ============================================================
   Browser
   ============================================================ */
.browser-toolbar {
  display: flex; align-items: center; gap: 1px; padding: 2px 4px; flex: none;
  border-bottom: 1px solid var(--win-shadow); box-shadow: 0 1px 0 var(--win-hilite);
}
.bt-btn {
  border: none; background: transparent; font-family: inherit; font-size: 10px;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 2px 6px; cursor: pointer; min-width: 40px; color: #000;
}
.bt-btn:hover { box-shadow: inset -1px -1px var(--win-shadow), inset 1px 1px var(--win-hilite); }
.bt-btn:active { box-shadow: inset 1px 1px var(--win-shadow), inset -1px -1px var(--win-hilite); }
.bt-btn[disabled] { color: var(--win-shadow); pointer-events: none; }
.bt-btn canvas, .bt-btn img { image-rendering: pixelated; }
.browser-addressbar { display: flex; align-items: center; gap: 6px; padding: 3px 4px; flex: none; }
.browser-addressbar input {
  flex: 1; border: none; outline: none; font-family: inherit; font-size: 12px;
  padding: 3px 4px;
  box-shadow: inset -1px -1px var(--win-hilite), inset 1px 1px var(--win-shadow),
              inset -2px -2px var(--win-light), inset 2px 2px var(--win-dkshadow);
  user-select: text; -webkit-user-select: text;
}
.browser-links {
  display: flex; align-items: center; gap: 2px; padding: 2px 4px; flex: none;
  font-size: 11px;
  border-bottom: 1px solid var(--win-shadow); box-shadow: 0 1px 0 var(--win-hilite);
  overflow: hidden;
}
.bl-link {
  padding: 2px 6px; cursor: pointer; display: flex; align-items: center; gap: 3px;
  white-space: nowrap;
}
.bl-link:hover { box-shadow: inset -1px -1px var(--win-shadow), inset 1px 1px var(--win-hilite); }
.browser-viewport {
  flex: 1; background: #fff; overflow: auto; margin: 0 2px;
  box-shadow: inset -1px -1px var(--win-hilite), inset 1px 1px var(--win-shadow),
              inset -2px -2px var(--win-light), inset 2px 2px var(--win-dkshadow);
  user-select: text; -webkit-user-select: text;
}
.browser-status {
  flex: none; display: flex; gap: 3px; padding: 2px; font-size: 11px; align-items: stretch;
}
.browser-status > div {
  box-shadow: inset -1px -1px var(--win-hilite), inset 1px 1px var(--win-shadow);
  padding: 2px 6px; display: flex; align-items: center; gap: 4px;
}
.bs-text { flex: 1; overflow: hidden; white-space: nowrap; }
.bs-progress { width: 110px; flex: none; padding: 2px !important; }
.bs-progress-inner { display: flex; gap: 1px; height: 100%; width: 100%; align-items: center; }
.bs-progress-inner i { width: 8px; height: 10px; background: var(--sel); display: none; }
.bs-zone { width: 90px; flex: none; }

/* ---------- retro web page content ---------- */
.web-page {
  font-family: "Times New Roman", Times, serif;
  font-size: 15px;
  color: #000;
  padding: 8px;
  min-height: 100%;
  line-height: 1.35;
}
.web-page a { color: #0000ee; text-decoration: underline; cursor: pointer; }
.web-page a:visited { color: #551a8b; }
.web-page h1, .web-page h2, .web-page h3 { margin: 10px 0 6px; }
.web-page p { margin: 8px 0; }
.web-page hr { border: none; border-top: 1px solid #808080; margin: 8px 0; }
.web-page table { border-collapse: collapse; }
.web-page .web-img {
  position: relative; display: inline-block; vertical-align: middle;
  background: #fff;
}
.web-page .web-img.loading {
  border: 1px solid #999; background: #fff;
}
.web-img .img-placeholder {
  position: absolute; top: 2px; left: 2px;
  display: flex; align-items: flex-start; gap: 3px;
  font-family: Arial, sans-serif; font-size: 10px; color: #444;
}
.web-img canvas { image-rendering: pixelated; display: block; }
.web-marquee { overflow: hidden; white-space: nowrap; display: block; }
.web-marquee > span { display: inline-block; padding-left: 100%; animation: marquee 12s linear infinite; }
@keyframes marquee { to { transform: translateX(-100%); } }
.blink { animation: blink 1s steps(1) infinite; }
.err-page { font-family: Arial, sans-serif; padding: 20px 30px; font-size: 13px; line-height: 1.5; }
.err-page h1 { font-size: 17px; margin-bottom: 12px; }
.err-page ul { margin: 10px 0 10px 30px; }

/* under construction bar */
.construction {
  background: repeating-linear-gradient(45deg, #000 0 12px, #ffcc00 12px 24px);
  color: #fff; text-align: center; font-weight: bold; padding: 3px;
  text-shadow: 1px 1px 2px #000; font-family: Arial, sans-serif;
}

/* visitor counter */
.hit-counter {
  display: inline-flex; gap: 1px; background: #000; padding: 2px; vertical-align: middle;
}
.hit-counter span {
  background: #111; color: #33ff33; font-family: "Courier New", monospace;
  font-size: 14px; font-weight: bold; padding: 1px 3px; border: 1px solid #333;
}

/* ============================================================
   Phone overlay
   ============================================================ */
#phone-overlay {
  position: fixed; inset: 0; z-index: 50000;
  background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center;
}
#phone-overlay[hidden] { display: none; }
.phone-box {
  background: #2a2a30; border: 3px solid #555; border-radius: 10px;
  padding: 18px 26px; text-align: center; color: #ccc;
  box-shadow: 0 10px 40px rgba(0,0,0,0.8);
  animation: phone-shake 0.5s infinite;
}
@keyframes phone-shake {
  0%,100% { transform: translateX(0) rotate(0); }
  20% { transform: translateX(-3px) rotate(-0.6deg); }
  40% { transform: translateX(3px) rotate(0.6deg); }
  60% { transform: translateX(-2px) rotate(-0.4deg); }
  80% { transform: translateX(2px) rotate(0.4deg); }
}
.phone-box.answered { animation: none; }
.phone-lcd {
  background: #9ab89a; color: #1a2a1a; border: 3px solid #444;
  font-family: "Courier New", monospace; font-weight: bold;
  padding: 8px 14px; margin-bottom: 10px;
  text-shadow: 0 0 2px rgba(26,42,26,0.5);
}
.lcd-line1 { font-size: 13px; }
.lcd-line2 { font-size: 24px; margin: 4px 0; animation: blink 1s steps(1) infinite; }
.lcd-line3 { font-size: 11px; }
.phone-body-art pre { color: #666; font-size: 11px; line-height: 1.2; font-family: monospace; }
.phone-msg { margin: 12px 0; font-size: 14px; color: #ffdd88; min-height: 20px; font-family: Tahoma, sans-serif; }
.phone-buttons { display: flex; gap: 10px; justify-content: center; }

/* ============================================================
   Shutdown
   ============================================================ */
#shutdown-screen {
  position: fixed; inset: 0; z-index: 60000; background: #000;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 30px;
}
#shutdown-screen[hidden] { display: none; }
.shutdown-text {
  color: #ffa500; font-size: 34px; font-weight: bold; text-align: center;
  font-family: "Courier New", monospace; line-height: 1.5;
}
.shutdown-hint { color: #333; font-size: 13px; font-family: Tahoma, sans-serif; }

/* selection rectangle text inside apps */
::selection { background: var(--sel); color: #fff; }

/* ============================================================
   America Online sign-on
   ============================================================ */
.aol-signon { flex: 1; display: flex; flex-direction: column; padding: 8px; gap: 8px; }
.aol-banner {
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(180deg, #1a3f9e, #0a2264);
  color: #fff; padding: 10px 12px;
  box-shadow: inset -1px -1px var(--win-shadow), inset 1px 1px var(--win-hilite);
}
.aol-tri {
  width: 0; height: 0; flex: none;
  border-left: 13px solid transparent; border-right: 13px solid transparent;
  border-bottom: 22px solid #ffd800;
}
.aol-word { font: bold 19px Georgia, "Times New Roman", serif; letter-spacing: 0.5px; }
.aol-fields { padding: 2px 6px; }
.aol-row { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.aol-row label { width: 130px; font-size: 11px; }
.aol-input {
  flex: 1; font-family: inherit; font-size: 12px; padding: 2px 4px;
  border: none; background: #fff;
  box-shadow: inset -1px -1px var(--win-hilite), inset 1px 1px var(--win-shadow),
              inset -2px -2px var(--win-light), inset 2px 2px var(--win-dkshadow);
}
.aol-check { font-size: 11px; display: flex; align-items: center; gap: 4px; padding-left: 138px; }
.aol-status { padding: 0 6px; }
.aol-step { font-size: 11px; height: 16px; margin-bottom: 4px; }
.aol-bar {
  height: 14px; background: #fff;
  box-shadow: inset -1px -1px var(--win-hilite), inset 1px 1px var(--win-shadow),
              inset -2px -2px var(--win-light), inset 2px 2px var(--win-dkshadow);
  overflow: hidden;
}
.aol-bar i {
  display: block; height: 100%; width: 0%;
  background: repeating-linear-gradient(90deg, var(--sel) 0 8px, transparent 8px 10px);
  transition: width 0.3s linear;
}
.aol-actions { margin-top: auto; display: flex; gap: 6px; justify-content: flex-end; padding: 0 6px 2px; }
.aol-actions .btn { min-width: 66px; font-size: 10px; font-weight: bold; }
.aol-primary { font-weight: bold; }

/* ============================================================
   Internet Explorer frame
   ============================================================ */
.ie-framewrap { position: relative; width: 100%; height: 100%; overflow: hidden; }
.ie-frame { width: 100%; height: 100%; border: none; background: #fff; }
.ie-cover { position: absolute; inset: 0; background: #fff; z-index: 5; }

/* ============================================================
   Calculator
   ============================================================ */
.calc-wrap { flex: 1; padding: 6px; display: flex; flex-direction: column; gap: 5px; }
.calc-display {
  background: #fff; text-align: right; padding: 3px 6px;
  font-family: "Courier New", monospace; font-size: 17px;
  box-shadow: inset -1px -1px var(--win-hilite), inset 1px 1px var(--win-shadow),
              inset -2px -2px var(--win-light), inset 2px 2px var(--win-dkshadow);
  overflow: hidden; white-space: nowrap;
}
.calc-top { display: flex; gap: 4px; justify-content: flex-end; }
.calc-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; flex: 1; }
.calc-key {
  background: var(--win-face); border: none; cursor: pointer;
  font-family: inherit; font-size: 11px; font-weight: bold; color: #000080;
  box-shadow: inset -1px -1px var(--win-dkshadow), inset 1px 1px var(--win-hilite),
              inset -2px -2px var(--win-shadow), inset 2px 2px var(--win-light);
  padding: 3px 0;
}
.calc-key:active {
  box-shadow: inset 1px 1px var(--win-dkshadow), inset -1px -1px var(--win-hilite);
}
.calc-key.k-num { color: #000080; }
.calc-key.k-op, .calc-key.k-eq { color: #800000; }
.calc-key.k-mem { color: #800000; }
.calc-key.k-fn { color: #000080; }
.calc-key.k-clr { color: #ff0000; min-width: 54px; padding: 3px 6px; }

/* ============================================================
   Disk Defragmenter
   ============================================================ */
.defrag-wrap { flex: 1; padding: 8px; display: flex; flex-direction: column; gap: 7px; }
.defrag-grid {
  display: grid; gap: 1px; padding: 4px; background: #fff;
  box-shadow: inset -1px -1px var(--win-hilite), inset 1px 1px var(--win-shadow),
              inset -2px -2px var(--win-light), inset 2px 2px var(--win-dkshadow);
}
.dfc { display: block; width: 100%; aspect-ratio: 1/1.4; }
.c-free { background: #d8d8d8; }
.c-used { background: #0000a8; }
.c-frag { background: #a80000; }
.c-read { background: #00a800; }
.c-write { background: #ffff00; }
.defrag-progress {
  height: 15px; background: #fff;
  box-shadow: inset -1px -1px var(--win-hilite), inset 1px 1px var(--win-shadow),
              inset -2px -2px var(--win-light), inset 2px 2px var(--win-dkshadow);
}
.defrag-bar {
  height: 100%; width: 0;
  background: repeating-linear-gradient(90deg, var(--sel) 0 8px, transparent 8px 10px);
  transition: width 0.25s linear;
}
.defrag-pct { text-align: center; font-size: 11px; }
.defrag-legend { display: flex; gap: 10px; font-size: 10px; flex-wrap: wrap; justify-content: center; }
.defrag-legend span { display: flex; align-items: center; gap: 3px; }
.defrag-legend i { width: 9px; height: 11px; display: block; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.3); }
.defrag-actions { display: flex; gap: 6px; justify-content: center; }

/* ============================================================
   AIM
   ============================================================ */
.aim-wrap { flex: 1; display: flex; flex-direction: column; margin: 0 2px 2px; }
.aim-header {
  background: linear-gradient(180deg, #4a7ad8, #274f9e); color: #fff;
  font-weight: bold; padding: 4px 6px; font-size: 11px;
}
.aim-list {
  flex: 1; background: #fff; overflow-y: auto; padding: 3px;
  box-shadow: inset -1px -1px var(--win-hilite), inset 1px 1px var(--win-shadow),
              inset -2px -2px var(--win-light), inset 2px 2px var(--win-dkshadow);
}
.aim-group { font-weight: bold; font-size: 11px; padding: 3px 2px; color: #000; }
.aim-buddy { padding: 2px 2px 2px 16px; cursor: pointer; font-size: 12px; }
.aim-buddy.on { color: #000; }
.aim-buddy.off { color: #999; font-style: italic; }
.aim-buddy.away { color: #777; }
.aim-buddy.away::after { content: " (away)"; font-size: 10px; }
.aim-buddy:hover { background: var(--sel); color: #fff; }
.aim-foot { font-size: 10px; padding: 3px; color: #333; }

.im-wrap { flex: 1; display: flex; flex-direction: column; margin: 0 2px 2px; gap: 3px; }
.im-log {
  flex: 1; background: #fff; overflow-y: auto; padding: 5px;
  font-size: 12px; font-family: Arial, sans-serif; line-height: 1.4;
  box-shadow: inset -1px -1px var(--win-hilite), inset 1px 1px var(--win-shadow),
              inset -2px -2px var(--win-light), inset 2px 2px var(--win-dkshadow);
  user-select: text; -webkit-user-select: text;
}
.im-line { margin-bottom: 2px; }
.im-me { color: #cc0000; }
.im-them { color: #0000cc; }
.im-input-wrap { height: 62px; display: flex; }
.im-input {
  flex: 1; resize: none; border: none; outline: none; padding: 4px;
  font-family: Arial, sans-serif; font-size: 12px;
  box-shadow: inset -1px -1px var(--win-hilite), inset 1px 1px var(--win-shadow),
              inset -2px -2px var(--win-light), inset 2px 2px var(--win-dkshadow);
  user-select: text; -webkit-user-select: text;
}
.im-actions { display: flex; justify-content: flex-end; }

/* ============================================================
   Display Properties
   ============================================================ */
.disp-wrap { flex: 1; display: flex; flex-direction: column; padding: 6px; }
.disp-tabs { display: flex; gap: 2px; }
.disp-tabs .tab {
  padding: 3px 12px; font-size: 11px; background: var(--win-face); cursor: pointer;
  box-shadow: inset 1px 1px var(--win-hilite), inset -1px 0 var(--win-dkshadow);
}
.disp-tabs .tab.active { font-weight: bold; padding-bottom: 5px; }
.disp-panel {
  flex: 1; padding: 10px; display: flex; flex-direction: column; gap: 7px;
  box-shadow: inset -1px -1px var(--win-dkshadow), inset 1px 1px var(--win-hilite),
              inset -2px -2px var(--win-shadow), inset 2px 2px var(--win-light);
}
.disp-monitor {
  width: 160px; height: 128px; margin: 0 auto; background: var(--win-face);
  border-radius: 8px; padding: 10px 10px 22px;
  box-shadow: inset -1px -1px var(--win-dkshadow), inset 1px 1px var(--win-hilite),
              inset -2px -2px var(--win-shadow), inset 2px 2px var(--win-light);
}
.disp-screen {
  width: 100%; height: 100%; background: #008080;
  box-shadow: inset 1px 1px var(--win-dkshadow);
}
.disp-label { font-size: 11px; }
.disp-listbox {
  flex: 1; background: #fff; overflow-y: auto; min-height: 90px;
  box-shadow: inset -1px -1px var(--win-hilite), inset 1px 1px var(--win-shadow),
              inset -2px -2px var(--win-light), inset 2px 2px var(--win-dkshadow);
}
.disp-item { padding: 2px 6px; cursor: pointer; font-size: 12px; }
.disp-item.sel { background: var(--sel); color: #fff; }
.disp-actions { display: flex; gap: 6px; justify-content: flex-end; }

/* ============================================================
   Date/Time, volume, close program, BSOD
   ============================================================ */
.dt-wrap { flex: 1; padding: 14px; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.dt-clock {
  font-family: "Courier New", monospace; font-size: 26px; font-weight: bold;
  background: var(--win-face); padding: 5px 16px;
  box-shadow: inset -1px -1px var(--win-hilite), inset 1px 1px var(--win-shadow),
              inset -2px -2px var(--win-light), inset 2px 2px var(--win-dkshadow);
}
.dt-zone { font-size: 11px; text-align: center; line-height: 1.6; }
.dt-actions { margin-top: auto; }

.vol-popup {
  position: fixed; z-index: 40000; background: var(--win-face);
  padding: 8px 10px; text-align: center;
  box-shadow: inset -1px -1px var(--win-dkshadow), inset 1px 1px var(--win-hilite),
              inset -2px -2px var(--win-shadow), inset 2px 2px var(--win-light),
              2px 2px 5px rgba(0,0,0,0.4);
}
.vol-title { font-size: 11px; margin-bottom: 6px; }
.vol-slider { writing-mode: vertical-lr; direction: rtl; width: 24px; height: 90px; }
.vol-mute { display: block; font-size: 10px; margin-top: 6px; }

.cp-wrap { flex: 1; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.cp-list {
  flex: 1; background: #fff; overflow-y: auto; min-height: 100px;
  box-shadow: inset -1px -1px var(--win-hilite), inset 1px 1px var(--win-shadow),
              inset -2px -2px var(--win-light), inset 2px 2px var(--win-dkshadow);
}
.cp-item { padding: 2px 6px; cursor: pointer; font-size: 12px; }
.cp-item.sel { background: var(--sel); color: #fff; }
.cp-text { font-size: 11px; line-height: 1.4; }
.cp-actions { display: flex; gap: 6px; justify-content: center; }

.bsod {
  position: fixed; inset: 0; z-index: 90000;
  background: #0000a8; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: "Courier New", monospace;
}
.bsod pre { font-size: 15px; line-height: 1.6; }
.bsod-cursor { animation: blink 1s steps(1) infinite; }

/* ============================================================
   Screen saver, games, misc
   ============================================================ */
#screensaver { position: fixed; inset: 0; z-index: 45000; background: #000; cursor: none; }
#screensaver[hidden] { display: none; }

.game-hint {
  flex: none; padding: 3px 6px; font-size: 11px;
  background: #ffffe1; border-bottom: 1px solid var(--win-shadow);
}
#desktop-icons.freeform { display: block; }
.text-field {
  flex: 1; font-family: inherit; font-size: 12px; padding: 3px; border: none; outline: none;
  box-shadow: inset -1px -1px var(--win-hilite), inset 1px 1px var(--win-shadow),
              inset -2px -2px var(--win-light), inset 2px 2px var(--win-dkshadow);
}
.menu-popup.ctx, .menu-popup.fav { z-index: 45000; }
