/* Hallmark · shape: app screen · genre: playful · theme: custom · idea: "a 1995 desktop where every shortcut launches a classic game" · vibe: "grey bevels, teal desktop, pixel icons"
 * paper: oklch(80.8% 0.005 250) · accent: oklch(27.1% 0.188 264) · display: W95FA · body: W95FA
 * nav: a taskbar with a Start menu · signature: the desktop of game shortcuts · states: boot, desktop, shortcuts picked and dragged, own wallpaper, empty folder, no search results, offline, shut down
 * axes: mid/pixel/cool · posture: committed, the teal desktop is the field · contrast: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S5 R3 V5 · weakest: R, cut the trash can, the fake network icon and every menu that did nothing */
/* Hallmark · waive 47c · every bevel here is the edge of a working button, field or window · the brief names the 95 desktop bevel as the look */
/* Hallmark · waive 39b · controls are 23px and grow to 36px on coarse pointers · the 95 shell metric is what the brief asks to keep */
@import url("./tokens.css");
@import url("./base.css");

/* ---------- page ---------- */
html, body { height: 100%; }
body { background: var(--color-field); color: var(--color-accent-ink); font-size: var(--text-md); line-height: 1.25; font-synthesis: none; -webkit-font-smoothing: auto; user-select: none; -webkit-user-select: none; cursor: default; overflow: clip; touch-action: manipulation; }
h1, h2, h3, th, b, strong { font-weight: 400; }
b, strong, .strong { text-shadow: 1px 0 0 currentColor; }
button { color: inherit; cursor: default; border-radius: 0; }
img { image-rendering: pixelated; object-fit: contain; }
img.is-smooth { image-rendering: auto; }
p { max-width: none; }
.glyph { fill: currentColor; shape-rendering: crispEdges; flex-shrink: 0; }
.selectable { user-select: text; -webkit-user-select: text; cursor: text; }

/* ---------- desktop ---------- */
.desktop { position: fixed; inset: 0 0 var(--taskbar-h) 0; }
.icons { position: absolute; inset: 0; display: grid; grid-auto-flow: column; grid-template-rows: repeat(auto-fill, var(--cell-h)); grid-auto-columns: var(--cell-w); align-content: start; justify-content: start; padding: var(--space-xs); overflow: hidden; }

/* on a wide screen every shortcut sits in a cell of its own, set by js/desk.js, and can be dragged to another */
.icons.is-free { display: block; }
.icons.is-free .icon { position: absolute; left: calc(var(--space-xs) + var(--col, 0) * var(--cell-w)); top: calc(var(--space-xs) + var(--row, 0) * var(--cell-h)); }
.icons.is-dragging .icon.is-selected { z-index: var(--z-dropdown); opacity: 0.72; }
.band { position: absolute; z-index: var(--z-raised); border: var(--rule-hair) solid var(--color-band-edge); background: var(--color-band); pointer-events: none; }

/* the desktop picture, and the same picture on the small monitor of the Display window */
.wall { background-repeat: no-repeat; background-position: center; background-size: cover; }
.wall[data-fit="center"] { background-size: var(--wall-w, auto) var(--wall-h, auto); }
.wall[data-fit="tile"] { background-repeat: repeat; background-position: 0 0; background-size: var(--wall-w, auto) var(--wall-h, auto); }

