@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600;700&family=Lora:ital,wght@0,400;0,700;1,400&display=swap');
@font-face { font-family: "MSSansSerif8pt"; src: url("/fonts/ms-sans-serif-8pt.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "MSSansSerif8pt"; src: url("/fonts/ms-sans-serif-8pt-bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --pixel-bg: #6b90a8;
  --win-accent: #7f1d1d;
}
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { font-family: "MSSansSerif8pt", "MS Sans Serif", Arial, sans-serif; background: var(--pixel-bg); }
body.opening-wait,
body.opening-wait * { cursor: url('/icons/desktopnostalgia/wait.cur'), wait !important; }
button { cursor: default; }
[hidden] { display: none !important; }
.pixel-os { position: absolute; inset: 0; overflow: hidden; background-color: var(--pixel-bg); }
#pixel-os:fullscreen, #pixel-os:-webkit-full-screen { position: fixed; inset: 0; width: 100vw; height: 100vh; }
.wallpaper-teal     { background: #008080; }
.wallpaper-grid     { background-color: #f4f4f0; background-image: linear-gradient(rgba(0,0,0,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(0,0,0,.08) 1px, transparent 1px); background-size: 24px 24px; }
.wallpaper-yellow   { background: #f5c800; }
.wallpaper-mustard  { background: #FEDD57; }
.wallpaper-mustard  .desktop-icon-label { color: #000; text-shadow: none; }
.wallpaper-mustard  .desktop-icon:focus .desktop-icon-label { color: #fff; }
.wallpaper-black    { background: #1a1a18; }
.wallpaper-navy     { background: #6b90a8; }
.wallpaper-cream    { background: #f0e8d8; }
.wallpaper-rose     { background: #ff66c4; }
.wallpaper-rosedk   { background: #d946a8; }
.wallpaper-segasky      { background: url('/images/segasky.png') center center / cover no-repeat; }
.wallpaper-streetsofrage { background: url('/images/streetsofrage.jpg') center center / cover no-repeat; }
.wallpaper-sage     { background: #7a9e7e; }
.wallpaper-terra    { background: #b5714a; }
.wallpaper-plum     { background: #4e2d4e; }
.wallpaper-slate    { background: #3d5a80; }
.wallpaper-sand     { background: #c9b08a; }
.wallpaper-lavender { background: #8b7faa; }
.wallpaper-cream .desktop-icon-label,
.wallpaper-rose .desktop-icon-label,
.wallpaper-sand .desktop-icon-label    { color: #333; text-shadow: none; }
.wallpaper-cream .desktop-icon:focus .desktop-icon-label,
.wallpaper-rose .desktop-icon:focus .desktop-icon-label,
.wallpaper-sand .desktop-icon:focus .desktop-icon-label { color: #fff; }
.desktop { position: absolute; inset: 0 0 42px; }
.desktop::after { content: ""; position: absolute; inset: 0; background: url('/images/bitmag_logo_pink.svg') right 24px bottom 48px / 320px auto no-repeat; opacity: 1; pointer-events: none; z-index: 0; }
.desktop-selection-box { position: absolute; border: 1px dotted #fff; background: rgba(0, 0, 128, 0.18); pointer-events: none; z-index: 3; }
.desktop-icons { position: relative; margin: 10px 0 0 10px; padding: 0; list-style: none; width: 0; height: calc(100% - 20px); }
.desktop-icon-item { position: absolute; width: 94px; height: 102px; outline: none; }
.desktop-icon { appearance: none; box-shadow: none; color: black; display: flex; flex-direction: column; margin: 0; align-items: center; text-align: center; width: 94px; background: none; border: none; padding: 0; outline: none !important; -webkit-appearance: none; -webkit-tap-highlight-color: transparent; }
.desktop-icon-image { width: 50px; height: 50px; image-rendering: pixelated; }
.desktop-icon-image { margin-bottom: 4px; }
.desktop-icon-label { color: white; margin: 1px 0 0; padding: 0 2px; font-size: 14px; line-height: 1.1; text-shadow: 1px 1px 0 #000; }
.border-box { padding: 1px 3px; }
.desktop-icon::-moz-focus-inner { border: 0; }
.desktop-icon:focus, .desktop-icon:focus-visible, .desktop-icon-item:focus, .desktop-icon-item:focus-within { outline: none !important; box-shadow: none !important; }
.desktop-icon:focus .desktop-icon-image, .desktop-icon.selected .desktop-icon-image { filter: grayscale(100%) brightness(30%) sepia(100%) hue-rotate(-180deg) saturate(400%) contrast(0.9); }
.desktop-icon:focus .desktop-icon-label, .desktop-icon.selected .desktop-icon-label { background: rgb(0, 0, 118); color: white; margin: 0; text-shadow: none; }
.desktop-icon:focus .border-box, .desktop-icon.selected .border-box { border: rgb(255, 255, 148) dotted 1px; }
.wallpaper-grid .desktop-icon-label,
.wallpaper-yellow .desktop-icon-label { color: #000; text-shadow: none; }
.wallpaper-grid .desktop-icon:focus .desktop-icon-label,
.wallpaper-yellow .desktop-icon:focus .desktop-icon-label { color: #fff; }
.window.os-window { position: absolute; display: flex; flex-direction: column; width: min(980px, calc(100vw - 220px)); min-width: 640px; height: min(650px, calc(100vh - 110px)); min-height: 380px; margin: 0; box-sizing: border-box; overflow: hidden; }
.window.os-window.maximized { inset: 0 !important; width: 100% !important; height: 100% !important; }
.window.os-window.minimized { display: none; }
.window.os-window:not(.focused) .title-bar { background: #7f7f7f !important; }
.window.os-window .title-bar {
  zoom: 1.5;
  background: var(--win-accent) !important;
  padding: 3px 3px 3px 4px !important;
  font-family: "MSSansSerif8pt", "MS Sans Serif", Arial, sans-serif !important;
  display: flex !important;
  align-items: center !important;
}
/* título e icono alineados */
.title-bar-text { display: flex !important; align-items: center !important; gap: 5px; min-width: 0; }
.title-bar-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; line-height: 1; font-weight: 400; }
.window-title-icon { width: 16px; height: 16px; image-rendering: pixelated; flex: 0 0 auto; }
/* botones — copia literal de desktopnostalgia.com */
.title-bar-controls { display: flex; align-items: center; gap: 2px; padding-right: 2px; }
.title-bar-controls button[data-action="close"] { margin-left: 0 !important; }
.title-bar-controls button {
  width: 16px !important;
  height: 14px !important;
  padding: 0 !important;
  line-height: 12px !important;
  text-align: center !important;
  font-size: 0 !important;
  position: relative !important;
  color: transparent !important;
  text-shadow: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  background-image: none !important;
}
.title-bar-controls button::before,
.title-bar-controls button::after { content: ""; position: absolute; background: #000000; }
/* minimize */
.title-bar-controls button[data-action="minimize"]::before { width: 6px; height: 1.5px; left: 50%; bottom: 3px; transform: translateX(-50%); }
.title-bar-controls button[data-action="minimize"]::after { display: none; }
/* maximize */
.title-bar-controls button[data-action="maximize"]::before { width: 8px; height: 7px; left: 50%; top: 3px; transform: translateX(-50%); border: 1px solid #000000; border-top-width: 2px; background: transparent; box-sizing: border-box; }
.title-bar-controls button[data-action="maximize"]::after { display: none; }
/* close */
.title-bar-controls button[data-action="close"]::before { width: 7px; height: 1px; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(45deg); }
.title-bar-controls button[data-action="close"]::after { width: 7px; height: 1px; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-45deg); }
.window.os-window { box-shadow: inset -1px -1px #000, inset 1px 1px #fff, inset -2px -2px #808080, inset 2px 2px #dfdfdf !important; padding: 6px !important; }
.explorer-shell { display: flex; flex-direction: column; flex: 1; min-height: 0; box-sizing: border-box; padding: 0 !important; margin: 0 !important; }
.explorer-menu-bar { display: flex; gap: 2px; padding: 1px 2px 0; zoom: 1.25; }
.explorer-menu-bar button { min-width: 0; margin: 0; padding: 2px 8px; border: 0; background: transparent; box-shadow: none; font: 11px "MSSansSerif8pt", "MS Sans Serif", sans-serif; }
.explorer-menu-bar button:hover, .explorer-menu-bar button:focus { outline: 1px dotted #000; outline-offset: -2px; }
.explorer-icon-toolbar { display: flex; align-items: center; gap: 0; padding: 2px 2px; border-bottom: 1px solid #c0c0c0; zoom: 1.25; }
.toolbar-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 2px 4px; border: 1px solid transparent; background: transparent; box-shadow: none; gap: 1px; cursor: default; font: 11px "MSSansSerif8pt", "MS Sans Serif", sans-serif; }
.toolbar-btn:hover:not(.tb-disabled) { border-color: #c0c0c0 #808080 #808080 #c0c0c0; background: #d4d0c8; }
.toolbar-btn:active:not(.tb-disabled) { border-color: #808080 #c0c0c0 #c0c0c0 #808080; }
.toolbar-btn img { width: 16px; height: 16px; image-rendering: pixelated; }
.toolbar-btn.tb-disabled { opacity: 0.4; cursor: default; }
.toolbar-sep { display: inline-block; width: 1px; height: 34px; background: #808080; margin: 0 3px; border-right: 1px solid #fff; }
.explorer-command-bar { display: flex; gap: 4px; padding: 2px 4px; align-items: center; border-bottom: 1px solid #c0c0c0; zoom: 1.25; }
.explorer-toolbar { margin: 0; flex: 1; display: flex; align-items: center; gap: 4px; }
.explorer-toolbar label { font: 11px "MSSansSerif8pt", "MS Sans Serif", sans-serif; white-space: nowrap; }
.explorer-toolbar input { flex: 1; height: 22px; box-sizing: border-box; font: 11px "MSSansSerif8pt", "MS Sans Serif", sans-serif; }
.explorer-toolbar button { height: 22px; padding: 0 10px; font: 11px "MSSansSerif8pt", "MS Sans Serif", sans-serif; }
.explorer-body { display: grid; grid-template-columns: 200px 4px 1fr; gap: 0; min-height: 0; flex: 1; zoom: 1.25; }
.explorer-sidebar { display: flex; flex-direction: column; min-height: 0; height: 100%; }
.explorer-sidebar-header { display: flex; align-items: center; justify-content: space-between; padding: 1px 4px; background: #c0c0c0; border-bottom: 1px solid #808080; flex: 0 0 auto; font: bold 11px "MSSansSerif8pt", "MS Sans Serif", sans-serif; }
.sidebar-close-btn { min-width: 0; width: 14px; height: 14px; padding: 0; font-size: 10px; line-height: 1; display: flex; align-items: center; justify-content: center; cursor: default; }
.explorer-tree-panel { flex: 1; min-height: 0; padding: 4px; margin: 0; overflow: auto; background: #fff; border: none; }
.explorer-tree-panel ul.tree-view { box-shadow: none; padding: 2px; background: transparent; }
.explorer-vsplit { width: 4px; background: #c0c0c0; border-left: 1px solid #808080; border-right: 1px solid #dfdfdf; }
.explorer-main .sunken-panel { border: 2px solid; border-color: #808080 #fff #fff #808080 !important; }
.folder-tree, .folder-tree ul { margin: 0; padding-left: 16px; list-style: none; }
.folder-tree { padding-left: 0; }
.folder-tree li { position: relative; margin: 0; }
.tree-root, .tree-button { display: flex; align-items: center; gap: 5px; min-height: 16px; white-space: nowrap; }
.tree-root { font: 11px "MSSansSerif8pt", "MS Sans Serif", sans-serif; }
.tree-toggle { display: inline-grid; place-items: center; width: 11px; height: 11px; border: 1px solid #777; background: #fff; font: 11px/1 monospace; }
.tree-root img { width: 16px; height: 16px; image-rendering: pixelated; }
.tree-button { appearance: none; box-shadow: none; width: 100%; padding: 0px 3px; border: 0; background: transparent; text-align: left; font: 11px "MSSansSerif8pt", "MS Sans Serif", sans-serif; }
.tree-button img { width: 16px; height: 16px; image-rendering: pixelated; }
.tree-button.active, .tree-button:hover, .tree-button:focus { background: var(--win-accent); color: #fff; }
.tree-toggle { cursor: pointer; }
.tree-files { padding-left: 20px; list-style: none; margin: 0; }
ul.tree-view .tree-files li, ul.tree-view .tree-files { margin-top: 0 !important; }
.tree-file-button { display: flex; align-items: center; gap: 4px; appearance: none; box-shadow: none; width: 100%; padding: 0 3px; border: 0; background: transparent; text-align: left; font: 11px "MSSansSerif8pt", "MS Sans Serif", sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; cursor: pointer; line-height: 14px; height: 14px; }
.tree-file-button img { width: 14px; height: 14px; image-rendering: pixelated; flex-shrink: 0; }
.tree-file-button:hover, .tree-file-button:focus { background: var(--win-accent); color: #fff; }
.explorer-main { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.file-panel { flex: 1; min-height: 0; overflow: auto; background: #fff; }
.file-table { min-width: 100%; border-collapse: collapse; font: 11px "MSSansSerif8pt", "MS Sans Serif", sans-serif; white-space: nowrap; }
.file-table thead th { position: sticky; top: 0; z-index: 1; background: silver; box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px grey, inset 2px 2px #dfdfdf; text-align: left; font: 11px "MSSansSerif8pt", "MS Sans Serif", sans-serif; font-weight: 400; }
.file-table th:nth-child(1) { min-width: 240px; }
.file-table th:nth-child(2) { min-width: 90px; }
.file-table th:nth-child(3) { min-width: 110px; }
.file-table th:nth-child(4) { min-width: 120px; }
.file-table th, .file-table td { height: 23px; padding: 1px 5px; vertical-align: middle; box-sizing: border-box; }
.file-item { cursor: default; }
.file-item.highlighted td { background: var(--win-accent); color: #fff; }
.name-cell { display: flex; align-items: center; gap: 6px; min-width: 0; }
.file-type-icon { width: 18px; height: 18px; image-rendering: pixelated; flex: 0 0 auto; }
.file-main { min-width: 0; display: block; line-height: 1.4; }
.file-main strong, .file-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; overflow: visible; }
.file-main strong { font-weight: 700; }
.file-main small { display: none; }
.reader-window { width: min(900px, calc(100vw - 160px)); height: min(660px, calc(100vh - 84px)); }
.reader-window .ie3-body { height: calc(100% - 12px); overflow: hidden; }

/* ── IE3 chrome (copiado de desktopnostalgia.com) ────────────────────── */
:root {
  --w95-face:            #c0c0c0;
  --w95-shadow:          #808080;
  --w95-dark:            #000000;
  --w95-highlight:       #ffffff;
  --w95-frame-outer-light: #fcfcfc;
  --w95-frame-inner-shadow: #808488;
  --w95-frame-outer-dark: #404040;
  --w95-text:            #000000;
  --w95-highlight-bg:    var(--win-accent);
  --w95-highlight-text:  #ffffff;
  --w95-font:            "MSSansSerif8pt", 'MS Sans Serif', 'Microsoft Sans Serif', Arial, sans-serif;
  --ie3-logo-size:       52px;
  --ie3-addressbar-height: 24px;
  --ie3-linksbar-height: 22px;
  --ie3-header-overlay:  rgba(192,192,192,0.26);
  --ie3-header-bg-image: url('/icons/ie3/ie3-header-background.png');
  --ie3-header-bg-height: calc(52px + 24px + 22px);
  --ie3-progress-width:  186px;
  --ie3-progress-side-padding: 2px;
}

/* Grip pattern */
.ie3-commandbar::before,
.ie3-addressbar::before,
.ie3-linksbar::before {
  content: "";
  position: absolute;
  left: 0; top: 2px; bottom: 2px; width: 8px;
  background: linear-gradient(
    to right,
    transparent 0 1px, #808488 1px 2px, #fcfcfc 2px 3px,
    transparent 3px 4px, #808488 4px 5px, #fcfcfc 5px 6px,
    transparent 6px 100%
  );
  pointer-events: none;
}

/* Body */
.ie3-body { margin: 0 !important; padding: 0; min-height: 0; display: flex; flex-direction: column; position: relative; background: var(--w95-face); }

/* Aplicar zoom 2x al chrome (igual que desktopnostalgia), pero NO al iframe */
.ie3-menubar, .ie3-commandbar, .ie3-addressbar, .ie3-linksbar, .ie3-statusbar { zoom: 1.5; }

/* Menu bar */
.ie3-menubar { display: flex; align-items: center; gap: 2px; padding: 0 2px 2px 1px; background: var(--w95-face); border-bottom: 0; box-shadow: inset 0 -1px 0 var(--w95-shadow); flex-shrink: 0; font: 11px/13px var(--w95-font); }
.ie3-menubar-button { min-width: 0; min-height: 0; padding: 2px 3px 1px; border: 0; box-shadow: none; background: transparent; appearance: none; -webkit-appearance: none; font: inherit; font-size: 11px; line-height: 13px; color: var(--w95-text); cursor: default; }
.ie3-menubar-button:hover { background: var(--w95-highlight-bg); color: var(--w95-highlight-text); }

/* Command bar */
.ie3-commandbar {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  background-color: #c0c0c0;
  background-image: linear-gradient(var(--ie3-header-overlay), var(--ie3-header-overlay)), var(--ie3-header-bg-image);
  background-repeat: no-repeat, repeat-x;
  background-position: left top, left top;
  background-size: 100% 100%, auto var(--ie3-header-bg-height);
  border-top: 1px solid var(--w95-highlight);
  border-bottom: 1px solid var(--w95-shadow);
  overflow: hidden; flex-shrink: 0;
}
.ie3-commandbar-main { position: relative; z-index: 1; display: flex; align-items: stretch; gap: 0; padding: 2px 2px 0 14px; }

/* Tool groups */
.ie3-tool-group { display: flex; align-items: flex-start; gap: 0; padding-right: 3px; margin-right: 3px; border-right: 1px solid var(--w95-highlight); box-shadow: 1px 0 0 var(--w95-shadow); }
.ie3-tool-group:last-child { border-right: 0; box-shadow: none; padding-right: 0; margin-right: 0; }
.ie3-commandbar-main > .ie3-tool-group:first-child { border-right: 0; box-shadow: none; padding-right: 6px; margin-right: 0; }

/* Each button */
.ie3-tool { min-width: 0; min-height: 0; width: auto; min-width: 47px; padding: 1px 1px 0; border: 1px solid transparent; box-shadow: none; background: transparent; appearance: none; -webkit-appearance: none; font: inherit; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 3px; color: var(--w95-text); cursor: default; }
.ie3-tool:hover:not(.is-disabled) { border-top-color: var(--w95-highlight); border-left-color: var(--w95-highlight); border-right-color: var(--w95-shadow); border-bottom-color: var(--w95-shadow); }
.ie3-tool:active:not(.is-disabled):not(:disabled) { border-top-color: var(--w95-shadow); border-left-color: var(--w95-shadow); border-right-color: var(--w95-highlight); border-bottom-color: var(--w95-highlight); }
.ie3-tool:focus { outline: none; }
.ie3-tool.is-disabled { color: var(--w95-shadow); text-shadow: 1px 1px 0 var(--w95-highlight); pointer-events: none; }
.ie3-tool.is-disabled .ie3-tool-icon { opacity: 0.55; }

/* Icons */
.ie3-tool-icon { width: 21px; height: 20px; position: relative; background-repeat: no-repeat; background-position: center; background-size: contain; image-rendering: pixelated; }
.ie3-tool-icon--back      { background-image: url('/icons/ie3/back.webp'); }
.ie3-tool-icon--forward   { background-image: url('/icons/ie3/forward.webp'); }
.ie3-tool-icon--stop      { background-image: url('/icons/ie3/stop.webp'); }
.ie3-tool-icon--refresh   { background-image: url('/icons/ie3/refresh.webp'); }
.ie3-tool-icon--home      { background-image: url('/icons/ie3/home.webp'); }
.ie3-tool-icon--search    { background-image: url('/icons/ie3/search.webp'); }
.ie3-tool-icon--favorites { background-image: url('/icons/ie3/favorites.webp'); }
.ie3-tool-icon--print     { background-image: url('/icons/ie3/print.webp'); }
.ie3-tool-icon--font      { background-image: url('/icons/ie3/font-size.webp'); }
.ie3-tool-icon--mail      { background-image: url('/icons/ie3/mail.webp'); }
.ie3-tool.is-disabled .ie3-tool-icon--back    { background-image: url('/icons/ie3/back-disabled.webp'); opacity: 1; }
.ie3-tool.is-disabled .ie3-tool-icon--forward { background-image: url('/icons/ie3/forward-disabled.webp'); opacity: 1; }
.ie3-tool:hover:not(.is-disabled) .ie3-tool-icon--back      { background-image: url('/icons/ie3/back-on.webp'); }
.ie3-tool:hover:not(.is-disabled) .ie3-tool-icon--forward   { background-image: url('/icons/ie3/forward-on.webp'); }
.ie3-tool:hover:not(.is-disabled) .ie3-tool-icon--stop      { background-image: url('/icons/ie3/stop-on.webp'); }
.ie3-tool:hover:not(.is-disabled) .ie3-tool-icon--refresh   { background-image: url('/icons/ie3/refresh-on.webp'); }
.ie3-tool:hover:not(.is-disabled) .ie3-tool-icon--home      { background-image: url('/icons/ie3/home-on.webp'); }
.ie3-tool:hover:not(.is-disabled) .ie3-tool-icon--search    { background-image: url('/icons/ie3/search-on.webp'); }
.ie3-tool:hover:not(.is-disabled) .ie3-tool-icon--favorites { background-image: url('/icons/ie3/favorites-on.webp'); }
.ie3-tool:hover:not(.is-disabled) .ie3-tool-icon--print     { background-image: url('/icons/ie3/print-on.webp'); }
.ie3-tool:hover:not(.is-disabled) .ie3-tool-icon--font      { background-image: url('/icons/ie3/font-size-on.webp'); }
.ie3-tool:hover:not(.is-disabled) .ie3-tool-icon--mail      { background-image: url('/icons/ie3/mail-on.webp'); }
.ie3-tool-label { font-size: 11px; line-height: 11px; white-space: nowrap; }

/* Font size dropdown menu (IE3 style) */
.ie3-font-menu { position: absolute; top: 52px; right: 50px; z-index: 300; background: #c0c0c0; border: 2px solid; border-color: #fff #000 #000 #fff; box-shadow: 2px 2px 0 #000; padding: 2px 0; min-width: 120px; display: flex; flex-direction: column; }
.ie3-font-item { text-align: left; background: transparent; border: none; padding: 3px 20px 3px 6px; font-size: 11px; font-family: "MSSansSerif8pt", "MS Sans Serif", Arial, sans-serif; color: #000; cursor: default; width: 100%; }
.ie3-font-item:hover { background: var(--win-accent); color: #fff; }
.ie3-font-item--active::before { content: "✓ "; }

/* Address bar */
/* address bar — copia literal de desktopnostalgia.com */
.ie3-addressbar {
  position: relative;
  display: grid; grid-template-columns: auto minmax(0, 1fr);
  align-items: center; gap: 3px;
  padding: 2px 2px 2px 14px;
  background-color: #c0c0c0;
  background-image: linear-gradient(var(--ie3-header-overlay), var(--ie3-header-overlay)), var(--ie3-header-bg-image);
  background-repeat: no-repeat, repeat-x;
  background-position: left top, left calc(var(--ie3-logo-size) * -1);
  background-size: 100% 100%, auto var(--ie3-header-bg-height);
  border-top: 1px solid var(--w95-highlight);
  border-bottom: 1px solid var(--w95-shadow);
  flex-shrink: 0;
}
.ie3-address-label { font-size: 11px; line-height: 13px; }
.ie3-address-field {
  min-width: 0; height: 18px;
  display: flex; align-items: stretch;
  background: #ffffff;
  border: 1px solid var(--w95-dark);
  box-shadow: inset 1px 1px 0 var(--w95-shadow), inset -1px -1px 0 var(--w95-highlight);
}
.ie3-address-input {
  flex: 1 1 auto; min-width: 0; border: 0; background: transparent;
  padding: 1px 3px 0; font-size: 11px; line-height: 13px; color: var(--w95-text);
  outline: none; -webkit-appearance: none; appearance: none;
}
.ie3-address-drop { min-width: 0; min-height: 0; padding: 0; border: 0; background: var(--w95-face); box-shadow: none; appearance: none; -webkit-appearance: none; font: inherit; color: var(--w95-text); cursor: default; }
.ie3-address-drop { width: 18px; position: relative; border-left: 1px solid var(--w95-shadow); box-shadow: inset 1px 1px 0 var(--w95-highlight); }
.ie3-address-drop::before { content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -20%); border-left: 3px solid transparent; border-right: 3px solid transparent; border-top: 4px solid var(--w95-dark); }

/* Links bar */
.ie3-linksbar {
  position: relative; display: flex; align-items: stretch; gap: 0;
  min-height: 20px; padding: 1px 1px 1px 11px;
  background-color: #c0c0c0;
  background-image: linear-gradient(var(--ie3-header-overlay), var(--ie3-header-overlay)), var(--ie3-header-bg-image);
  background-repeat: no-repeat, repeat-x;
  background-position: left top, left calc((var(--ie3-logo-size) + var(--ie3-addressbar-height)) * -1);
  background-size: 100% 100%, auto var(--ie3-header-bg-height);
  border-top: 1px solid var(--w95-highlight);
  border-bottom: 1px solid var(--w95-shadow);
  flex-shrink: 0; overflow: hidden; font: 11px/13px var(--w95-font);
}
.ie3-linksbar-label { flex: 0 0 auto; height: 18px; display: inline-flex; align-items: center; padding: 0 8px 0 6px; font: inherit; border: 1px solid transparent; border-right: 1px solid var(--w95-shadow); box-shadow: 1px 0 0 var(--w95-highlight); cursor: default; }
.ie3-linksbar-item { margin-left: 1px; min-width: 0; min-height: 0; height: 18px; display: inline-flex; align-items: center; gap: 4px; padding: 0 10px 0 6px; font: inherit; border: 1px solid transparent; background: transparent; appearance: none; -webkit-appearance: none; color: var(--w95-text); cursor: default; white-space: nowrap; }
.ie3-linksbar-item:hover { border-top-color: var(--w95-highlight); border-left-color: var(--w95-highlight); border-right-color: var(--w95-shadow); border-bottom-color: var(--w95-shadow); }
.ie3-linksbar-icon { width: 14px; height: 17px; background-image: url('/icons/ie3/document.webp'); background-repeat: no-repeat; background-position: center; background-size: contain; flex: 0 0 auto; image-rendering: pixelated; }
.ie3-linksbar-item:hover .ie3-linksbar-icon { background-image: url('/icons/ie3/document-on.webp'); }

/* Main area + iframe */
.ie3-main { flex: 1 1 auto; min-height: 0; display: flex; }
.ie3-main iframe { flex: 1; width: 100%; min-height: 0; margin: 0; border: none; border-top: 1px solid var(--w95-frame-outer-dark); border-left: 1px solid var(--w95-frame-outer-dark); box-shadow: inset -1px -1px 0 var(--w95-highlight), inset 1px 1px 0 var(--w95-shadow); background: #fff; }

/* Status bar */
.ie3-statusbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) calc(var(--ie3-progress-width) + (var(--ie3-progress-side-padding) * 2) + 2px) 54px;
  gap: 1px; padding: 1px 1px 0 1px;
  background: var(--w95-face);
  border-top: 1px solid var(--w95-highlight);
  flex-shrink: 0; font: 11px/13px var(--w95-font);
}
.ie3-status-panel, .ie3-status-spacer, .ie3-status-logo {
  height: 16px; display: flex; align-items: center;
  background: var(--w95-face); font-size: 11px; line-height: 13px;
  border-top: 1px solid #808488; border-left: 1px solid #808488;
  border-right: 1px solid #fcfcfc; border-bottom: 1px solid #fcfcfc;
}
.ie3-status-panel { padding: 0 3px; min-width: 0; overflow: hidden; white-space: nowrap; }
.ie3-status-panel span { display: block; min-width: 0; overflow: hidden; text-overflow: clip; white-space: nowrap; }
.ie3-status-logo { justify-content: flex-start; padding: 0 0 0 2px; }
.ie3-status-icon { width: 16px; height: 16px; background-image: url('/icons/globe-16.png'); background-repeat: no-repeat; background-position: center; background-size: contain; image-rendering: pixelated; }
.about-window, .game-window { width: 480px; height: auto; }
.settings-window { width: 440px; height: auto; }

/* ── Settings tabs (Win98 Display Properties style) ── */
.settings-content { padding: 8px 8px 8px !important; display: flex; flex-direction: column; gap: 0; }
.settings-tabs { display: flex; gap: 0; margin-bottom: -1px; position: relative; z-index: 1; padding-left: 4px; }
.settings-tab {
  font: 11px "MSSansSerif8pt", "MS Sans Serif", sans-serif;
  padding: 4px 12px 5px;
  background: #c0c0c0;
  border: 1px solid;
  border-color: #fff #808080 transparent #fff;
  box-shadow: inset -1px 0 #dfdfdf, inset 0 1px #dfdfdf;
  cursor: default;
  position: relative;
  bottom: 0;
  margin-right: 2px;
  min-width: 60px;
}
.settings-tab.active {
  background: #c0c0c0;
  border-bottom-color: #c0c0c0;
  padding-bottom: 6px;
  z-index: 2;
  font-weight: 700;
}
.settings-tab-body {
  border: 1px solid;
  border-color: #808080 #fff #fff #808080;
  box-shadow: inset 1px 1px #dfdfdf, inset -1px -1px #808080;
  background: #c0c0c0;
  padding: 12px 10px;
  position: relative;
  z-index: 0;
}
.settings-panel { display: none; }
.settings-panel.active { display: block; }
.about-window { width: 260px; height: auto !important; min-height: 0 !important; min-width: 0 !important; }
@media (pointer: coarse) {
  .about-window { width: 220px; height: auto !important; min-height: unset !important; max-height: none !important; }
  .about-logo { width: 120px; height: auto; margin: -14px -6px -18px -10px; }
  .about-content { gap: 4px; padding: 8px 12px 10px !important; }
  .about-content > p:first-of-type { font-size: 13px; }
}
.about-content { display: flex; flex-direction: column; gap: 6px; padding: 12px 16px 14px !important; align-items: flex-start; }
.about-logo { width: 190px; height: auto; display: block; margin: -22px -10px -28px -14px; }
.about-content h1 { margin: 0; font-size: 18px; font-weight: normal; display: flex; align-items: baseline; gap: 8px; }
.about-version { font-size: 13px; color: #666; font-weight: normal; }
.about-content p { font: 16px/1.5 var(--w95-font); margin: 0; }
.about-content hr { border: none; border-top: 1px solid #aaa; margin: 0; }
.about-content dl { display: grid; grid-template-columns: 90px 1fr; font-size: 12px; gap: 3px 0; margin: 0; }
.about-content dt { color: #444; }
.about-content dd { margin: 0; font-weight: bold; }
.about-hint { color: #666; font-style: italic; font-size: 11px !important; }
.wallpaper-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.wallpaper-options button { font-size: 10px; }
.wallpaper-preview { display: block; height: 32px; margin-bottom: 3px; border: 2px inset #fff; }
.settings-tab-body { max-height: 320px; overflow-y: auto; }
.wallpaper-preview.teal   { background: #008080; }
.wallpaper-preview.grid   { background-color: #f4f4f0; background-image: linear-gradient(#ddd 1px, transparent 1px), linear-gradient(90deg, #ddd 1px, transparent 1px); background-size: 8px 8px; }
.wallpaper-preview.yellow  { background: #f5c800; }
.wallpaper-preview.mustard { background: #FEDD57; }
.wallpaper-preview.black   { background: #111; }
.wallpaper-preview.navy    { background: #6b90a8; }
.wallpaper-preview.cream    { background: #f0e8d8; }
.wallpaper-preview.rose     { background: #ff66c4; }
.wallpaper-preview.rosedk   { background: #d946a8; }
.wallpaper-preview.segasky      { background: linear-gradient(to bottom, #1a0a4a 0%, #3d1a8a 35%, #6b35c8 60%, #d4608a 80%, #f0a060 100%); }
.wallpaper-preview.streetsofrage { background: url('/images/streetsofrage.jpg') center center / cover no-repeat; }
.wallpaper-preview.sage     { background: #7a9e7e; }
.wallpaper-preview.terra    { background: #b5714a; }
.wallpaper-preview.plum     { background: #4e2d4e; }
.wallpaper-preview.slate    { background: #3d5a80; }
.wallpaper-preview.sand     { background: #c9b08a; }
.wallpaper-preview.lavender { background: #8b7faa; }
.setting-check { margin-top: 16px; }
.settings-content fieldset,
.settings-content legend,
.settings-content label,
.settings-content input,
.settings-content button { font: 11px "MSSansSerif8pt", "MS Sans Serif", sans-serif !important; }
/* ── Windows Media Player ─────────────────────────────────── */
.mplayer-window { width: min(540px, calc(100vw - 60px)); height: min(560px, calc(100vh - 80px)); min-width: 340px; min-height: 380px; }
.mplayer-menu-bar, .mplayer-nav-bar, .mplayer-bottom { zoom: 1.35; }
.mplayer-body { display: flex; flex-direction: column; flex: 1; min-height: 0; padding: 0 !important; margin: 0 !important; }
/* menu bar */
.mplayer-menu-bar { display: flex; gap: 0; padding: 0 2px; flex: 0 0 auto; }
.mplayer-menu-bar button { min-width: 0; margin: 0; height: 20px; padding: 0 8px; border: 0; background: transparent; box-shadow: none; font: 11px "MSSansSerif8pt", "MS Sans Serif", sans-serif; line-height: 20px; }
.mplayer-menu-bar button:hover { background: var(--win-accent); color: #fff; }
/* nav toolbar */
.mplayer-nav-bar { display: flex; align-items: center; gap: 0; padding: 1px 4px; flex: 0 0 auto; border-top: 1px solid #808080; border-bottom: 1px solid #808080; background: #c0c0c0; }
.mp-nav-arrow { min-width: 0; width: 22px; height: 22px; padding: 0; border: 0 !important; box-shadow: none !important; background: transparent !important; cursor: default; display: flex; align-items: center; justify-content: center; color: #404040; }
.mp-nav-arrow:disabled { color: #a0a0a0; }
.mp-nav-sep { width: 1px; height: 20px; background: #808080; border-right: 1px solid #fff; margin: 0 6px; }
.mp-nav-link { min-width: 0; height: 22px; padding: 1px 5px; border: 0 !important; box-shadow: none !important; background: transparent !important; display: flex; align-items: center; gap: 4px; font: 11px "MSSansSerif8pt", "MS Sans Serif", sans-serif; white-space: nowrap; cursor: default; }
.mp-nav-link img { width: 16px; height: 16px; image-rendering: pixelated; }
.mp-nav-link:hover { background: var(--win-accent) !important; color: #fff; }
/* viewport */
.mplayer-viewport { flex: 1; min-height: 0; background: #000; overflow: hidden; }
.mplayer-viewport video { width: 100%; height: 100%; object-fit: contain; display: block; }
/* bottom panel */
.mplayer-bottom { flex: 0 0 auto; background: #c0c0c0; border-top: 2px solid; border-color: #fff #808080 #808080 #fff; padding: 3px 4px 2px; display: flex; flex-direction: column; gap: 2px; }
/* seek row: mini button + seek bar */
.mplayer-seek-row { display: flex; align-items: center; gap: 3px; }
.mp-minibtn { min-width: 0; width: 18px; height: 18px; padding: 0; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; outline: none !important; border: 0 !important; box-shadow: none !important; background: transparent !important; }
.mplayer-seek { flex: 1; height: 20px; cursor: pointer; margin: 0; }
.mplayer-seek::-webkit-slider-runnable-track {
  height: 8px !important; background: #c0c0c0 !important;
  border-top: 1px solid #808080 !important; border-left: 1px solid #808080 !important;
  border-bottom: 1px solid #fff !important; border-right: 1px solid #fff !important;
  box-shadow: inset 1px 1px 0 #404040 !important;
}
.mplayer-seek::-webkit-slider-thumb {
  -webkit-appearance: none !important;
  width: 11px !important; height: 18px !important;
  background: #c0c0c0 !important; transform: none !important;
  border-top: 1px solid #fff !important; border-left: 1px solid #fff !important;
  border-bottom: 1px solid #404040 !important; border-right: 1px solid #404040 !important;
  box-shadow: inset -1px -1px #808080, inset 1px 1px #dfdfdf !important;
  margin-top: -5px !important;
}
.mplayer-seek::-moz-range-track {
  height: 8px !important; background: #c0c0c0 !important;
  border-top: 1px solid #808080 !important; border-left: 1px solid #808080 !important;
  border-bottom: 1px solid #fff !important; border-right: 1px solid #fff !important;
}
.mplayer-seek::-moz-range-thumb {
  width: 11px !important; height: 18px !important; border-radius: 0 !important;
  background: #c0c0c0 !important; transform: none !important;
  border-top: 1px solid #fff !important; border-left: 1px solid #fff !important;
  border-bottom: 1px solid #404040 !important; border-right: 1px solid #404040 !important;
  box-shadow: none !important;
}
/* transport controls row — flat, no 3D borders like WMP original */
.mplayer-controls { display: flex; align-items: center; }
.mplayer-transport { display: flex; align-items: center; gap: 0; }
.mp-btn { min-width: 0; width: 26px; height: 22px; padding: 0; display: flex; align-items: center; justify-content: center; border: 0 !important; box-shadow: none !important; background: transparent !important; cursor: default; }
.mp-btn:active { background: rgba(0,0,0,0.06) !important; }
.mplayer-sep { width: 1px; height: 16px; background: #808080; border-right: 1px solid #fff; margin: 0 4px; flex-shrink: 0; }
/* CSS icon shapes */
.mpi { display: flex; align-items: center; justify-content: center; pointer-events: none; }
.mpi-play { width: 0; height: 0; border-style: solid; border-width: 5px 0 5px 9px; border-color: transparent transparent transparent #000; margin-left: 2px; }
.mpi-pause { display: flex; gap: 2px; }
.mpi-pause::before, .mpi-pause::after { content: ''; display: block; width: 3px; height: 9px; background: #000; }
.mpi-stop { width: 8px; height: 8px; background: #000; box-shadow: 0 0 0 1px #808080; }
.mpi-prev { display: flex; align-items: center; }
.mpi-prev::before { content: ''; display: block; width: 2px; height: 9px; background: #000; margin-right: 1px; }
.mpi-prev::after { content: ''; display: block; width: 0; height: 0; border-style: solid; border-width: 4px 7px 4px 0; border-color: transparent #000 transparent transparent; }
.mpi-next { display: flex; align-items: center; }
.mpi-next::before { content: ''; display: block; width: 0; height: 0; border-style: solid; border-width: 4px 0 4px 7px; border-color: transparent transparent transparent #000; }
.mpi-next::after { content: ''; display: block; width: 2px; height: 9px; background: #000; margin-left: 1px; }
.mpi-rew { display: flex; align-items: center; gap: 1px; }
.mpi-rew::before, .mpi-rew::after { content: ''; display: block; width: 0; height: 0; border-style: solid; border-width: 4px 6px 4px 0; border-color: transparent #000 transparent transparent; }
.mpi-fwd { display: flex; align-items: center; gap: 1px; }
.mpi-fwd::before, .mpi-fwd::after { content: ''; display: block; width: 0; height: 0; border-style: solid; border-width: 4px 0 4px 6px; border-color: transparent transparent transparent #000; }
.mpi-eq { display: flex; align-items: flex-end; gap: 1px; height: 10px; }
.mpi-eq::before { content: ''; display: block; width: 2px; height: 6px; background: #000; }
.mpi-eq::after { content: ''; display: block; width: 2px; height: 10px; background: #000; }
.mpi-eq span { display: block; width: 2px; height: 8px; background: #000; }
.mpi-mini { display: flex; gap: 1px; align-items: center; }
.mpi-mini::before { content: ''; display: block; width: 6px; height: 6px; border: 1px solid #000; }
.mpi-mini::after { content: ''; display: block; width: 4px; height: 4px; border: 1px solid #000; }
/* volume — flat icon + diagonal wedge like WMP */
.mplayer-vol-row { display: flex; align-items: center; margin-left: auto; gap: 2px; }
.mp-vol-icon-btn { width: 20px; height: 22px; border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 0; display: flex; align-items: center; justify-content: center; cursor: default; }
.mp-vol-icon-btn img { width: 14px; height: 14px; image-rendering: pixelated; }
/* wedge container — triangle outline only, no fill */
.mp-vol-wedge-wrap {
  position: relative; width: 50px; height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='46' height='16'%3E%3Cline x1='0' y1='15' x2='42' y2='0' stroke='%23808080' stroke-width='1'/%3E%3Cline x1='42' y1='0' x2='42' y2='15' stroke='%23ffffff' stroke-width='1'/%3E%3Cline x1='0' y1='15' x2='42' y2='15' stroke='%23ffffff' stroke-width='1'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0 center;
}
.mp-vol-wedge { display: none; }
/* range input overlays wedge */
.mplayer-vol {
  position: absolute; left: 0; right: 0; top: 0; bottom: 0;
  width: 100%; height: 100%;
  -webkit-appearance: none !important; appearance: none;
  background: transparent !important; border: 0; cursor: ew-resize; margin: 0; padding: 0;
}
.mplayer-vol::-webkit-slider-runnable-track {
  background: transparent !important; border: none !important;
  box-shadow: none !important; height: 2px !important;
}
.mplayer-vol::-webkit-slider-thumb {
  -webkit-appearance: none !important;
  width: 11px !important; height: 18px !important;
  background: #c0c0c0 !important;
  border-top: 1px solid #fff !important; border-left: 1px solid #fff !important;
  border-bottom: 1px solid #404040 !important; border-right: 1px solid #404040 !important;
  box-shadow: inset -1px -1px #808080, inset 1px 1px #dfdfdf !important;
  transform: none !important; margin-top: -8px !important; cursor: ew-resize;
}
.mplayer-vol::-moz-range-track {
  background: transparent !important; border: none !important;
  box-shadow: none !important; height: 2px !important;
}
.mplayer-vol::-moz-range-thumb {
  width: 11px !important; height: 18px !important; border-radius: 0 !important;
  background: #c0c0c0 !important;
  border-top: 1px solid #fff !important; border-left: 1px solid #fff !important;
  border-bottom: 1px solid #404040 !important; border-right: 1px solid #404040 !important;
  transform: none !important; box-shadow: none !important; cursor: ew-resize;
}
/* clip dropdown */
.mplayer-clip-row { display: flex; }
.mp-clip-select { flex: 1; height: 20px; font: 11px "MSSansSerif8pt", "MS Sans Serif", sans-serif; border: 1px solid; border-color: #808080 #fff #fff #808080; background: #fff; padding: 0 2px; }
/* info panel — black background like WMP */
.mplayer-info { background: #000; padding: 4px 8px; font: 11px "MSSansSerif8pt", "MS Sans Serif", sans-serif; color: #c0c0c0; line-height: 1.6; text-align: center; }
.mp-info-label { color: #808080; }
/* status bar */
.mplayer-status-bar { display: flex; gap: 2px; }
.mplayer-status-bar span { font: 11px "MSSansSerif8pt", "MS Sans Serif", sans-serif; padding: 1px 5px; border: 1px solid; border-color: #808080 #fff #fff #808080; background: #c0c0c0; }
#mp-status { flex: 1; }
#mp-time { min-width: 80px; text-align: right; }
.status-bar { width: 100%; box-sizing: border-box; flex: 0 0 auto; }
.taskbar { position: fixed; left: 0; right: 0; bottom: 0; height: 42px; display: flex; align-items: center; gap: 7px; padding: 3px; background: #c0c0c0; border-top: 1px solid #fff; z-index: 1000; box-sizing: border-box; }
.start-logo {
  display: inline-block; flex-shrink: 0;
  width: 20px; height: 20px; margin-right: 5px;
  background:
    linear-gradient(to right, #e85555 50%, #1e47a0 50%) top    / 100% 50% no-repeat,
    linear-gradient(to right, #22b567 50%, #f5c842 50%) bottom / 100% 50% no-repeat;
  image-rendering: pixelated;
}
.start-button { position: relative; display: flex; align-items: center; justify-content: center; gap: 0; flex: 0 0 auto; min-width: 80px; height: 36px; padding: 1px 7px; font-family: "MSSansSerif8pt", "MS Sans Serif", sans-serif; font-size: 14px; font-weight: 700; line-height: 22px; border: 2px solid; border-color: #fff #000 #000 #fff; background: #c0c0c0; box-shadow: inset -1px -1px #808080, inset 1px 1px #dfdfdf; }
.start-button:active, .start-button.open { border-top: 2px solid #000; border-left: 2px solid #000; border-bottom: 2px solid rgb(250,250,250); border-right: 2px solid rgb(250,250,250); box-shadow: none; background: repeating-conic-gradient(rgb(189,190,189) 0% 25%, rgb(255,255,255) 0% 50%) 50% / 2px 2px; }
.task-buttons { flex: 1 1 auto; display: flex; gap: 4px; min-width: 0; overflow: hidden; }
.task-buttons button { flex: 1 1 150px; min-width: 0; max-width: 250px; height: 36px; display: flex; align-items: center; gap: 5px; padding: 2px 9px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-align: left; font-family: "MSSansSerif8pt", "MS Sans Serif", sans-serif; font-size: 14px; border-top: 2px solid #fff; border-left: 2px solid #fff; border-bottom: 2px solid #404040; border-right: 2px solid #404040; background: #c0c0c0; box-shadow: 1px 1px 0 #000; }
.task-buttons button img { width: 20px; height: 20px; margin-left: -4px; image-rendering: pixelated; flex: 0 0 auto; }
.task-buttons button span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.task-buttons button.active { border-top: 2px solid #000; border-left: 2px solid #000; border-bottom: 2px solid rgb(250,250,250); border-right: 2px solid rgb(250,250,250); box-shadow: none; background: repeating-conic-gradient(rgb(189,190,189) 0% 25%, rgb(255,255,255) 0% 50%) 50% / 2px 2px; }
.tray { flex: 0 1 auto; min-width: 0; height: 35px; padding: 1px 7px 1px 5px; display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; font-family: "MSSansSerif8pt", "MS Sans Serif", sans-serif; font-size: 14px; border: 0; border-top: 1px solid #808080; border-left: 1px solid #808080; box-shadow: inset -1px -1px 0 #fff; background: #c0c0c0; box-sizing: border-box; overflow: hidden; }
.tray-icon { width: 22px; height: 22px; object-fit: contain; image-rendering: pixelated; flex: 0 0 auto; }
.tray-icon-btn { display: flex; align-items: center; justify-content: center; min-width: 0; width: 22px; height: 22px; padding: 0; border: 1px solid transparent; background: transparent; box-shadow: none; cursor: default; }
.tray-icon-btn:hover { border-color: #808080 #fff #fff #808080; }
.tray-icon-btn:active { border-color: #fff #808080 #808080 #fff; }
.volume-popup { position: fixed; z-index: 1002; background: #c0c0c0; border: 2px solid; border-color: #fff #808080 #808080 #fff; box-shadow: 2px 2px 0 #000; padding: 6px 10px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; font: 11px "MSSansSerif8pt", "MS Sans Serif", sans-serif; width: 60px; }
.volume-label { font: bold 11px "MSSansSerif8pt", "MS Sans Serif", sans-serif; white-space: nowrap; }
.volume-track-wrap { height: 90px; display: flex; align-items: center; justify-content: center; }
.volume-slider { appearance: none; -webkit-appearance: none; width: 90px; height: 18px; transform: rotate(-90deg); background: transparent; cursor: pointer; margin: 0; }
.volume-slider::-webkit-slider-runnable-track { height: 4px; background: #808080; border: 1px solid #000; }
.volume-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 11px; height: 20px; background: #c0c0c0; border: 2px solid; border-color: #fff #808080 #808080 #fff; margin-top: -9px; }
.volume-slider::-moz-range-track { height: 4px; background: #808080; border: 1px solid #000; }
.volume-slider::-moz-range-thumb { width: 11px; height: 20px; background: #c0c0c0; border: 2px solid; border-color: #fff #808080 #808080 #fff; border-radius: 0; }
.volume-mute-row { display: flex; align-items: center; gap: 4px; font: 11px "MSSansSerif8pt", "MS Sans Serif", sans-serif; cursor: default; white-space: nowrap; }
.tray-clock { min-width: 48px; height: 20px; padding: 0 4px; border: 0; background: transparent; box-shadow: none; font-family: "MSSansSerif8pt", "MS Sans Serif", sans-serif; font-size: 14px; line-height: 17px; white-space: nowrap; }
.start-menu { position: fixed; left: 2px; bottom: 42px; width: 190px; display: flex; flex-direction: row; background: rgb(195, 195, 195); overflow: hidden; border-top: solid rgb(250, 250, 250) 2px; border-left: solid rgb(250, 250, 250) 2px; border-right: solid rgb(90, 90, 90) 1.5px; border-bottom: solid rgb(90, 90, 90) 1.5px; box-shadow: 1.5px 1.5px black; outline: rgb(222, 222, 222) 1px solid; z-index: 1001; }
.start-brand { width: 25px; background: rgb(123, 125, 123); display: flex; align-items: flex-end; justify-content: center; padding: 6px 0; writing-mode: vertical-rl; transform: rotate(180deg); color: rgb(212,212,212); font: 700 18px Arial, sans-serif; line-height: 1; }
.start-brand b { color: #fff; }
.start-items { flex: 1; padding: 4px 0; background: rgb(195, 195, 195); }
.start-entry { appearance: none; box-shadow: none; width: 100%; display: flex; flex-direction: row; align-items: center; gap: 10px; min-height: 40px; border: 0; background: rgb(195, 195, 195); text-align: left; padding: 5px 10px; font: 12px "MSSansSerif8pt", "MS Sans Serif", sans-serif; color: #000; }
.start-entry:hover, .start-entry:focus { background: rgb(0, 0, 118); color: #fff; outline: none; }
.start-divider { width: 100%; height: 1px; background: rgb(123, 125, 123); border-bottom: white solid 1px; margin: 2px 0; }
.menu-icon { width: 30px; height: 30px; image-rendering: pixelated; flex: 0 0 auto; }
.mobile-status, .mobile-launcher { display: none; }
.screensaver { position: fixed; inset: 0; z-index: 9000; background: #000; overflow: hidden; color: #fff; }
.screensaver canvas { width: 100%; height: 100%; display: block; }
.screensaver small { position: absolute; bottom: 20px; width: 100%; text-align: center; color: #777; font: 11px monospace; }
.shutdown-screen { position: fixed; inset: 0; z-index: 9001; display: grid; place-content: center; gap: 20px; background: #000; color: #f90; text-align: center; font: 22px Georgia, serif; }
.taisei-window { width: min(900px, calc(100vw - 180px)); height: min(660px, calc(100vh - 100px)); min-width: 480px; min-height: 320px; }
.taisei-window.touch-fullscreen { position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important; min-width: unset !important; min-height: unset !important; transform: none !important; border: none !important; z-index: 500 !important; }
.taisei-body { display: flex; flex-direction: column; flex: 1; min-height: 0; padding: 0 !important; background: #000; position: relative; }
.taisei-body iframe { flex: 1; width: 100%; border: none; display: block; }

/* Touch controls overlay — visible only on touch devices */
.taisei-touch-controls {
  display: none;
  position: absolute;
  inset: 0;
  pointer-events: none;
  align-items: flex-end;
  justify-content: space-between;
  padding: 20px 24px 40px;
  z-index: 10;
}
@media (pointer: coarse) { .taisei-touch-controls { display: flex; } }

.taisei-joy-zone {
  pointer-events: auto;
  width: 150px;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
}
.taisei-joy-base {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1.5px solid rgba(255,255,255,0.15);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.taisei-joy-knob {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(255,255,255,0.5), rgba(255,255,255,0.15));
  border: 1.5px solid rgba(255,255,255,0.3);
  position: absolute;
  pointer-events: none;
  will-change: transform;
}

.taisei-btns {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  touch-action: none;
}
.taisei-btns-row { display: flex; gap: 10px; }
.taisei-btn {
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.4);
  background: rgba(0,0,0,0.4);
  color: #fff;
  font-family: inherit;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.taisei-btn-shot { width: 72px; height: 72px; font-size: 12px; border-color: rgba(255,100,100,0.7); background: rgba(180,0,0,0.35); }
.taisei-btn-bomb { width: 54px; height: 54px; font-size: 10px; border-color: rgba(100,200,255,0.7); background: rgba(0,80,180,0.35); }
.taisei-btn-focus { width: 54px; height: 54px; font-size: 10px; border-color: rgba(200,255,100,0.7); background: rgba(60,140,0,0.35); }
.taisei-btn.pressed { filter: brightness(1.8); }
.doom-window { width: min(860px, calc(100vw - 180px)); height: min(640px, calc(100vh - 100px)); min-width: 480px; min-height: 320px; }
.doom-body { display: flex; flex-direction: column; flex: 1; min-height: 0; padding: 0 !important; background: #000; }
.doom-body iframe { flex: 1; width: 100%; border: none; display: block; }
.window-drag-outline { position: absolute; border: 1px dotted #000000; box-sizing: border-box; pointer-events: none; z-index: 9999; }
.window-resize-handle { position: absolute; right: 0; bottom: 0; width: 16px; height: 16px; cursor: se-resize; z-index: 1; background: linear-gradient(135deg, transparent 50%, #808080 50%, transparent 62%, #808080 62%, transparent 74%, #808080 74%); }
.game-content { background: #111; color: #fff; font: 12px monospace; text-align: center; }
.game-stats { margin-bottom: 8px; color: #f33; }
.game-board { display: grid; grid-template-columns: repeat(10,24px); justify-content: center; border: 2px inset #fff; background: #222; }
.game-board i { width:24px; height:24px; display:grid; place-items:center; border:1px solid #292929; font-style:normal; }
.game-board .wall { background:#777; border:2px outset #aaa; }
.game-board .pixel { width:12px; height:12px; margin:6px; background:#f00; box-shadow:0 0 7px #f00; }
.game-board .player { background:#fff; color:#000; font-weight:bold; }
.touch-dpad { display:none; }
/* Webamp / Winamp overrides */
#webamp-container { position: absolute; top: 0; left: 0; pointer-events: none; }
#webamp, #webamp * { pointer-events: auto; box-sizing: content-box; }
#webamp .window { box-shadow: none !important; outline: none !important; overflow: hidden; }
#webamp #playlist-resize-target, #webamp #gen-resize-target { display: none !important; }

/* ── MOBILE ────────────────────────────────────────────────── */
html.is-mobile body { background: #000 !important; overflow: hidden; }
html.is-mobile body.opening-wait::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: url('/icons/hourglass.png') calc(50% + 10px) calc(50% + 20px) / 64px 64px no-repeat;
  image-rendering: pixelated;
  pointer-events: none;
}
html.is-mobile { overflow: hidden; }

html.is-mobile .taskbar { display: none !important; }
html.is-mobile .start-menu { display: none !important; }
html.is-mobile .screensaver { display: none !important; }
html.is-mobile .window-resize-handle { display: none !important; }
html.is-mobile .window-drag-outline { display: none !important; }
html.is-mobile .desktop-selection-box { display: none !important; }

html.is-mobile .desktop {
  bottom: 0 !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start !important;
}
html.is-mobile .desktop::after {
  content: "" !important;
  position: static !important;
  inset: auto !important;
  display: block !important;
  flex: 1 !important;
  align-self: stretch !important;
  background: url('/images/bitmag_logo_pink.svg') right 12px bottom 56px / 70% auto no-repeat !important;
  opacity: 1 !important;
  pointer-events: none !important;
  z-index: 0 !important;
}

html.is-mobile .desktop-icons {
  position: static !important;
  width: auto !important;
  height: auto !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  margin: 0 !important;
  padding: 48px 8px 16px 12px !important;
  flex-shrink: 0 !important;
}

html.is-mobile .desktop-icon-item { display: none !important; }
html.is-mobile .desktop-icon-item[data-mobile] {
  display: flex !important;
  position: static !important;
  width: auto !important;
  height: auto !important;
  align-items: center !important;
  justify-content: flex-start !important;
}

html.is-mobile .desktop-icon {
  width: 80px !important;
  height: auto !important;
  padding: 6px 4px 8px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 5px !important;
  text-align: center !important;
}
html.is-mobile .desktop-icon-image { width: 40px !important; height: 40px !important; flex-shrink: 0 !important; }
html.is-mobile .desktop-icon-label { font-size: 12px !important; line-height: 1.2 !important; white-space: normal !important; }

html.is-mobile .window.os-window {
  position: absolute !important;
  inset: 5px 3px;
  width: calc(100% - 6px);
  height: calc(100% - 10px);
  min-width: 0 !important;
  min-height: 0 !important;
  resize: none !important;
  box-shadow: none !important;
  padding: 3px !important;
}
html.is-mobile .window.os-window.no-resize {
  inset: auto !important;
  width: auto !important;
  height: auto !important;
}
html.is-mobile #window-about {
  top: 60px !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translateX(-50%) !important;
  width: 80vw !important;
  max-width: 320px !important;
  height: auto !important;
  min-height: 0 !important;
}
html.is-mobile #window-about .about-logo {
  margin-bottom: -18px !important;
}

html.is-mobile .reader-window.os-window {
  inset: 10px 5px;
  width: calc(100% - 10px);
  height: calc(100% - 20px);
}

html.is-mobile .window.os-window .title-bar {
  zoom: 1 !important;
  min-height: 38px !important;
  padding: 0 4px 0 6px !important;
  display: flex !important;
  align-items: center !important;
  touch-action: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}
html.is-mobile .window.os-window .title-bar .title-bar-text span { font-size: 13px !important; }
html.is-mobile .window-title-icon { width: 16px !important; height: 16px !important; }

html.is-mobile .title-bar-controls { gap: 4px !important; padding-right: 4px !important; }
html.is-mobile .title-bar-controls button {
  width: 30px !important; height: 28px !important;
  min-width: 0 !important; min-height: 0 !important;
}
html.is-mobile .title-bar-controls button[data-action="maximize"]::before { width: 16px !important; height: 13px !important; top: 50% !important; left: 50% !important; transform: translate(-50%, -50%) !important; border-width: 2.5px !important; border-top-width: 4px !important; }
html.is-mobile .title-bar-controls button[data-action="close"]::before { width: 17px !important; height: 2.5px !important; top: 50% !important; left: 50% !important; transform: translate(-50%, -50%) rotate(45deg) !important; }
html.is-mobile .title-bar-controls button[data-action="close"]::after  { width: 17px !important; height: 2.5px !important; top: 50% !important; left: 50% !important; transform: translate(-50%, -50%) rotate(-45deg) !important; }

html.is-mobile .explorer-menu-bar { display: none !important; }
html.is-mobile .explorer-body { grid-template-columns: 1fr !important; }
html.is-mobile .explorer-sidebar, html.is-mobile .explorer-vsplit { display: none !important; }
html.is-mobile .toolbar-sep { display: none; }
html.is-mobile .explorer-icon-toolbar { zoom: 1.3; padding: 2px 0 2px 0 !important; align-items: center !important; }
html.is-mobile .explorer-icon-toolbar .toolbar-btn[aria-label="Propiedades"],
html.is-mobile .explorer-icon-toolbar .toolbar-btn[aria-label="Vistas"] { display: none !important; }
html.is-mobile .ie3-commandbar-main { padding-left: 2px !important; }
html.is-mobile .title-bar-controls button[data-action="minimize"] { display: none !important; }
html.is-mobile .explorer-command-bar { zoom: 1.1; }
html.is-mobile .ie3-linksbar, html.is-mobile .ie3-addressbar, html.is-mobile .ie3-statusbar { display: none !important; }

html.is-mobile .file-table th:nth-child(2), html.is-mobile .file-table th:nth-child(3), html.is-mobile .file-table th:nth-child(4),
html.is-mobile .file-table td:nth-child(2), html.is-mobile .file-table td:nth-child(3), html.is-mobile .file-table td:nth-child(4) { display: none !important; }
html.is-mobile .file-table { width: 100%; table-layout: fixed; }
html.is-mobile .file-table th:nth-child(1) { width: 100%; }
html.is-mobile .file-table td:nth-child(1) { width: 100%; overflow: hidden; }
html.is-mobile .file-table td { height: 23px !important; padding: 1px 5px !important; font-size: 11px !important; vertical-align: middle !important; }
html.is-mobile .name-cell { gap: 6px; width: 100%; overflow: hidden; align-items: center !important; }
html.is-mobile .file-type-icon { width: 18px !important; height: 18px !important; flex-shrink: 0 !important; }
html.is-mobile .file-main { min-width: 0; overflow: hidden; flex: 1; }
html.is-mobile .file-main strong { white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; display: block !important; line-height: 1.35 !important; }
html.is-mobile .file-main small { display: none !important; }

/* ── CRT effect ─────────────────────────────────────────────── */
.crt-overlay {
  position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
  pointer-events: none; z-index: 200000; overflow: hidden;
}
.crt-overlay::before {
  content: ' '; display: block; position: absolute; inset: 0;
  background:
    linear-gradient(rgba(18,16,16,0) 50%, rgba(0,0,0,0.13) 50%),
    linear-gradient(90deg, rgba(255,0,0,0.03), rgba(0,255,0,0.01), rgba(0,0,255,0.03));
  background-size: 100% 4px, 6px 100%;
  animation: crt-scanline 10s linear infinite;
}
@keyframes crt-scanline { 0% { background-position: 0 0; } 100% { background-position: 0 100%; } }
.crt-overlay::after {
  content: ' '; display: block; position: absolute; inset: 0;
  background: radial-gradient(circle, rgba(18,16,16,0) 50%, rgba(18,16,16,0.03) 75%, rgba(0,0,0,0.18) 100%);
}
.crt-flicker {
  position: fixed; inset: 0; background: rgba(18,16,16,0.03);
  opacity: 0; z-index: 199999; pointer-events: none;
  animation: crt-flicker 0.1s infinite;
}
@keyframes crt-flicker { 0%,100% { opacity: 0.01; } 50% { opacity: 0.015; } }
.crt-screen {
  position: fixed; inset: 0; z-index: 199998; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 250 250' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.03; mix-blend-mode: overlay;
}
body.crt-enabled { filter: contrast(1.05) brightness(1.05); }

/* CRT hidden when disabled */
body:not(.crt-enabled) .crt-overlay,
body:not(.crt-enabled) .crt-flicker,
body:not(.crt-enabled) .crt-screen { display: none; }
