/* App/win98/win98.css — the Win98-style look. Colours come from CSS variables
   so Display Properties → Appearance can swap the whole scheme at runtime. */

:root {
  --face: #c0c0c0; --hilight: #ffffff; --light: #dfdfdf; --shadow: #808080; --dkshadow: #000000;
  --desktop: #008080; --text: #000000;
  --title-a1: #000080; --title-a2: #1084d0; --title-i1: #808080; --title-i2: #b5b5b5;
  --title-text: #ffffff; --title-itext: #c0c0c0;
  --sel-bg: #000080; --sel-text: #ffffff; --window-bg: #ffffff; --window-text: #000000;
  --tip: #ffffe1;
  --font: "Microsoft Sans Serif", "MS Sans Serif", Tahoma, Geneva, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #000; }
body {
  font-family: var(--font); font-size: var(--font-size, 11px); color: var(--text);
  -webkit-font-smoothing: none; -moz-osx-font-smoothing: grayscale;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent; cursor: var(--cur-default, default);
}
button, input, select, textarea { font: inherit; color: inherit; }
textarea, input[type=text], .selectable { -webkit-user-select: text; user-select: text; }

/* The scaled screen. JS sets width/height/transform from the chosen scale. */
#screen { position: fixed; left: 0; top: 0; transform-origin: 0 0; overflow: hidden; background: var(--desktop); }
#desktop { position: absolute; inset: 0 0 28px 0; overflow: hidden; background-color: var(--desktop); background-position: center; touch-action: none; }
#desktop.wp-tile { background-repeat: repeat; background-size: auto; }
#desktop.wp-center { background-repeat: no-repeat; background-size: auto; }
#desktop.wp-stretch { background-repeat: no-repeat; background-size: 100% 100%; }

/* ── bevels ── */
.raised { background: var(--face); box-shadow: inset -1px -1px var(--dkshadow), inset 1px 1px var(--light), inset -2px -2px var(--shadow), inset 2px 2px var(--hilight); }
.sunken { box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hilight), inset 2px 2px var(--dkshadow), inset -2px -2px var(--light); }
.sunken-thin { box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hilight); }
.field { background: var(--window-bg); color: var(--window-text); box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hilight), inset 2px 2px var(--dkshadow), inset -2px -2px var(--light); }
.etched { border: 1px solid var(--shadow); box-shadow: 1px 1px var(--hilight), inset 1px 1px var(--hilight); }

.btn {
  min-width: 75px; height: 23px; padding: 0 8px; border: 0; background: var(--face); color: var(--text);
  box-shadow: inset -1px -1px var(--dkshadow), inset 1px 1px var(--hilight), inset -2px -2px var(--shadow), inset 2px 2px var(--light);
  outline: none; touch-action: manipulation;
}
.btn:active:not(:disabled), .btn.pressed { box-shadow: inset 1px 1px var(--dkshadow), inset -1px -1px var(--hilight), inset 2px 2px var(--shadow), inset -2px -2px var(--light); padding-top: 2px; padding-left: 10px; }
.btn.default { box-shadow: inset -1px -1px var(--dkshadow), inset 1px 1px var(--dkshadow), inset -2px -2px var(--dkshadow), inset 2px 2px var(--hilight), inset -3px -3px var(--shadow), inset 3px 3px var(--light); }
.btn:disabled { color: var(--shadow); text-shadow: 1px 1px var(--hilight); }
/* Windows 98 always drew the focus rectangle (hiding it until a key is pressed came with Windows 2000). */
.btn:focus { outline: 1px dotted var(--text); outline-offset: -4px; }
.btn.small { min-width: 0; height: 21px; padding: 0 5px; }
.toolbtn { min-width: 0; height: auto; padding: 2px; background: transparent; box-shadow: none; display: inline-flex; align-items: center; gap: 3px; }
.toolbtn:hover:not(:disabled) { box-shadow: inset -1px -1px var(--shadow), inset 1px 1px var(--hilight); }
.toolbtn:active:not(:disabled), .toolbtn.on { box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hilight); padding: 3px 1px 1px 3px; }