.icon { position: relative; display: flex; flex-direction: column; align-items: center; gap: var(--space-2xs); width: var(--cell-w); height: var(--cell-h); padding: var(--space-xs) var(--space-3xs) 0; background: none; border: 0; color: var(--color-field-ink); font-size: var(--text-md); line-height: 1.15; text-align: center; }
.icon img { width: 32px; height: 32px; flex-shrink: 0; }
.icon-label { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; max-width: 100%; padding: 0 var(--space-3xs) var(--space-4xs); overflow-wrap: break-word; }
.icon.is-shortcut::after { content: ""; position: absolute; left: calc(50% - 16px); top: var(--space-xs); width: 32px; height: 32px; background: var(--shortcut-arrow) no-repeat 0 0 / 32px 32px; image-rendering: pixelated; pointer-events: none; }
.desktop.has-wall .icon:not(.is-selected) .icon-label { background: none; color: var(--pix-w); text-shadow: 1px 1px 0 var(--pix-k), 0 0 2px var(--pix-k), 0 0 3px var(--pix-k); }
.icon.is-selected { z-index: var(--z-raised); }
.icon.is-selected img { filter: brightness(0.55) sepia(1) hue-rotate(195deg) saturate(5); }
.icon.is-selected .icon-label { -webkit-line-clamp: 5; line-clamp: 5; background: var(--color-accent); color: var(--color-accent-ink); }
.icon:focus-visible { outline: none; }
.icon:focus-visible .icon-label { outline: 1px dotted currentColor; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-width: 75px; height: var(--control-h); padding: 0 var(--space-lg); background: var(--color-paper); color: var(--color-ink); border: 0; box-shadow: var(--bevel-raised); font-size: var(--text-md); white-space: nowrap; text-decoration: none; flex-shrink: 0; }
.btn-face { display: inline-flex; align-items: center; gap: var(--space-xs); }
.btn:active, .btn.is-pressed { box-shadow: var(--bevel-pressed); }
.btn:active .btn-face, .btn.is-pressed .btn-face { transform: translate(1px, 1px); }
.btn:focus-visible { outline: 1px dotted var(--color-focus); outline-offset: -5px; }
.btn.is-default { box-shadow: var(--bevel-raised), 0 0 0 1px var(--color-ink); }
.btn.is-default:active { box-shadow: var(--bevel-pressed), 0 0 0 1px var(--color-ink); }
.btn:disabled, .btn[aria-disabled="true"] { color: var(--color-muted); text-shadow: 1px 1px 0 var(--color-paper-2); cursor: not-allowed; opacity: 0.9; }
.btn:disabled:active, .btn[aria-disabled="true"]:active { box-shadow: var(--bevel-raised); }
.btn:disabled:active .btn-face, .btn[aria-disabled="true"]:active .btn-face { transform: none; }

.field { height: var(--control-h); min-width: 0; padding: 0 var(--space-sm); background: var(--color-paper-2); color: var(--color-ink); border: 0; border-radius: 0; box-shadow: var(--bevel-sunken); font-size: var(--text-md); user-select: text; -webkit-user-select: text; caret-color: var(--color-ink); }
.field:focus-visible { outline: 1px dotted var(--color-focus); outline-offset: 1px; }
.field[readonly] { background: var(--color-paper); }
.field::selection { background: var(--color-accent); color: var(--color-accent-ink); }

.check { display: inline-flex; align-items: center; gap: var(--space-sm); min-height: var(--control-h); }
.check input { appearance: none; -webkit-appearance: none; position: relative; width: 13px; height: 13px; margin: 0; background: var(--color-paper-2); box-shadow: var(--bevel-sunken); border-radius: 0; flex-shrink: 0; }
.check input[type="radio"] { border-radius: 50%; }
.check input:checked::after { content: ""; position: absolute; inset: 3px; background: var(--color-ink); clip-path: polygon(0 40%, 0 72%, 30% 100%, 100% 30%, 100% 0, 30% 68%); }
.check input[type="radio"]:checked::after { inset: 4px; clip-path: none; border-radius: 50%; }
.check input:focus-visible { outline: none; }
.check input:focus-visible + span { outline: 1px dotted var(--color-focus); outline-offset: 1px; }
.check input:disabled { background: var(--color-paper); cursor: not-allowed; }

