/* Per-program layouts. Shared chrome lives in win95.css. */

.win.max.autosize .win-body { flex: 1; overflow: auto; }
.dialog .win-body { flex: none; }

/* ---------- about / logon ---------- */
.about .row { align-items: flex-start; }
.about-logo { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.about-logo svg { width: 40px; height: 36px; }
.about-text { display: flex; flex-direction: column; gap: 8px; max-width: 320px; }
.about-text p { margin: 0; }
.about-text hr { width: 100%; border: 0; height: 2px; margin: 0; box-shadow: inset 0 1px var(--shadow), inset 0 -1px var(--hilite); }
.logon-win { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); width: min(470px, calc(100vw - 24px)); }
.logon-win .row { flex-wrap: wrap; }
.logon-avatar { width: 48px; height: 48px; box-shadow: var(--sunken); padding: 2px; background: var(--paper); }
.logon-fields { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 8px; }
.logon-fields p { margin: 0; }
.logon-fields label { display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: center; gap: 6px; }
.logon-hint { color: var(--shadow); text-shadow: 1px 1px var(--hilite); font-size: 11px; }
.logon-hint a { color: var(--link); text-shadow: none; }

/* ---------- Internet Explorer ---------- */
.ie { display: flex; flex-direction: column; flex: 1; min-height: 0; container-type: inline-size; }
.ie-top { display: flex; gap: 2px; flex: none; }
.ie-bars { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ie-bars > * { box-shadow: var(--thin-out); padding: 2px 3px; }
.ie-bars > .menubar { box-shadow: none; padding: 1px 0; }
.ie-bars > [hidden] { display: none !important; }
.throbber { width: 44px; flex: none; background: #000; box-shadow: var(--thin-in); display: grid; place-items: center; align-self: stretch; min-height: 40px; }
.throbber svg { width: 38px; height: 38px; }
.throbber .mer { transform-box: fill-box; transform-origin: center; }
.throbber.busy .mer { animation: spin 0.8s steps(8) infinite; }
@keyframes spin { 0% { transform: scaleX(1); } 50% { transform: scaleX(0.05); } 100% { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .throbber.busy .mer { animation-duration: 3s; } }
.ie-tools { display: flex; align-items: stretch; gap: 0; overflow: hidden; }
.ie-tool {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  min-width: 52px; padding: 2px 4px; border: 0; background: none; cursor: var(--arrow); color: var(--ink); font-size: 11px;
}
.ie-tool svg { width: 20px; height: 20px; }
.ie-tool:hover:not(:disabled) { box-shadow: var(--thin-out); }
.ie-tool:active:not(:disabled) { box-shadow: var(--thin-in); }
.ie-tool:disabled { color: var(--shadow); text-shadow: 1px 1px var(--hilite); }
.ie-tool:disabled svg { filter: grayscale(1) opacity(.45); }
.ie-sep { width: 2px; margin: 2px 3px; box-shadow: inset 1px 0 var(--shadow), inset -1px 0 var(--hilite); }
.ie-addr { display: flex; align-items: center; gap: 6px; }
.ie-label { color: var(--ink); padding: 0 2px; flex: none; }
.ie-addr-field { flex: 1; min-width: 0; display: flex; align-items: center; background: var(--paper); box-shadow: var(--sunken); padding: 0 2px 0 4px; height: 22px; }
.ie-addr-field svg { width: 16px; height: 16px; flex: none; }
.ie-address { flex: 1; min-width: 0; box-shadow: none; height: 20px; }
.ie-links { display: flex; align-items: center; gap: 2px; overflow: hidden; white-space: nowrap; }
.ie-link { display: inline-flex; align-items: center; gap: 3px; border: 0; background: none; padding: 1px 4px; color: var(--ink); text-decoration: none; cursor: var(--arrow); font-size: 11px; flex: none; }
.ie-link svg { width: 16px; height: 16px; }
.ie-link:hover { box-shadow: var(--thin-out); }
.ie-link:active { box-shadow: var(--thin-in); }
.ie-view { flex: 1; min-height: 0; box-shadow: var(--sunken); padding: 2px; background: var(--paper); margin-top: 2px; }
.ie-view iframe[hidden] { display: none; }
.ie-view iframe { display: block; width: 100%; height: 100%; border: 0; background: #fff; }
.ie-prog-cell { width: 110px; padding: 2px !important; }
.ie-progress { width: 100%; height: 100%; }
.ie-progress i { display: block; height: 100%; width: 0; background: repeating-linear-gradient(90deg, var(--title) 0 8px, transparent 8px 10px); transition: width .25s steps(4); }
.ie-zone { width: 130px; }
@container (max-width: 560px) {
  .ie-tool span { display: none; }
  .ie-tool { min-width: 30px; }
  .ie-zone, .ie-prog-cell { display: none !important; }
}
@container (max-width: 380px) {
  .ie-links .ie-link span { display: none; }
  .throbber { display: none; }
}

/* ---------- Explorer ---------- */
.ex { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.ex-list { flex: 1; min-height: 0; overflow: auto; background: var(--paper); box-shadow: var(--sunken); padding: 4px; }
.ex-list.v-icons { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px 2px; }
.ex-list.v-icons .ex-item { width: 76px; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; padding: 2px 0; position: relative; }
.ex-list.v-icons .ex-ic svg { width: 32px; height: 32px; }
.ex-list.v-icons .ex-name { padding: 0 2px; max-width: 74px; overflow-wrap: anywhere; line-height: 1.2; }
.ex-ic { position: relative; display: block; }
.ex-ic .lnk { position: absolute; left: 0; bottom: 0; width: 11px; height: 11px; background: #fff; box-shadow: inset 0 0 0 1px #000; }
.ex-list.v-details { display: flex; flex-direction: column; padding: 0; }
.ex-list.v-details .ex-head, .ex-list.v-details .ex-item { display: grid; grid-template-columns: 20px minmax(120px, 2fr) repeat(var(--cols, 2), minmax(70px, 1fr)); align-items: center; min-width: 380px; }
.ex-list.v-details .ex-head { position: sticky; top: 0; z-index: 1; }
.ex-list.v-details .ex-head span { background: var(--face); box-shadow: var(--raised-btn); padding: 1px 6px; white-space: nowrap; overflow: hidden; }
.ex-list.v-details .ex-head span:first-child { grid-column: span 2; }
.ex-list.v-details .ex-item { padding: 1px 0; }
.ex-list.v-details .ex-item > span { padding: 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ex-list.v-details .ex-item > .ex-ic { padding: 0 2px; }
.ex-list.v-details .ex-item > .ex-ic svg { width: 16px; height: 16px; }
.ex-list.v-details .ex-name { justify-self: start; max-width: 100%; }
.ex-item.sel .ex-name { background: var(--select); color: var(--select-ink); }
.ex-item.sel .ex-ic svg { filter: brightness(.55) sepia(1) hue-rotate(185deg) saturate(5); }
.ex-list:focus-within .ex-item.sel .ex-name { outline: 1px dotted var(--select-ink); outline-offset: -1px; }
.ex-item:focus { outline: none; }
.ex-empty { color: var(--shadow); padding: 8px; }

/* ---------- Notepad ---------- */
.np { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.np-text { flex: 1; min-height: 0; width: 100%; border: 0; resize: none; background: var(--paper); box-shadow: var(--sunken); padding: 4px 6px; font: 14px/1.35 "Fixedsys Excelsior", "Courier New", Courier, monospace; color: var(--ink); white-space: pre-wrap; overflow: auto; }
.np-text.nowrap { white-space: pre; overflow-wrap: normal; }
.np-text:focus { outline: none; }

/* ---------- Display Properties ---------- */
.dp, .sp, .dt { width: min(400px, calc(100vw - 16px)); }
.dp-tabs { display: flex; flex-direction: column; }
.dp-tabs .tabpanel { display: flex; flex-direction: column; gap: 12px; }
.dp-monitor { align-self: center; display: flex; flex-direction: column; align-items: center; }
.dp-screen {
  width: 164px; height: 112px; border: 10px solid #c0c0c0; border-bottom-width: 14px;
  box-shadow: inset 0 0 0 1px #000, 0 0 0 1px #000, 2px 2px 0 1px #808080;
  background-color: var(--desktop); background-image: var(--wallpaper), var(--pattern);
  background-size: var(--wallpaper-size, cover), auto; background-repeat: var(--wallpaper-repeat, no-repeat), repeat;
  position: relative; image-rendering: pixelated;
}
.dp-win { position: absolute; left: 22px; top: 18px; width: 88px; height: 52px; background: var(--face); box-shadow: inset -1px -1px #000, inset 1px 1px var(--hilite); padding: 2px; }
.dp-tb { height: 8px; background: var(--title); }
.dp-wb { height: 36px; margin-top: 2px; background: #fff; box-shadow: inset 1px 1px var(--shadow); }
.dp-stand { width: 60px; height: 10px; background: #c0c0c0; box-shadow: inset 0 0 0 1px #000; clip-path: polygon(15% 0, 85% 0, 100% 100%, 0 100%); }
.dp-panel { display: flex; flex-direction: column; gap: 10px; }
.dp-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dp-lists .listbox { height: 92px; }
.dp-colors { display: grid; grid-template-columns: repeat(9, 1fr); gap: 3px; }
.dp-sw { aspect-ratio: 1; border: 0; box-shadow: var(--sunken); padding: 0; cursor: var(--arrow); max-width: 100%; }
.dp-sw[aria-checked="true"] { outline: 2px solid var(--ink); outline-offset: 1px; }
.dp-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dp-row > span:first-child { min-width: 90px; }
.dp-row .field { flex: 1; min-width: 0; }
.dp-note { margin: 0; }
.dp-res { font-weight: normal; }

/* ---------- System Properties ---------- */
.sp-general { display: flex; gap: 20px; align-items: flex-start; }
.sp-pc svg { width: 96px; height: 96px; }
.sp-text p { margin: 0 0 12px; }
.sp-text .ind { padding-left: 16px; }
.sp-devices { display: flex; flex-direction: column; gap: 8px; }
.sp-tree { height: 130px; }
.sp-tree .opt { display: flex; align-items: center; gap: 4px; }
.sp-tree .opt svg { width: 16px; height: 16px; }
.sp-tree .sp-cat { padding-left: 18px; }
.sp-tree .sp-dev { padding-left: 34px; }
.sp-detail { min-height: 48px; }
.sp-perf dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 0 0 10px; }
.sp-perf dd { margin: 0; }
.sp-perf p { margin: 0; }
@media (max-width: 420px) { .sp-general { flex-direction: column; gap: 6px; } .sp-pc svg { width: 48px; height: 48px; } }

/* ---------- Help ---------- */
.hp { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(150px, 210px) minmax(0, 1fr); gap: 4px; }
.hp-tree { overflow: auto; }
.hp-tree .opt { display: flex; align-items: center; gap: 4px; }
.hp-tree .opt svg { width: 16px; height: 16px; }
.hp-page { padding-left: 20px !important; }
.hp-q { width: 14px; height: 14px; display: inline-grid; place-items: center; background: #fff; box-shadow: inset 0 0 0 1px #808080; color: #000080; font: bold 10px var(--font-ui); flex: none; }
.hp-view { background: var(--paper); box-shadow: var(--sunken); padding: 10px 14px; overflow: auto; user-select: text; -webkit-user-select: text; }
.hp-view h3 { margin: 0 0 10px; font-size: 15px; color: #008000; }
.hp-view p { margin: 0 0 10px; max-width: 60ch; }
.hp-view ul { margin: 0 0 10px; padding-left: 18px; }
.hp-view td { padding: 2px 12px 2px 0; vertical-align: top; }
.hp-view code { font-family: var(--font-dos); font-size: 1.2em; }
@media (max-width: 520px) { .hp { grid-template-columns: minmax(0, 1fr); grid-template-rows: 130px minmax(0, 1fr); } }
/* Me's Help and Support: a navy band, a toolbar with Search, links on the left */
.hs { flex: 1; min-height: 0; display: flex; flex-direction: column; background: #fff; }
.hs-band { display: flex; align-items: baseline; justify-content: space-between; padding: 8px 12px; color: #fff; background: linear-gradient(90deg, #0a246a, #3a6ea5); }
.hs-band b { font: bold 20px Verdana, Tahoma, sans-serif; }
.hs-band span { font-size: 11px; opacity: .85; }
.hs-bar { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; padding: 3px 6px; background: #d6e3f5; border-bottom: 1px solid #7f9db9; }
.hs-btn { border: 1px solid transparent; background: none; padding: 2px 8px; color: #0a246a; font-weight: bold; cursor: var(--arrow); }
.hs-btn:hover:not(:disabled) { border-color: #7f9db9; background: #fff; }
.hs-btn:disabled { color: #8c9bb5; }
.hs-search { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.hs-search label { color: #0a246a; font-weight: bold; }
.hs-q { width: 140px; }
.hs-main { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(140px, 220px) minmax(0, 1fr); }
.hs-side { overflow: auto; padding: 10px; background: #eef3fb; border-right: 1px solid #c5d3ea; display: flex; flex-direction: column; gap: 3px; }
.hs-side h4 { margin: 8px 0 2px; color: #0a246a; font-size: 12px; }
.hs-side h4:first-child { margin-top: 0; }
.hs-side a, .hs-view a { color: #0033cc; text-decoration: none; }
.hs-side a:hover, .hs-view a:hover { text-decoration: underline; }
.hs-side a.on { font-weight: bold; color: #000; }
.hs-side p { margin: 0; }
.hs-view { box-shadow: none; }
.hs-view h3 { color: #0a246a; }
.hs-view h4 { margin: 10px 0 4px; color: #0a246a; }
@media (max-width: 520px) { .hs-main { grid-template-columns: minmax(0, 1fr); grid-template-rows: 120px minmax(0, 1fr); } }
/* System Restore (Me, XP): Help and Support's band over a white wizard page */
.sr { flex: 1; min-height: 0; display: flex; flex-direction: column; background: #fff; }
.sr-page { flex: 1; min-height: 0; overflow: auto; padding: 12px 16px; }
.sr-page h2 { margin: 0 0 10px; color: #0a246a; font: bold 18px Verdana, Tahoma, sans-serif; }
.sr-page p { margin: 0 0 8px; }
.sr-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.sr-opt { display: flex; align-items: center; gap: 6px; margin: 6px 0; }
.sr-list { height: 150px; }
.sr-list .opt { display: flex; justify-content: space-between; gap: 12px; }
.sr-big { color: #0a246a; font-weight: bold; }
.sr-field { display: flex; flex-direction: column; gap: 4px; }
.sr-btns { padding: 8px 12px; background: var(--face); border-top: 1px solid var(--shadow); }
/* Settings (10, 11; js/apps/settings.js): a nav down the left, the page on the right. 10 is flat white, 11 grey with rounded cards.
   Colours are --st-* so dark mode (data-theme on <html>) swaps them in one place; the highlight is the accent. */
.st { --st-bg: #fff; --st-nav: #f2f2f2; --st-ink: #000; --st-sub: #555; --st-hover: #e5e5e5; --st-on: #e0e0e0; --st-card: transparent; --st-line: transparent; --st-link: #0067b8; --st-r: 0;
  flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(150px, 230px) minmax(0, 1fr); background: var(--st-bg); color: var(--st-ink); font: 13px var(--font-ui); }
[data-win="11"] .st { --st-bg: #f3f3f3; --st-nav: #f3f3f3; --st-on: #e9e9e9; --st-hover: #eaeaea; --st-card: #fbfbfb; --st-line: #e5e5e5; --st-r: 6px; }
[data-theme="dark"] .st { --st-bg: #000; --st-nav: #1f1f1f; --st-ink: #fff; --st-sub: #aaa; --st-hover: #333; --st-on: #2b2b2b; --st-link: #6cb8f6; }
[data-theme="dark"][data-win="11"] .st { --st-bg: #202020; --st-nav: #202020; --st-hover: #2d2d2d; --st-on: #2d2d2d; --st-card: #2b2b2b; --st-line: #1d1d1d; }
.st.home { grid-template: minmax(0, 1fr) / minmax(0, 1fr); }
.st.home .st-nav { display: none; }
.st-nav { overflow: auto; padding: 8px 6px; display: flex; flex-direction: column; gap: 1px; background: var(--st-nav); }
.st-user { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; padding: 6px 8px 10px; }
.st-user svg { grid-row: span 2; width: 32px; height: 32px; }
.st-user span, .st-nav h4 { color: var(--st-sub); font-size: 12px; }
.st-nav h4 { margin: 10px 8px 2px; }
.st-nav button { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border: 0; border-left: 3px solid transparent; background: none; text-align: left; font: inherit; color: inherit; cursor: var(--arrow); }
.st-nav button svg { width: 16px; height: 16px; flex: none; }
.st-nav button:hover:not(:disabled) { background: var(--st-hover); }
.st-nav button.on { border-left-color: var(--accent, #0078d7); background: var(--st-on); }
.st-nav .st-back { align-self: flex-start; width: 40px; justify-content: center; font-size: 16px; }
.st-nav .st-back:disabled { opacity: .35; }
.st-nav .st-find { margin: 4px 0 6px; }
.st-find { width: min(360px, 100%); height: 32px; padding: 0 10px; border: 2px solid #999; border-radius: var(--st-r); background: var(--st-bg); color: var(--st-ink); font: inherit; }
.st-find:focus { border-color: var(--accent, #0078d7); outline: 0; }
[data-win="11"] .st-find { border: 1px solid var(--st-line); border-bottom-color: #8a8a8a; background: var(--st-card); }
.st-head { margin-bottom: 20px; text-align: center; }
.st-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
.st-tile { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; align-items: center; padding: 12px; border: 2px solid transparent; background: none; color: inherit; font: inherit; text-align: left; cursor: var(--arrow); }
.st-tile svg { grid-row: span 2; width: 32px; height: 32px; }
.st-tile span, .st-plink small { color: var(--st-sub); font-size: 12px; }
.st-tile:hover { border-color: var(--st-hover); background: var(--st-hover); }
.st-plink { display: flex; align-items: center; gap: 12px; width: 100%; margin-bottom: 4px; padding: 12px 16px; border: 1px solid var(--st-line); border-radius: var(--st-r); background: var(--st-card); color: inherit; font: inherit; text-align: left; cursor: var(--arrow); }
.st-plink svg { width: 20px; height: 20px; flex: none; }
.st-plink small { display: block; }
.st-plink::after { content: "›"; margin-left: auto; font-size: 18px; color: var(--st-sub); }
.st-plink:hover { background: var(--st-hover); }
.st-main { overflow: auto; padding: 16px 24px; }
.st-main h1 { margin: 0 0 16px; font: 300 26px var(--font-ui); }
.st-main h3 { margin: 14px 0 6px; font: 600 15px var(--font-ui); }
.st-card > h3:first-child { margin-top: 0; }
.st-card { margin-bottom: 12px; }
.st-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; padding: 6px 0; }
.st-row select { min-width: 180px; }
.st-link { display: block; padding: 3px 0; color: var(--st-link); text-decoration: none; }
.st-link:hover { text-decoration: underline; }
.st-big { font: 600 20px var(--font-ui); }
.st-hero { width: 48px; height: 48px; float: left; margin: 0 14px 6px 0; }
.st-card::after { content: ""; display: block; clear: both; }
/* 10's and 11's dropdowns and switches, in place of the bevelled 95 ones */
.st select.field { appearance: none; -webkit-appearance: none; height: 32px; padding: 0 30px 0 10px; border: 2px solid #999; border-radius: var(--st-r); color: var(--st-ink); font: inherit;
  background: var(--st-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23888' stroke-width='1.3'/%3E%3C/svg%3E") right 10px center / 10px no-repeat; }
.st select.field:hover:not(:disabled) { border-color: #666; }
[data-win="11"] .st select.field { border: 1px solid var(--st-line); border-bottom-color: #8a8a8a; background-color: var(--st-card); }
.st select.field:disabled { opacity: .6; }
.st-switch { display: inline-flex; align-items: center; gap: 10px; min-width: 76px; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: var(--arrow); }
.st-switch::before { content: ""; width: 40px; height: 20px; box-sizing: border-box; border: 2px solid currentColor; border-radius: 10px; background: radial-gradient(circle at 8px 50%, currentColor 4px, transparent 4.5px); }
.st-switch[aria-checked="true"]::before { border-color: var(--accent, #0078d7); background: radial-gradient(circle at 28px 50%, #fff 4px, transparent 4.5px), var(--accent, #0078d7); }
[data-win="11"] .st-switch::before { border-width: 1px; }
.st-preview { width: 220px; max-width: 100%; aspect-ratio: 16 / 10; margin-bottom: 12px; border: 6px solid #222; border-radius: 2px; }
.st-pics { display: grid; grid-template-columns: repeat(auto-fill, 72px); gap: 6px; }
.st-pic { width: 72px; height: 48px; border: 2px solid transparent; padding: 0; cursor: var(--arrow); }
.st-pic.color { width: 40px; height: 40px; }
.st-pics:has(> .color) { grid-template-columns: repeat(auto-fill, 40px); }
.st-pic[aria-checked="true"] { border-color: var(--st-ink); outline: 2px solid var(--st-bg); outline-offset: -4px; }
[data-win="11"] .st-nav button { border: 0; border-radius: 4px; position: relative; }
[data-win="11"] .st-nav button.on::before { content: ""; position: absolute; left: 0; top: 25%; bottom: 25%; width: 3px; border-radius: 2px; background: var(--accent, #005fb8); }
[data-win="11"] .st-main h1 { font-weight: 600; }
[data-win="11"] .st-card { padding: 12px 16px; background: var(--st-card); border: 1px solid var(--st-line); border-radius: 6px; }
[data-win="11"] .st-preview { border-radius: 8px; }
[data-win="11"] .st-pic { border-radius: 6px; }
@media (max-width: 520px) { .st { grid-template-columns: minmax(0, 1fr); grid-template-rows: 150px minmax(0, 1fr); } .st-user { display: none; } }

/* ---------- Find ---------- */
.fd-wrap { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.fd { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 8px; }
.fd-fields { display: flex; flex-direction: column; gap: 8px; }
.fd-btns { display: flex; flex-direction: column; gap: 6px; padding-top: 24px; }
.fd-results { flex: 1; min-height: 120px; max-height: 260px; padding: 0; }
.fd-row { display: grid; grid-template-columns: minmax(120px, 1.4fr) minmax(90px, 1.4fr) 60px minmax(80px, 1fr); }
.fd-row > span { padding: 1px 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 4px; }
.fd-row svg { width: 16px; height: 16px; flex: none; }
.fd-head { position: sticky; top: 0; }
.fd-head span { background: var(--face); box-shadow: var(--raised-btn); }
@media (max-width: 520px) { .fd { grid-template-columns: minmax(0, 1fr); } .fd-btns { flex-direction: row; flex-wrap: wrap; padding-top: 0; } }

/* ---------- Date/Time ---------- */
.dt-grid { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.dt-month { display: flex; gap: 6px; margin-bottom: 6px; }
.dt-month .field { height: auto; padding: 1px 6px; }
.dt-cal { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--paper); box-shadow: var(--sunken); padding: 3px; text-align: center; font-variant-numeric: tabular-nums; }
.dt-cal b { background: var(--shadow); color: #fff; font-weight: normal; }
.dt-cal span { padding: 1px 0; }
.dt-cal .today { background: var(--select); color: var(--select-ink); }
.dt-clock { width: 120px; height: 120px; display: block; margin: 0 auto 6px; }
.dt-digital { text-align: center; height: auto; font-variant-numeric: tabular-nums; }
.dt-tz p { margin: 0 0 6px; }
@media (max-width: 420px) { .dt-grid { grid-template-columns: 1fr; } }

/* ---------- Minesweeper ---------- */
.ms-wrap { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.ms-wrap > .ms { margin: auto; }
.ms { background: #c0c0c0; padding: 6px; box-shadow: inset 3px 3px #fff; display: flex; flex-direction: column; gap: 6px; align-items: stretch; touch-action: none; user-select: none; }
.ms-top { display: flex; align-items: center; justify-content: space-between; padding: 4px 5px; box-shadow: inset 2px 2px #808080, inset -2px -2px #fff; }
.ms-led { background: #000; box-shadow: inset 1px 1px #808080, inset -1px -1px #fff; padding: 1px; line-height: 0; }
.ms-face { width: 26px; height: 26px; border: 0; padding: 0; background: #c0c0c0 center / 17px 17px no-repeat; box-shadow: 0 0 0 1px #808080, inset -2px -2px #808080, inset 2px 2px #fff; cursor: var(--arrow); }
.ms-face:active { box-shadow: 0 0 0 1px #808080, inset 1px 1px #808080; background-position: calc(50% + 1px) calc(50% + 1px); }
.ms-face.smile { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='17' height='17' shape-rendering='crispEdges'%3E%3Ccircle cx='8.5' cy='8.5' r='7.5' fill='%23ff0' stroke='%23000'/%3E%3Cpath d='M5 6h2v2H5zM10 6h2v2h-2z'/%3E%3Cpath d='M5 11h1v1h5v-1h1v1h-1v1H6v-1H5z'/%3E%3C/svg%3E"); }
.ms-face.ooh { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='17' height='17' shape-rendering='crispEdges'%3E%3Ccircle cx='8.5' cy='8.5' r='7.5' fill='%23ff0' stroke='%23000'/%3E%3Cpath d='M5 6h2v2H5zM10 6h2v2h-2z'/%3E%3Cpath d='M7 10h3v3H7z'/%3E%3Cpath fill='%23ff0' d='M8 11h1v1H8z'/%3E%3C/svg%3E"); }
.ms-face.dead { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='17' height='17' shape-rendering='crispEdges'%3E%3Ccircle cx='8.5' cy='8.5' r='7.5' fill='%23ff0' stroke='%23000'/%3E%3Cpath d='M4.5 5.5l3 3M7.5 5.5l-3 3M9.5 5.5l3 3M12.5 5.5l-3 3' stroke='%23000' fill='none'/%3E%3Cpath d='M6 11h5v1h1v1h-1v-1H6v1H5v-1h1z'/%3E%3C/svg%3E"); }
.ms-face.cool { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='17' height='17' shape-rendering='crispEdges'%3E%3Ccircle cx='8.5' cy='8.5' r='7.5' fill='%23ff0' stroke='%23000'/%3E%3Cpath d='M3 6h11v1H3zM4 6h4v3H4zM9 6h4v3H9z'/%3E%3Cpath d='M5 11h1v1h5v-1h1v1h-1v1H6v-1H5z'/%3E%3C/svg%3E"); }
.ms-board { display: grid; box-shadow: inset 3px 3px #808080, inset -3px -3px #fff; padding: 3px; justify-content: start; width: max-content; align-self: center; }
.ms-board:focus-visible { outline: 1px dotted #000; }
.ms-board .c { width: 16px; height: 16px; background: #c0c0c0 center no-repeat; box-shadow: inset -2px -2px #808080, inset 2px 2px #fff; font: bold 13px/16px Tahoma, Verdana, Arial, sans-serif; text-align: center; cursor: var(--arrow); }
.ms-board .c.o, .ms-board .c.down { box-shadow: inset 1px 1px #808080; }
.ms-board .c.f { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' shape-rendering='crispEdges'%3E%3Cpath fill='%23f00' d='M7 3h2v1H7zM5 4h4v1H5zM4 5h5v1H4zM5 6h4v1H5zM7 7h2v1H7z'/%3E%3Cpath d='M8 8h1v2H8zM6 10h4v1H6zM4 11h8v2H4z'/%3E%3C/svg%3E"); }
.ms-board .c.q::after { content: "?"; color: #000; }
.ms-board .c.m { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' shape-rendering='crispEdges'%3E%3Cpath d='M7 2h1v13H7zM1 8h13v1H1zM3 4h1v1H3zM11 4h1v1h-1zM3 12h1v1H3zM11 12h1v1h-1zM5 4h5v1h1v1h1v5h-1v1h-1v1H5v-1H4v-1H3V6h1V5h1z'/%3E%3Cpath fill='%23fff' d='M5 6h2v2H5z'/%3E%3C/svg%3E"); }
.ms-board .c.m.hit { background-color: #f00; }
.ms-board .c.m.wrong { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' shape-rendering='crispEdges'%3E%3Cpath d='M7 2h1v13H7zM1 8h13v1H1zM3 4h1v1H3zM11 4h1v1h-1zM3 12h1v1H3zM11 12h1v1h-1zM5 4h5v1h1v1h1v5h-1v1h-1v1H5v-1H4v-1H3V6h1V5h1z'/%3E%3Cpath fill='%23fff' d='M5 6h2v2H5z'/%3E%3Cpath d='M1.5 2.5l12 12M13.5 2.5l-12 12' stroke='%23f00' stroke-width='1.6' shape-rendering='auto'/%3E%3C/svg%3E"); }
.ms-board .c.n1 { color: #0000ff; } .ms-board .c.n2 { color: #008000; } .ms-board .c.n3 { color: #ff0000; } .ms-board .c.n4 { color: #000080; }
.ms-board .c.n5 { color: #800000; } .ms-board .c.n6 { color: #008080; } .ms-board .c.n7 { color: #000000; } .ms-board .c.n8 { color: #808080; }
.ms.mono { filter: grayscale(1); }
.ms-best td { padding: 2px 10px 2px 0; }
.ms-best .num { font-variant-numeric: tabular-nums; }
.ms-cfs { display: flex; flex-direction: column; gap: 8px; }
.ms-cf { display: grid; grid-template-columns: 60px 70px; align-items: center; }
.win.max .ms-wrap { overflow: auto; }

/* ---------- Solitaire ---------- */
.sol { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.sol-board { position: relative; flex: 1; min-height: 0; overflow: auto; background: #008000; touch-action: none; user-select: none; box-shadow: var(--thin-in); }
.sol-board:focus-visible { outline: none; }
.sol .statusbar > :nth-child(n+2) { flex: none; width: 92px; font-variant-numeric: tabular-nums; }
.sol-spacer { position: absolute; left: 0; width: 1px; height: 1px; }
.sol-slot { position: absolute; width: var(--cw); height: var(--ch); border: 1px solid #004000; border-radius: 4px; box-shadow: 1px 1px #00a000 inset, -1px -1px #00a000; }
.sol-slot.stock::after { content: ""; position: absolute; inset: 22% 18%; border: max(3px, calc(var(--cw) * .08)) solid #00c000; border-radius: 50%; }
.sol-slot.stock.done::after { border: 0; border-radius: 0; inset: 20%; background: linear-gradient(45deg, transparent 42%, #ff0000 42% 58%, transparent 58%), linear-gradient(-45deg, transparent 42%, #ff0000 42% 58%, transparent 58%); }
.cd { position: absolute; width: var(--cw); height: var(--ch); border-radius: 4px; background: #fff; box-shadow: inset 0 0 0 1px #000; cursor: var(--arrow); }
.sol-board.dragging .cd { pointer-events: none; }
.cd-front { display: none; position: absolute; inset: 0; color: #000; font-family: Arial, Helvetica, sans-serif; }
.cd-front.red { color: #e00000; }
.cd.up .cd-front { display: block; }
.cd.up .cd-back { display: none; }
.cd-corner { position: absolute; display: flex; flex-direction: column; align-items: center; line-height: .95; font-size: calc(var(--cw) * .19); }
.cd-corner b { font-weight: bold; letter-spacing: -.06em; }
.cd-corner i { font-style: normal; }
.cd-corner.tl { left: 3px; top: 3px; }
.cd-corner.br { right: 3px; bottom: 3px; transform: rotate(180deg); }
.cd-mid { position: absolute; inset: 9% 22%; }
.cd-pip { position: absolute; transform: translate(-50%, -50%); font-size: calc(var(--cw) * .22); line-height: 1; }
.cd-pip.flip { transform: translate(-50%, -50%) rotate(180deg); }
.cd-pip.ace { font-size: calc(var(--cw) * .55); }
.cd-court { position: absolute; inset: 4% -6%; border: 1px solid currentColor; background: repeating-linear-gradient(135deg, #fff6c8 0 3px, #ffe680 3px 6px); display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 2px 0; }
.cd-court b { font: bold calc(var(--cw) * .26)/1 Georgia, "Times New Roman", serif; }
.cd-court b.flip { transform: rotate(180deg); }
.cd-court i { font-style: normal; font-size: calc(var(--cw) * .36); line-height: 1; }
.cd-back { position: absolute; inset: 3px; border-radius: 2px; box-shadow: 0 0 0 1px #000; }
[data-back="weave"] .cd-back { background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .45) 0 1px, transparent 1px 4px), repeating-linear-gradient(-45deg, rgba(255, 255, 255, .45) 0 1px, transparent 1px 4px), #0000a8; }
[data-back="bricks"] .cd-back { background: repeating-linear-gradient(0deg, #ffd0d0 0 1px, transparent 1px 6px), repeating-linear-gradient(90deg, #ffd0d0 0 1px, transparent 1px 10px), #b00000; }
[data-back="fish"] .cd-back { background: radial-gradient(circle at 30% 30%, #9ff 0 1.5px, transparent 2.5px) 0 0 / 9px 9px, radial-gradient(circle at 70% 60%, #6cf 0 1px, transparent 2px) 0 0 / 13px 13px, linear-gradient(#0090c0, #003060); }
.sol-fx { position: absolute; z-index: 5000; }

/* ---------- Paint ---------- */
.pt { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.pt-main { flex: 1; min-height: 0; display: flex; gap: 2px; }
.pt-toolbox { flex: none; width: 56px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 2px 0; }
.pt-tools { display: grid; grid-template-columns: 25px 25px; gap: 0; }
.pt-tool { width: 25px; height: 25px; border: 0; padding: 0; display: grid; place-items: center; background: var(--face); box-shadow: var(--raised-btn); cursor: var(--arrow); }
.pt-tool[aria-pressed="true"] { box-shadow: var(--sunken); background: repeating-conic-gradient(var(--face) 0 25%, var(--hilite) 0 50%) 0 0 / 2px 2px; }
.pt-tool svg { width: 16px; height: 16px; }
.pt-options { width: 44px; min-height: 66px; box-shadow: var(--thin-in); padding: 3px; display: flex; flex-direction: column; gap: 2px; align-items: stretch; }
.pt-opt { border: 0; background: none; padding: 0; height: 15px; display: grid; place-items: center; cursor: var(--arrow); }
.pt-opt i { display: block; background: #000; }
.pt-opt[aria-pressed="true"] { background: var(--select); }
.pt-opt[aria-pressed="true"] i { background: #fff; }
.pt-opt.shape { height: 18px; }
.pt-opt.shape i { width: 28px; height: 12px; background: none; }
.pt-opt.shape.outline i { box-shadow: inset 0 0 0 1px #000; }
.pt-opt.shape.both i { box-shadow: inset 0 0 0 1px #000; background: #808080; }
.pt-opt.shape.fill i { background: #808080; }
.pt-opt.shape[aria-pressed="true"] i { box-shadow: inset 0 0 0 1px #fff; }
.pt-area { flex: 1; min-width: 0; overflow: auto; background: #808080; box-shadow: var(--sunken); padding: 3px; }
.pt-holder { position: relative; display: inline-block; line-height: 0; cursor: var(--cross); touch-action: none; }
.pt-holder[data-tool="fill"] { cursor: cell; }
.pt-holder[data-tool="picker"] { cursor: copy; }
.pt-holder canvas { image-rendering: pixelated; }
.pt-overlay { position: absolute; left: 0; top: 0; pointer-events: none; }
.pt-colorbox { flex: none; display: flex; align-items: center; gap: 4px; padding: 4px 2px; }
.pt-cur { width: 32px; height: 32px; box-shadow: var(--thin-in); position: relative; background: repeating-conic-gradient(var(--face) 0 25%, var(--hilite) 0 50%) 0 0 / 2px 2px; flex: none; }
.pt-cur i { position: absolute; width: 14px; height: 14px; box-shadow: var(--thin-in), inset 0 0 0 2px var(--face); }
.pt-fg { left: 4px; top: 4px; z-index: 1; }
.pt-bg { right: 4px; bottom: 4px; }
.pt-pal { display: grid; grid-template-columns: repeat(14, 16px); grid-template-rows: 16px 16px; }
.pt-sw { border: 0; padding: 0; box-shadow: var(--sunken); cursor: var(--arrow); }
.pt-native { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
@media (max-width: 520px) { .pt-pal { grid-template-columns: repeat(14, 13px); grid-template-rows: 13px 13px; } }

/* ---------- Calculator ---------- */
.calc-wrap { display: flex; flex-direction: column; }
.calc { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 8px; outline: none; }
.calc-display { height: 23px; text-align: right; padding: 3px 6px; font: 15px/17px var(--font-ui); font-variant-numeric: tabular-nums; overflow: hidden; white-space: nowrap; }
.calc-top { display: grid; grid-template-columns: 36px repeat(3, 1fr); gap: 6px; padding-left: 0; }
.calc-mem { box-shadow: var(--sunken); display: grid; place-items: center; height: 28px; font-weight: bold; }
.calc-keys { display: grid; grid-template-columns: 36px repeat(5, 36px); gap: 6px 4px; }
.calc-keys > :nth-child(6n + 1) { margin-right: 6px; }
.calc-key { min-width: 0; height: 28px; padding: 0; font-size: 12px; }
.calc-key:active:not(:disabled) { padding: 1px 0 0 1px; }
.calc-key.wide { height: 28px; }
.calc-key.red { color: #ff0000; }
.calc-key.blue { color: #0000ff; }
.calc:focus-visible { outline: 1px dotted var(--ink); outline-offset: -3px; }

/* ---------- MS-DOS Prompt ---------- */
.dos { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.dos-tools { display: flex; gap: 3px; padding: 2px 0 3px; align-items: center; flex: none; }
.dos-font { width: 82px; height: 21px; padding-top: 1px; padding-bottom: 1px; }
.dos-tb { border: 0; background: var(--face); box-shadow: var(--raised-btn); padding: 1px 8px; height: 21px; cursor: var(--arrow); font-size: 11px; }
.dos-tb:active { box-shadow: var(--sunken); }
.dos-screen { flex: 1; min-height: 0; overflow: auto; background: #000; color: #c0c0c0; box-shadow: var(--sunken); padding: 4px 6px; font: 19px/1.05 var(--font-dos); white-space: pre-wrap; word-break: break-all; position: relative; cursor: var(--ibeam); user-select: text; -webkit-user-select: text; }
.dos-screen[data-font="1"] { font-size: 15px; }
.dos-screen[data-font="2"] { font-size: 19px; }
.dos-screen[data-font="3"] { font-size: 24px; }
.dos-out > div { min-height: 1.05em; }
.dos-cursor { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .dos-cursor { animation: none; } }
.dos-input { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; border: 0; padding: 0; font-size: 16px; }
.win.max .dos-screen { font-size: 22px; }
/* EDIT's MS-DOS Editor: VGA blue text, grey menu bar, cyan status line, all inside the DOS window. */
.de { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; background: #0000aa; color: #aaa; font: 18px/1.15 var(--font-dos); box-shadow: var(--sunken); cursor: default; }
.de-menu { display: flex; flex-wrap: wrap; background: #aaa; color: #000; padding: 0 1ch; flex: none; position: relative; z-index: 2; }
.de-m { padding: 0 1ch; position: relative; cursor: default; }
.de-m u, .de-item u { text-decoration: none; color: #fff; }
.de-m.on { background: #000; color: #aaa; }
.de-drop { position: absolute; left: 0; top: 100%; min-width: 20ch; background: #aaa; color: #000; border: 2px solid #000; outline: 1px solid #aaa; padding: 2px 0; box-shadow: 1ch 4px 0 #000; white-space: nowrap; }
.de-item { padding: 0 1.5ch; }
.de-item.off, .de-item.off u { color: #555; }
.de-item.sel, .de-item:hover { background: #000; color: #aaa; }
.de-frame { display: flex; align-items: center; justify-content: center; gap: 1ch; flex: none; color: #000; }
.de-frame::before, .de-frame::after { content: ''; flex: 1; border-top: 2px solid #aaa; }
.de-frame span { background: #aaa; padding: 0 1ch; }
.de-text { flex: 1; min-height: 0; resize: none; margin: 0; padding: 0 1ch; border: solid #aaa; border-width: 0 2px 2px; border-radius: 0; background: #0000aa; color: #aaa; caret-color: #fff; font: inherit; white-space: pre; outline: none; scrollbar-color: #000 #aaa; cursor: var(--ibeam); }
.de-text::selection { background: #aaa; color: #0000aa; }
.de-status { display: flex; justify-content: space-between; gap: 1ch; flex: none; background: #00aaaa; color: #000; padding: 0 1ch; white-space: pre; overflow: hidden; }
.de-dlg { position: absolute; z-index: 3; left: 50%; top: 40%; transform: translate(-50%, -50%); width: min(46ch, calc(100% - 2ch)); background: #aaa; color: #000; border: 2px solid #fff; outline: 4px solid #aaa; box-shadow: 1.5ch 10px 0 #000; padding: 6px 1.5ch; white-space: pre-line; display: flex; flex-direction: column; gap: 6px; }
.de-field { font: inherit; background: #000; color: #aaa; border: 0; border-radius: 0; padding: 0 .5ch; outline: none; caret-color: #fff; }
.de-btns { display: flex; justify-content: center; flex-wrap: wrap; gap: 1ch; border-top: 2px solid #fff; padding-top: 4px; }
.de-btns button { font: inherit; background: none; color: #000; border: 0; padding: 0; cursor: default; }
.de-btns button:focus-visible, .de-btns button:focus { color: #fff; outline: none; }
.de-run { position: absolute; inset: 0; z-index: 4; background: #000; color: #aaa; padding: 2px 1ch; white-space: pre-wrap; display: flex; flex-direction: column; justify-content: space-between; outline: none; }
@media (max-width: 500px) { .de { font-size: 14px; } }
/* Windows Terminal (11): dark, its one tab laid over the title bar, a bar cursor */
[data-win="11"] .win.terminal > .titlebar, [data-win="11"] .win.terminal.active > .titlebar { background: #202020; color: #fff; }
.win.terminal > .titlebar :is(.sysicon, .t) { display: none; }
.win.terminal .tbtn { color: #fff; }
.wt-tabs { flex: 1; min-width: 0; align-self: stretch; display: flex; align-items: end; gap: 2px; }
.wt-tab { display: flex; align-items: center; gap: 8px; height: 26px; min-width: 0; max-width: 220px; padding: 0 6px 0 10px; border-radius: 6px 6px 0 0; background: #0c0c0c; color: #fff; font: 12px var(--font-ui); }
.wt-tab svg { width: 16px; height: 16px; flex: none; }
.wt-tab span { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.wt-x, .wt-new { border: 0; border-radius: 4px; background: none; color: #ccc; font: 16px/1 var(--font-ui); padding: 2px 6px; cursor: var(--arrow); }
.wt-new { margin-bottom: 2px; }
:is(.wt-x, .wt-new):hover { background: #ffffff1f; color: #fff; }
.terminal .dos-screen { background: #0c0c0c; color: #cccccc; box-shadow: none; padding: 6px 10px; font: 14px/1.25 "Cascadia Mono", Consolas, "DejaVu Sans Mono", monospace; }
.terminal .dos-cursor { display: inline-block; width: 0; border-left: 1px solid #ccc; color: transparent; }

/* ---------- Send to blankiekun ---------- */
.send-btn { min-width: 0; padding: 0 8px; flex: none; }
.send-btn:active:not(:disabled) { padding: 1px 7px 0 9px; }
.send-btn:disabled svg { filter: grayscale(1) opacity(.5); }
.pt { position: relative; }
.pt-colorbox .send-btn { margin-left: auto; }
.np { position: relative; }
.np-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 3px; flex: none; }
.np-foot > span { color: var(--shadow); text-shadow: 1px 1px var(--hilite); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.send-tip {
  position: absolute; right: 6px; bottom: 64px; z-index: 5; max-width: 230px;
  background: var(--tip); color: #000; border: 1px solid #000; padding: 6px 22px 6px 8px; cursor: var(--hand);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, .35); font-size: 12px; line-height: 1.35;
}
.np .send-tip { bottom: 34px; }
.send-tip::after { content: ""; position: absolute; right: 30px; bottom: -8px; width: 12px; height: 8px; background: #000; clip-path: polygon(0 0, 100% 0, 100% 100%); }
.send-tip::before { content: ""; position: absolute; right: 31px; bottom: -6px; width: 10px; height: 6px; background: var(--tip); clip-path: polygon(0 0, 100% 0, 100% 100%); z-index: 1; }
.send-tip-x { position: absolute; right: 2px; top: 2px; width: 16px; height: 16px; border: 0; background: none; padding: 0; font: bold 13px/1 var(--font-ui); cursor: var(--arrow); }
@media (prefers-reduced-motion: no-preference) { .send-tip { animation: tip-in .2s steps(3) both; } @keyframes tip-in { from { opacity: 0; } } }
.send-dlg { width: min(340px, calc(100vw - 16px)); }
.send-preview { box-shadow: var(--sunken); background: var(--paper); padding: 3px; display: grid; place-items: center; max-height: 150px; overflow: hidden; margin: 0; }
.send-preview img { max-width: 100%; max-height: 140px; image-rendering: pixelated; }
.send-preview.note { display: block; place-items: initial; font: 12px/1.35 "Courier New", monospace; white-space: pre-wrap; overflow: auto; max-height: 110px; padding: 4px 6px; }
.send-dlg .dp-row > span:first-child { min-width: 72px; }
.cons-bug { display: flex; flex-direction: column; gap: 4px; }
.cons-bug textarea { width: 100%; resize: vertical; font: inherit; }
.cons-bug p { margin: 2px 0 0; line-height: 1.35; }
.send-turnstile { min-height: 65px; display: flex; justify-content: center; }
.send-turnstile:empty { min-height: 0; }
.send-status { min-height: 16px; display: flex; flex-direction: column; gap: 4px; }
.send-status.err { color: #800000; }
.send-progress { height: 14px; box-shadow: var(--thin-in); padding: 2px; overflow: hidden; }
.send-progress i { display: block; height: 100%; width: 40%; background: repeating-linear-gradient(90deg, var(--title) 0 8px, transparent 8px 10px); animation: sendbar 1.2s steps(10) infinite; }
@keyframes sendbar { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
@media (prefers-reduced-motion: reduce) { .send-progress i { animation: none; width: 100%; } }

/* ---------- CONscripter ---------- */
.cons { display: flex; flex-direction: column; flex: 1; min-height: 0; container-type: inline-size; }
.cons-view { flex: 1; min-height: 0; display: flex; margin-top: 2px; overflow: auto; }
.cons-view.playing { box-shadow: var(--sunken); padding: 2px; background: #000; overflow: hidden; }
.cons-frame { display: block; flex: 1; width: 100%; height: 100%; border: 0; background: #000; }
/* the welcome page is a Setup wizard page: picture down the left, text on the right */
.cons-welcome { flex: 1; display: flex; gap: 14px; padding: 12px; min-height: min-content; }
.cons-side {
  width: 132px; flex: none; box-shadow: var(--sunken); padding: 2px;
  background: linear-gradient(180deg, #000080, #008080) content-box;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
}
.cons-art { margin-top: 20px; filter: drop-shadow(3px 3px 0 #000040); }
.cons-art svg { width: 112px; height: 98px; image-rendering: pixelated; }
.cons-blink { animation: cons-blink 1s steps(1) infinite; }
@keyframes cons-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cons-blink { animation: none; } }
.cons-side span { color: var(--face); font: italic bold 19px var(--font-ui); padding-bottom: 12px; text-shadow: 2px 2px 0 #000040; }
.cons-side span b { color: var(--hilite); }
.cons-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.cons-main h2 { margin: 2px 0 0; font: bold 16px var(--font-ui); }
.cons-main p { margin: 0; line-height: 1.4; max-width: 60ch; }
.cons-drop {
  flex: 1; min-height: 104px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  text-align: center; padding: 12px; background: var(--paper); box-shadow: var(--sunken); color: var(--ink);
  outline: 1px dashed var(--shadow); outline-offset: -7px;
}
.cons-drop svg { width: 32px; height: 32px; margin-bottom: 4px; }
.cons-drop span { color: var(--shadow); }
.cons-drop.over { background: var(--select); color: var(--select-ink); outline-color: var(--select-ink); }
.cons-drop.over span { color: inherit; }
.cons-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.cons-recent-list { display: flex; flex-direction: column; background: var(--paper); box-shadow: var(--sunken); padding: 2px; max-height: 120px; overflow: auto; }
.cons-recent-item { display: flex; align-items: center; gap: 6px; padding: 1px 4px; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; }
.cons-recent-item svg { width: 16px; height: 16px; flex: none; }
.cons-recent-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cons-recent-at { flex: none; color: var(--shadow); }
.cons-recent-item:hover, .cons-recent-item:focus-visible { background: var(--select); color: var(--select-ink); outline: 0; }
.cons-recent-item:hover .cons-recent-at, .cons-recent-item:focus-visible .cons-recent-at { color: inherit; }
.cons-settings { width: 400px; max-width: calc(100vw - 32px); }
.cons-settings fieldset { display: flex; flex-direction: column; gap: 6px; }
.cons-settings p { margin: 0; }
.cons-check { display: flex; align-items: center; gap: 6px; }
.cons-kept-item { display: flex; align-items: center; gap: 6px; padding: 1px 4px; }
.cons-kept-item svg { width: 16px; height: 16px; flex: none; }
.cons-kept-item .btn { min-width: 0; padding: 0 6px; }
.cons-warn { display: flex; flex-direction: column; gap: 8px; }
.cons-warn-row { display: flex; gap: 10px; align-items: flex-start; }
.cons-warn-row svg { width: 32px; height: 32px; flex: none; }
.cons-keep { display: flex; gap: 6px 8px; align-items: center; flex-wrap: wrap; padding-left: 42px; }
.cons-keep > span { flex: 1 1 200px; }
.cons-keep .btn { margin-left: auto; }
.cons-keep svg { width: 16px; height: 16px; flex: none; }
.cons-drive-btns { display: flex; gap: 6px; margin-left: auto; }
.cons-drive-btns .btn { margin-left: 0; }
.cons .statusbar .cons-saves.link { cursor: var(--hand); }
/* a yellow tip laid over the top of the game for a few seconds */
.cons-view.playing { position: relative; }
.cons-tip {
  position: absolute; top: 6px; left: 6px; right: 6px; z-index: 1;
  display: flex; align-items: flex-start; gap: 8px; padding: 5px 4px 5px 6px;
  background: var(--tip); color: #000; border: 1px solid #000; box-shadow: 2px 2px 0 rgba(0, 0, 0, .5);
}
.cons-tip > svg { width: 16px; height: 16px; flex: none; }
.cons-offline-tip { position: static; box-shadow: none; align-items: center; }
.cons-offline-tip[hidden] { display: none; }
.cons-tip > span { flex: 1; min-width: 0; line-height: 1.4; }
@media (prefers-reduced-motion: no-preference) {
  .cons-tip { animation: tip-in .2s steps(3) both; }
  .cons-tip.going { animation: cons-tip-out .3s steps(3) both; }
  @keyframes cons-tip-out { to { opacity: 0; } }
}
.cons-tip-x { width: 16px; height: 14px; padding: 0; border: 0; background: var(--face); box-shadow: var(--raised-btn); display: grid; place-items: center; flex: none; }
.cons-tip-x svg { width: 8px; height: 7px; }
.cons-tip-x:active { box-shadow: var(--sunken); }
.cons-tip-never { flex: none; padding: 1px 6px; border: 0; background: var(--face); color: #000; font: inherit; font-size: 11px; box-shadow: var(--raised-btn); white-space: nowrap; }
.cons-tip-never:active { box-shadow: var(--sunken); }
.menubar > .cons-fs {
  margin: 0 0 0 auto; padding: 1px 6px; display: flex; align-items: center; gap: 4px;
  background: var(--face); box-shadow: var(--raised-btn);
}
.menubar > .cons-fs svg { width: 8px; height: 7px; }
.menubar > .cons-fs:active:not(:disabled) { box-shadow: var(--sunken); }
.menubar > .cons-fs:disabled { color: var(--shadow); text-shadow: 1px 1px var(--hilite); }
.menubar > .cons-fs:last-child { margin-right: 2px; }
.menubar > .cons-fs + .cons-fs { margin-left: 4px; }
.menubar > .cons-sync .drive-logo { width: 14px; height: 13px; }
.menubar > .cons-sync .drive-logo svg { width: 100%; height: 100%; }
.menubar > .cons-sync.warn .cons-sync-label { color: #800000; font-weight: bold; }
.menubar > .cons-anki .anki-logo { color: #000080; font-size: 13px; line-height: 1; }
.menubar > .cons-anki.off .anki-logo { color: var(--shadow); }
.drive-logo { display: inline-block; flex: none; }
.drive-logo svg { display: block; width: 100%; height: 100%; }
/* the welcome page's offer of Drive sync: a big 95 button */
.cons-promo {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 10px; text-align: left;
  background: var(--face); color: #000; font: inherit; border: 0; box-shadow: var(--raised-btn);
}
.cons-promo:active { box-shadow: var(--sunken); }
.cons-promo:active > * { transform: translate(1px, 1px); }
.cons-promo:focus-visible .cons-promo-text b { outline: 1px dotted #000; }
.cons-promo .drive-logo { width: 32px; height: 29px; }
.cons-promo-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cons-promo-text b { color: #000080; }
/* full screen: the window fills the page; the menu bar waits above the top edge */
.win.cons-full { position: fixed; inset: 0 !important; width: auto !important; height: auto !important; padding: 0; box-shadow: none; }
.win.cons-full > .titlebar, .win.cons-full > .resize, .cons-full .cons > .statusbar { display: none; }
body:has(.win.cons-full) .taskbar { display: none; }
.cons-full .cons { position: relative; }
.cons-full .cons-view, .cons-full .cons-view.playing { margin: 0; padding: 0; box-shadow: none; }
.cons-hot { display: none; }
.cons-full .cons-hot { display: block; position: absolute; top: 0; left: 0; right: 0; height: 8px; z-index: 3; }
.cons-full .cons > .menubar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 4; background: var(--face); box-shadow: var(--raised); padding: 2px 2px 3px;
  transform: translateY(-100%); visibility: hidden;
}
.cons-full .cons.reveal > .menubar, .cons-full .cons > .menubar:has(.open), .cons-full .cons > .menubar:focus-within { transform: none; visibility: visible; }
@media (prefers-reduced-motion: no-preference) {
  .cons-full .cons > .menubar { transition: transform .12s steps(3), visibility 0s .12s; }
  .cons-full .cons.reveal > .menubar, .cons-full .cons > .menubar:has(.open), .cons-full .cons > .menubar:focus-within { transition: transform .12s steps(3); }
}
.cons .statusbar .cons-size:empty { display: none; }
.cons .statusbar .cons-size, .cons .statusbar .cons-saves { flex: none; }
/* The drop box doesn't need the whole height of a tall window. */
.cons-drop { max-height: 260px; }
@media (max-height: 500px) { .cons-side { display: none; } }
.solo-win .cons-view.playing { margin: 0; padding: 0; box-shadow: none; }

/* Touch screens: no dragging folders in, bigger things to tap, and Menu / Skip buttons
   under the game in place of the status bar, since there's no right-click or Ctrl. */
.cons-touch { display: none; gap: 4px; padding: 3px 2px 2px; flex: none; }
.cons-touch .btn { flex: 1; min-width: 0; height: 36px; }
.cons-touch .btn.on { box-shadow: var(--sunken); background: var(--light); }
@media (pointer: coarse) {
  .cons-drop { display: none; }
  .cons-btns .btn { flex: 1; height: 36px; }
  .cons > .menubar > button { padding-top: 6px; padding-bottom: 6px; }
  body.solo .menu .mi { padding-top: 7px; padding-bottom: 8px; }
  .cons:has(> .cons-view.playing) > .cons-touch { display: flex; }
  .cons:has(> .cons-view.playing) > .statusbar, .cons:has(> .cons-view.playing) > .menubar > .cons-fs:not(.cons-sync) { display: none; }
}
/* Sideways, the buttons go in a column beside the game, which needs the height more. */
@media (pointer: coarse) and (orientation: landscape) {
  .cons:has(> .cons-view.playing) { display: grid; grid-template: auto minmax(0, 1fr) / minmax(0, 1fr) 112px; }
  .cons:has(> .cons-view.playing) > .menubar { grid-column: 1 / -1; }
  /* row 2 even in full screen, where the menu bar leaves the grid and row 1 shrinks to nothing */
  .cons:has(> .cons-view.playing) > .cons-view, .cons:has(> .cons-view.playing) > .cons-touch { grid-row: 2; }
  .cons:has(> .cons-view.playing) > .cons-touch { flex-direction: column; padding: 2px 2px 2px 4px; }
  .cons:has(> .cons-view.playing) > .cons-touch .btn { flex: 1; max-height: 64px; }
}
/* The little tab at the end of the buttons folds them away, leaving the game more room. */
.cons:has(> .cons-view.playing) > .cons-touch > .cons-fold { flex: none; width: 28px; padding: 0; }
.cons-fold::before { content: '\25be'; }
.cons-folded .cons-fold::before { content: '\25b4'; }
.cons-folded > .cons-touch { justify-content: flex-end; }
.cons-folded > .cons-touch > .btn:not(.cons-fold) { display: none; }
.cons-folded:has(> .cons-view.playing) > .cons-touch > .cons-fold { height: 18px; width: 44px; }
@media (pointer: coarse) and (orientation: landscape) {
  .cons:has(> .cons-view.playing) > .cons-touch > .cons-fold { width: auto; height: 28px; }
  .cons-fold::before { content: '\25b8'; }
  .cons-folded .cons-fold::before { content: '\25c2'; }
  .cons.cons-folded:has(> .cons-view.playing) { grid-template-columns: minmax(0, 1fr) auto; }
  .cons-folded:has(> .cons-view.playing) > .cons-touch > .cons-fold { width: 18px; height: 44px; }
}
@container (max-width: 480px) {
  .cons-side { display: none; }
  .cons-saves { display: none !important; }
  .cons-sync-label { display: none; }
  .cons-tip > span { font-size: 11px; }
}

/* CONscripter Save Editor */
.cse { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 6px; padding: 8px; }
.cse-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cse-bar label { display: flex; align-items: center; gap: 6px; }
.cse-bar select { min-width: 0; max-width: 100%; }
.cse-find { flex: 1; min-width: 160px; }
.cse-find input { flex: 1; min-width: 0; }
.cse-list { flex: 1; min-height: 0; overflow: auto; background: var(--paper); box-shadow: var(--sunken); padding: 2px; }
.cse-head, .cse-row { display: grid; grid-template-columns: 56px minmax(60px, 1fr) 96px minmax(100px, 2fr); gap: 2px; align-items: center; min-width: 360px; }
.cse-head { position: sticky; top: 0; z-index: 1; }
.cse-head span { background: var(--face); box-shadow: var(--raised-btn); padding: 1px 6px; white-space: nowrap; overflow: hidden; }
.cse-row { padding: 1px 0; }
.cse-row > span { padding: 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cse-no { font-variant-numeric: tabular-nums; }
.cse-row .field { width: 100%; min-width: 0; height: 19px; padding: 1px 3px; }
.cse-row.edited .cse-no, .cse-row.edited .field { font-weight: bold; }
.cse-row .field.bad { outline: 1px solid #c00000; outline-offset: -1px; }
.cse-empty { margin: 8px; color: var(--shadow); }
.cse-foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.cse-count { margin-right: auto; }

/* ---------- Open / Save As ---------- */
.fdlg { width: min(420px, calc(100vw - 24px)); }
.fdlg-top { display: flex; align-items: center; gap: 6px; }
.fdlg-top label { white-space: nowrap; }
.fdlg-where { flex: 1; min-width: 0; }
.btn.fdlg-tool { min-width: 0; width: 24px; height: 22px; padding: 0; display: grid; place-items: center; }
.btn.fdlg-tool svg { width: 16px; height: 16px; }
.btn.fdlg-tool:disabled svg { filter: grayscale(1) opacity(.5); }
.fdlg-list {
  height: 150px; background: var(--paper); box-shadow: var(--sunken); padding: 3px; overflow: auto;
  display: flex; flex-direction: column; flex-wrap: wrap; align-content: flex-start; gap: 0 12px;
}
.fdlg-item { display: flex; align-items: center; gap: 3px; height: 18px; max-width: 180px; cursor: var(--arrow); }
.fdlg-item svg { width: 16px; height: 16px; flex: none; }
.fdlg-item span { padding: 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fdlg-item.sel span { background: var(--select); color: var(--select-ink); }
.fdlg-list:focus .fdlg-item.sel span { outline: 1px dotted var(--select-ink); outline-offset: -1px; }
.fdlg-note { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; width: 100%; height: 100%; padding: 8px; }
.fdlg-note svg { width: 32px; height: 32px; }
.fdlg-note p { margin: 0; max-width: 280px; }
.fdlg-grid { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px 8px; align-items: center; }
.fdlg-grid label { white-space: nowrap; }
.fdlg-grid .btn { min-width: 75px; }

/* ---------- Properties ---------- */
.pr { width: min(380px, calc(100vw - 24px)); }
.pr-panel > div { display: flex; flex-direction: column; gap: 6px; min-height: 300px; }
.pr-head { display: flex; align-items: center; gap: 14px; }
.pr-head svg { width: 32px; height: 32px; flex: none; }
.pr-name { flex: 1; min-width: 0; }
.pr-name[readonly] { background: var(--face); box-shadow: none; padding-left: 0; }
.pr-sep { width: 100%; border: 0; height: 2px; margin: 2px 0; box-shadow: inset 0 1px var(--shadow), inset 0 -1px var(--hilite); }
.pr-rows { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 4px 6px; margin: 0; }
.pr-rows dt { margin: 0; }
.pr-rows dd { margin: 0; overflow-wrap: anywhere; }
.pr-attrrow { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 6px; }
.pr-attrs { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; }
.pr-check { display: flex; align-items: flex-start; gap: 4px; }
.pr-check input { margin: 1px 0 0; flex: none; }
.pr-space { display: grid; grid-template-columns: 14px 86px 1fr auto; gap: 4px 6px; align-items: center; }
.pr-sw { width: 12px; height: 12px; box-shadow: inset 0 0 0 1px #000; }
.pr-sw.used { background: #0000ff; }
.pr-sw.free { background: #ff00ff; }
.pr-piebox { display: flex; flex-direction: column; align-items: center; gap: 4px; padding-top: 6px; }
.pr-slider { display: flex; align-items: center; gap: 8px; }
.pr-slider input { flex: 1; }
.pr-tool p { margin: 0 0 6px; display: flex; gap: 8px; }

/* ---------- ScanDisk and Disk Defragmenter ---------- */
.sk { width: min(380px, calc(100vw - 24px)); }
.sk-row { display: flex; align-items: center; gap: 8px; }
.sk-row svg { width: 32px; height: 32px; }
.sk-drives { height: 52px; }
.sk-drives .opt { display: flex; align-items: center; gap: 4px; }
.sk-drives svg { width: 16px; height: 16px; }
.sk-status { min-height: 16px; }
.sk-progress { height: 18px; box-shadow: var(--thin-in); padding: 2px; background: var(--face); }
.sk-progress i { display: block; height: 100%; width: 0; background: repeating-linear-gradient(90deg, var(--title) 0 8px, transparent 8px 10px); }
.sk-results { font: 12px/1.3 var(--font-dos); font-size: 15px; margin: 8px 0 0; white-space: pre; overflow-x: auto; }
.sk-note { color: var(--shadow); margin: 0; }
.df { display: flex; flex-direction: column; gap: 6px; padding: 4px; }
.df-wrap { background: #000; box-shadow: var(--sunken); padding: 2px; overflow: auto; }
.df-map { display: block; width: 100%; image-rendering: pixelated; }
.df-foot { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.df-left { flex: 1; min-width: 160px; display: flex; flex-direction: column; gap: 3px; }
.df-legend p { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; }
.df-legend i { width: 12px; height: 12px; box-shadow: inset 0 0 0 1px #000; flex: none; }

/* Explorer: the other views, toolbar, folder tree, renaming and dragging */
.ex-list.v-small, .ex-list.v-list { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 1px 12px; }
.ex-list.v-list { flex-direction: column; flex-wrap: wrap; overflow-x: auto; overflow-y: hidden; }
.ex-list.v-small .ex-item, .ex-list.v-list .ex-item { width: 140px; display: flex; align-items: center; gap: 3px; height: 18px; }
.ex-list.v-small .ex-ic svg, .ex-list.v-list .ex-ic svg { width: 16px; height: 16px; }
.ex-list.v-small .ex-name, .ex-list.v-list .ex-name { padding: 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ex-list.v-small .ex-ic .lnk, .ex-list.v-list .ex-ic .lnk, .ex-list.v-details .ex-ic .lnk { width: 7px; height: 7px; }
.ex-list.v-details .ex-head span { cursor: var(--arrow); }
.ex-list.v-details .ex-head span:active { box-shadow: var(--thin-in); }
.ex-item.cut .ex-ic svg { opacity: .5; }
.ex-rename { font: inherit; resize: none; width: 100%; min-width: 60px; padding: 0 1px; border: 1px solid #000; background: var(--paper); color: var(--ink); overflow: hidden; text-align: inherit; height: auto; }
.ex-list.v-icons .ex-rename { height: 30px; }
.ex-toolbar { display: flex; flex-wrap: wrap; gap: 0; padding: 2px 0; box-shadow: var(--thin-out); margin-bottom: 2px; flex: none; }
.ex-tbgroup { display: flex; align-items: center; gap: 0; padding: 0 4px; border-left: 1px solid var(--shadow); box-shadow: inset 1px 0 var(--hilite); }
.ex-tbgroup:first-child { border-left: 0; box-shadow: none; }
.ex-where { width: 170px; margin-right: 4px; }
.ex-tb { width: 24px; height: 22px; padding: 0; display: grid; place-items: center; background: none; border: 0; cursor: var(--arrow); }
.ex-tb svg { width: 16px; height: 16px; }
.ex-tb:hover:not(:disabled) { box-shadow: var(--thin-out); }
.ex-tb:active:not(:disabled), .ex-tb[aria-pressed="true"] { box-shadow: var(--thin-in); }
.ex-tb[aria-pressed="true"] { background: repeating-conic-gradient(var(--face) 0 25%, var(--hilite) 0 50%) 0 0 / 2px 2px; }
.ex-tb:disabled svg { filter: grayscale(1) opacity(.45) drop-shadow(1px 1px 0 var(--hilite)); }
.ex-heads { display: grid; grid-template-columns: minmax(130px, 35%) 1fr; gap: 3px; flex: none; }
.ex-heads span { box-shadow: var(--thin-out); padding: 1px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ex-panes { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(130px, 35%) 1fr; gap: 3px; }
/* 98, Me and 2000's web view: the folder's name and the selection's details beside the icons */
.ex-web { overflow: auto; padding: 10px 12px; background: var(--paper); box-shadow: var(--sunken); font-size: 11px; line-height: 1.35; }
.ex-web[hidden] + * { grid-column: 1 / -1; }
.ex-wicon { width: 32px; height: 32px; display: block; }
.ex-web h2 { margin: 6px 0 4px; font: bold 18px/1.15 Verdana, Tahoma, sans-serif; overflow-wrap: anywhere; }
.ex-wrule { display: block; height: 3px; margin-bottom: 10px; background: linear-gradient(90deg, #ff0000 0 25%, #00a000 0 50%, #0000ff 0 75%, #ffd800 0); }
:is([data-win="me"], [data-win="2000"]) .ex-wrule { height: 2px; background: linear-gradient(90deg, #08246b, #a6caf0 70%, transparent); }
:is([data-win="me"], [data-win="2000"]) .ex-web h2 { font-size: 16px; }
.ex-web p { margin: 0 0 8px; }
.ex-web a { color: #0000ff; }
.ex-tree { background: var(--paper); box-shadow: var(--sunken); overflow: auto; padding: 2px; }
.ex-trow { display: flex; align-items: center; gap: 3px; height: 18px; white-space: nowrap; cursor: var(--arrow); }
.ex-trow svg { width: 16px; height: 16px; flex: none; }
.ex-trow span { padding: 0 2px; }
.ex-trow.sel span { background: var(--select); color: var(--select-ink); }
.ex-twist { width: 9px; height: 9px; padding: 0; border: 1px solid var(--shadow); background: var(--paper); font: 9px/7px var(--font-ui); display: grid; place-items: center; flex: none; cursor: var(--arrow); }
.ex-twist[hidden] { display: grid !important; visibility: hidden; }
@media (max-width: 640px) { .ex-panes, .ex-heads { grid-template-columns: 120px 1fr; } .ex-where { width: 120px; } }
.regedit .ex-list.v-details .ex-head, .regedit .ex-list.v-details .ex-item { grid-template-columns: 20px minmax(100px, 1fr) minmax(140px, 2fr); }
.ex-opt { align-items: center; margin: 6px 0; }
.ex-opt span { flex: 1; }
.ex-optpic { width: 50px; height: 34px; position: relative; flex: none; }
.ex-optpic i { position: absolute; width: 26px; height: 18px; background: var(--paper); box-shadow: inset 0 0 0 1px #000, inset 0 4px var(--title); }
.ex-optpic i:nth-child(1) { left: 0; top: 0; } .ex-optpic i:nth-child(2) { left: 12px; top: 8px; } .ex-optpic i:nth-child(3) { left: 24px; top: 16px; }
.ex-optpic:not(.many) i:nth-child(n+2) { display: none; }
.ex-optpic:not(.many) i:first-child { width: 44px; height: 30px; }
.drop-hot > .ex-name, .drop-hot > span:last-child, .icon.drop-hot span { background: var(--select); color: var(--select-ink); }
.drag-ghost { position: fixed; z-index: 100001; pointer-events: none; opacity: .7; width: 32px; height: 32px; }
.drag-ghost svg { width: 32px; height: 32px; }
.drag-ghost b { position: absolute; right: -6px; top: -6px; background: var(--tip); border: 1px solid #000; font-size: 10px; padding: 0 2px; }
.drag-ghost.copy::after { content: "+"; position: absolute; left: 20px; top: 20px; width: 11px; height: 11px; background: #fff; border: 1px solid #000; font: bold 10px/9px var(--font-ui); text-align: center; }
.drag-ghost.no { opacity: .4; }
body.dragging-files, body.dragging-files * { cursor: var(--arrow); }
body.dragging-files iframe { pointer-events: none; }
.icon.cut svg { opacity: .5; }
.icon-rename { font: inherit; width: 74px; resize: none; padding: 0 1px; border: 1px solid #000; background: var(--paper); color: var(--ink); text-align: center; overflow: hidden; }

/* ---------- Taskbar Properties ---------- */
.tbp { display: flex; flex-direction: column; gap: 6px; min-height: 260px; }
.tbp p { margin: 0 0 6px; }
.tbp-pic { position: relative; height: 112px; background: var(--desktop); box-shadow: var(--sunken); overflow: hidden; margin-bottom: 6px; }
.tbp-win { position: absolute; left: 30px; top: 12px; width: 190px; height: 70px; background: var(--face); box-shadow: var(--raised); padding: 2px; }
.tbp-win i { display: block; height: 12px; background: var(--title); }
.tbp-win b { position: absolute; left: 6px; top: 1px; color: #fff; font-size: 10px; }
.tbp-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 22px; background: var(--face); box-shadow: inset 0 1px var(--light), inset 0 2px var(--hilite); display: flex; gap: 3px; padding: 3px 2px 2px; font-size: 10px; }
.tbp-start { box-shadow: var(--raised-btn); padding: 0 4px; font-weight: bold; display: flex; align-items: center; }
.tbp-task { flex: 0 0 80px; box-shadow: var(--raised-btn); }
.tbp-clock { margin-left: auto; box-shadow: var(--thin-in); padding: 0 4px; display: flex; align-items: center; }
.tbp-clock[hidden] { display: none; }

/* ---------- Volume ---------- */
.vol-pop {
  position: fixed; right: 4px; bottom: calc(var(--tb-h) + 2px); z-index: 50000;
  background: var(--face); box-shadow: var(--raised); padding: 8px 10px;
  display: flex; flex-direction: column; align-items: center; gap: 6px; width: 80px;
}
.vol-slider { writing-mode: vertical-lr; direction: rtl; height: 100px; width: 22px; }
.vol-mixer { display: flex; gap: 2px; padding: 4px; }
.vol-col { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 8px; box-shadow: var(--etched); min-width: 84px; }
.vol-col b { font-weight: normal; white-space: nowrap; }
.vol-col span { align-self: flex-start; }
.vol-bal { width: 70px; }
@media (max-width: 640px) { .vol-mixer { flex-wrap: wrap; } }

/* ---------- Close Program ---------- */
.tm { width: min(340px, calc(100vw - 24px)); }
.tm-list { height: 150px; }
.tm-warn { margin: 0; }

/* Task Manager (2000 on, js/apps/taskman.js) */
.tmgr { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.tmgr .dp-tabs { flex: 1; min-height: 0; padding: 6px 6px 0; }
.tmgr .dp-tabs .tabpanel { flex: 1; min-height: 0; padding: 8px; }
.tm-panel { display: flex; flex-direction: column; gap: 8px; flex: 1; min-height: 0; }
.tm-grid { flex: 1; min-height: 60px; padding: 0; outline: 0; }
.tm-grid table { width: 100%; border-collapse: collapse; }
.tm-grid th { position: sticky; top: 0; z-index: 1; background: var(--face); box-shadow: var(--thin-out); padding: 1px 6px; font-weight: normal; text-align: left; white-space: nowrap; }
.tm-grid td { padding: 1px 6px; white-space: nowrap; }
.tm-grid .n { text-align: right; font-variant-numeric: tabular-nums; }
.tm-grid tr.sel td { background: var(--select); color: var(--select-ink); }
.tm-grid:focus-visible tr.sel td:first-child { outline: 1px dotted #fff; outline-offset: -1px; }
.tm-btns { display: flex; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.tm-perf { display: grid; grid-template-columns: 84px 1fr; gap: 6px 8px; overflow: auto; }
.tm-perf .group { margin: 0; padding: 4px 6px 6px; }
.tm-meter, .tm-hist { display: block; height: 96px; width: 100%; }
.tm-totals { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tm-nums { width: 100%; border-collapse: collapse; }
.tm-nums td { padding: 0 2px; }
.tm-nums .n { text-align: right; font-variant-numeric: tabular-nums; }
.tm-nt > .statusbar > span { flex: 1; }
.tm-nt > .statusbar > span:last-child { flex: 1.6; }

/* 8 on: fewer details is the list alone; more details the menus and tabs */
.tm-10 { background: #fff; }
.tm-10:not(.more) > :is(.menubar, .dp-tabs), .tm-10.more > .tm-fewer { display: none; }
.tm-fewer { flex: 1; min-height: 0; display: flex; padding: 6px 6px 0; }
.tm-fewer .tm-grid { box-shadow: none; }
.tm-fewer thead { display: none; }
.tm-app { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; }
.tm-app svg { width: 16px; height: 16px; flex: none; }
.tm-10 .tm-grid { box-shadow: none; border: 0; }
.tm-10 .tm-grid th { box-shadow: inset -1px 0 #e5e5e5, inset 0 -1px #e5e5e5; background: #fff; vertical-align: bottom; color: #4d4d4d; }
.tm-10 .tm-grid th b { font-size: 15px; font-weight: normal; color: #000; }
.tm-10 .tm-grid td { padding: 3px 6px; }
.tm-10 .tm-grid tr.grp td { padding-top: 10px; font-weight: bold; color: #1e3287; background: #fff; }
.tm-10 .tm-grid tr.sel td { background: #cce8ff; color: #000; }
.tm-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-top: 1px solid #e5e5e5; }
.tm-more { border: 0; background: none; padding: 0; color: #000; cursor: var(--arrow); }
.tm-more::before { content: "\2304"; display: inline-block; margin-right: 6px; }
.tm-10.more .tm-more::before { transform: rotate(180deg); }
.tm-perf10 { display: grid; grid-template-columns: 150px 1fr; gap: 10px; flex: 1; min-height: 0; }
.tm-side { display: flex; flex-direction: column; gap: 2px; border-right: 1px solid #e5e5e5; padding-right: 6px; }
.tm-side button { display: flex; flex-direction: column; align-items: flex-start; border: 0; background: none; padding: 6px 8px; text-align: left; cursor: var(--arrow); }
.tm-side button b { font-size: 14px; font-weight: normal; }
.tm-side button span { font-size: 11px; color: #4d4d4d; }
.tm-side button.on { background: #cce8ff; }
.tm-main { display: flex; flex-direction: column; min-width: 0; }
.tm-main h2 { margin: 0; font-size: 22px; font-weight: normal; }
.tm-sub { font-size: 11px; color: #707070; margin: 4px 0 2px; }
.tm-graph { display: block; width: 100%; flex: 1; min-height: 120px; }
.tm-stats { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 8px; }
.tm-stats div { display: flex; flex-direction: column; }
.tm-stats span { font-size: 11px; color: #707070; }
.tm-stats b { font-size: 18px; font-weight: normal; }

/* ---------- Welcome ---------- */
.wl { width: min(470px, calc(100vw - 24px)); }
.wl-head { font: 26px/1 Arial, var(--font-ui); letter-spacing: -.5px; }
.wl-head b { font-weight: 900; }
.wl-head sup { font: bold 30px/1 Arial, var(--font-ui); color: var(--title); vertical-align: -2px; margin-left: 2px; }
.wl-main { display: flex; gap: 10px; }
.wl-box { flex: 1; min-width: 0; background: var(--paper); box-shadow: var(--sunken); padding: 10px 12px; min-height: 150px; }
.wl-did { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 8px; }
.wl-did svg { width: 32px; height: 32px; }
.wl-tip { margin: 0; line-height: 1.45; }
.wl-btns { display: flex; flex-direction: column; gap: 6px; width: 130px; flex: none; }
.wl-btns .btn { width: 100%; }
@media (max-width: 480px) { .wl-main { flex-direction: column; } .wl-btns { width: 100%; } }

/* ---------- Add Printer wizard and print queues ---------- */
.wz { width: min(470px, calc(100vw - 24px)); }
.wz-main { display: flex; gap: 14px; min-height: 230px; }
.wz-art { width: 120px; flex: none; background: var(--desktop); box-shadow: var(--sunken); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.wz-art svg { width: 48px; height: 48px; }
.wz-pane { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.wz-pane p { margin: 0; }
.wz-list { height: 110px; }
.wz-two { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; }
.wz-two b { font-weight: normal; display: block; margin-bottom: 2px; }
.wz-field { display: flex; flex-direction: column; gap: 3px; }
.wz-note { color: var(--shadow); }
@media (max-width: 480px) { .wz-art { display: none; } .wz-two { grid-template-columns: 1fr; } }
.pq { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.pq-list { flex: 1; min-height: 0; overflow: auto; background: var(--paper); box-shadow: var(--sunken); }
.pq-row { display: grid; grid-template-columns: minmax(120px, 2fr) 70px 80px 110px 80px; min-width: 460px; }
.pq-row > span { padding: 1px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 4px; }
.pq-row svg { width: 16px; height: 16px; }
.pq-head > span { background: var(--face); box-shadow: var(--raised-btn); }

/* ---------- System Monitor and Resource Meter ---------- */
.sm-pane { display: flex; gap: 4px; padding: 6px 8px 2px; }
.sm-scale { display: flex; flex-direction: column; justify-content: space-between; font-size: 10px; text-align: right; }
.sm-chart { box-shadow: var(--sunken); padding: 2px; background: #fff; }
.sm-label { padding: 2px 8px 6px 36px; }
.rm { width: 260px; }
.rm-row { display: flex; flex-direction: column; gap: 3px; }
.rm-bar { height: 16px; box-shadow: var(--thin-in); padding: 2px; background: var(--paper); }
.rm-bar i { display: block; height: 100%; background: repeating-linear-gradient(90deg, #008000 0 8px, transparent 8px 10px); }
.tray .resmeter { margin-right: 4px; }

/* ---------- Windows Setup ---------- */
.su-list { width: min(300px, calc(100vw - 48px)); height: 150px; }
.screen.su-screen { background: #000080; color: #fff; font: 16px/1.4 var(--font-dos); padding: 40px max(16px, 8vw); }
.su-screen h1 { font: inherit; margin: 0 0 24px; padding-bottom: 4px; border-bottom: 2px solid #fff; }
.su-bar { margin-top: 24px; max-width: 480px; height: 22px; background: #fff; padding: 2px; }
.su-fill { height: 100%; width: 0; background: #c00000; }
.su-balloon {
  position: fixed; right: 8px; bottom: calc(var(--tb-h) + 10px + env(safe-area-inset-bottom, 0px)); z-index: 40001;
  width: min(280px, calc(100vw - 16px)); padding: 8px 26px 8px 10px;
  background: var(--tip); color: #000; border: 1px solid #000; border-radius: 6px; cursor: var(--hand);
}
.su-balloon::after { content: ''; position: absolute; right: 30px; bottom: -11px; border: 10px solid transparent; border-top-color: var(--tip); border-bottom: 0; filter: drop-shadow(0 1px 0 #000); }
.su-balloon b { display: flex; align-items: center; gap: 6px; }
.su-balloon b svg { width: 16px; height: 16px; }
.su-balloon p { margin: 4px 0 0; }
.su-x { position: absolute; right: 4px; top: 4px; }

/* blankiekun Tour (tour.js): 98's dark presentation over the desktop, the taskbar left in view */
.tour {
  position: fixed; inset: 0 0 calc(var(--tb-h) + env(safe-area-inset-bottom, 0px)) 0; z-index: 70000; overflow: auto; outline: 0;
  display: grid; grid-template: auto 1fr auto / minmax(150px, 220px) 1fr; gap: 16px 32px; padding: 28px max(16px, 5vw);
  background: radial-gradient(circle at 70% 40%, #1d2f6b, #070b1c 70%); color: #fff; font: 14px/1.5 Arial, Helvetica, sans-serif;
}
.tour h1 { grid-column: 1 / -1; margin: 0; font: 300 clamp(28px, 6vw, 48px)/1 Arial, sans-serif; letter-spacing: -1px; border-bottom: 2px solid #f6c343; padding-bottom: 10px; }
.tour h1 b { color: #f6c343; }
.tour-steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; counter-reset: st; }
.tour-steps button { all: unset; display: block; width: 100%; box-sizing: border-box; padding: 4px 8px; cursor: var(--hand); color: #9fb4e8; counter-increment: st; }
.tour-steps button::before { content: counter(st) '. '; }
.tour-steps .on button, .tour-steps button:hover { color: #fff; }
.tour-steps .on button { background: #2b3f86; font-weight: bold; }
.tour-steps button:focus-visible { outline: 1px dotted #fff; }
.tour-main { max-width: 560px; }
.tour-main h2 { margin: 0 0 8px; font: bold 26px/1.2 Arial, sans-serif; }
.tour-main p { margin: 0 0 12px; }
.tour-count { color: #9fb4e8; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
.tour-pic { position: relative; width: 120px; height: 120px; margin-bottom: 20px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(#3b5bc0, transparent 70%); }
.tour-pic svg { width: 64px; height: 58px; }
/* The pointer: an arrow drawn in CSS that wanders in from the right and clicks the picture */
.tour-ptr { position: absolute; left: 70px; top: 70px; width: 0; height: 0; border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 18px solid #fff;
  transform: rotate(-28deg); filter: drop-shadow(1px 1px 0 #000); animation: tour-ptr 1.6s ease-out both; }
@keyframes tour-ptr { from { translate: 160px 60px; } 80% { translate: 0 0; scale: 1; } 90% { scale: .8; } }
.tour .btn { color: #000; }
.tour-btns { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.tour-btns .btn { min-width: 80px; }
.tour-ring { position: fixed; z-index: 70001; pointer-events: none; border: 3px solid #f6c343; border-radius: 4px; box-sizing: border-box; animation: tour-ring 1s ease-in-out infinite alternate; }
@keyframes tour-ring { to { box-shadow: 0 0 0 6px rgba(246, 195, 67, .35); } }
@media (prefers-reduced-motion: reduce) { .tour-ptr, .tour-ring { animation: none; } }
@media (max-width: 600px) {
  .tour { grid-template: auto auto 1fr auto / 1fr; padding: 16px; gap: 12px; }
  .tour-steps { flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .tour-steps button { width: auto; font-size: 0; padding: 0; }
  .tour-steps button::before { font-size: 13px; padding: 2px 8px; display: inline-block; content: counter(st); }
  .tour-pic { width: 88px; height: 88px; margin-bottom: 8px; }
}
/* XP: the Luna blues and the green Next */
[data-win="xp"] .tour { background: linear-gradient(#0a246a, #245edb 18%, #3a80f3 70%, #5a9cff); font-family: Tahoma, Verdana, sans-serif; }
[data-win="xp"] .tour h1 { font-style: italic; border-bottom-color: #f39c35; }
[data-win="xp"] .tour h1 b { color: #fff; }
[data-win="xp"] .tour-steps .on button { background: #2c9d2c; border-radius: 4px; }
[data-win="xp"] .tour-steps button, [data-win="xp"] .tour-count { color: #d6e4ff; }
[data-win="xp"] .tour-pic { background: radial-gradient(#9cc8ff, transparent 70%); }
[data-win="xp"] .tour-btns .btn.default:not(:disabled) { background: linear-gradient(#7ad37a, #2c9d2c); color: #fff; border-color: #1f6f1f; }
[data-win="xp"] .tour-ring { border-color: #7ad37a; }

/* About's hidden credits (dialogs.js): 3.1's bear, or 95's clouds; the names roll up */
.about-credits { display: flex; gap: 12px; align-items: center; width: min(360px, calc(100vw - 64px)); height: 160px; overflow: hidden; }
.about-roll { flex: 1; text-align: center; animation: about-roll 16s linear infinite; }
.about-roll p { margin: 0 0 4px; }
.about-roll p:first-child { font-weight: bold; }
@keyframes about-roll { from { transform: translateY(160px); } to { transform: translateY(-100%); } }
.about-credits.clouds { color: #000080; font-weight: bold;
  background: radial-gradient(ellipse 50px 18px at 20% 30%, #fff 60%, transparent 64%), radial-gradient(ellipse 70px 22px at 75% 65%, #fff 60%, transparent 64%),
    radial-gradient(ellipse 40px 14px at 45% 85%, #fff 60%, transparent 64%), linear-gradient(#4f86d8, #b7d3f5);
  animation: about-clouds 30s linear infinite; }
@keyframes about-clouds { to { background-position: 360px 0, 360px 0, 360px 0, 0 0; } }
@media (prefers-reduced-motion: reduce) { .about-credits { overflow: auto; align-items: flex-start; } .about-roll, .about-credits.clouds { animation: none; } }

/* ---------- Blankie, the helper (98 to XP) ---------- */
.bk {
  position: fixed; right: 16px; bottom: calc(var(--tb-h) + 16px + env(safe-area-inset-bottom, 0px)); z-index: 39000;
  width: 80px; height: 92px; cursor: var(--hand, pointer); touch-action: none; user-select: none;
  filter: drop-shadow(2px 3px 0 rgba(0, 0, 0, .25));
}
.bk svg { display: block; overflow: visible; }
.bk-sheet, .bk-arm { fill: #eef3ff; stroke: #2b3350; stroke-width: 2; stroke-linejoin: round; }
.bk-stitch { fill: none; stroke: #9fb3e6; stroke-width: 1.5; stroke-dasharray: 2.5 2.5; }
.bk-cap { fill: #6b8cff; stroke: #2b3350; stroke-width: 2; stroke-linejoin: round; }
.bk-pom { fill: #fff; stroke: #2b3350; stroke-width: 2; }
.bk-white { fill: #fff; stroke: #2b3350; stroke-width: 1.5; }
.bk-look { fill: #2b3350; }
.bk-glint { fill: #fff; }
.bk-lid { fill: #eef3ff; }
.bk-lash, .bk-shut, .bk-mouth { fill: none; stroke: #2b3350; stroke-width: 2; stroke-linecap: round; }
.bk-blush { fill: #ffb3c6; opacity: .8; }
.bk-shut, .bk-pencil, .bk-z { display: none; }
.bk-z { font: bold 11px sans-serif; fill: #2b3350; }
.bk-body, .bk-eyes, .bk-wave, .bk-look, .bk-pencil, .bk-z text { transform-box: fill-box; }
.bk.write .bk-pencil, .bk.sleep .bk-shut, .bk.sleep .bk-z { display: inline; }
.bk.sleep .bk-eyes { display: none; }
.bk.write .bk-look { transform: translate(1px, 2px); }
.bk.think .bk-look { transform: translate(-1px, -3px); }
@media (prefers-reduced-motion: no-preference) {
  .bk-body { transform-origin: 50% 100%; animation: bk-sway 4s ease-in-out infinite; }
  .bk-eyes { transform-origin: 50% 50%; animation: bk-blink 5s infinite; }
  .bk.think .bk-body { animation: bk-wiggle .35s ease-in-out 2; }
  .bk-wave { transform-origin: 0 100%; }
  .bk.wave .bk-wave { animation: bk-wave .4s ease-in-out 4; }
  .bk.write .bk-pencil { transform-origin: 0 100%; animation: bk-scribble .25s linear infinite alternate; }
  .bk.sleep .bk-body { animation-duration: 7s; }
  .bk.sleep .bk-z text { animation: bk-z 2.4s ease-out infinite; }
  .bk.sleep .bk-z text + text { animation-delay: 1.2s; }
  .bk-balloon { animation: tip-in .2s steps(3) both; }
}
@keyframes bk-sway { 0%, 100% { transform: rotate(-3deg) translateY(0); } 50% { transform: rotate(3deg) translateY(-2px); } }
@keyframes bk-blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
@keyframes bk-wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-7deg); } 75% { transform: rotate(7deg); } }
@keyframes bk-wave { 50% { transform: rotate(-30deg); } }
@keyframes bk-scribble { to { transform: translate(-2px, 1px) rotate(-8deg); } }
@keyframes bk-z { from { opacity: 0; transform: translate(0, 4px); } 30% { opacity: 1; } to { opacity: 0; transform: translate(4px, -6px); } }
.bk-balloon {
  position: fixed; z-index: 39001; width: min(250px, calc(100vw - 16px)); box-sizing: border-box; padding: 8px 10px;
  background: var(--tip, #ffffe1); color: #000; border: 1px solid #000; border-radius: 8px; box-shadow: 2px 2px 0 rgba(0, 0, 0, .4);
}
.bk-balloon::after {
  content: ''; position: absolute; left: var(--tail, 200px); top: 100%; border: 9px solid transparent; border-top-color: var(--tip, #ffffe1); border-bottom: 0;
  filter: drop-shadow(0 1px 0 #000);
}
.bk-balloon.below::after { top: auto; bottom: 100%; border: 9px solid transparent; border-bottom-color: var(--tip, #ffffe1); border-top: 0; filter: drop-shadow(0 -1px 0 #000); }
.bk-balloon p { margin: 0 0 6px; }
.bk-opt { display: flex; align-items: flex-start; gap: 6px; width: 100%; padding: 2px 0; border: 0; background: none; color: #000; font: inherit; text-align: left; cursor: var(--hand, pointer); }
.bk-opt i { flex: none; width: 9px; height: 9px; margin-top: 3px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #9cf, #1452c4); border: 1px solid #0a2a6b; }
.bk-opt:hover { color: #1452c4; text-decoration: underline; }

/* ---------- Clock ---------- */
.ck { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ck-view { flex: 1; min-height: 0; display: grid; place-items: center; background: var(--face); padding: 4px; }
.ck-face { width: 100%; height: 100%; }
.ck-hour { fill: #000080; } .ck-min { fill: #008080; }
.ck-hand { stroke: #000080; stroke-linecap: round; } .ck-sec { stroke: #000; }
.ck-pin { fill: #000; }
.ck-digits { font: 28px var(--font-dos); color: #000080; }
/* The Vista and 7 Sidebar gadget: a glossy face on clear glass */
.ck-gadget .ck-view { background: radial-gradient(circle at 50% 50%, #fff 0 44%, #c8c8c8 45%, #6c6c6c 48%, transparent 49%); }
.ck-gadget .ck .menubar { display: none; }
.ck-gadget :is(.ck-hour, .ck-pin) { fill: #333; } .ck-gadget .ck-min { fill: #999; }
.ck-gadget .ck-hand { stroke: #222; } .ck-gadget .ck-sec { stroke: #d00; }
.ck-gadget .ck-digits { font: 22px var(--font-ui); color: #222; }
.win:is(.ck-gadget, .gadget) .win-body { background: none; box-shadow: none; }

/* ---------- Gadgets (js/apps/gadgets.js): Vista and 7 ---------- */
.gadget .tbtn:not(.x) { display: none; }
.gd { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 6px;
  background: linear-gradient(#3a4a5c, #10161e); color: #fff; font: 12px var(--font-ui); box-shadow: inset 0 1px #fff4, 0 1px 3px #0008; }
.gd-dial { width: 100%; flex: 1; min-height: 0; }
.gd-rim { fill: #0a0e14; stroke: #8a9bb0; stroke-width: 2; }
.gd-tick { stroke: #cfe0f0; stroke-width: 2; } .gd-tick.hot { stroke: #f44; }
.gd-needle { stroke: #7fd0ff; stroke-width: 2.5; stroke-linecap: round; transition: transform .8s ease-out; }
.gd-pin { fill: #cfe0f0; }
.gd-pct { padding: 0 0 6px; font-variant-numeric: tabular-nums; }
.gd-cal { justify-content: flex-start; padding: 4px; background: linear-gradient(#fff, #dde6ef); color: #222; }
.gd-cal-head { display: flex; align-items: center; width: 100%; }
.gd-cal-head button { border: 0; background: none; color: #1c4f86; font: inherit; cursor: var(--hand); padding: 2px 4px; }
.gd-cal-t { flex: 1; font-weight: bold !important; }
.gd-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); width: 100%; text-align: center; font-size: 11px; line-height: 17px; }
.gd-cal-wd { color: #1c4f86; font-weight: bold; }
.gd-cal-grid .today { background: #3b7fc4; color: #fff; border-radius: 3px; }
.gd-slide { padding: 5px; background: #111; cursor: var(--hand); overflow: hidden; }
.gd-slide img { width: 100%; height: 100%; object-fit: contain; }
@media (prefers-reduced-motion: no-preference) { .gd-slide img { animation: gd-fade .8s; } }
@keyframes gd-fade { from { opacity: 0; } }
/* Vista's Sidebar: a dark glass strip down the right of the desktop, under the windows */
.sidebar { position: absolute; top: 0; right: 0; bottom: 0; width: 170px; background: linear-gradient(90deg, #0000, #0007 14px, #0005); border-left: 1px solid #fff2; }
@media (max-width: 640px), (max-height: 420px) { .sidebar { display: none; } }
.gd-gallery { padding: 10px; font: 12px var(--font-ui); }
.gd-gallery p { margin: 0 0 8px; }
.gd-tiles { display: grid; grid-template-columns: repeat(4, 84px); gap: 6px; }
.gd-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 4px; border: 1px solid transparent; border-radius: 3px; background: none; font: inherit; cursor: var(--hand); }
.gd-tile:hover, .gd-tile:focus-visible { border-color: #7eb4ea; background: #e5f3fb; }
.gd-tile svg, .gd-cal-ico { width: 32px; height: 32px; }
.gd-cal-ico { display: grid; place-items: center; border: 1px solid #567; border-top: 7px solid #3b7fc4; border-radius: 3px; background: #fff; font-weight: bold; box-sizing: border-box; }

/* ---------- Sticky Notes ---------- */
.sn { flex: 1; min-height: 0; display: flex; }
.sn-text { flex: 1; border: 0; resize: none; padding: 6px 8px; background: transparent; font: 15px/1.3 "Segoe Print", "Comic Sans MS", var(--font-ui); color: #000; }
.sn-win { --note: #fdfdc9; --note-top: #f8f7b6; }
.sn-blue { --note: #d9f3fb; --note-top: #c9ecf8; } .sn-green { --note: #d2fecc; --note-top: #c5f7c1; }
.sn-pink { --note: #f6d3f6; --note-top: #f1c3f1; } .sn-purple { --note: #ddd9ff; --note-top: #d0cbfe; } .sn-white { --note: #fff; --note-top: #f5f5f5; }
html[data-win] .win.sn-win { padding: 0; border-radius: 0; background: var(--note); box-shadow: 0 0 0 1px rgba(0, 0, 0, .25), 2px 3px 8px rgba(0, 0, 0, .3); -webkit-backdrop-filter: none; backdrop-filter: none; }
html[data-win] .win.sn-win .win-body { background: var(--note); box-shadow: none; }
html[data-win] .win.sn-win > .titlebar { height: 20px; margin: 0; padding: 0 0 0 2px; border-radius: 0; background: var(--note-top); color: #000; }
.sn-win .titlebar .sysicon, .sn-win .tbtn:not(.x) { display: none; }
.sn-win .titlebar .t { visibility: hidden; }
html[data-win] .sn-win .tbtn.x, .sn-add { order: 2; width: 20px; height: 18px; margin: 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: #555; }
.sn-add { order: 0; font: 16px/1 var(--font-ui); padding: 0; }
html[data-win] .sn-win .tbtn.x:hover, .sn-add:hover { background: rgba(0, 0, 0, .1); color: #000; }
html[data-win] .sn-win .tbtn.x svg { width: 8px; height: 8px; filter: none; }

.vw { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.vw-tools { flex: none; display: flex; flex-wrap: wrap; gap: 2px; padding: 2px; }
.snip { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.snip-tools { flex: none; display: flex; gap: 2px; padding: 2px; }
.snip-hint { margin: 4px 6px; }
.snip-dim { position: fixed; inset: 0; z-index: 99999; background: rgba(255, 255, 255, .35); cursor: crosshair; touch-action: none; outline: 0; }
.vw-stage { flex: 1; min-height: 0; overflow: auto; background: #808080; box-shadow: var(--thin-in); }
.vw-img { display: block; image-rendering: auto; }

/* chimimouryou Reader: vertical text paged right to left, in the page's own light, sepia or dark. */
.rd { --rd-bg: #fff; --rd-ink: #111; --rd-hit: #ffe680; display: flex; flex-direction: column; flex: 1; min-height: 0; outline: 0; }
.rd[data-theme="sepia"] { --rd-bg: #f4ecd8; --rd-ink: #5b4636; --rd-hit: #e6cf8f; }
.rd[data-theme="dark"] { --rd-bg: #1e1e1e; --rd-ink: #d8d8d8; --rd-hit: #5a4a10; }
.rd-stage { position: relative; flex: 1; min-height: 0; display: flex; background: var(--rd-bg); color: var(--rd-ink); box-shadow: var(--thin-in); }
.rd-text { writing-mode: vertical-rl; flex: 1; min-width: 0; margin: 16px auto; overflow: hidden; font: var(--rd-fs, 20px)/var(--rd-lh, 40px) "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif CJK JP", "Noto Serif JP", serif; user-select: none; touch-action: pan-y pinch-zoom; cursor: pointer; }
.rd-text p { margin: 0; text-indent: 1em; }
.rd-text rt { font-size: .5em; }
.rd-nofuri .rd-text rt { visibility: hidden; }
.rd-spacer { flex: none; }
.rd .rd-hit { background: var(--rd-hit); }
.rd-side { flex: none; width: 28px; border: 0; background: none; color: inherit; opacity: .35; font-size: 22px; cursor: pointer; }
.rd-side:hover { opacity: .8; }
.rd-pop { position: absolute; z-index: 2; max-width: 240px; padding: 6px 8px; background: #ffffe1; color: #000; border: 1px solid #000; box-shadow: 2px 2px 0 rgba(0, 0, 0, .3); }
.rd-pop b { font-size: 18px; margin-right: 6px; }
.rd-pop p { margin: 4px 0 0; }
.rd-pop small { display: block; margin-top: 4px; color: #666; }
.rd-status { flex: none; display: flex; align-items: center; gap: 8px; padding: 3px 4px; }
.rd-bar { flex: 1; height: 6px; box-shadow: var(--thin-in); background: #fff; }
.rd-fill { height: 100%; background: var(--select, #000080); }

/* The 10/11 lock screen: the desktop colour under a soft glow, with the clock low on the left. */
.screen.lockscreen { display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; padding: 0 48px 12vh; color: #fff; outline: 0; cursor: default; text-shadow: 0 1px 8px rgba(0, 0, 0, .4);
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .35), transparent 60%), var(--desktop); animation: lock-in .25s ease-out; }
.lockscreen b { font: 300 min(14vw, 120px)/1 "Segoe UI", system-ui, sans-serif; }
.lockscreen span { font: min(5vw, 32px) "Segoe UI", system-ui, sans-serif; }
@keyframes lock-in { from { transform: translateY(24px); opacity: 0; } }

/* VNBox: the CONscripter window's classes, plus the text log beside the game (below it when narrow). */
.vnb-play { flex: 1; min-width: 0; display: flex; }
.vnb-log { flex: 0 0 min(32%, 320px); overflow: auto; background: var(--paper); color: var(--ink); padding: 4px 6px; font-size: 15px; line-height: 1.5; user-select: text; border-left: 2px solid var(--face); }
.vnb-log[hidden] { display: none; }
.vnb-log p { margin: 0 0 6px; }
.vnb-log .vnb-log-empty { color: var(--shadow); font-size: 12px; }
@container (max-width: 560px) {
  .vnb-play { flex-direction: column; }
  .vnb-log { flex-basis: 30%; border-left: 0; border-top: 2px solid var(--face); }
}
.vnb-dlg { width: 420px; max-width: calc(100vw - 32px); display: flex; flex-direction: column; gap: 6px; }
.vnb-dlg p { margin: 0; }
.vnb-list { width: 100%; }