input[type=text], select { height: 21px; padding: 2px 3px; border: 0; background: var(--window-bg); color: var(--window-text); box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hilight), inset 2px 2px var(--dkshadow), inset -2px -2px var(--light); outline: none; border-radius: 0; }
select { -webkit-appearance: none; appearance: none; padding-right: 18px; background-image: linear-gradient(45deg, transparent 50%, #000 50%), linear-gradient(135deg, #000 50%, transparent 50%); background-position: calc(100% - 9px) 9px, calc(100% - 5px) 9px; background-size: 4px 4px; background-repeat: no-repeat; }
label { display: inline-flex; align-items: center; gap: 4px; }
input[type=checkbox], input[type=radio] { margin: 0; accent-color: var(--sel-bg); }
fieldset { border: 1px solid var(--shadow); box-shadow: 1px 1px var(--hilight), inset 1px 1px var(--hilight); padding: 8px 10px 10px; margin: 0 0 8px; }
legend { padding: 0 3px; }
hr.sep { border: 0; border-top: 1px solid var(--shadow); border-bottom: 1px solid var(--hilight); margin: 6px 0; }

/* scrollbars (WebKit) */
.win ::-webkit-scrollbar, .dd-list::-webkit-scrollbar, .field::-webkit-scrollbar { width: 16px; height: 16px; }
.win ::-webkit-scrollbar-track, .dd-list::-webkit-scrollbar-track, .field::-webkit-scrollbar-track { background: repeating-conic-gradient(var(--face) 0 25%, var(--hilight) 0 50%) 0 0 / 2px 2px; }
.win ::-webkit-scrollbar-thumb, .dd-list::-webkit-scrollbar-thumb, .field::-webkit-scrollbar-thumb { background: var(--face); box-shadow: inset -1px -1px var(--dkshadow), inset 1px 1px var(--light), inset -2px -2px var(--shadow), inset 2px 2px var(--hilight); }
.win ::-webkit-scrollbar-corner , .dd-list::-webkit-scrollbar-corner { background: var(--face); }
/* One button at each end. Selected by :start:decrement / :end:increment, not :single-button:
   that matches only where the host's own scroll bars have buttons (not on a Mac, so no arrows were drawn). */
.win ::-webkit-scrollbar-button, .dd-list::-webkit-scrollbar-button { display: none; }
.win ::-webkit-scrollbar-button:start:decrement, .win ::-webkit-scrollbar-button:end:increment, .dd-list::-webkit-scrollbar-button:start:decrement, .dd-list::-webkit-scrollbar-button:end:increment { background: var(--face); display: block; height: var(--scroll-w, 16px); width: var(--scroll-w, 16px); box-shadow: inset -1px -1px var(--dkshadow), inset 1px 1px var(--light), inset -2px -2px var(--shadow), inset 2px 2px var(--hilight); background-repeat: no-repeat; background-position: center; }
.win ::-webkit-scrollbar-button:vertical:start:decrement , .dd-list::-webkit-scrollbar-button:vertical:start:decrement { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='4'%3E%3Cpath d='M3 0h1v1h1v1h1v1h1v1H0V3h1V2h1V1h1z'/%3E%3C/svg%3E"); }
.win ::-webkit-scrollbar-button:vertical:end:increment , .dd-list::-webkit-scrollbar-button:vertical:end:increment { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='4'%3E%3Cpath d='M0 0h7v1H6v1H5v1H4v1H3V3H2V2H1V1H0z'/%3E%3C/svg%3E"); }
.win ::-webkit-scrollbar-button:horizontal:start:decrement , .dd-list::-webkit-scrollbar-button:horizontal:start:decrement { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='7'%3E%3Cpath d='M3 0h1v7H3V6H2V5H1V4H0V3h1V2h1V1h1z'/%3E%3C/svg%3E"); }
.win ::-webkit-scrollbar-button:horizontal:end:increment , .dd-list::-webkit-scrollbar-button:horizontal:end:increment { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='7'%3E%3Cpath d='M0 0h1v1h1v1h1v1h1v1H3v1H2v1H1v1H0z'/%3E%3C/svg%3E"); }

/* ── desktop icons ── */
.dicon { position: absolute; width: 74px; display: flex; flex-direction: column; align-items: center; padding: 2px 0; touch-action: none; }
.dicon .ico { width: 32px; height: 32px; position: relative; }
.dicon .ico svg, .dicon .ico img { width: 32px; height: 32px; display: block; image-rendering: pixelated; }
.dicon .lbl { margin-top: 4px; padding: 1px 2px; color: #fff; text-align: center; line-height: 13px; max-width: 74px; word-wrap: break-word; overflow-wrap: anywhere; }
.dicon.sel .lbl { background: var(--sel-bg); color: var(--sel-text); outline: 1px dotted #ff0; outline-offset: -1px; }
.dicon.sel .ico::after { pointer-events: none; content: ""; position: absolute; inset: 0; background: var(--sel-bg); opacity: .5; mix-blend-mode: multiply; -webkit-mask: var(--mask) center / contain no-repeat; }
.dicon.droptarget .lbl, .item.droptarget .lbl { background: var(--sel-bg); color: var(--sel-text); }
.dicon .lbl input, .item .lbl input { width: 70px; height: auto; padding: 0 1px; text-align: center; box-shadow: none; border: 1px solid #000; }
.ghost { position: fixed; pointer-events: none; opacity: .6; z-index: 100000; }
.marquee { position: absolute; border: 1px dotted #fff; mix-blend-mode: difference; pointer-events: none; z-index: 5; }

/* ── windows ── */
.win { position: absolute; display: flex; flex-direction: column; padding: 3px; min-width: 120px; min-height: 30px; background: var(--face); box-shadow: inset -1px -1px var(--dkshadow), inset 1px 1px var(--light), inset -2px -2px var(--shadow), inset 2px 2px var(--hilight); }
.win.max { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; }
.win.min { display: none; }
.titlebar { flex: none; height: 18px; display: flex; align-items: center; gap: 3px; padding: 0 2px 0 3px; background: linear-gradient(90deg, var(--title-i1), var(--title-i2)); color: var(--title-itext); font-weight: bold; touch-action: none; }
.win.active > .titlebar { background: linear-gradient(90deg, var(--title-a1), var(--title-a2)); color: var(--title-text); }
.titlebar .tico { width: 16px; height: 16px; flex: none; }
.titlebar .tico svg, .titlebar .tico img { width: 16px; height: 16px; display: block; }
.titlebar .ttl { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.titlebar .tbtns { display: flex; }
.tbtn { width: 16px; height: 14px; padding: 0; min-width: 0; border: 0; background: var(--face) center no-repeat; box-shadow: inset -1px -1px var(--dkshadow), inset 1px 1px var(--hilight), inset -2px -2px var(--shadow), inset 2px 2px var(--light); }
.tbtn:active { box-shadow: inset 1px 1px var(--dkshadow), inset -1px -1px var(--hilight), inset 2px 2px var(--shadow), inset -2px -2px var(--light); background-position: 1px 1px; background-position: calc(50% + 1px) calc(50% + 1px); }
.tbtn.close { margin-left: 2px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='7'%3E%3Cpath d='M0 0h2v1h1v1h2V1h1V0h2v1H7v1H6v1H5v1h1v1h1v1h1v1H6V6H5V5H3v1H2v1H0V6h1V5h1V4h1V3H2V2H1V1H0z'/%3E%3C/svg%3E"); }
.tbtn.minb { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='2'%3E%3Cpath d='M0 0h6v2H0z'/%3E%3C/svg%3E"); background-position: 4px 8px; }
.tbtn.minb:active { background-position: 5px 9px; }
.tbtn.maxb { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='9'%3E%3Cpath fill-rule='evenodd' d='M0 0h9v9H0zM1 2v6h7V2z'/%3E%3C/svg%3E"); }
.win.max .tbtn.maxb { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='9'%3E%3Cpath fill-rule='evenodd' d='M2 0h6v6H6v3H0V3h2zm1 1v1h4v3h0V1zM1 4v4h4V4z'/%3E%3C/svg%3E"); }
.tbtn.help { font-weight: bold; font-size: 11px; line-height: 12px; }
.tbtn:disabled { opacity: .5; }
.win .body { flex: 1; display: flex; flex-direction: column; min-height: 0; position: relative; }
/* A real program's window (js/native-frame.js): the program itself covers the client
   area; while it's hidden, the snapshot taken as it was hidden stands in for it. */
.win.nativewin > .body { background: #000; overflow: hidden; }
.win.nativewin .native-shot { position: absolute; inset: 0; background: no-repeat 0 0 / 100% 100%; }
.win .blocker { position: absolute; inset: 0; z-index: 50; }
.rz { position: absolute; z-index: 2; touch-action: none; }
.rz.n { top: -2px; left: 6px; right: 6px; height: 6px; cursor: var(--cur-ns-resize, ns-resize); }
.rz.s { bottom: -2px; left: 6px; right: 6px; height: 6px; cursor: var(--cur-ns-resize, ns-resize); }
.rz.e { right: -2px; top: 6px; bottom: 6px; width: 6px; cursor: var(--cur-ew-resize, ew-resize); }
.rz.w { left: -2px; top: 6px; bottom: 6px; width: 6px; cursor: var(--cur-ew-resize, ew-resize); }
.rz.ne { right: -2px; top: -2px; width: 10px; height: 10px; cursor: var(--cur-nesw-resize, nesw-resize); }
.rz.nw { left: -2px; top: -2px; width: 10px; height: 10px; cursor: var(--cur-nwse-resize, nwse-resize); }
.rz.se { right: -2px; bottom: -2px; width: 14px; height: 14px; cursor: var(--cur-nwse-resize, nwse-resize); }
.rz.sw { left: -2px; bottom: -2px; width: 10px; height: 10px; cursor: var(--cur-nesw-resize, nesw-resize); }
@media (pointer: coarse) {
  .rz.n, .rz.s { height: 14px; } .rz.n { top: -8px; } .rz.s { bottom: -8px; }
  .rz.e, .rz.w { width: 14px; } .rz.e { right: -8px; } .rz.w { left: -8px; }
  .rz.ne, .rz.nw, .rz.se, .rz.sw { width: 22px; height: 22px; }
  .rz.se { right: -10px; bottom: -10px; }
}
.win.max .rz, .win.fixed .rz { display: none; }
.grip { position: absolute; right: 2px; bottom: 2px; width: 12px; height: 12px; pointer-events: none; background: linear-gradient(135deg, transparent 0 45%, var(--hilight) 45% 52%, var(--shadow) 52% 62%, transparent 62% 70%, var(--hilight) 70% 77%, var(--shadow) 77% 87%, transparent 87%); }
.statusbar { flex: none; display: flex; gap: 2px; margin-top: 2px; }
.statusbar > div { flex: 1; height: 18px; padding: 2px 4px; box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hilight); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.statusbar > div.fixed { flex: none; width: 140px; }
.statusbar > div:last-child { padding-right: 16px; }

/* menubar + menus */
.menubar { flex: none; display: flex; height: 19px; padding: 0 0 1px; }
.menubar .mi { padding: 2px 6px; }
.menubar .mi.open { box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hilight); }
.menubar .mi:hover:not(.open) { box-shadow: inset -1px -1px var(--shadow), inset 1px 1px var(--hilight); }
.menu { position: absolute; z-index: 90000; min-width: 140px; padding: 3px; background: var(--face); box-shadow: inset -1px -1px var(--dkshadow), inset 1px 1px var(--light), inset -2px -2px var(--shadow), inset 2px 2px var(--hilight); }
.menu .row { display: flex; align-items: center; height: 18px; padding: 0 16px 0 2px; white-space: nowrap; position: relative; }
.menu.withicons .row { height: 22px; }
.menu .row .mico { width: 18px; flex: none; display: flex; justify-content: center; }
.menu .row .mico svg { width: 16px; height: 16px; }
.menu .row .lab { flex: 1; padding-left: 2px; }
.menu .row .key { padding-left: 24px; }
.menu .row.sub::after { content: ""; position: absolute; right: 6px; top: 50%; margin-top: -4px; border: 4px solid transparent; border-left-color: currentColor; border-right: 0; }
.menu .row.hi { background: var(--sel-bg); color: var(--sel-text); }
.menu .row.dis { color: var(--shadow); text-shadow: 1px 1px var(--hilight); }
.menu .row.dis.hi { text-shadow: none; }
.menu .row.def .lab { font-weight: bold; }
.menu .row .chk { position: absolute; left: 6px; }
.menu .sepr { height: 2px; margin: 3px 1px; border-top: 1px solid var(--shadow); border-bottom: 1px solid var(--hilight); }
@media (pointer: coarse) { .menu .row { height: 26px; } .menu.withicons .row { height: 28px; } }

/* ── taskbar & start menu ── */
/* The bar's ends stay clear of the screen's corners: most browser windows round them, and the Start button's corner was cut off (Morr, 2026-12-01). */
#taskbar { position: absolute; left: 0; right: 0; bottom: 0; height: 28px; display: flex; align-items: center; gap: 3px; padding: 2px 10px 0; background: var(--face); box-shadow: inset 0 1px var(--light), inset 0 2px var(--hilight); z-index: 80000; touch-action: none; }
#startbtn { flex: none; min-width: 0; height: 22px; padding: 0 6px 0 3px; display: flex; align-items: center; gap: 3px; font-weight: bold; }
#startbtn svg { width: 16px; height: 16px; }
#startbtn.pressed { padding: 1px 5px 0 4px; }
.tbsep { width: 2px; height: 20px; flex: none; border-left: 1px solid var(--shadow); border-right: 1px solid var(--hilight); margin: 0 1px; }
.tbgrip { width: 3px; height: 18px; flex: none; box-shadow: inset 1px 1px var(--hilight), inset -1px -1px var(--shadow); }
#tasks { flex: 1; display: flex; gap: 3px; min-width: 0; height: 22px; }
.task { flex: 0 1 160px; min-width: 24px; justify-content: flex-start; display: flex; align-items: center; gap: 3px; overflow: hidden; padding: 0 4px; }
.task span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.task svg { width: 16px; height: 16px; flex: none; }
.task.pressed { font-weight: bold; background: repeating-conic-gradient(var(--face) 0 25%, var(--hilight) 0 50%) 0 0 / 2px 2px; padding-left: 5px; }
#tray { flex: none; height: 22px; display: flex; align-items: center; gap: 5px; padding: 0 8px 0 6px; box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hilight); }
#tray svg { width: 16px; height: 16px; display: block; }
#clock { min-width: 50px; text-align: center; }
.menu.startmenu { padding-left: 25px; min-width: 190px; }
.menu.startmenu .banner { position: absolute; left: 3px; top: 3px; bottom: 3px; width: 21px; background: linear-gradient(0deg, var(--title-a1), var(--title-a2)); }
.menu.startmenu .banner span { position: absolute; left: 0; bottom: 6px; width: 21px; writing-mode: vertical-rl; transform: rotate(180deg); color: #fff; font-size: 18px; line-height: 21px; font-family: Arial, sans-serif; white-space: nowrap; }
/* the banner picture (img/start-banner.png, 21×233): a fixed picture, not tied to the colour scheme,
   anchored to the bottom; a taller menu shows its top colour above it */
.menu.startmenu .banner.genuine, html.lowcolor .menu.startmenu .banner.genuine { background: #000080 no-repeat left bottom; image-rendering: pixelated; }
.menu.startmenu .banner b { font-weight: 900; } .menu.startmenu .banner i { font-style: normal; color: var(--light); }
.menu.startmenu > .row { height: 32px; padding-right: 20px; }
.menu.startmenu > .row .mico { width: 36px; }
.menu.startmenu > .row .mico svg { width: 24px; height: 24px; }
@media (pointer: coarse) { .menu.startmenu > .row { height: 40px; } }
.tip { position: absolute; z-index: 95000; background: var(--tip); border: 1px solid #000; padding: 2px 4px; pointer-events: none; white-space: nowrap; }

/* ── generic list / icon views ── */
.iconview { flex: 1; overflow: auto; background: var(--window-bg); color: var(--window-text); display: flex; flex-wrap: wrap; align-content: flex-start; padding: 6px; gap: 6px 2px; touch-action: pan-y; }
.iconview .item { width: 76px; display: flex; flex-direction: column; align-items: center; padding: 2px; }
.iconview .item .ico svg, .iconview .item .ico img { width: 32px; height: 32px; display: block; }
.iconview .item .lbl { margin-top: 3px; padding: 0 2px; text-align: center; line-height: 13px; max-width: 76px; overflow-wrap: anywhere; }
.iconview .item.sel .lbl { background: var(--sel-bg); color: var(--sel-text); }
.iconview.details { flex-direction: column; flex-wrap: nowrap; padding: 0; gap: 0; }
.iconview.details .hdr, .iconview.details .item { display: grid; grid-template-columns: minmax(140px, 2fr) 80px minmax(100px, 1fr) 120px; width: auto; flex-direction: row; align-items: center; padding: 0; }
.iconview.details .hdr > div { padding: 1px 4px; box-shadow: inset -1px -1px var(--dkshadow), inset 1px 1px var(--hilight), inset -2px -2px var(--shadow); background: var(--face); color: var(--text); white-space: nowrap; overflow: hidden; }
.iconview.details .item { height: 18px; }
.iconview.details .item > * { padding: 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iconview.details .item .nm { display: flex; align-items: center; gap: 3px; }
.iconview.details .item .nm svg { width: 16px; height: 16px; flex: none; }
.iconview.details .item .nm .lbl { margin: 0; text-align: left; }
.iconview .empty { color: var(--shadow); padding: 8px; }
.addrbar { flex: none; display: flex; align-items: center; gap: 4px; padding: 2px 2px 3px; }
.addrbar input { flex: 1; }
.toolbar { flex: none; display: flex; align-items: center; gap: 1px; padding: 2px; border-top: 1px solid var(--hilight); border-bottom: 1px solid var(--shadow); box-shadow: 0 1px var(--hilight); margin-bottom: 2px; }
.toolbar .toolbtn { flex-direction: column; min-width: 48px; font-size: 11px; }
.toolbar .toolbtn svg { width: 20px; height: 20px; }
.explorer-split { flex: 1; display: flex; min-height: 0; gap: 0; }
.explorer-side { width: 170px; flex: none; background: linear-gradient(var(--window-bg), var(--window-bg)); color: var(--window-text); padding: 12px 10px; overflow: hidden; border-right: 1px solid var(--face); }
/* The folder's name in large letters: a real outline face, smoothed. The desktop's own small bitmap face,
   stretched to this size, came out as blocks. */
.explorer-side .big { font: bold 18px/1.15 Verdana, Arial, sans-serif; margin: 6px 0 4px; overflow-wrap: anywhere; }
html.bitmap-fonts #screen .explorer-side .big { -webkit-font-smoothing: antialiased; font-smooth: auto; text-shadow: none; letter-spacing: 0; font-weight: bold; }
.explorer-side .bar { height: 3px; background: linear-gradient(90deg, var(--title-a1), var(--title-a2), transparent); margin-bottom: 10px; }
@media (max-width: 700px) { .explorer-side { display: none; } }

/* dialogs */
.dlg { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.dlg .msg { display: flex; gap: 14px; align-items: flex-start; padding: 6px 6px 8px; }
.dlg .msg svg { width: 32px; height: 32px; flex: none; }
.dlg .msg .txt { padding-top: 8px; white-space: pre-wrap; max-width: 380px; line-height: 14px; }
.dlg .btns { display: flex; justify-content: center; gap: 6px; }
.dlg .btns.right { justify-content: flex-end; }
.tabs { display: flex; padding-left: 2px; position: relative; z-index: 1; }
.tabs .tab { padding: 3px 8px 2px; margin-right: -1px; background: var(--face); box-shadow: inset 1px 1px var(--hilight), inset -1px 0 var(--dkshadow), inset -2px 0 var(--shadow); border-radius: 3px 3px 0 0; margin-top: 2px; }
.tabs .tab.on { margin-top: 0; padding-bottom: 4px; margin-bottom: -2px; position: relative; z-index: 2; }
.tabpane { padding: 12px; box-shadow: inset -1px -1px var(--dkshadow), inset 1px 1px var(--hilight), inset -2px -2px var(--shadow); flex: 1; min-height: 0; overflow: auto; }
.listbox { background: var(--window-bg); color: var(--window-text); overflow: auto; box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hilight), inset 2px 2px var(--dkshadow), inset -2px -2px var(--light); padding: 2px; }
.listbox .opt { padding: 1px 3px; display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.listbox .opt svg { width: 16px; height: 16px; flex: none; }
.listbox .opt.sel { background: var(--sel-bg); color: var(--sel-text); }
.grid2 { display: grid; grid-template-columns: auto 1fr; gap: 6px 8px; align-items: center; }

/* monitor preview in Display Properties */
.monitor { width: 184px; margin: 0 auto 10px; position: relative; }
.monitor .bezel { width: 184px; height: 140px; background: var(--face); padding: 12px 14px 22px; box-shadow: inset -1px -1px var(--dkshadow), inset 1px 1px var(--light), inset -2px -2px var(--shadow), inset 2px 2px var(--hilight); border-radius: 2px; }
.monitor .scr { width: 100%; height: 100%; background-color: var(--desktop); background-position: center; box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hilight); overflow: hidden; position: relative; }
.monitor .stand { width: 90px; height: 14px; margin: 0 auto; background: var(--face); box-shadow: inset -1px -1px var(--dkshadow), inset 1px 1px var(--hilight), inset -2px -2px var(--shadow); }

/* boot / shutdown screens */
#overlay { position: fixed; inset: 0; z-index: 200000; background: #000; color: #c0c0c0; display: none; }
#overlay.on { display: block; }
.bios { font-family: "Courier New", Courier, monospace; font-size: 15px; line-height: 19px; padding: 20px 26px; white-space: pre-wrap; -webkit-font-smoothing: auto; }
.poweron { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; color: #c0c0c0; font-family: "Courier New", monospace; font-size: 15px; cursor: var(--cur-pointer, pointer); }
.poweron .pbtn { width: 64px; height: 64px; padding: 0; border-radius: 50%; border: 3px solid #555; background: #1a1a1a; color: #8a8a8a; display: flex; align-items: center; justify-content: center; cursor: var(--cur-pointer, pointer); box-shadow: 0 2px 0 #333, inset 0 1px 2px #444; outline: none; }
.poweron .pbtn:hover { color: #b0b0b0; border-color: #666; }
.poweron .pbtn:active { transform: translateY(1px); box-shadow: inset 0 1px 3px #000; }
.poweron .pbtn:focus-visible { border-color: #888; }
.poweron-hint { color: #666; font-size: 13px; }
.splash { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #4280e0; overflow: hidden; }
.splash-caption { color: #0a2458; font: bold 16px "Courier New", monospace; text-shadow: 1px 1px #fff; -webkit-font-smoothing: none; }
.splash .cloud { position: absolute; background: #fff; border-radius: 50%; filter: blur(8px); opacity: .85; }
.splash .logo { position: relative; z-index: 1; display: flex; align-items: center; gap: 18px; }
.splash .logo .word { font-family: "Franklin Gothic Medium", "Arial Black", Arial, sans-serif; font-size: 64px; color: #fff; text-shadow: 2px 2px 6px rgba(0,0,40,.35); letter-spacing: -1px; }
.splash .logo .word sup { font-size: 30px; vertical-align: super; color: #ffe35a; }
.splash .bar { position: absolute; bottom: 0; left: 0; right: 0; height: 10px; background: linear-gradient(90deg, #0040a0, #4fc3ff, #0040a0); background-size: 50% 100%; animation: slide 1.4s linear infinite; }
@keyframes slide { from { background-position: 0 0; } to { background-position: 100% 0; } }
.safe { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #ff8c00; font-family: Arial, sans-serif; font-size: 30px; text-align: center; cursor: var(--cur-pointer, pointer); }
.shutdim { position: absolute; inset: 0; background: repeating-conic-gradient(rgba(0,0,0,.55) 0 25%, transparent 0 50%) 0 0 / 2px 2px; z-index: 89000; }

/* screensaver */
#saver { position: fixed; inset: 0; z-index: 190000; background: #000; display: none; cursor: none; }
#saver.on { display: block; }
#saver canvas { width: 100%; height: 100%; display: block; }

/* ── app specifics ── */
.notepad textarea { flex: 1; resize: none; border: 0; outline: none; padding: 2px 4px; font-family: var(--font-fixed, "Fixedsys", "Lucida Console", "Courier New", monospace); font-size: var(--font-fixed-size, 13px); line-height: 16px; white-space: pre; overflow: auto; -webkit-font-smoothing: auto; }
.notepad textarea.wrap { white-space: pre-wrap; }

.paint .main { flex: 1; display: flex; min-height: 0; }
.paint .tools { width: 56px; flex: none; padding: 2px; display: flex; flex-direction: column; align-items: center; }
.paint .tools .tgrid { display: grid; grid-template-columns: 25px 25px; gap: 0; }
.paint .tools .tgrid button { width: 25px; height: 25px; padding: 0; min-width: 0; display: flex; align-items: center; justify-content: center; }
.paint .tools .tgrid button svg { width: 16px; height: 16px; }
.paint .tools .opts { width: 44px; height: 66px; margin-top: 6px; display: flex; flex-direction: column; align-items: center; justify-content: space-evenly; padding: 2px; }
.paint .tools .opts div { width: 36px; display: flex; align-items: center; justify-content: center; height: 12px; }
.paint .tools .opts div.on { background: var(--sel-bg); }
.paint .tools .opts div.on span { background: #fff !important; }
.paint .canvaswrap { flex: 1; overflow: auto; background: var(--shadow); padding: 4px; touch-action: none; }
.paint canvas { display: block; background: #fff; image-rendering: pixelated; touch-action: none; cursor: var(--cur-crosshair, crosshair); }
.paint .palette { flex: none; display: flex; align-items: center; gap: 4px; padding: 3px 2px 1px; }
.paint .cur { width: 30px; height: 30px; position: relative; flex: none; background: var(--hilight); }
.paint .cur div { position: absolute; width: 14px; height: 14px; box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hilight); border: 1px solid var(--face); }
.paint .cur .c1 { left: 4px; top: 4px; z-index: 1; } .paint .cur .c2 { left: 12px; top: 12px; }
.paint .swatches { display: grid; grid-template-columns: repeat(14, 16px); grid-template-rows: 16px 16px; gap: 0; }
.paint .swatches div { width: 16px; height: 16px; box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hilight), inset 2px 2px var(--dkshadow); }
@media (pointer: coarse) { .paint .swatches { grid-template-columns: repeat(14, 22px); grid-template-rows: 22px 22px; } .paint .swatches div { width: 22px; height: 22px; } .paint .tools { width: 66px; } .paint .tools .tgrid { grid-template-columns: 30px 30px; } .paint .tools .tgrid button { width: 30px; height: 30px; } }

.mines .board { padding: 6px; display: inline-flex; flex-direction: column; gap: 6px; }
.mines .head { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px; }
.mines .lcd { background: #000; color: #f00; font-family: "Courier New", monospace; font-weight: bold; font-size: 22px; line-height: 24px; padding: 0 2px; letter-spacing: 1px; min-width: 41px; text-align: center; box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hilight); text-shadow: 0 0 2px #f00; }
.mines .face { width: 26px; height: 26px; min-width: 0; padding: 0; display: flex; align-items: center; justify-content: center; }
.mines .face svg { width: 18px; height: 18px; }
.mines .grid { display: grid; padding: 3px; touch-action: none; }
.mines .cell { width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 12px; font-family: Arial, sans-serif; background: var(--face); box-shadow: inset -1px -1px var(--shadow), inset 1px 1px var(--hilight), inset -2px -2px var(--shadow), inset 2px 2px var(--hilight); }
.mines .cell.open { box-shadow: inset 1px 1px var(--shadow); }
.mines .cell.boom { background: #f00; }
.mines .cell svg { width: 12px; height: 12px; }
@media (pointer: coarse) { .mines .cell { width: var(--mc, 24px); height: var(--mc, 24px); font-size: 16px; } .mines .cell svg { width: 16px; height: 16px; } }

.sol .table { flex: 1; position: relative; overflow: hidden; background: #008000; touch-action: none; }
.card { position: absolute; width: 71px; height: 96px; border-radius: 4px; background: #fff; border: 1px solid #000; font-family: Arial, sans-serif; touch-action: none; }
.card.red { color: #d00; } .card.black { color: #000; }
.card .c-tl, .card .c-br { position: absolute; font-size: 13px; font-weight: bold; line-height: 13px; text-align: center; width: 12px; }
.card .c-tl { left: 3px; top: 3px; } .card .c-br { right: 3px; bottom: 3px; transform: rotate(180deg); }
.card .c-mid { position: absolute; inset: 18px 14px; display: flex; align-items: center; justify-content: center; font-size: 34px; }
.card.back { background: #fff; padding: 3px; }
.card.back::before { content: ""; position: absolute; inset: 3px; border-radius: 2px; background: var(--cardback, repeating-linear-gradient(45deg, #1b3fa8 0 4px, #3b6be0 4px 8px)); }
.card.sel { filter: invert(1) hue-rotate(180deg); }
.slot { position: absolute; width: 71px; height: 96px; border: 1px solid #004000; border-radius: 4px; box-shadow: inset 1px 1px #00a000; }
.slot.stock::after { content: ""; position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; margin: -15px; border: 4px solid #0c0; border-radius: 50%; }
.slot.stock.x::after { border: 0; content: "×"; width: auto; height: auto; margin: 0; transform: translate(-50%, -50%); color: #c00; font-size: 50px; line-height: 40px; }

.calc .disp { margin: 6px 8px 4px; height: 24px; text-align: right; padding: 3px 6px; font-size: 13px; overflow: hidden; }
.calc .keys { display: grid; grid-template-columns: repeat(6, 36px); grid-auto-rows: 28px; gap: 5px; padding: 6px 8px 10px; }
.calc .keys .btn { min-width: 0; padding: 0; color: #00f; }
.calc .keys .btn.red { color: #f00; } .calc .keys .btn.mem { color: #f00; }
.calc .topkeys { display: flex; justify-content: flex-end; gap: 5px; padding: 0 8px; }
.calc .topkeys .btn { color: #f00; min-width: 60px; }
.calc .mbox { width: 36px; height: 28px; margin-right: auto; display: flex; align-items: center; justify-content: center; }
@media (pointer: coarse) { .calc .keys { grid-template-columns: repeat(6, 44px); grid-auto-rows: 36px; } }

.sndpanel .evlist { height: 150px; }
.clockface { width: 140px; height: 140px; }
.calgrid { display: grid; grid-template-columns: repeat(7, 22px); gap: 0; text-align: center; background: var(--window-bg); padding: 2px; }
.calgrid div { height: 16px; line-height: 16px; }
.calgrid .dow { background: var(--shadow); color: #fff; }
.calgrid .today { background: var(--sel-bg); color: var(--sel-text); }

/* Modex Navigator */
.navigator .menubar { position: relative; padding-right: 40px; }
.navigator .throbber { position: absolute; right: 2px; top: -1px; width: 36px; height: 20px; display: flex; align-items: center; justify-content: center; background: #000; box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hilight); }
.navigator .throbber svg { width: 16px; height: 16px; }
.navigator .throbber.spin svg { animation: throb 0.8s steps(8) infinite; }
@keyframes throb { to { transform: rotate(360deg); } }
.navigator .throbber.orig { width: 38px; height: 22px; top: -2px; background: #000; }
.navigator .throbber.orig .thr { width: 22px; height: 22px; background-repeat: no-repeat; background-position: 0 0; image-rendering: pixelated; }
.navigator .throbber.orig.spin .thr { animation: throb98 1.6s steps(40) infinite; }
@keyframes throb98 { from { background-position: 0 -22px; } to { background-position: 0 -902px; } }
.navigator .addrbar input { font-family: var(--font); }
.navigator .statusbar > div.nav-progress { width: 90px; padding: 3px; }
.navigator .nav-progress .bar { height: 100%; width: 0; background: repeating-linear-gradient(90deg, var(--sel-bg) 0 8px, transparent 8px 10px); }
.navigator .nav-progress.on .bar { animation: navprog 6s steps(9) infinite; }
@keyframes navprog { from { width: 0; } to { width: 100%; } }
.navigator .statusbar > div.fixed:last-child { width: 170px; }

/* Mail Express */
.mailx .mx-folderbar { flex: none; display: flex; align-items: baseline; gap: 10px; padding: 3px 8px; margin: 0 0 2px; background: var(--shadow); color: #fff; }
.mailx .mx-foldername { font-size: 16px; }
.mailx .mx-main { flex: 1; display: flex; gap: 3px; min-height: 0; }
.mailx .mx-left { width: 170px; flex: none; display: flex; flex-direction: column; }
.mailx .mx-panehead { padding: 2px 4px; box-shadow: inset -1px -1px var(--shadow), inset 1px 1px var(--hilight); margin-bottom: 1px; }
.mailx .mx-folders { flex: 1; }
.mailx .mx-folders .opt { padding: 2px 3px; cursor: var(--cur-default, default); }
.mailx .mx-folders .mx-indent { padding-left: 18px; }
.mailx .mx-right { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.mailx .mx-listwrap { flex: 0 0 38%; display: flex; padding: 2px; min-height: 80px; }
.mailx .mx-list { flex: 1; }
.mailx .mx-list .item.unread { font-weight: bold; }
.mailx .mx-list .item > div { display: flex; align-items: center; }
.mailx .mx-list .item svg { width: 16px; height: 16px; }
.mailx .mx-split { height: 4px; flex: none; }
.mailx .mx-prevwrap { flex: 1; overflow: auto; min-height: 0; padding: 2px; }
.mailx .mx-preview { background: var(--window-bg); color: var(--window-text); }
.mailx .mx-head { background: var(--face); color: var(--text); padding: 4px 8px; line-height: 16px; border-bottom: 1px solid var(--shadow); }
.mailx .mx-head b { display: inline-block; width: 56px; }
.mailx .mx-atts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 3px 0 1px; }
.mailx .mx-att { display: inline-flex; align-items: center; gap: 3px; padding: 1px 4px; cursor: var(--cur-pointer, pointer); }
.mailx .mx-att:hover { background: var(--sel-bg); color: var(--sel-text); }
.mailx .mx-att svg { width: 16px; height: 16px; }
.mailx .mx-text { margin: 0; padding: 8px; font: 13px "Courier New", monospace; white-space: pre-wrap; word-wrap: break-word; -webkit-font-smoothing: auto; }
.mailx .mx-html { display: block; width: 100%; border: 0; background: #fff; }
.mailx .mx-loading { padding: 10px; color: var(--shadow); }
.mailx .mx-fields { flex: none; padding: 4px 4px 2px; display: flex; flex-direction: column; gap: 3px; }
.mailx .mx-field { display: flex; align-items: center; gap: 6px; }
.mailx .mx-field > span { width: 56px; text-align: right; }
.mailx .mx-compose-body { flex: 1; resize: none; border: 0; outline: none; padding: 4px 6px; font: 13px Arial, sans-serif; -webkit-font-smoothing: auto; }
.mailx .mx-sig-note { flex: none; padding: 2px 6px; color: var(--shadow); }
#mailtray { cursor: var(--cur-pointer, pointer); }
@media (max-width: 760px) { .mailx .mx-left { display: none; } }

/* MS-DOS Prompt */
.dosbox .dos-screen { flex: 1; background: #000; color: #c0c0c0; font: var(--font-term-size, 16px)/1.15 var(--font-term, "Lucida Console", "Courier New", monospace); padding: 4px 6px; overflow: auto; white-space: pre-wrap; word-break: break-all; cursor: var(--cur-text, text); -webkit-font-smoothing: none; outline: none; }
.dosbox .dos-cursor { animation: dosblink 1s steps(1) infinite; }
@keyframes dosblink { 50% { opacity: 0; } }
.dosbox .dos-input { position: absolute; left: 6px; bottom: 6px; width: 2px; height: 16px; font-size: 16px; opacity: 0.01; border: 0; padding: 0; caret-color: transparent; background: transparent; color: transparent; }
/* ScanDisk / Defrag progress */
.sd-prog { height: 18px; padding: 2px; background: var(--face); }
.sd-bar { height: 100%; width: 0; background: repeating-linear-gradient(90deg, var(--sel-bg) 0 9px, transparent 9px 11px); }

/* A message arriving in the background (ICQ, AIM): the title bar flashes. */
.win.im-flash > .titlebar { animation: imflash .5s steps(1) 6; }
@keyframes imflash { 50% { background: linear-gradient(90deg, #c00000, #ff8080); } }

/* FreeCell & Hearts */
.fc-table .slot .fc-suit { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 34px; color: #00a000; opacity: .5; }
.hearts-table .card.dim { filter: brightness(.82); }
.hearts-name { position: absolute; width: 120px; text-align: center; color: #fff; font-weight: bold; text-shadow: 1px 1px #000; }
.hearts-bubble { position: absolute; max-width: 190px; background: #ffffe1; color: #000; border: 1px solid #000; padding: 4px 6px; z-index: 900; box-shadow: 2px 2px 0 rgba(0,0,0,.4); font-family: Arial, sans-serif; }
.hearts-pass { position: absolute; z-index: 950; min-width: 100px; }
.hearts-msg { display: none; }

/* Modex Jukebox */
.jukebox .jb-lcd { margin: 4px; padding: 4px 6px; background: #000; color: #30ff60; font: bold 13px "Lucida Console", monospace; box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hilight); }
.jukebox .jb-row { display: flex; align-items: center; justify-content: space-between; }
.jukebox .jb-time { font-size: 24px; letter-spacing: 1px; text-shadow: 0 0 3px #30ff60; }
.jukebox .jb-vis { image-rendering: pixelated; width: 114px; height: 39px; }
.jukebox .jb-title { white-space: nowrap; overflow: hidden; margin-top: 2px; }
.jukebox .jb-controls { display: flex; gap: 3px; padding: 2px 4px; }
.jukebox .jb-btn { min-width: 0; width: 34px; padding: 0; }
.jukebox .jb-shuf { margin-left: auto; font-size: 10px; }
.jukebox .jb-vol { display: flex; align-items: center; gap: 6px; padding: 2px 6px; }
.jukebox .jb-vol input { flex: 1; }
.jukebox .jb-list { flex: 1; min-height: 110px; margin: 2px 4px 4px; overflow: auto; }

/* ── Touch screens (iPad): finger-sized controls ──
   The title bar sits above the resize handles, so the bigger touch handles
   can never cover the close/maximize/minimize buttons. */
.titlebar { position: relative; z-index: 3; }
@media (pointer: coarse) {
  .titlebar { height: 28px; gap: 5px; padding-right: 3px; }
  .titlebar .tico, .titlebar .tico svg { width: 18px; height: 18px; }
  .titlebar .tbtns { gap: 4px; }
  .tbtn { width: 30px; height: 24px; background-size: auto; }
  .tbtn.close { margin-left: 6px; }
  .tbtn.minb { background-position: center 15px; }
  .tbtn.minb:active { background-position: calc(50% + 1px) 16px; }
  .rz.n { top: -10px; height: 10px; }
  .rz.ne, .rz.nw { top: -12px; width: 18px; height: 18px; }
  .rz.ne { right: -12px; } .rz.nw { left: -12px; }
  .btn { height: 30px; min-width: 84px; }
  .btn.small { height: 28px; }
  .menubar { height: 26px; }
  .menubar .mi { padding: 5px 10px; }
  .toolbar .toolbtn { min-width: 56px; padding: 4px; }
  input[type=text], select { height: 28px; }
  .listbox .opt { padding: 5px 4px; }
  #taskbar { height: 34px; }
  #desktop { bottom: 34px; }
  #startbtn, .task, #tray { height: 28px; }
  #tasks { height: 28px; }
  .calgrid { grid-template-columns: repeat(7, 30px); } .calgrid div { height: 24px; line-height: 24px; }
  /* tray icons and other small tap targets */
  #tray { gap: 2px; padding: 0 4px; }
  #tray > span { min-width: 30px; height: 28px; display: flex; align-items: center; justify-content: center; }
  #tray > span#clock { padding: 0 6px; }
  .paint .tools .opts > div { min-height: 26px; display: flex; align-items: center; justify-content: center; }
  .dlg label, .win label:has(> input[type=radio]), .win label:has(> input[type=checkbox]) { min-height: 30px; display: inline-flex; align-items: center; }
  input[type=checkbox], input[type=radio] { width: 18px; height: 18px; }
  .mcalc .mc-rsz { width: 12px; right: -4px; }
  .mshow .ms-h { width: 14px; height: 14px; margin: -7px 0 0 -7px; }
  .win .toolbar .toolbtn svg, .mail .toolbar svg { min-width: 20px; min-height: 20px; }
}

.btn.dlg-sq { width: 24px; min-width: 24px; height: 22px; padding: 0; }
@media (pointer: coarse) { .btn.dlg-sq { width: 40px; min-width: 40px; height: 34px; } }

/* Paint (v2): the picture and a TRANSPARENT overlay for previews/selection */
.paint .pt-stage { position: relative; }
.paint canvas.pt-image { display: block; background: #fff; }
.paint canvas.pt-overlay { position: absolute; left: 0; top: 0; background: transparent; pointer-events: none; }
.paint .pt-stage.grid::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(to right, rgba(0,0,0,.16) 1px, transparent 1px), linear-gradient(to bottom, rgba(0,0,0,.16) 1px, transparent 1px);
  background-size: var(--z) var(--z); }
.paint .tools .opts { height: auto; min-height: 66px; gap: 2px; padding: 3px 2px; }
.paint .pt-fontbar { flex: none; display: flex; align-items: center; gap: 4px; padding: 2px 4px; }
.paint .pt-text { position: absolute; z-index: 5; border: 1px dashed #000; outline: none; resize: both; padding: 2px; line-height: 1.2; overflow: hidden; -webkit-font-smoothing: none; }
.pt-viewbmp { position: fixed; inset: 0; z-index: 200000; background: #808080; display: flex; align-items: center; justify-content: center; cursor: var(--cur-default, default); }
.pt-viewbmp canvas { image-rendering: pixelated; max-width: 100%; max-height: 100%; }

/* Original Files panel */
.originals .tabpane { display: flex; flex-direction: column; min-height: 0; }
.orig-scroll { flex: 1; min-height: 0; overflow: auto; background: var(--window-bg); }
.orig-table { display: table; width: 100%; border-collapse: collapse; }
.orig-row { display: table-row; }
.orig-row > div { display: table-cell; padding: 2px 6px; vertical-align: middle; white-space: nowrap; border-bottom: 1px solid #e4e4e4; }
.orig-head > div { position: sticky; top: 0; background: var(--face); box-shadow: inset -1px -1px var(--shadow), inset 1px 1px var(--hilight); font-weight: normal; }
.orig-row.ok > div:nth-last-child(2) { color: #006000; font-weight: bold; }
.orig-ico svg { width: 16px; height: 16px; display: block; }

/* Original card bitmaps (cards.dll), when supplied: the bitmap is the whole card. */
.card.img { border: 0; border-radius: 3px; padding: 0; background: #fff center / 71px 96px no-repeat; image-rendering: pixelated; }
.card.img::before { display: none; }
.card.img.back { background-color: transparent; }
.slot.img { border: 0; box-shadow: none; background: center / 71px 96px no-repeat; image-rendering: pixelated; }
.slot.img::after { display: none; }

/* Original Minesweeper graphics (winmine.exe), when supplied */
.mines.orig .cell { box-shadow: none; background: var(--mt) 0 0 / 100% 1600% no-repeat; image-rendering: pixelated; font-size: 0; }
.mines.orig .cell.open:not([data-o]) { background-position: 0 100% !important; }
.mines.orig .cell.boom { background: var(--mt) 0 20% / 100% 1600% no-repeat; }
.mines.orig .face { width: 24px; height: 24px; min-width: 0; padding: 0; border: 0; box-shadow: none; background: var(--mf) 0 0 / 100% 500% no-repeat; image-rendering: pixelated; }
.mines.orig .face:active { background-position: 0 100% !important; }
.mines.orig .lcd { display: flex; padding: 0; min-width: 0; font-size: 0; background: none; text-shadow: none; box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hilight); }
.mines.orig .lcd i { display: block; width: 13px; height: 23px; background: var(--md) 0 0 / 100% 1200% no-repeat; image-rendering: pixelated; }

/* Windows' own bitmap faces (converted from the original .FON files): no smoothing, like Windows. */
html.bitmap-fonts #screen, html.bitmap-fonts #screen * { -webkit-font-smoothing: none; font-smooth: never; }
html.bitmap-fonts .dosbox .dos-screen { line-height: normal; }
html.bitmap-fonts .notepad textarea { line-height: normal; }
/* Bold the way Windows bolded a bitmap face: the same glyphs drawn again 1px to the right,
   each character 1px wider. (MS Sans Serif has no bold of its own.) */
html.bitmap-fonts #screen .titlebar .ttl, html.bitmap-fonts #screen .menu .row.def .lab, html.bitmap-fonts #screen #startbtn,
html.bitmap-fonts #screen .task.pressed, html.bitmap-fonts #screen .mailx .mx-list .item.unread, html.bitmap-fonts #screen .imlist .im-group,
html.bitmap-fonts #screen .imchat .im-me-name, html.bitmap-fonts #screen b, html.bitmap-fonts #screen strong {
  font-weight: normal; text-shadow: 1px 0 0 currentColor; letter-spacing: 1px;
}

/* ── window keyboard (Phase 1) ── */
/* Menu-bar title selected from the keyboard (Alt / F10): drawn raised, like the hover. */
.menubar .mi.kfocus:not(.open) { box-shadow: inset -1px -1px var(--shadow), inset 1px 1px var(--hilight); }
.menubar .mi u, .menu .row .lab u { text-decoration: underline; text-underline-offset: 1px; }
/* System menu: the caption-button glyphs beside Restore / Minimize / Maximize / Close */
.menu .row .mglyph { width: 14px; flex: none; display: flex; justify-content: center; align-items: center; }
.menu .row .mglyph svg { display: block; fill: currentColor; }
.menu .row.dis .mglyph svg { fill: var(--shadow); filter: drop-shadow(1px 1px 0 var(--hilight)); }
.menu .row.dis.hi .mglyph svg { filter: none; }
/* Alt+Tab ("cool switch"): a raised box centred on the screen, the open windows' icons
   in a row, the chosen one framed, its title in a sunken box below. */
.altswitch { position: absolute; z-index: 150000; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 10px 10px 8px; background: var(--face); max-width: calc(100% - 40px);
  box-shadow: inset -1px -1px var(--dkshadow), inset 1px 1px var(--light), inset -2px -2px var(--shadow), inset 2px 2px var(--hilight); }
.altswitch .asw-icons { display: flex; flex-wrap: wrap; justify-content: center; max-width: 301px; }
.altswitch .asw-ico { width: 43px; height: 43px; display: flex; align-items: center; justify-content: center; box-sizing: border-box; border: 2px solid transparent; }
.altswitch .asw-ico.on { border-color: var(--sel-bg); }
.altswitch .asw-ico svg, .altswitch .asw-ico img { width: 32px; height: 32px; display: block; }
.altswitch .asw-title { margin-top: 8px; min-width: 260px; height: 20px; line-height: 18px; padding: 0 4px; box-sizing: border-box; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hilight); }
/* Keyboard Move / Size: the four-way cursor, then the edge's resize cursor */
html.w98-kbmove, html.w98-kbmove * { cursor: var(--cur-move, move) !important; }
html.w98-kbsize-ns, html.w98-kbsize-ns * { cursor: var(--cur-ns-resize, ns-resize) !important; }
html.w98-kbsize-ew, html.w98-kbsize-ew * { cursor: var(--cur-ew-resize, ew-resize) !important; }
html.w98-kbsize-nwse, html.w98-kbsize-nwse * { cursor: var(--cur-nwse-resize, nwse-resize) !important; }
html.w98-kbsize-nesw, html.w98-kbsize-nesw * { cursor: var(--cur-nesw-resize, nesw-resize) !important; }

/* ── taskbar extras (Phase 1) ── */
.tbgrip { flex: none; width: 2px; height: 20px; margin: 0 2px; box-shadow: inset 1px 0 var(--shadow), inset -1px 0 var(--hilight); }
#quicklaunch { flex: none; display: flex; gap: 1px; align-items: center; }
.qlbtn { width: 23px; height: 22px; min-width: 0; padding: 0; display: flex; align-items: center; justify-content: center; box-shadow: none; background: var(--face); border: 0; }
.qlbtn:hover { box-shadow: inset -1px -1px var(--shadow), inset 1px 1px var(--hilight); }
.qlbtn:active { box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hilight); }
.qlbtn svg { width: 16px; height: 16px; display: block; }
#taskbar.autohide { transform: translateY(calc(100% - 3px)); transition: transform .15s steps(3); }
#taskbar.autohide.shown, #taskbar.autohide:hover { transform: none; }
#screen.tb-autohide #desktop { bottom: 3px; }
html.startmenu-small .menu.startmenu { padding-left: 0; }
html.startmenu-small .menu.startmenu .banner { display: none; }
html.startmenu-small .menu.startmenu > .row { height: 22px; }
html.startmenu-small .menu.startmenu > .row .mico { width: 22px; }
html.startmenu-small .menu.startmenu > .row .mico svg { width: 16px; height: 16px; }
@media (pointer: coarse) { .qlbtn { width: 34px; height: 28px; } }

/* Arrow-and-hourglass while a program starts (registry.launch). */
html.appstarting #screen, html.appstarting #screen * { cursor: var(--cur-progress, progress) !important; }

/* ── shared dialogs (Phase 1) ── */
/* Find / Replace (dialogs.js findDialog, replaceDialog) */
.fd { flex-direction: row; gap: 10px; padding: 10px 8px 8px 10px; }
.fd-fields { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.fd-row { display: flex; align-items: center; gap: 6px; }
.fd-row input { flex: 1; min-width: 0; }
.fd-lab { width: 72px; flex: none; }
.fd-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: 2px; }
.fd-checks { display: flex; flex-direction: column; gap: 6px; padding-bottom: 2px; }
.fd-dir { margin: 0; padding: 2px 8px 6px; display: flex; gap: 12px; }
.fd-btns { display: flex; flex-direction: column; gap: 5px; }
.fd-btns .btn { min-width: 75px; }
/* Properties sheet */
.ps { flex: 1; min-height: 0; padding: 6px 6px 8px; }
.ps-tabs { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ps-panes { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ps-panes > .tabpane { flex: 1; }
/* Browse for Folder */
.bf { flex: 1; min-height: 0; }
.bf-text { min-height: 28px; }
.bf-tree { flex: 1; min-height: 0; outline: none; padding: 2px 2px 2px 4px; }
.bf-row { display: flex; align-items: center; height: 18px; white-space: nowrap; }
.bf-tog { width: 9px; height: 9px; flex: none; margin: 0 4px 0 0; border: 1px solid var(--shadow); background: var(--window-bg); color: var(--window-text); font: 9px/7px monospace; text-align: center; }
.bf-tog.none { border-color: transparent; background: transparent; }
.bf-ico { width: 16px; height: 16px; flex: none; margin-right: 3px; }
.bf-ico svg { width: 16px; height: 16px; }
.bf-lab { padding: 0 2px; }
.bf-row.sel .bf-lab { background: var(--sel-bg); color: var(--sel-text); }
.bf-tree:focus .bf-row.sel .bf-lab { outline: 1px dotted var(--sel-text); outline-offset: -1px; }
.bf-kids { margin-left: 8px; padding-left: 9px; border-left: 1px dotted var(--shadow); }
.bf-kids > .bf-node > .bf-row { position: relative; }
.bf-kids > .bf-node > .bf-row::before { content: ""; position: absolute; left: -9px; top: 9px; width: 8px; border-top: 1px dotted var(--shadow); }
/* Font */
.fn { padding: 8px 10px 10px; gap: 6px; }
.fn-top { display: flex; gap: 8px; align-items: flex-start; }
.fn-col { display: flex; flex-direction: column; }
.fn-col label { margin-bottom: 2px; }
.fn-col input { margin-bottom: 0; }
.fn-list { height: 102px; overflow-y: scroll; padding: 1px; }
.fn-list .opt { padding: 0 2px; height: 14px; }
.fn-kind { width: 14px; height: 12px; flex: none; }
.fn-kind.tt { position: relative; }
.fn-kind.tt::before, .fn-kind.tt::after { content: "T"; position: absolute; font: bold 10px/10px "Times New Roman", serif; }
.fn-kind.tt::before { left: 0; top: 0; color: #808080; }
.fn-kind.tt::after { left: 4px; top: 3px; color: #000080; }
.opt.sel .fn-kind.tt::before, .opt.sel .fn-kind.tt::after { color: var(--sel-text); }
.fn-btns { display: flex; flex-direction: column; gap: 6px; margin-left: auto; padding-top: 14px; }
.fn-mid { display: flex; gap: 8px; align-items: stretch; }
.fn-effects { width: 150px; flex: none; margin: 0; display: flex; flex-direction: column; gap: 6px; padding: 4px 8px 8px; }
.fn-colorlab { margin-top: 2px; }
.fn-colorbox { position: relative; }
.fn-colorbox select { width: 100%; padding-left: 24px; }
.fn-swatch { position: absolute; left: 5px; top: 5px; width: 14px; height: 11px; border: 1px solid #000; pointer-events: none; }
.fn-right { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.fn-sample { margin: 0; padding: 4px 8px 8px; flex: 1; display: flex; }
.fn-sample-box { flex: 1; height: 48px; display: flex; align-items: center; justify-content: center; overflow: hidden; box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hilight); white-space: nowrap; }
.fn-scriptrow { display: flex; flex-direction: column; gap: 2px; }
.fn-script { width: 100%; }
.fn-desc { min-height: 28px; padding-top: 2px; }
/* Backup (apps/backup.js) */
.bk { padding: 6px 6px 8px; }
.bk .tabpane { display: flex; flex-direction: column; }
.bk-pane { display: flex; flex-direction: column; gap: 8px; flex: 1; min-height: 0; }
.bk-intro { line-height: 14px; }
.bk-row { display: flex; align-items: center; gap: 6px; }
.bk-row.right { justify-content: flex-end; }
.bk-list { height: 110px; overflow-y: auto; }
.bk-list.iconview.details .hdr, .bk-list.iconview.details .item { grid-template-columns: minmax(110px, 1.4fr) 64px minmax(120px, 1.3fr) 104px; }
.bk-list .item.sel { background: var(--sel-bg); color: var(--sel-text); }
.bk-empty { padding: 6px; color: var(--shadow); }
.bk-note { color: var(--text); line-height: 14px; }
.bk-reset { width: 100%; }
.bk-k { flex: 0 0 130px; }
.bk-row > span { flex: 1; line-height: 14px; }
.win.busy, .win.busy * { cursor: var(--cur-wait, wait) !important; }

/* The dotted drag/resize outline (Windows 98 default: contents not shown while dragging). */
.dragframe { position: absolute; z-index: 199000; pointer-events: none; box-sizing: border-box;
  background: repeating-conic-gradient(#000 0 25%, #fff 0 50%) 0 0 / 2px 2px; mix-blend-mode: difference;
  clip-path: polygon(evenodd, 0 0, 100% 0, 100% 100%, 0 100%, 0 0, 3px 3px, 3px calc(100% - 3px), calc(100% - 3px) calc(100% - 3px), calc(100% - 3px) 3px, 3px 3px); }

/* Character Map */
.cm-grid { display: grid; grid-template-columns: repeat(32, 16px); border-top: 1px solid #000; border-left: 1px solid #000; width: max-content; background: #fff; font-size: 12px; }
.cm-c { width: 16px; height: 18px; display: flex; align-items: center; justify-content: center; border-right: 1px solid #000; border-bottom: 1px solid #000; box-sizing: border-box; cursor: default; overflow: hidden; }
.cm-c.sel { outline: 2px solid #000; outline-offset: -2px; }
.cm-zoom { display: none; position: absolute; left: 40%; top: 20%; width: 48px; height: 48px; background: #fff; border: 2px solid #000; align-items: center; justify-content: center; font-size: 32px; box-shadow: 2px 2px 0 #000; pointer-events: none; }

/* ── Control Panel (Phase 2) ── apps/controlpanel.js */
:root { --caret-blink: 530ms; }
.dosbox .dos-cursor { animation-duration: calc(var(--caret-blink) * 2); }
.tabpane.cpl { display: flex; flex-direction: column; gap: 6px; overflow: auto; }
.cpl .cpl-fs { margin: 0; }
.cpl-row { display: flex; gap: 6px; align-items: flex-start; }
.cpl-row.right { justify-content: flex-end; margin-top: 4px; }
.cpl-check { display: flex; gap: 6px; align-items: center; margin: 3px 0; }
.cpl-note { line-height: 14px; }
.cpl-slide { display: flex; align-items: center; gap: 6px; margin: 4px 0; }
.cpl-slide span { width: 36px; text-align: center; }
.cpl-slider { flex: 1; -webkit-appearance: none; appearance: none; height: 22px; background: transparent; margin: 0; }
.cpl-slider::-webkit-slider-runnable-track { height: 4px; background: var(--window-bg); box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hilight), inset 2px 2px var(--dkshadow), inset -2px -2px var(--light); }
.cpl-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 11px; height: 21px; margin-top: -9px; background: var(--face); box-shadow: inset -1px -1px var(--dkshadow), inset 1px 1px var(--light), inset -2px -2px var(--shadow), inset 2px 2px var(--hilight); clip-path: polygon(0 0, 100% 0, 100% 75%, 50% 100%, 0 75%); }
.cpl-slider::-moz-range-track { height: 4px; background: var(--window-bg); box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hilight); }
.cpl-slider::-moz-range-thumb { width: 11px; height: 21px; border: 0; border-radius: 0; background: var(--face); box-shadow: inset -1px -1px var(--dkshadow), inset 1px 1px var(--light); }
.cpl-slider:disabled { opacity: .5; }
.cpl-mousecap { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 6px; }
.cpl-mousepic svg, .cpl-bigico svg, .cpl-keyico svg { width: 32px; height: 32px; display: block; }
.cpl-mousepic svg { width: 48px; height: 48px; }
.cpl-bigico, .cpl-keyico { flex: none; }
.cpl-labeled { display: flex; gap: 8px; align-items: center; margin-bottom: 4px; }
.cpl-testarea { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.cpl-jack { width: 52px; height: 56px; display: flex; align-items: flex-end; justify-content: center; background: var(--window-bg); box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hilight); user-select: none; touch-action: manipulation; }
.cpl-curlist { height: 190px; }
.cpl-curlist .opt { height: 34px; }
.cpl-curimg { width: 32px; height: 32px; image-rendering: pixelated; flex: none; }
.cpl-keytest { width: 100%; margin-top: 4px; }
.cpl-caretbox { width: 60px; height: 24px; flex: none; background: var(--window-bg); box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hilight); display: flex; align-items: center; justify-content: center; }
.cpl-caret { width: 1px; height: 15px; background: var(--window-text); animation: cplblink 1060ms steps(1) infinite; }
@keyframes cplblink { 50% { opacity: 0; } }
.cpl-langlist { height: 70px; flex: none; }
.cpl-langlist.iconview.details .hdr, .cpl-langlist.iconview.details .item { grid-template-columns: 1.4fr 1fr; }
.cpl-langlist .item.sel, .cpl-portlist .item.sel { background: var(--sel-bg); color: var(--sel-text); }
.cpl-en { background: #000080; color: #fff; font-size: 9px; padding: 0 2px; }
.cpl-portlist { height: 110px; flex: none; }
.cpl-portlist.iconview.details .hdr, .cpl-portlist.iconview.details .item { grid-template-columns: 90px 1fr; }
.cpl-form { grid-template-columns: 1fr auto; }
.cpl-sample { padding: 2px 4px; background: var(--window-bg); color: var(--window-text); box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hilight); min-height: 17px; white-space: nowrap; overflow: hidden; }
.cpl-globe { display: flex; justify-content: center; margin: 6px 0; }
.cpl-globe svg { width: 64px; height: 64px; }
.cpl-fontdetails.iconview.details .hdr, .cpl-fontdetails.iconview.details .item { grid-template-columns: minmax(180px, 2fr) 110px 70px; }
.cpl-fontdetails .item.sel { background: var(--sel-bg); color: var(--sel-text); }
.iconview.cpl-iconlist { flex-direction: column; flex-wrap: wrap; align-content: flex-start; }
.iconview.cpl-iconlist .item { flex-direction: row; width: 200px; gap: 3px; }
.iconview.cpl-iconlist .item .ico svg { width: 16px; height: 16px; }
.iconview.cpl-iconlist .item .lbl { margin: 0; text-align: left; max-width: none; }
.cpl-fontview { flex: 1; overflow: auto; padding: 10px 14px; background: #fff; color: #000; -webkit-font-smoothing: none; }
.cpl-fv-title { margin-bottom: 6px; white-space: nowrap; }
.cpl-fv-info { white-space: pre-line; font-size: 11px; margin-bottom: 8px; }
.cpl-fv-line { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.cpl-fv-pt { font: 10px Arial, sans-serif; width: 18px; flex: none; }
.cpl-wiz { flex: 1; min-height: 0; }
.cpl-wiz-main { flex: 1; display: flex; gap: 12px; min-height: 0; }
.cpl-wiz-art { width: 110px; flex: none; background: #008080; display: flex; align-items: center; justify-content: center; box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hilight); }
.cpl-wiz-art svg { width: 64px; height: 64px; }
.cpl-wiz-body { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; line-height: 14px; }
.cpl-wiz-body ul { margin: 6px 0; padding-left: 18px; }
.cpl-progress { height: 16px; margin: 8px 0; background: var(--window-bg); box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hilight); padding: 2px; }
.cpl-progress div { height: 100%; width: 0; background: repeating-linear-gradient(90deg, var(--sel-bg) 0 8px, transparent 8px 10px); transition: width .3s; }
.iconview .item.cpl-default .ico { position: relative; }
.iconview .item.cpl-default .ico::after { content: "✓"; position: absolute; left: -2px; top: -4px; width: 12px; height: 12px; line-height: 12px; text-align: center; font-size: 10px; font-weight: bold; color: #fff; background: #000; border-radius: 50%; }
.cpl-queue.iconview.details .hdr { grid-template-columns: 2fr 1fr 1fr 1fr 1fr; }
.cpl-trails { position: fixed; inset: 0; pointer-events: none; z-index: 199500; }
.cpl-trails img { position: absolute; display: none; image-rendering: pixelated; }
#cpl-monitor-off { position: fixed; inset: 0; z-index: 195000; background: #000; cursor: none; }
.cpl-lock { position: fixed; inset: 0; z-index: 196000; background: var(--desktop); display: flex; align-items: center; justify-content: center; }

/* ── WordPad / Calculator / Notepad (Phase 2) ── */
.wordpad .wp-main { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.wordpad .wp-bar { gap: 0; padding: 1px 2px; flex-wrap: wrap; }
.wordpad .wp-tb { width: 23px; height: 22px; padding: 0; border: 0; background: transparent; display: inline-flex; align-items: center; justify-content: center; font: 13px "Times New Roman", serif; color: #000; }
.wordpad .wp-tb svg { width: 16px; height: 16px; display: block; }
.wordpad .wp-tb:hover:not(:disabled) { box-shadow: inset -1px -1px var(--shadow), inset 1px 1px var(--hilight); }
.wordpad .wp-tb:active:not(:disabled) { box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hilight); }
.wordpad .wp-tb.on { box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hilight); background: repeating-conic-gradient(var(--face) 0 25%, var(--hilight) 0 50%) 0 0 / 2px 2px; }
.wordpad .wp-tb:disabled { opacity: .45; }
.wordpad .wp-font { width: 150px; margin-right: 3px; }
.wordpad .wp-size { width: 46px; margin-right: 3px; }
.wordpad .wp-script { width: 96px; margin-right: 2px; }
.wordpad .wp-ruler { flex: none; height: 24px; overflow: hidden; position: relative; margin-bottom: 1px; }
.wordpad .wp-rinner { position: absolute; left: 2px; top: 0; right: 0; bottom: 0; }
.wordpad .wp-rcanvas { position: absolute; left: 0; top: 0; image-rendering: pixelated; }
.wordpad .wp-mk { position: absolute; width: 9px; height: 7px; cursor: default; }
.wordpad .wp-mk-first { top: 0; background: linear-gradient(to bottom right, transparent 49%, transparent 50%) , none; clip-path: polygon(0 0, 100% 0, 50% 100%); background: #c0c0c0; box-shadow: inset 0 0 0 1px #000; }
.wordpad .wp-mk-left { top: 15px; height: 9px; clip-path: polygon(50% 0, 100% 45%, 100% 100%, 0 100%, 0 45%); background: #c0c0c0; box-shadow: inset 0 0 0 1px #000; }
.wordpad .wp-mk-right { top: 15px; clip-path: polygon(50% 0, 100% 100%, 0 100%); background: #c0c0c0; box-shadow: inset 0 0 0 1px #000; }
.wordpad .wp-tabmk { position: absolute; top: 14px; width: 6px; height: 5px; border-left: 2px solid #000; border-bottom: 2px solid #000; margin-left: -1px; }
.wordpad .wp-scroll { flex: 1; min-height: 0; overflow: auto; background: #fff; box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hilight), inset 2px 2px var(--dkshadow), inset -2px -2px var(--light); padding: 2px; }
.wp-doc { min-height: calc(100% - 58px); box-sizing: content-box; padding: 14px 22px 40px; /* a little room round the words (Morr, 2026-12-01); the ruler reads this padding */ outline: none; background: #fff; color: #000; font: 10pt "Times New Roman", serif; -webkit-user-select: text; user-select: text; cursor: var(--cur-text, text); word-wrap: break-word; -webkit-font-smoothing: auto; }
.wp-doc p, .wp-doc div { margin: 0; }
.wp-doc ul { margin: 0; padding-left: 24px; list-style: disc; }
.wp-doc li { margin: 0; }
.wp-doc.nowrap p, .wp-doc.nowrap li { white-space: nowrap; }
.wp-doc.plain, .wp-doc.plain * { font-family: "Courier New", monospace !important; font-size: 10pt !important; font-weight: normal !important; font-style: normal !important; text-decoration: none !important; color: #000 !important; }
.wp-doc .wp-tab { display: inline-block; white-space: pre; overflow: hidden; vertical-align: baseline; height: 1px; }
.wp-measure { position: absolute; visibility: hidden; left: -10000px; top: 0; padding: 0; min-height: 0; }
.wordpad .wp-preview { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.wordpad .wp-pvbar { gap: 4px; padding: 3px; }
.wordpad .wp-pvbtn { min-width: 0; padding: 0 8px; height: 22px; }
.wordpad .wp-pvdesk { flex: 1; min-height: 0; overflow: auto; background: #808080; display: flex; justify-content: center; align-items: flex-start; gap: 16px; padding: 12px; box-shadow: inset 1px 1px var(--dkshadow); }
.wordpad .wp-pvholder { flex: none; position: relative; box-shadow: 3px 3px 0 #000; background: #fff; }
.wordpad .wp-pvpage { position: absolute; left: 0; top: 0; background: #fff; transform-origin: 0 0; overflow: hidden; pointer-events: none; }
.wordpad .wp-pvtext { min-height: 0; }
.wp-dt .wp-dtrow, .wp-pdrow { display: flex; gap: 10px; align-items: flex-start; }
.wp-dtcol { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.wp-dtbtns { display: flex; flex-direction: column; gap: 6px; padding-top: 14px; }
.wp-dtlist { height: 170px; min-width: 180px; }
.wp-newlist { height: 64px; min-width: 150px; }
.wp-tablist { height: 100px; }
.wp-opt { display: flex; gap: 10px; padding: 10px; }
.wp-pd .pr-grid, .wp-pd fieldset .pr-grid { display: grid; grid-template-columns: auto 90px; gap: 5px 8px; align-items: center; }
.wp-pd input[type=text] { width: 90px; }
.wp-pd select { width: 90px; }
.wp-opt fieldset { flex: 1; display: flex; flex-direction: column; gap: 4px; }
/* Print / Page Setup (printing.js) */
.pr .pr-grid { display: grid; grid-template-columns: auto 1fr; gap: 5px 8px; align-items: center; }
.pr .pr-row { display: flex; gap: 8px; }
.pr .pr-row > fieldset { flex: 1; margin: 0; }
.pr .pr-num { width: 56px; }
.pr .pr-mgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 8px; }
.pr .pr-lab { display: flex; gap: 4px; align-items: center; justify-content: space-between; }
.pr .pr-sample { display: flex; justify-content: center; align-items: center; height: 104px; }
.pr .pr-sheet { position: relative; background: #fff; box-shadow: 1px 1px 0 #000, 3px 3px 0 #808080; outline: 1px solid #000; }
.pr .pr-sheet-text { position: absolute; background: repeating-linear-gradient(to bottom, #808080 0 1px, transparent 1px 3px); }
.pr .pr-orient, .pr .pr-range { display: flex; flex-direction: column; gap: 4px; }
.pr .pr-pages { display: flex; gap: 4px; align-items: center; }
.pr .pr-copyrow { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.pr .pr-printer { position: relative; }
.pr .pr-tofile { position: absolute; right: 12px; bottom: 16px; }
.pr-job .pr-jobrow { display: flex; gap: 12px; align-items: flex-start; line-height: 15px; }
.pr-job .pr-jobico svg { width: 32px; height: 32px; }
.pr-job .pr-note { color: var(--shadow); font-size: 11px; text-align: center; }
/* the shell About box (about.js) */
.shellabout .sa { gap: 8px; }
.shellabout .sa-banner { height: 44px; display: flex; align-items: center; gap: 6px; padding: 0 12px; background: linear-gradient(90deg, #000080, #1084d0); color: #fff; font: italic 20px "Times New Roman", serif; }
.shellabout .sa-banner b { font: bold 22px Arial, sans-serif; font-style: normal; }
.shellabout .sa-win { font-size: 13px; font-style: normal; }
.shellabout .sa-main { display: flex; gap: 14px; padding: 2px 6px; }
.shellabout .sa-ico svg { width: 32px; height: 32px; }
.shellabout .sa-text { flex: 1; line-height: 15px; }
.shellabout .sa-text hr.sep { margin: 6px 0; }
/* Calculator, Scientific view */
.calc.sci .disp { margin: 6px 8px 6px; }
.calc .sci-row { display: flex; gap: 6px; padding: 0 8px; margin-bottom: 4px; align-items: center; }
.calc .cg { margin: 0; padding: 2px 6px; display: flex; gap: 8px; align-items: center; flex: 1; box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hilight); border: 0; }
.calc .cg.invhyp { flex: none; }
.calc .sci-row .mbox { margin: 0; width: 34px; height: 24px; flex: none; }
.calc .sci-top { display: flex; gap: 5px; margin-left: auto; }
.calc .sci-top .btn { min-width: 62px; height: 26px; padding: 0; color: #f00; }
.calc .sci-keys { display: flex; gap: 10px; padding: 4px 8px 10px; }
.calc .kgrid { display: grid; grid-auto-rows: 26px; gap: 4px; }
.calc .kgrid.g1 { grid-template-columns: 36px; }
.calc .kgrid.g3 { grid-template-columns: repeat(3, 36px); }
.calc .kgrid.g6 { grid-template-columns: repeat(6, 36px); }
.calc .sci-keys .btn { min-width: 0; padding: 0; color: #00f; height: 26px; }
.calc .sci-keys .btn.red, .calc .sci-keys .btn.mem { color: #f00; }
.calc .sci-keys .btn.fn { color: #800080; }
.calc .sci-keys .btn.blue { color: #00f; }
.calc .btn:disabled { color: var(--shadow) !important; text-shadow: 1px 1px var(--hilight); }
.calcstat .cs { flex: 1; gap: 6px; }
.calcstat .cs-list { flex: 1; min-height: 90px; text-align: right; }
.calcstat .cs-btns { display: flex; gap: 4px; }
.calcstat .cs-btns .btn { min-width: 0; flex: 1; padding: 0; color: #00f; }
.calcstat .cs-n { padding: 1px 4px; box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hilight); }
@media (pointer: coarse) { .calc .kgrid { grid-auto-rows: 34px; } .calc .kgrid.g1 { grid-template-columns: 42px; } .calc .kgrid.g3 { grid-template-columns: repeat(3, 42px); } .calc .kgrid.g6 { grid-template-columns: repeat(6, 42px); } .calc .sci-keys .btn { height: 34px; } .wordpad .wp-tb { width: 30px; height: 28px; } }

/* ── Explorer (Phase 2) ── */
.explorer98 .ex-bars { flex: none; margin-bottom: 2px; }
.explorer98 .ex-bars > .toolbar, .explorer98 .ex-bars > .addrbar { margin: 0; border-top: 1px solid var(--hilight); border-bottom: 1px solid var(--shadow); box-shadow: none; }
.explorer98 .ex-std { padding: 1px 2px; gap: 0; flex-wrap: nowrap; overflow: hidden; }
.explorer98 .ex-std > * { flex: none; }
.explorer98 .ex-std .toolbtn { min-width: 50px; padding: 2px 3px 1px; }
.explorer98 .ex-std .toolbtn:active:not(:disabled) { padding: 3px 2px 0 4px; }
.explorer98 .ex-std .toolbtn svg { width: 20px; height: 20px; filter: grayscale(1); }
.explorer98 .ex-std .toolbtn:hover:not(:disabled) svg, .explorer98 .ex-go:hover svg { filter: none; }
.explorer98 .toolbtn:disabled svg { filter: grayscale(1) brightness(1.5) contrast(.45) drop-shadow(1px 1px 0 var(--hilight)); }
.explorer98 .toolbtn:disabled .tl { color: var(--shadow); text-shadow: 1px 1px var(--hilight); }
.explorer98 .ex-std.nolabels .tl { display: none; }
.explorer98 .ex-std.nolabels .toolbtn { min-width: 0; padding: 3px; }
.explorer98 .ex-splitbtn { display: inline-flex; align-items: stretch; }
.explorer98 .ex-std .toolbtn.ex-arrow { min-width: 0; width: 11px; padding: 0; justify-content: center; }
.ex-tri { display: block; width: 0; height: 0; border-left: 3px solid transparent; border-right: 3px solid transparent; border-top: 3px solid var(--text); }
.toolbtn:disabled .ex-tri { border-top-color: var(--shadow); }
.explorer98 .ex-addr { padding: 2px 2px 2px 4px; gap: 4px; }
.ex-alab { color: var(--text); }
.ex-combo { flex: 1; min-width: 0; display: flex; align-items: center; height: 22px; padding: 2px; background: var(--window-bg); box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hilight), inset 2px 2px var(--dkshadow), inset -2px -2px var(--light); }
.ex-combo input[type=text] { flex: 1; min-width: 0; height: 18px; padding: 0 3px; box-shadow: none; }
.ex-aico { width: 16px; height: 16px; flex: none; margin-left: 1px; }
.ex-aico svg, .ex-aico img { width: 16px; height: 16px; display: block; }
.ex-ddbtn { flex: none; width: 16px; height: 18px; padding: 0; border: 0; display: flex; align-items: center; justify-content: center; background: var(--face); box-shadow: inset -1px -1px var(--dkshadow), inset 1px 1px var(--light), inset -2px -2px var(--shadow), inset 2px 2px var(--hilight); }
.ex-ddbtn:active { box-shadow: inset 1px 1px var(--shadow); }
.explorer98 .ex-go { flex-direction: row !important; min-width: 0 !important; gap: 3px; }
.explorer98 .ex-go svg { width: 16px; height: 16px; filter: grayscale(1); }
/* Toolbar glyphs cut from the original bitmap strips (assets.js): drawn at their own pixel size,
   the gray "cold" picture at rest and the colour "hot" one under the pointer or pressed. */
.toolbar svg.ico-sprite, .explorer98 .ex-std .toolbtn svg.ico-sprite, .explorer98 .ex-go svg.ico-sprite { width: var(--sw); height: var(--sh); min-width: 0; min-height: 0; }
.explorer98 .ex-std .toolbtn:not(:disabled) svg.ico-sprite.hc, .explorer98 .ex-go:not(:disabled) svg.ico-sprite.hc { filter: none; }
svg.ico-sprite.hc .hot { display: none; }
.toolbtn:hover:not(:disabled) svg.ico-sprite.hc .hot, .toolbtn:active:not(:disabled) svg.ico-sprite.hc .hot, .toolbtn.on svg.ico-sprite.hc .hot { display: inline; }
.toolbtn:hover:not(:disabled) svg.ico-sprite.hc .cold, .toolbtn:active:not(:disabled) svg.ico-sprite.hc .cold, .toolbtn.on svg.ico-sprite.hc .cold { display: none; }
.toolbtn:disabled svg.ico-sprite { filter: grayscale(1) brightness(1.5) contrast(.45) drop-shadow(1px 1px 0 var(--hilight)); }
.ex-dd { position: absolute; z-index: 100001; background: var(--window-bg); color: var(--window-text); border: 1px solid var(--dkshadow); max-height: 320px; overflow: auto; padding: 1px 0; }
.ex-ddrow { display: flex; align-items: center; gap: 4px; height: 18px; white-space: nowrap; padding-right: 6px; }
.ex-ddrow.sel { background: var(--sel-bg); color: var(--sel-text); }
.ex-ddrow .bf-ico svg { width: 16px; height: 16px; display: block; }

.ex-main { flex: 1; display: flex; min-height: 0; }
.ex-treepane { flex: none; display: flex; flex-direction: column; min-width: 0; }
.ex-panehdr { flex: none; display: flex; align-items: center; justify-content: space-between; height: 20px; padding: 0 2px 0 5px; margin-bottom: 1px; box-shadow: inset -1px -1px var(--shadow), inset 1px 1px var(--hilight); white-space: nowrap; overflow: hidden; }
.ex-paneclose { flex: none; width: 16px; height: 14px; padding: 0; border: 0; background: transparent; display: flex; align-items: center; justify-content: center; }
.ex-paneclose:hover { box-shadow: inset -1px -1px var(--shadow), inset 1px 1px var(--hilight); }
.ex-paneclose:active { box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hilight); }
.ex-paneclose svg { display: block; }
.ex-treefield { flex: 1; min-height: 0; display: flex; padding: 2px; }
.ex-tree { flex: 1; min-width: 0; overflow: auto; outline: none; padding: 2px 2px 2px 3px; }
.ex-tree .bf-row { cursor: default; }
.ex-tree .bf-tog { cursor: default; }
.ex-tree .bf-row.droptarget .bf-lab { background: var(--sel-bg); color: var(--sel-text); }
.ex-tree:not(:focus) .bf-row.sel .bf-lab { background: var(--face); color: var(--text); }
.ex-tree:focus .bf-row.sel .bf-lab { outline: 1px dotted var(--sel-text); outline-offset: -1px; }
.ex-splitter { flex: none; width: 4px; cursor: col-resize; touch-action: none; }
.explorer98 .ex-content { flex: 1; min-width: 0; }
.ex-sideico { display: block; width: 32px; height: 32px; }
.ex-sideico svg, .ex-sideico img { width: 32px; height: 32px; display: block; }
.ex-thumb { display: block; max-width: 100%; max-height: 130px; margin-top: 10px; border: 1px solid var(--shadow); image-rendering: pixelated; }
.ex-cap { height: 10px; border: 1px solid #000; background: #ff00ff; margin: 6px 0 4px; }
.ex-cap > div { height: 100%; background: #0000ff; }
.ex-capk { display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.ex-sq { display: inline-block; flex: none; width: 11px; height: 11px; border: 1px solid #000; }

/* the folder view in its four modes */
.exv { position: relative; outline: none; }
.exv .item .ico { position: relative; }
.exv .item.sel .ico::after { pointer-events: none; content: ""; position: absolute; inset: 0; background: var(--sel-bg); opacity: .5; -webkit-mask: var(--mask) center / contain no-repeat; mask: var(--mask) center / contain no-repeat; }
.exv .item.cutitem .ico { opacity: .45; }
.exv:focus .item.focus .lbl { outline: 1px dotted var(--window-text); outline-offset: -1px; }
.exv:focus .item.focus.sel .lbl { outline-color: #ff0; }
.exv.mode-icons .item .lbl { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.exv.mode-icons .item.sel .lbl, .exv.mode-icons .item.focus .lbl { display: block; -webkit-line-clamp: none; position: relative; z-index: 2; }
.exv.mode-small, .exv.mode-list { padding: 2px; gap: 0; }
.exv.mode-list { flex-direction: column; flex-wrap: wrap; align-content: flex-start; overflow-x: auto; overflow-y: hidden; touch-action: pan-x; }
.exv.mode-small .item, .exv.mode-list .item { flex-direction: row; align-items: center; height: 18px; padding: 0 1px; }
.exv.mode-small .item { width: 152px; }
.exv.mode-list .item { width: auto; max-width: 240px; margin-right: 14px; }
.exv.mode-small .item .ico svg, .exv.mode-small .item .ico img, .exv.mode-list .item .ico svg, .exv.mode-list .item .ico img { width: 16px; height: 16px; }
.exv.mode-small .item .ico, .exv.mode-list .item .ico { width: 16px; height: 16px; flex: none; }
.exv.mode-small .item .lbl, .exv.mode-list .item .lbl { margin: 0 0 0 3px; padding: 0 2px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 128px; line-height: 14px; }
.exv.mode-list .item .lbl { max-width: 216px; }
.exv.free { display: block; }
.exv.free .item { position: absolute; }
.exv.mode-details { display: block; padding: 0; overflow: auto; }
.exv.mode-details .hdr, .exv.mode-details .item { display: grid; grid-template-columns: var(--cols); width: max-content; min-width: 100%; padding: 0; }
.exv.mode-details .hdr { position: sticky; top: 0; z-index: 3; }
.exv.mode-details .hc { position: relative; height: 18px; padding: 2px 6px 0; background: var(--face); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: inset -1px -1px var(--dkshadow), inset 1px 1px var(--hilight), inset -2px -2px var(--shadow); }
.exv.mode-details .hc.down { box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--shadow); padding: 3px 5px 0 7px; }
.exv.mode-details .hc.r { text-align: right; }
.exv.mode-details .hc .ex-grip { position: absolute; right: 0; top: 0; bottom: 0; width: 6px; cursor: col-resize; touch-action: none; }
.exv.mode-details .item { height: 17px; align-items: center; flex-direction: row; }
.exv.mode-details .item > div { padding: 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.exv.mode-details .item > div.r { text-align: right; }
.exv.mode-details .item .nm { display: flex; align-items: center; gap: 2px; padding-left: 2px; }
.exv.mode-details .item .nm .ico, .exv.mode-details .item .nm .ico svg, .exv.mode-details .item .nm .ico img { width: 16px; height: 16px; flex: none; display: block; }
.exv.mode-details .item .lbl { margin: 0; padding: 0 2px; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exv .lbl input { width: 100%; min-width: 60px; }
.exv.webstyle .item .lbl { text-decoration: underline; }
.exv.webstyle .item { cursor: pointer; }
.ex-marq { position: absolute; z-index: 4; pointer-events: none; border: 1px dotted var(--window-text); }
.explorer98 .statusbar .ex-stsize { flex: none; width: 96px; }
.explorer98 .statusbar .ex-zone { display: flex; align-items: center; gap: 3px; width: 150px; }
.ex-zico svg, .ex-zico img { width: 16px; height: 16px; display: block; }

/* Properties and Folder Options */
.ex-gen { display: flex; flex-direction: column; }
.ex-ph { display: flex; align-items: center; gap: 12px; margin: 0 0 4px; }
.ex-pi { width: 32px; height: 32px; flex: none; display: block; }
.ex-pi svg, .ex-pi img { width: 32px; height: 32px; display: block; }
.ex-ph .ex-pname { flex: 1; min-width: 0; }
.ex-pname:disabled { background: var(--face); color: var(--text); }
.ex-pg { display: grid; grid-template-columns: 84px 1fr; gap: 7px 4px; align-items: baseline; }
.ex-pg > span { overflow-wrap: anywhere; }
.ex-attrs { display: grid; grid-template-columns: 84px 1fr; align-items: start; }
.ex-attr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 4px; }
.ex-attr-cb { color: var(--shadow); }
.ex-space { display: grid; grid-template-columns: 14px 78px 1fr 64px; gap: 7px 6px; align-items: center; }
.ex-space .r { text-align: right; white-space: nowrap; }
.ex-pie { display: flex; justify-content: center; margin-top: 10px; }
.ex-drivec { text-align: center; margin-top: 2px; }
.ex-tool { margin-bottom: 8px; }
.ex-tool-row { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 6px; line-height: 14px; }
.ex-fo > label { display: flex; margin-top: 4px; }
.ex-fo-note { margin: 2px 0 6px 20px; line-height: 14px; }
.ex-fo-row { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; }
.ex-adv { height: 168px; overflow: auto; margin: 4px 0 8px; }
.ex-advrow { display: flex !important; align-items: center; gap: 4px; height: 18px; white-space: nowrap; }
.ex-advrow .bf-ico svg { width: 16px; height: 16px; display: block; }
@media (pointer: coarse) {
  .exv.mode-details .item { height: 28px; }
  .exv.mode-small .item, .exv.mode-list .item { height: 28px; }
  .ex-tree .bf-row { height: 28px; }
  .ex-tree .bf-tog { width: 15px; height: 15px; line-height: 13px; }
  .ex-splitter { width: 10px; }
  .exv.mode-details .hc .ex-grip { width: 14px; }
  .ex-ddrow { height: 28px; }
}
.exv.mode-details .item .lbl { max-width: none; }
/* Check and radio marks need the menu's left gutter (Explorer's View menu has both). */
.menu:not(.startmenu):not(.withicons):has(> .row > .chk) > .row { padding-left: 20px; }
/* Drop-down lists (js/dropdown.js): Windows 98's combo-box list, not the host's menu. */
.dd-list { position: absolute; z-index: 100000; box-sizing: border-box; background: var(--window-bg, #fff); color: var(--window-text, #000); border: 1px solid #000; overflow-y: auto; overflow-x: hidden; white-space: nowrap; }
.dd-list .dd-item { padding: 0 3px; height: 16px; line-height: 16px; cursor: default; }
.dd-list .dd-item.hi { background: var(--sel-bg); color: var(--sel-text); }
.dd-list .dd-item.dis { color: var(--gray-text, #808080); }
.dd-list .dd-item.in-group { padding-left: 12px; }
.dd-list .dd-group { padding: 0 3px; height: 16px; line-height: 16px; font-weight: bold; }
/* TrueType text (documents, mail, Character Map, a TrueType font picked in Notepad) is drawn
   smoothed: unhinted TrueType with smoothing off breaks into faint, spindly strokes. Windows'
   own bitmap faces (the UI, Fixedsys, Terminal) keep the pixel-exact rule above. */
html.bitmap-fonts #screen .mailx .mx-text, html.bitmap-fonts #screen .wp-doc, html.bitmap-fonts #screen .wp-doc *,
html.bitmap-fonts #screen .wr-page, html.bitmap-fonts #screen .wr-page *, html.bitmap-fonts #screen .cm-grid, html.bitmap-fonts #screen .cm-grid *,
html.bitmap-fonts #screen .cm-zoom, html.bitmap-fonts #screen .tt-smooth, html.bitmap-fonts #screen .tt-smooth * { -webkit-font-smoothing: antialiased; font-smooth: auto; }
/* Desktop labels as Windows 98 drew them: two lines and "...", the whole name only
   while the icon is selected, drawn over the icons below (as Explorer's Large Icons). */
.dicon .lbl { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dicon.sel .lbl { display: block; -webkit-line-clamp: none; overflow: visible; }
.dicon.sel { z-index: 5; }


/* Phase 6: the start-up and shut-down screens (js/boot.js, js/bios-setup.js) */
.bios.post { position: absolute; inset: 0; padding: 18px 24px; overflow: hidden; }
.post-text { white-space: pre; }
.post-energy { position: absolute; right: 26px; top: 18px; width: 150px; height: 74px; border: 2px solid #3a3; color: #3c3; display: flex; flex-direction: column; align-items: center; justify-content: center; font: italic bold 26px Arial, sans-serif; }
.post-energy span { font: 9px "Courier New", monospace; letter-spacing: 1px; margin-top: 4px; }
.post-bottom { position: absolute; left: 24px; right: 24px; bottom: 16px; }
.post-del { cursor: var(--cur-pointer, pointer); }
.post-foot { margin-top: 4px; }
.safe-hint { font-size: 13px; margin-top: 40px; color: #a65a00; }
.standby { position: fixed; inset: 0; z-index: 300000; background: #000; cursor: none; }
.y2k-tip { z-index: 99000; }
.scandisk-dos { position: absolute; inset: 0; background: #0000a8; color: #c0c0c0; font: 15px/19px "Courier New", monospace; display: flex; flex-direction: column; white-space: pre-wrap; }
.scandisk-dos .sd-title { background: #c0c0c0; color: #000; padding: 0 8px; }
.scandisk-dos .sd-body { flex: 1; padding: 14px 40px; max-width: 760px; }
.scandisk-dos p { margin: 0 0 12px; }
.scandisk-dos .sd-areas { margin: 6px 0 16px 30px; color: #fff; }
.scandisk-dos .sd-mark { display: inline-block; width: 14px; color: #ff5; }
.scandisk-dos .sd-dosprog { display: flex; gap: 12px; align-items: center; }
.scandisk-dos .sd-dosbar { width: 320px; height: 14px; background: #000060; border: 1px solid #c0c0c0; }
.scandisk-dos .sd-dosbar i { display: block; height: 100%; width: 0; background: #ff5; }
.scandisk-dos .sd-dosstatus { margin-top: 10px; color: #fff; }
.scandisk-dos .sd-keys { background: #c0c0c0; color: #000; padding: 0 8px; }
.dosbox.dosmode { position: absolute; inset: 0; display: flex; flex-direction: column; background: #000; }
.dosbox.dosmode .dos-screen { font-size: 18px; padding: 10px 14px; }
.cmos { position: absolute; inset: 0; background: #0000a8; color: #fff; font: 15px/20px "Courier New", monospace; padding: 12px 0; white-space: pre; overflow: hidden; -webkit-user-select: none; user-select: none; }
.cmos-head { text-align: center; color: #fff; margin-bottom: 10px; }
.cmos-head div:nth-child(2) { color: #ff5; }
.cmos-menu { display: grid; grid-template-columns: 1fr 1fr; grid-auto-flow: column; grid-template-rows: repeat(7, auto); gap: 6px 30px; margin: 0 auto; width: 640px; border: 3px double #fff; padding: 14px 20px; }
.cmos-item { color: #ff5; padding: 0 4px; cursor: default; }
.cmos-item.on { background: #c00000; color: #fff; }
.cmos-page { width: 720px; margin: 0 auto; border: 3px double #fff; padding: 12px 18px; min-height: 360px; }
.cmos-row { color: #fff; }
.cmos-row.plain { color: #c0c0c0; }
.cmos-label { color: #fff; }
.cmos-val { color: #ff5; padding: 0 2px; cursor: default; }
.cmos-val.fixed { color: #c0c0c0; }
.cmos-val.on { background: #c00000; color: #fff; }
.cmos-sep { border-top: 1px solid #c0c0c0; margin: 6px 0; }
.cmos-keys { width: 720px; margin: 10px auto 0; border: 3px double #fff; padding: 6px 18px; color: #fff; }
.cmos-help { width: 720px; margin: 6px auto 0; text-align: center; color: #fff; }
.cmos-back { position: absolute; left: 12px; top: 12px; color: #ff5; padding: 2px 8px; border: 1px solid #ff5; cursor: default; }
.cmos-ask { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); background: #c00000; color: #fff; border: 3px double #fff; padding: 10px 24px; white-space: pre; }
.cmos-ask b { color: #ff5; }
/* Date/Time Properties */
.dt-time { display: flex; align-items: stretch; margin-top: 6px; }
.dt-edit { display: flex; align-items: center; padding: 1px 3px; background: var(--window-bg); color: var(--window-text); }
.propsheet .dt-f, .dt-f { width: 20px; border: 0 !important; box-shadow: none !important; height: 16px; padding: 0; text-align: center; font: inherit; background: transparent; color: inherit; outline: none; }
.dt-f:focus { background: var(--sel-bg); color: var(--sel-text); }
.dt-ap { width: 22px; }
.dt-spin { display: flex; flex-direction: column; }
.dt-spin .btn { min-width: 0; width: 16px; height: 10px; padding: 0; font-size: 8px; line-height: 8px; }

/* Windows 98's error states (js/faults.js). The blue screen and the protection error are
   the 80×25 text mode: a 640×400 page of 8×16 cells, stretched to the screen as a CRT did. */
.w98-textmode { position: fixed; inset: 0; z-index: 2147483000; overflow: hidden; cursor: none; user-select: none; -webkit-user-select: none; }
.w98-textmode-page { position: absolute; left: 0; top: 0; width: 640px; height: 400px; transform-origin: 0 0; font: 13.333px/16px "Lucida Console", "Courier New", monospace; -webkit-font-smoothing: none; }
.w98-textmode .row { height: 16px; white-space: pre; overflow: hidden; }
.w98-bsod { background: #0000aa; }
.w98-bsod .w98-textmode-page { color: #fff; }
.w98-bsod .w98-tm-title { background: #aaa; color: #0000aa; }
.w98-tm-cursor { animation: w98blink 0.5s steps(1) infinite; }
@keyframes w98blink { 50% { visibility: hidden; } }
.w98-protection { background: #000; }
.w98-protection .w98-textmode-page { color: #aaa; }
/* "This program has performed an illegal operation": Close and Details >> on the right. */
.w98-fault-top { display: flex; gap: 12px; align-items: flex-start; }
.w98-fault-top .msg { flex: 1; }
.w98-fault-top .msg .txt { white-space: pre; max-width: none; }
.w98-fault-ico svg { width: 32px; height: 32px; }
.w98-fault-btns { display: flex; flex-direction: column; gap: 6px; padding-top: 6px; }
.w98-fault-btns .btn { min-width: 75px; }
.w98-fault-details { width: 100%; box-sizing: border-box; height: 132px; resize: none; font: 12px/14px "Lucida Console", "Courier New", monospace; white-space: pre; overflow: auto; background: #fff; color: #000; }
/* Windows Help popups (js/help.js): the glossary popups in help topics and What's This? */
.hh-popupwin { position: absolute; z-index: 100000; max-width: 300px; padding: 6px 8px; background: #ffffe1; color: #000; border: 1px solid #000; box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5); font-size: 11px; line-height: 1.3; }
.hh-popupwin p { margin: 0 0 5px; }
.hh-popupwin p:last-child { margin-bottom: 0; }
.hh-popupwin a { color: #008000; }
html.whatsthis #screen, html.whatsthis #screen * { cursor: var(--cur-help, help) !important; }
/* 16 and 256 colours: Windows 98 drew title bars (and the Start menu's banner) in the
   solid first colour, with no gradient. */
html.lowcolor .titlebar { background: var(--title-i1); }
html.lowcolor .win.active > .titlebar { background: var(--title-a1); }
html.lowcolor .menu.startmenu .banner { background: var(--title-a1); }

/* ── Marlett frame controls (js/marlett.js) ──
   Windows 98 drew these with DrawFrameControl from the Marlett font; js/marlett.js renders
   the genuine glyphs pixel-exact (the font's own hinting) in the colour scheme and sets the
   --mt-* images. Without the original font <html> has no .marlett class and the pixel copies
   above stay. */
.menu .row .mglyph .mt { display: none; }
html.marlett .tbtn { background-size: auto; background-position: 0 0; }
html.marlett .tbtn:active { background-position: 1px 1px; }
html.marlett .tbtn.close { background-image: var(--mt-close); }
html.marlett .tbtn.minb { background-image: var(--mt-min); background-position: 0 0; }
html.marlett .tbtn.minb:active { background-position: 1px 1px; }
html.marlett .tbtn.maxb { background-image: var(--mt-max); }
html.marlett .win.max .tbtn.maxb { background-image: var(--mt-restore); }
html.marlett .tbtn.help { background-image: var(--mt-help); font-size: 0; color: transparent; }
html.marlett .tbtn:disabled { opacity: 1; }
html.marlett .tbtn.close:disabled { background-image: var(--mt-close-dis); }
html.marlett .tbtn.minb:disabled { background-image: var(--mt-min-dis); }
html.marlett .tbtn.maxb:disabled { background-image: var(--mt-max-dis); }
html.marlett .win.max .tbtn.maxb:disabled { background-image: var(--mt-restore-dis); }
html.marlett .tbtn.help:disabled { background-image: var(--mt-help-dis); }
@media (pointer: coarse) {
  html.marlett .tbtn.close { background-image: var(--mt-close-lg); }
  html.marlett .tbtn.minb { background-image: var(--mt-min-lg); }
  html.marlett .tbtn.maxb { background-image: var(--mt-max-lg); }
  html.marlett .win.max .tbtn.maxb { background-image: var(--mt-restore-lg); }
  html.marlett .tbtn.help { background-image: var(--mt-help-lg); }
  html.marlett .tbtn.close:disabled { background-image: var(--mt-close-lg-dis); }
  html.marlett .tbtn.minb:disabled { background-image: var(--mt-min-lg-dis); }
  html.marlett .tbtn.maxb:disabled { background-image: var(--mt-max-lg-dis); }
}
/* scroll-bar arrows: the glyph alone over the CSS bevel; pressed, the button goes flat and the arrow moves 1 px */
html.marlett .win ::-webkit-scrollbar-button, html.marlett .dd-list::-webkit-scrollbar-button { background-position: 0 0; }
html.marlett .win ::-webkit-scrollbar-button:vertical:start:decrement, html.marlett .dd-list::-webkit-scrollbar-button:vertical:start:decrement { background-image: var(--mt-up); }
html.marlett .win ::-webkit-scrollbar-button:vertical:end:increment, html.marlett .dd-list::-webkit-scrollbar-button:vertical:end:increment { background-image: var(--mt-down); }
html.marlett .win ::-webkit-scrollbar-button:horizontal:start:decrement, html.marlett .dd-list::-webkit-scrollbar-button:horizontal:start:decrement { background-image: var(--mt-left); }
html.marlett .win ::-webkit-scrollbar-button:horizontal:end:increment, html.marlett .dd-list::-webkit-scrollbar-button:horizontal:end:increment { background-image: var(--mt-right); }
html.marlett .win ::-webkit-scrollbar-button:active, html.marlett .dd-list::-webkit-scrollbar-button:active { box-shadow: inset 0 0 0 1px var(--shadow); background-position: 1px 1px; }
/* Check boxes (13×13) and radio buttons (12×12), whole, in place of the host's controls.
   They stay real <input>s: clickable, focusable, read by screen readers. */
html.marlett input[type=checkbox], html.marlett input[type=radio] {
  -webkit-appearance: none; appearance: none; flex: none; width: 13px; height: 13px; margin: 0; padding: 0; border: 0; border-radius: 0;
  background: var(--mt-chk-off) 0 0 no-repeat; outline: none; vertical-align: -2px; box-shadow: none;
}
html.marlett input[type=radio] { width: 12px; height: 12px; background-image: var(--mt-rad-off); }
html.marlett input[type=checkbox]:checked { background-image: var(--mt-chk-on); }
html.marlett input[type=checkbox]:active:not(:disabled) { background-image: var(--mt-chk-push); }
html.marlett input[type=checkbox]:checked:active:not(:disabled) { background-image: var(--mt-chk-pushon); }
html.marlett input[type=checkbox]:disabled { background-image: var(--mt-chk-dis); }
html.marlett input[type=checkbox]:checked:disabled { background-image: var(--mt-chk-dison); }
html.marlett input[type=radio]:checked { background-image: var(--mt-rad-on); }
html.marlett input[type=radio]:active:not(:disabled) { background-image: var(--mt-rad-push); }
html.marlett input[type=radio]:checked:active:not(:disabled) { background-image: var(--mt-rad-pushon); }
html.marlett input[type=radio]:disabled { background-image: var(--mt-rad-dis); }
html.marlett input[type=radio]:checked:disabled { background-image: var(--mt-rad-dison); }
/* the focus rectangle Windows drew round the control's label */
html.marlett label > input:is([type=checkbox],[type=radio]):focus-visible ~ span { outline: 1px dotted var(--text); outline-offset: 0; }
html.marlett label:not(:has(> span)):has(> input:is([type=checkbox],[type=radio]):focus-visible) { outline: 1px dotted var(--text); outline-offset: -1px; }
@media (pointer: coarse) {
  /* a bigger target on touch screens; the box itself stays pixel-exact */
  html.marlett input[type=checkbox], html.marlett input[type=radio] { width: 21px; height: 21px; margin: -4px; background-position: center; }
}
/* combo boxes: the raised drop button with Marlett's arrow */
html.marlett select { background-image: var(--mt-combo); background-position: right 2px center; background-size: auto; padding-right: 20px; }
html.marlett select[multiple], html.marlett select[size]:not([size="1"]) { background-image: none; padding-right: 3px; }
/* menus: the check mark, the radio bullet and the submenu arrow, over currentColor */
html.marlett .menu .row .chk { top: 50%; left: 6px; width: 7px; height: 7px; margin-top: -4px; font-size: 0; background: currentColor; -webkit-mask: var(--mt-mcheck) 0 0 no-repeat; mask: var(--mt-mcheck) 0 0 no-repeat; }
html.marlett .menu .row .chk.radio { left: 7px; width: 6px; height: 6px; margin-top: -3px; -webkit-mask-image: var(--mt-mbullet); mask-image: var(--mt-mbullet); }
html.marlett .menu .row.sub::after { border: 0; width: 4px; height: 7px; margin-top: -4px; background: currentColor; -webkit-mask: var(--mt-marrow) 0 0 no-repeat; mask: var(--mt-marrow) 0 0 no-repeat; }
html.marlett .menu .row .mglyph[data-g] svg { display: none; }
html.marlett .menu .row .mglyph[data-g] .mt { display: block; width: 16px; height: 14px; margin: 0 -1px; background: currentColor; -webkit-mask: var(--mt-sys-close) 0 0 no-repeat; mask: var(--mt-sys-close) 0 0 no-repeat; }
html.marlett .menu .row .mglyph[data-g=min] .mt { -webkit-mask-image: var(--mt-sys-min); mask-image: var(--mt-sys-min); }
html.marlett .menu .row .mglyph[data-g=max] .mt { -webkit-mask-image: var(--mt-sys-max); mask-image: var(--mt-sys-max); }
html.marlett .menu .row .mglyph[data-g=restore] .mt { -webkit-mask-image: var(--mt-sys-restore); mask-image: var(--mt-sys-restore); }
html.marlett .menu .row.dis .mglyph[data-g] { filter: drop-shadow(1px 1px 0 var(--hilight)); }
html.marlett .menu .row.dis.hi .mglyph[data-g] { filter: none; }
/* an editable combo box (Run's Open box): a text field with the drop button */
html.marlett input.dlu-comboedit { background-image: var(--mt-combo); background-repeat: no-repeat; background-position: right 2px center; padding-right: 20px; }
/* Find: All Files (js/apps/find.js): the results list, a Details-view list with its column headers */
.find-results { min-width: max-content; outline: none; background: var(--window-bg); color: var(--window-text); }
.find-results .hdr { display: flex; position: sticky; top: 0; z-index: 1; }
.find-results .hdr > div { height: 17px; line-height: 15px; padding: 0 5px; background: var(--face); color: var(--text); white-space: nowrap; overflow: hidden; box-shadow: inset -1px -1px var(--dkshadow), inset 1px 1px var(--hilight), inset -2px -2px var(--shadow); }
.find-results .item { display: flex; align-items: center; height: 17px; white-space: nowrap; }
.find-results .item > div { overflow: hidden; text-overflow: ellipsis; padding: 0 5px; }
.find-results .item .nm { display: flex; align-items: center; gap: 3px; padding-left: 2px; }
.find-results .item .nm svg, .find-results .item .nm img { width: 16px; height: 16px; flex: none; }
.find-results .item.sel .lbl { background: var(--sel-bg); color: var(--sel-text); }
.find-results:focus .item.sel .lbl { outline: 1px dotted var(--sel-text); outline-offset: -1px; }
.find-results .empty { padding: 6px; }
input.dlu-comboedit::-webkit-calendar-picker-indicator, input.dlu-comboedit::-webkit-list-button { display: none !important; opacity: 0; }
/* the folder window's throbber (browseui.dll BITMAP 306), at the right of its menu bar */
.win > .menubar:has(> .ex-throbber) { height: 22px; align-items: flex-start; }
.win > .menubar > .ex-throbber { margin-left: auto; flex: none; width: 38px; height: 22px; margin-top: 0; margin-right: 1px; display: flex; align-items: center; justify-content: center; background: #000; box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hilight); }
.win > .menubar > .ex-throbber .thr { width: 22px; height: 22px; background-repeat: no-repeat; background-position: 0 0; image-rendering: pixelated; }
.win > .menubar > .ex-throbber.spin .thr { animation: throb98 1.6s steps(40) infinite; }
/* Web View with webvw.dll's own files (js/apps/explorer.js renderSide): WEBVIEW.CSS's faces and margins,
   WVLEFT.BMP behind the panel, WVLINE.GIF under the title, WVLOGO.GIF in C:\Windows's brand pane */
.explorer-side.genuine { background: var(--window-bg) no-repeat 0 0; padding: 15px; font: 8pt/10pt Verdana, Arial, sans-serif; -webkit-font-smoothing: auto; }
.explorer-side.genuine .big { font: bold 16pt/1.15 Verdana, Arial, sans-serif; margin: 10px 0 0; }
.explorer-side.genuine .logoline { display: block; width: 100%; height: 1px; margin: 0 0 20px; }
.explorer-side a.command, .ex-brand a.command { font-weight: bold; color: #0000ff; cursor: var(--cur-hand, pointer); }
.ex-brand { flex: 1; min-width: 0; background: var(--window-bg) no-repeat right bottom; color: var(--window-text); font: 8pt/10pt Verdana, Arial, sans-serif; overflow: hidden; }
.ex-brand p { margin: 15px; }
.exv.ex-hidden { display: none; }
/* Open / Save As (comdlg32 DIALOG 1547): the List / Details toolbar and the Details list */
.listbox.fd-details { display: block !important; overflow: auto !important; }
.fd98 .fd-toolbar .dlg-sq { width: 23px; min-width: 23px; height: 22px; padding: 0; justify-content: center; }
.ow-row { display: flex; gap: 6px; align-items: center; padding: 1px 2px; height: 18px; }
.ow-row .ow-ico { width: 16px; height: 16px; flex: none; display: inline-block; }
.ow-row .ow-ico svg, .ow-row .ow-ico img { width: 16px; height: 16px; display: block; }
.ow-row.sel .lbl { background: var(--sel-bg); color: var(--sel-text); }
/* dragging files: ole32.dll's cursors (assets.js), the move arrow or the no-drop sign */
html[data-drag=move] #screen, html[data-drag=move] #screen *, html[data-drag=move] .ghost { cursor: var(--cur-drag-move, default) !important; }
html[data-drag=no] #screen, html[data-drag=no] #screen *, html[data-drag=no] .ghost { cursor: var(--cur-drag-no, no-drop) !important; }

/* ── the writer's full-screen view: our own layout and colours ── */
.wp-full { position: fixed; inset: 0; z-index: 190000; display: flex; flex-direction: column; font: 20px/1.6 "Courier New", Courier, monospace; cursor: text; }
.wp-full.blue { background: #0b1f6b; color: #e6e9f2; }
.wp-full.black { background: #0a0a0a; color: #d6d2c4; }
.wp-full .wpf-scroll { flex: 1; overflow: hidden; position: relative; }
.wp-full .wp-doc { width: 66ch !important; max-width: calc(100vw - 48px); min-height: 0; margin: 0 auto !important; padding: 45vh 0 55vh !important; background: transparent !important; caret-color: transparent; white-space: pre-wrap; }
.wp-full .wp-doc, .wp-full .wp-doc * { font-family: "Courier New", Courier, monospace !important; font-size: 20px !important; line-height: 1.6 !important; color: inherit !important; background-color: transparent !important; text-indent: 0 !important; }
.wp-full .wp-doc p, .wp-full .wp-doc li { margin: 0 0 0.8em !important; text-align: left !important; }
.wp-full .wp-doc ::selection { background: #e6e9f2; color: #0b1f6b; }
.wp-full.black .wp-doc ::selection { background: #d6d2c4; color: #0a0a0a; }
.wp-full .wpf-caret { position: absolute; width: 1ch; background: #fff; mix-blend-mode: difference; pointer-events: none; }
.wp-full .wpf-caret.blink { animation: wpf-blink 1.1s steps(1) infinite; }
@keyframes wpf-blink { 50% { opacity: 0; } }
.wp-full .wpf-status { display: flex; gap: 3ch; padding: 6px 24px; font-size: 15px; white-space: pre; opacity: 0.75; }
.wp-full .wpf-left { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.wp-full .wpf-hint { display: flex; gap: 3ch; }
.wp-full .wpf-hint.gone { display: none; } /* only while a goal is being typed */
.wp-full .wpf-askbtns { display: flex; gap: 3ch; }
.wp-full .wpf-do { cursor: pointer; }
.wp-full .wpf-do:hover { text-decoration: underline; }
.wp-full .wpf-right { min-width: 10ch; text-align: right; } /* "Saving..." has its own place: nothing else moves or is covered when it appears */

/* ── the writer's chapter list ── */
.wordpad .wp-row { flex: 1; min-height: 0; display: flex; }
.wordpad .wp-row .wp-scroll { flex: 1; min-width: 0; }
.wp-side { flex: none; width: 150px; display: flex; flex-direction: column; gap: 3px; padding: 3px; background: var(--face); min-height: 0; }
.wp-side-h { font-weight: bold; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 1px 2px; }
.wp-chs { flex: 1; min-height: 40px; overflow: auto; background: #fff; box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hilight), inset 2px 2px var(--dkshadow), inset -2px -2px var(--light); padding: 2px; }
.wp-ch { display: flex; gap: 6px; padding: 1px 3px; white-space: nowrap; cursor: var(--cur-default, default); border-top: 2px solid transparent; border-bottom: 2px solid transparent; }
.wp-ch-t { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.wp-ch-n { color: #808080; }
.wp-ch.cur { background: var(--sel-bg); color: var(--sel-text); }
.wp-ch.cur .wp-ch-n { color: inherit; }
.wp-ch.dragging { opacity: 0.5; }
.wp-ch.drop-before { border-top-color: #000; }
.wp-ch.drop-after { border-bottom-color: #000; }
.wp-notes { background: #fff; box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hilight); }
.wp-side-f { color: #000; padding: 1px 2px; line-height: 1.4; }

/* ── Import Your Work ── */
.wp-imp { display: flex; flex-direction: column; gap: 6px; flex: 1; min-height: 0; }
.wp-imp-row { display: flex; align-items: center; gap: 6px; }
.wp-imp-row input[type=text] { flex: 1; }
.wp-imp-list { flex: 1; min-height: 60px; overflow: auto; background: #fff; padding: 2px 4px; }
.wp-imp-item { display: flex; gap: 8px; white-space: nowrap; }
.wp-imp-split { display: flex; align-items: center; gap: 4px; }
.wp-imp-note { min-height: 1.3em; color: #000080; }
.wp-side .wp-import { white-space: nowrap; }

/* ── Earlier Versions ── */
.wp-ver { display: flex; flex-direction: column; gap: 6px; flex: 1; min-height: 0; }
.wp-ver-top { flex: 1; min-height: 0; display: flex; gap: 6px; }
.wp-ver-list { flex: none; width: 190px; overflow: auto; white-space: nowrap; }
.wp-ver-right { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.wp-ver-page { flex: 1; min-height: 0; overflow: auto; background: #fff; box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hilight), inset 2px 2px var(--dkshadow), inset -2px -2px var(--light); }
.wp-ver-view { min-height: 0; padding: 4px 8px; }
.wp-ver-info { color: #000080; min-height: 1.3em; }
.wp-ver-none { color: #000080; }

/* the full-screen status line's session goal */
.wp-full .wpf-goal { white-space: pre; }
.wp-full .wpf-ask { width: 9ch; background: transparent; color: inherit; font: inherit; border: 0; border-bottom: 1px solid currentColor; outline: none; padding: 0; }
.wp-full .wpf-ask.bad { border-bottom-style: dashed; opacity: 0.7; }

/* ── Find in Project ── */
.wp-pf { display: flex; flex-direction: column; gap: 6px; flex: 1; min-height: 0; }
.wp-pf-grid { display: grid; grid-template-columns: auto 1fr; gap: 4px 6px; align-items: center; }
.wp-pf-opts { display: flex; gap: 14px; }
.wp-pf-opts label { display: flex; align-items: center; gap: 4px; }
.wp-pf-results { flex: 1; min-height: 60px; overflow: auto; }
.wp-pf-row { display: flex; gap: 8px; white-space: nowrap; }
.wp-pf-ch { flex: none; width: 96px; overflow: hidden; text-overflow: ellipsis; font-weight: bold; }
.wp-pf-snip { overflow: hidden; text-overflow: ellipsis; white-space: pre; }
.wp-pf-hit { background: #ffff00; color: #000; }
.wp-pf-note { color: #000080; min-height: 1.3em; }

/* ── Your Account ── */
.youraccount .body { display: flex; flex-direction: column; padding: 6px; gap: 6px; }
.ya { display: flex; flex-direction: column; gap: 7px; flex: 1; min-height: 0; }
.ya-row { display: flex; align-items: center; gap: 8px; }
.ya-lab { flex: none; width: 118px; }
.ya-row > .field, .ya-inline { flex: 1; min-width: 0; }
.ya-inline { display: flex; gap: 6px; } .ya-inline .field { flex: 1; min-width: 0; }
.ya-number { font-size: 16px; letter-spacing: 1px; }
.ya-hint { color: #404040; }
.ya-note { color: #000080; min-height: 1.3em; }
.ya-list { flex: 1; min-height: 70px; overflow: auto; }
.ya-empty { color: #808080; padding: 4px; }
.ya fieldset { margin: 0; padding: 6px 8px 8px; display: flex; flex-direction: column; gap: 6px; }
.ya .btns { justify-content: flex-start; } .ya .btns.right { justify-content: flex-end; }
.youraccount .ya-close { display: flex; justify-content: flex-end; }

/* Sign-up: a window on the desktop, one question to a page (js/account.js signUp). */
.su2 { padding: 0 !important; color: var(--text); }
.su2 .su2-main { display: flex; min-height: 268px; }
.su2 .su2-pic { width: 112px; flex: none; margin: 10px 0 10px 10px; display: flex; align-items: center; justify-content: center; background: linear-gradient(#3d86e6, #b8e0ff); box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hilight); }
.su2 .su2-pic svg { width: 64px; height: 64px; }
.su2 .su2-right { flex: 1; min-width: 0; padding: 14px 16px 4px; display: flex; flex-direction: column; }
.su2 .su2-head { font-weight: bold; font-size: 13px; margin-bottom: 10px; }
.su2 .su2-body { flex: 1; }
.su2 .su2-body p { margin: 0 0 8px; }
.su2 .su2-body ul { margin: 0 0 8px 18px; padding: 0; }
.su2 .su2-body li { margin-bottom: 3px; }
.su2 .su2-note { min-height: 28px; color: #800000; }
.su2 .su2-terms { width: 100%; height: 154px; resize: none; margin: 2px 0 8px; font: inherit; box-sizing: border-box; }
.su2 .su2-number { font: bold 32px "Courier New", monospace; letter-spacing: 6px; text-align: center; margin: 8px 0 12px; padding: 6px; background: var(--window, #fff); color: #000; box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hilight), inset 2px 2px var(--dkshadow), inset -2px -2px var(--light); }
.su2 .su2-rule { height: 2px; margin: 0 10px; box-shadow: inset 0 1px var(--shadow), inset 0 -1px var(--hilight); }
.su2 .btns { padding: 10px; }

/* Boxes drawn on the overlay before the desktop is up (sign-in, sign-up) use the desktop's own text colour, not the start-up screen's. */
#overlay .win.logon { color: var(--text); }
.logon-note:empty { display: none; }

/* The system's mark in the corner of Files and Internet Navigator: on a patch of its own sky, and
   it blinks (it does not turn) while something is loading. */
.navigator .throbber, .win > .menubar > .ex-throbber { background: #62a4f4; }
.win > .menubar > .ex-throbber svg { width: 16px; height: 16px; }
.navigator .throbber.spin svg, .win > .menubar > .ex-throbber.spin svg { animation: markbusy 0.7s steps(2, jump-none) infinite; }
@keyframes markbusy { from { opacity: 1; } to { opacity: 0.45; } }

/* Write's small note ("Your document is saved automatically"): over the bottom of the window, gone in a moment. */
.wp-note { left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 5; }
/* A chapter's name being typed over in the list. */
.wp-ch-edit { flex: 1; min-width: 0; height: 15px; margin: -1px 0; padding: 0 1px; border: 1px solid #000; background: #fff; color: #000; font: inherit; outline: none; box-sizing: border-box; }
/* Write: "Save a Copy to Your Computer" */
.wp-copy { display: flex; flex-direction: column; gap: 8px; width: 100%; box-sizing: border-box; }
.wp-copy fieldset { display: flex; flex-direction: column; gap: 5px; margin: 0; }
.wp-copy-opt { display: flex; align-items: flex-start; gap: 6px; }
.wp-copy-opt input { flex: none; margin-top: 1px; }
.wp-side .wp-takecopy { white-space: nowrap; }
/* Write: snapshots in the versions list */
.wp-ver-head { padding: 3px 3px 1px; font-weight: bold; color: #000080; cursor: default; }
.wp-ver-snap { display: flex; flex-direction: column; }
.wp-ver-when { color: var(--gray-text, #808080); padding-left: 10px; }
.wp-ver-list .opt.sel .wp-ver-when { color: inherit; }
/* "There is news": a small NEW on the browser's desktop icon (js/news.js). */
.dicon .news-flag { position: absolute; top: -4px; right: -15px; padding: 0 2px; background: #ffff00; border: 1px solid #d00000; color: #d00000; font: bold 8px/10px Arial, Helvetica, sans-serif; letter-spacing: 0.5px; -webkit-font-smoothing: auto; }

/* A Start menu program being carried to the desktop (wm.js menu(), it.drag). */
.menu-ghost { position: absolute; z-index: 100000; display: flex; align-items: center; gap: 6px; padding: 2px 6px; pointer-events: none; background: var(--sel-bg, #000080); color: var(--sel-text, #fff); opacity: 0.8; white-space: nowrap; }
.menu-ghost .mico { width: 16px; height: 16px; display: inline-block; }

/* The box a name is changed in (explorer.js startRename): the whole name shows. Under an icon it wraps, wider than
   the label so a long name takes fewer lines; in a list it is one line that grows sideways. */
.lbl.renaming { display: block !important; overflow: visible !important; max-width: none !important; text-overflow: clip !important; -webkit-line-clamp: none !important; position: relative; z-index: 6; background: none !important; outline: none !important; }
.lbl.renaming.wraps { width: 116px; margin-left: -21px; margin-right: -21px; }
.lbl .rn { display: block; box-sizing: border-box; width: 100%; min-height: 15px; margin: 0; padding: 0 1px; font: inherit; line-height: 13px; color: #000; background: #fff; border: 1px solid #000; box-shadow: none; border-radius: 0; resize: none; overflow: hidden; text-align: center; overflow-wrap: anywhere; outline: none; }
.lbl.renaming:not(.wraps) .rn { text-align: left; white-space: pre; width: 60px; line-height: 14px; }
.renaming-in { overflow: visible !important; position: relative; z-index: 6; }

/* Calculator, standard view: everything lines up on one grid (Morr, 2026-12-02: "looks off"). The keys fill the
   window's width, so the last column ends where C does; the memory box is one key wide and one key tall, over MC;
   Backspace, CE and C share the rest of the top row. */
.calc:not(.sci) .keys { grid-template-columns: repeat(6, 1fr); padding-top: 5px; }
.calc:not(.sci) .topkeys { display: grid; grid-template-columns: repeat(12, 1fr); gap: 5px; }
.calc:not(.sci) .topkeys .mbox { grid-column: span 2; width: auto; height: 28px; margin: 0; }
.calc:not(.sci) .topkeys .btn { grid-column: span 3; min-width: 0; height: 28px; padding: 0; }
.calc:not(.sci) .topkeys .btn:first-of-type { grid-column: 4 / span 3; }
.calc:not(.sci) .keys .btn { height: 28px; }

/* Write, Whole Book (wordpad.js setBook): the project read as one document, in the page's place. The format bar
   and the ruler are for the page being written, so they step aside while the book is read. */
.wordpad .wp-row .wp-bookscroll { flex: 1; min-width: 0; min-height: 0; overflow: auto; padding: 12px; background: #808080; outline: none; box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hilight), inset 2px 2px var(--dkshadow), inset -2px -2px var(--light); }
.wordpad .wp-bookdoc { box-sizing: content-box; max-width: 620px; margin: 0 auto; padding: 44px 56px 60px; background: #fff; color: #000; font: 10pt "Times New Roman", serif; word-wrap: break-word; -webkit-font-smoothing: auto; cursor: var(--cur-text, text); box-shadow: 1px 1px 0 #000; }
.wordpad .wp-bookdoc p, .wordpad .wp-bookdoc .wp-book-text div { margin: 0; }
.wordpad .wp-bookdoc ul { margin: 0; padding-left: 24px; list-style: disc; }
.wordpad .wp-bookdoc li { margin: 0; }
.wordpad .wp-bookdoc .wp-tab { display: inline-block; white-space: pre; overflow: hidden; vertical-align: baseline; height: 1px; }
.wordpad .wp-bookch + .wp-bookch { margin-top: 44px; padding-top: 36px; border-top: 1px dashed #a0a0a0; }
.wordpad .wp-bookch h2 { margin: 0 0 22px; font: bold 17px "Times New Roman", Times, serif; text-align: center; }
.wordpad .wp-reading .wp-formatbar, .wordpad .wp-reading .wp-ruler { display: none !important; }
.wordpad .wp-bookch.at h2 { animation: wp-book-at 1.2s steps(6, end) 1; }
@keyframes wp-book-at { 0%, 60% { background: #000080; color: #fff; } 100% { background: transparent; color: inherit; } }