/* ---------- windows ---------- */
.windows { position: fixed; inset: 0 0 var(--taskbar-h) 0; z-index: var(--z-raised); pointer-events: none; overflow: hidden; }
.window { position: absolute; display: flex; flex-direction: column; max-width: 100%; max-height: 100%; padding: var(--space-xs); background: var(--color-paper); color: var(--color-ink); box-shadow: var(--bevel-window); pointer-events: auto; }
.window:focus-visible { outline: none; }
.window.is-max { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; }
.titlebar { display: flex; align-items: center; gap: var(--space-2xs); height: var(--title-h); padding: 0 var(--space-3xs); background: var(--color-idle); color: var(--color-accent-ink); flex-shrink: 0; touch-action: none; }
.window.is-active .titlebar { background: var(--color-accent); color: var(--color-accent-ink); }
.titlebar img { width: 16px; height: 16px; flex-shrink: 0; }
.titlebar-text { flex: 1; min-width: 0; margin: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-family: var(--font-body); font-size: var(--text-md); line-height: 1.25; text-shadow: 1px 0 0 currentColor; }
.tb-btn { display: grid; place-items: center; width: 16px; height: 14px; padding: 0; background: var(--color-paper); color: var(--color-ink); border: 0; box-shadow: var(--bevel-raised); flex-shrink: 0; }
.tb-btn:active { box-shadow: var(--bevel-pressed); }
.tb-btn:focus-visible { outline: 1px dotted var(--color-focus-inverse); outline-offset: 1px; }
.tb-btn:disabled { color: var(--color-muted); cursor: not-allowed; opacity: 0.9; }
.tb-close { margin-left: var(--space-3xs); }
.window-body { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.grip { position: absolute; right: 4px; bottom: 4px; width: 12px; height: 12px; cursor: nwse-resize; touch-action: none; background: repeating-linear-gradient(135deg, var(--color-paper) 0 2px, var(--color-muted) 2px 3px, var(--color-paper-2) 3px 4px); clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.window.is-max .grip { display: none; }

.menubar { display: flex; flex-shrink: 0; padding: var(--space-4xs) 0; }
.menubar-item { height: 18px; padding: 0 var(--space-sm); background: none; border: 0; font-size: var(--text-md); }
.menubar-item.is-open, .menubar-item:focus-visible { background: var(--color-accent); color: var(--color-accent-ink); outline: 1px dotted var(--color-focus-inverse); outline-offset: -1px; }

.pane { flex: 1; min-height: 0; overflow: auto; background: var(--color-paper-2); box-shadow: var(--bevel-sunken); padding: var(--space-3xs); scrollbar-color: var(--color-muted) var(--color-paper-3); }
.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--cell-w), 1fr)); grid-auto-rows: var(--cell-h); align-content: start; padding: var(--space-xs); }
.files .icon { width: auto; color: var(--color-ink); }
.empty { display: grid; place-content: center; gap: var(--space-xs); min-height: 100%; padding: var(--space-2xl); text-align: center; color: var(--color-ink-2); }

.details { width: 100%; border-collapse: collapse; font-size: var(--text-md); }
.details th { position: sticky; top: 0; padding: 0; text-align: left; }
.th-btn { display: block; width: 100%; height: 18px; padding: 0 var(--space-sm); background: var(--color-paper); border: 0; box-shadow: var(--bevel-raised); font-size: var(--text-md); text-align: left; white-space: nowrap; }
.th-btn:active { box-shadow: var(--bevel-pressed); }
.th-btn:focus-visible { outline: 1px dotted var(--color-focus); outline-offset: -4px; }
.details td { padding: var(--space-4xs) var(--space-sm); white-space: nowrap; }
.row-btn { display: inline-flex; align-items: center; gap: var(--space-xs); min-width: max-content; padding: 0; background: none; border: 0; font-size: var(--text-md); }
.row-btn img { width: 16px; height: 16px; }
.row-name { padding: 0 var(--space-3xs); }
.details tr.is-selected .row-name { background: var(--color-accent); color: var(--color-accent-ink); }
.row-btn:focus-visible { outline: none; }
.row-btn:focus-visible .row-name { outline: 1px dotted var(--color-focus); }
.details tr.is-selected .row-btn:focus-visible .row-name { outline-color: var(--color-focus-inverse); }

.statusbar { display: flex; gap: var(--space-3xs); flex-shrink: 0; padding-top: var(--space-3xs); }
.status-field { flex: 1; min-width: 0; height: 18px; padding: 0 var(--space-xs); box-shadow: var(--bevel-thin-sunken); line-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status-field.is-narrow { flex: 0 1 180px; }

/* ---------- dialogs ---------- */
.dlg { display: flex; flex-direction: column; gap: var(--space-lg); padding: var(--space-lg); }
.dlg-row { display: flex; align-items: flex-start; gap: var(--space-lg); }
.dlg-row > img { width: 32px; height: 32px; flex-shrink: 0; }
.dlg-col { display: flex; flex-direction: column; gap: var(--space-md); flex: 1; min-width: 0; }
.dlg-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: var(--space-sm); }
.dlg-side { display: flex; flex-direction: column; gap: var(--space-sm); flex-shrink: 0; }
.dlg-title { font-family: var(--font-display); font-size: var(--text-2xl); line-height: 1.1; text-shadow: 1px 0 0 currentColor; }
.dlg-text { overflow-wrap: break-word; }
.rule { height: 2px; box-shadow: inset 0 1px var(--color-muted), inset 0 -1px var(--color-paper-2); }
.tip { display: flex; align-items: flex-start; gap: var(--space-lg); min-height: 96px; padding: var(--space-lg); background: var(--color-tip); box-shadow: var(--bevel-sunken); }
.tip img { width: 32px; height: 32px; flex-shrink: 0; }
.props { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--space-sm) var(--space-lg); margin: 0; align-items: center; }
.props dt { color: var(--color-ink-2); }
.props dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.props .field { width: 100%; }
.link-list { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-xs); margin: 0; padding: 0; list-style: none; }
.link { color: var(--color-accent); text-decoration: underline; overflow-wrap: anywhere; user-select: text; -webkit-user-select: text; }
.link:focus-visible { outline: 1px dotted var(--color-focus); outline-offset: 1px; }
.field-row { display: flex; align-items: center; gap: var(--space-sm); }
.field-row .field { flex: 1; }
.note { color: var(--color-ink-2); }
.warn { padding: var(--space-xs) var(--space-sm); background: var(--color-tip, var(--color-paper-2)); box-shadow: var(--bevel-thin-sunken); }
.marks { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin: 0; padding: 0; list-style: none; }
.marks li { padding: 0 var(--space-xs); background: var(--color-paper-2); box-shadow: var(--bevel-thin-sunken); }
.stack { display: flex; flex-direction: column; align-items: stretch; gap: var(--space-xs); }
.stack .check { align-self: flex-start; }
textarea.field { height: auto; padding: var(--space-xs) var(--space-sm); font-family: inherit; resize: vertical; }
.dlg-actions > .is-left { margin-right: auto; }
.readme-actions { padding: var(--space-sm); }
.icon.is-down img { opacity: 0.45; }
.notepad { flex: 1; min-height: 0; margin: 0; overflow: auto; padding: var(--space-sm) var(--space-md); background: var(--color-paper-2); box-shadow: var(--bevel-sunken); font-family: var(--font-outlier); font-size: var(--text-md); line-height: 1.45; white-space: pre-wrap; overflow-wrap: break-word; user-select: text; -webkit-user-select: text; cursor: text; scrollbar-color: var(--color-muted) var(--color-paper-3); }
.notepad:focus-visible { outline: 1px dotted var(--color-focus); outline-offset: -3px; }
.game-frame { flex: 1; min-height: 0; width: 100%; border: 0; background: var(--color-ink); }

/* ---------- the Display window ---------- */
.monitor { display: flex; flex-direction: column; align-items: center; }
.monitor-case { padding: var(--space-md) var(--space-md) var(--space-lg); background: var(--color-paper); box-shadow: var(--bevel-raised); }
.monitor-screen { width: 184px; background-color: var(--color-field); box-shadow: var(--bevel-sunken); }
.monitor-neck { width: 44px; height: var(--space-md); background: var(--color-muted); }
.monitor-foot { width: 108px; height: var(--space-sm); background: var(--color-paper); box-shadow: var(--bevel-raised); }
.group { display: flex; flex-direction: column; gap: var(--space-md); flex: 1; min-width: 0; margin: 0; padding: var(--space-sm) var(--space-lg) var(--space-lg); border: var(--rule-hair) solid var(--color-muted); box-shadow: inset 1px 1px var(--color-paper-2), 1px 1px var(--color-paper-2); }
.group legend { padding: 0 var(--space-xs); }
.group-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--space-xs) var(--space-lg); }
.listbox { display: flex; flex-direction: column; flex: 1; min-width: 96px; min-height: 76px; padding: var(--space-3xs); background: var(--color-paper-2); box-shadow: var(--bevel-sunken); }
.list-row { display: block; }
.list-row span { display: block; padding: var(--space-4xs) var(--space-xs); white-space: nowrap; }
.list-row input:checked + span { background: var(--color-accent); color: var(--color-accent-ink); }
.list-row input:focus-visible + span { outline: 1px dotted var(--color-focus); outline-offset: -1px; }
.list-row input:checked:focus-visible + span { outline-color: var(--color-focus-inverse); }
.swatches { display: grid; grid-template-columns: repeat(6, max-content); gap: var(--space-xs); }
.swatch { width: var(--control-h); height: var(--control-h); padding: 0; border: 0; background: var(--swatch); box-shadow: var(--bevel-sunken); }
.swatch[aria-pressed="true"] { outline: 2px solid var(--color-ink); outline-offset: 1px; }
.swatch:focus-visible { outline: 1px dotted var(--color-focus); outline-offset: 3px; }

/* ---------- menus ---------- */
.menus { position: fixed; inset: 0; z-index: var(--z-modal); pointer-events: none; }
.menu { position: fixed; display: flex; max-width: calc(100% - var(--space-xs)); max-height: calc(100% - var(--space-xs)); padding: var(--space-2xs); background: var(--color-paper); color: var(--color-ink); box-shadow: var(--bevel-window); pointer-events: auto; }
.menu:focus-visible { outline: none; }
.menu-list { display: flex; flex-direction: column; flex: 1; min-width: 0; overflow: hidden auto; scrollbar-color: var(--color-muted) var(--color-paper-3); }
.menu-item { display: flex; align-items: center; gap: var(--space-md); flex-shrink: 0; width: 100%; height: var(--menu-row); padding: 0 var(--space-xl) 0 var(--space-xs); background: none; border: 0; font-size: var(--text-md); text-align: left; white-space: nowrap; }
.menu-item img { width: 16px; height: 16px; flex-shrink: 0; }
.menu-gutter { display: grid; place-items: center; width: 16px; height: 16px; flex-shrink: 0; }
.menu-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.menu-item.has-sub { padding-right: var(--space-sm); }
.menu-item.has-sub::after { content: ""; border: 4px solid transparent; border-left-color: currentColor; border-right-width: 0; }
.menu-item:hover, .menu-item.is-open, .menu-item:focus-visible { background: var(--color-accent); color: var(--color-accent-ink); outline: none; }
.menu-item:disabled { color: var(--color-muted); text-shadow: 1px 1px 0 var(--color-paper-2); cursor: not-allowed; }
.menu-item:disabled:hover { background: none; color: var(--color-muted); }
.menu-sep { height: 2px; flex-shrink: 0; margin: var(--space-2xs) var(--space-4xs); box-shadow: inset 0 1px var(--color-muted), inset 0 -1px var(--color-paper-2); }
.menu-big .menu-item { height: var(--start-row); gap: var(--space-lg); }
.menu-big .menu-item img { width: 32px; height: 32px; }
.menu-strip { display: flex; align-items: flex-end; justify-content: center; width: 24px; flex-shrink: 0; margin-right: var(--space-3xs); padding: var(--space-sm) 0; background: var(--color-idle); color: var(--color-accent-ink); }
.menu-strip span { writing-mode: vertical-rl; transform: rotate(180deg); font-size: var(--text-xl); line-height: 1; white-space: nowrap; text-shadow: 1px 0 0 currentColor, 0 1px 0 currentColor; }

/* ---------- taskbar ---------- */
.taskbar { position: fixed; inset: auto 0 0 0; z-index: var(--z-sticky-nav); display: flex; align-items: center; gap: var(--space-xs); height: var(--taskbar-h); padding: var(--space-3xs) var(--space-3xs) 0; background: var(--color-paper); color: var(--color-ink); box-shadow: inset 0 1px var(--color-paper-3), inset 0 2px var(--color-paper-2); }
.start-btn { min-width: 0; height: calc(var(--taskbar-h) - 6px); padding: 0 var(--space-sm) 0 var(--space-xs); text-shadow: 1px 0 0 currentColor; }
.start-btn img { width: 16px; height: 16px; }
.tasks { display: flex; flex: 1; gap: var(--space-2xs); min-width: 0; overflow: hidden; }
.task { justify-content: flex-start; flex: 0 1 160px; min-width: 0; height: calc(var(--taskbar-h) - 6px); padding: 0 var(--space-sm); overflow: hidden; }
.task .btn-face { min-width: 0; }
.task img { width: 16px; height: 16px; flex-shrink: 0; }
.task-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.task.is-active { box-shadow: var(--bevel-pressed); background: repeating-conic-gradient(var(--color-paper-2) 0% 25%, var(--color-paper) 0% 50%) 0 0 / 2px 2px; text-shadow: 1px 0 0 currentColor; }
.tray { display: flex; align-items: center; gap: var(--space-sm); height: calc(var(--taskbar-h) - 6px); padding: 0 var(--space-md) 0 var(--space-xs); box-shadow: var(--bevel-thin-sunken); flex-shrink: 0; }
.tray-btn { display: inline-flex; align-items: center; gap: var(--space-xs); height: 100%; padding: 0 var(--space-3xs); background: none; border: 0; font-size: var(--text-md); white-space: nowrap; }
.tray-btn[hidden] { display: none; }
.tray-btn img { width: 16px; height: 16px; }
.tray-btn:focus-visible { outline: 1px dotted var(--color-focus); outline-offset: -1px; }
.tray-btn.is-open { box-shadow: var(--bevel-thin-sunken); }
.lang-tag { display: inline-grid; place-items: center; min-width: 18px; height: 16px; padding: 0 var(--space-3xs); background: var(--color-accent); color: var(--color-accent-ink); font-size: var(--text-sm); line-height: 1; flex-shrink: 0; }
.menu-item.is-current .menu-label { text-shadow: 1px 0 0 currentColor; }
.menu-item:hover .lang-tag, .menu-item:focus-visible .lang-tag { background: var(--color-accent-ink); color: var(--color-accent); }
.clock { padding-left: var(--space-2xs); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- boot and shut down ---------- */
.boot { position: fixed; inset: 0; z-index: var(--z-tooltip); display: grid; background: var(--color-boot); color: var(--color-boot-ink); }
.boot-post { margin: 0; padding: var(--space-2xl); font-family: var(--font-outlier); font-size: var(--text-lg); line-height: 1.5; white-space: pre-wrap; }
.boot-splash { position: relative; display: grid; place-items: center; overflow: hidden; }
.boot-sky { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.boot-brand { position: relative; display: flex; flex-direction: column; align-items: center; font-size: calc(var(--boot-logo-w) / 22); padding: var(--space-xl) var(--space-xl) var(--space-4xl); }
.boot-logo { width: var(--boot-logo-w); }
.boot-logo svg { display: block; width: 100%; height: auto; }
.boot-name { display: flex; flex-direction: column; align-items: flex-start; margin-top: -0.5em; }
.boot-tag { padding-left: var(--space-2xs); font-family: var(--font-boot); font-size: 1.1em; font-weight: 700; line-height: 1; color: var(--color-ink); font-synthesis: weight; }
.boot-word { display: flex; align-items: baseline; gap: var(--space-xs); font-family: var(--font-boot); font-size: 4em; line-height: 1; letter-spacing: -0.03em; font-synthesis: weight; }
.boot-word b { font-weight: 900; color: var(--color-ink); text-shadow: none; }
.boot-word i { font-family: var(--font-boot-light); font-style: normal; font-weight: 300; font-size: 1.12em; letter-spacing: 0; color: var(--color-paper-2); }
.boot-bar { position: absolute; inset: auto 0 0 0; height: var(--space-xl); overflow: hidden; background: var(--pix-n); }
.boot-bar-run { width: 200%; height: 100%; background: linear-gradient(90deg, var(--pix-n) 0%, var(--pix-b) 12%, var(--pix-1) 22%, var(--pix-w) 25%, var(--pix-1) 28%, var(--pix-b) 38%, var(--pix-n) 50%, var(--pix-b) 62%, var(--pix-1) 72%, var(--pix-w) 75%, var(--pix-1) 78%, var(--pix-b) 88%, var(--pix-n) 100%); transform: translateX(-50%); animation: boot-bar 1.6s steps(32, end) infinite; }
@keyframes boot-bar { to { transform: translateX(0); } }
.safe { position: fixed; inset: 0; z-index: var(--z-tooltip); display: grid; place-content: center; gap: var(--space-lg); width: 100%; padding: var(--space-2xl); background: var(--color-boot); color: var(--color-safe); border: 0; font-size: var(--text-2xl); line-height: 1.2; text-align: center; }
.safe small { color: var(--color-boot-ink); font-size: var(--text-lg); }
.safe:focus-visible { outline: 1px dotted var(--color-focus-inverse); outline-offset: -8px; }
.noscript { position: fixed; inset: 0; z-index: var(--z-tooltip); display: grid; place-content: center; padding: var(--space-2xl); background: var(--color-field); color: var(--color-accent-ink); font-size: var(--text-lg); text-align: center; }

/* ---------- Notepad and Paint ---------- */
.notepad-edit { width: 100%; border: 0; border-radius: 0; resize: none; color: var(--color-ink); }
.notepad-edit.is-nowrap { white-space: pre; overflow-wrap: normal; }
.paint-main { display: flex; flex: 1; min-height: 0; gap: var(--space-xs); }
.paint-side { display: flex; flex-direction: column; gap: var(--space-sm); flex-shrink: 0; }
.paint-tools { display: grid; grid-template-columns: repeat(2, 25px); gap: var(--space-4xs); }
.paint-tool { display: grid; place-items: center; width: 25px; height: 25px; padding: 0; background: var(--color-paper); border: 0; box-shadow: var(--bevel-raised); }
.paint-tool[aria-checked="true"] { background: var(--color-paper-3); box-shadow: var(--bevel-pressed); }
.paint-tool:focus-visible, .paint-size:focus-visible, .paint-swatch:focus-visible { outline: 1px dotted var(--color-focus); outline-offset: -4px; }
.paint-sizes { display: flex; flex-direction: column; gap: var(--space-3xs); width: 51px; padding: var(--space-2xs); box-shadow: var(--bevel-sunken); }
.paint-sizes[hidden] { display: none; }
.paint-size { display: grid; place-items: center; height: 14px; padding: 0 var(--space-2xs); background: transparent; border: 0; }
.paint-size-bar { display: block; width: 100%; background: var(--color-ink); }
.paint-size[aria-checked="true"] { background: var(--color-accent); }
.paint-size[aria-checked="true"] .paint-size-bar { background: var(--color-accent-ink); }
.paint-pane { background: var(--color-muted); padding: var(--space-xs); }
.paint-canvas { display: block; touch-action: none; cursor: crosshair; image-rendering: pixelated; box-shadow: 1px 1px 0 var(--color-ink); }
.paint-canvas[data-tool="fill"], .paint-canvas[data-tool="pick"] { cursor: pointer; }
.paint-bottom { display: flex; align-items: center; gap: var(--space-xs); padding-top: var(--space-xs); flex-shrink: 0; }
.paint-current { position: relative; width: 34px; height: 34px; flex-shrink: 0; background: var(--color-paper-3); box-shadow: var(--bevel-sunken); }
.paint-current span { position: absolute; width: 14px; height: 14px; box-shadow: var(--bevel-thin-sunken); }
.paint-fg { left: var(--space-xs); top: var(--space-xs); }
.paint-bg { right: var(--space-xs); bottom: var(--space-xs); }
.paint-palette { display: grid; grid-template-columns: repeat(14, 17px); grid-auto-rows: 17px; gap: var(--space-4xs); }
.paint-swatch { padding: 0; border: 0; box-shadow: var(--bevel-thin-sunken); }

/* ---------- small screens and touch ---------- */
@media (max-width: 40rem) {
  .icons { grid-auto-flow: row; grid-template-rows: none; grid-template-columns: repeat(auto-fill, minmax(var(--cell-w), 1fr)); grid-auto-rows: var(--cell-h); overflow: hidden auto; }
  .icons .icon { width: auto; }
  .task { flex-basis: 40px; }
  .task .task-label { display: none; }
  .dlg-row.is-stack { flex-direction: column; }
  .dlg-row.is-stack > .group { align-self: stretch; }
  .dlg-side { flex-direction: row; flex-wrap: wrap; }
  .paint-main { flex-direction: column; }
  .paint-side { flex-direction: row; }
  .paint-tools { grid-template-columns: repeat(9, 25px); }
  .paint-side { flex-wrap: wrap; align-items: center; }
  .paint-sizes { flex-direction: row; align-items: center; width: auto; }
  .paint-size { width: 28px; }
  .paint-canvas { max-width: 100%; height: auto; }
  .paint-palette { grid-template-columns: repeat(14, minmax(0, 1fr)); flex: 1; }
}
@media (pointer: coarse) {
  .tb-btn { width: 26px; height: 22px; }
  .menubar-item, .th-btn, .status-field { height: 28px; line-height: 28px; }
  .check input { width: 18px; height: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .boot-bar-run { animation: none; }
}
