/* Desktop shell — every value comes from the Figma components in Section 1 */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  overflow: hidden;
  background: var(--bg-sky-middle) url("../assets/img/wallpaper.webp") center / cover no-repeat;
  font-family: var(--font-body);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  user-select: none; -webkit-user-select: none;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:focus { outline: none; }
input { font: inherit; }

/* ================= Desktop ================= */
.desktop {
  position: fixed; left: 0; top: 0; right: 0;
  bottom: 92px;                      /* Taskbar · v3 height */
  overflow: hidden;
}

/* File (367:2224) — 168×168, padding 6/20, gap 6, radius 8 */
.file {
  position: absolute;
  width: 168px; min-height: 168px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 6px 20px;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px transparent;
  transition: background-color 120ms ease-out, box-shadow 120ms ease-out;
}
.file:hover { background: var(--control-glass-hover); box-shadow: inset 0 0 0 1px var(--control-glass-hover-border); }
.file.is-pressed { background: var(--control-glass-pressed); box-shadow: inset 0 0 0 1px var(--control-glass-pressed-border); }
.file:focus-visible { box-shadow: inset 0 0 0 2px var(--control-focus-ring); }
.file .art { width: 128px; height: 128px; }
.file .art img { width: 128px; height: 128px; }
.file .label {
  position: relative;
  padding: 2px 8px;
  font-weight: 700; font-size: var(--type-label-size); line-height: var(--type-label-lh);
  color: var(--text-on-dark); text-align: center; white-space: nowrap;
}
/* Label bg: three rects (#2a1e2e @55%) inside a group at 55% opacity, 4px cut corners */
.file .label::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(42, 30, 46, 0.3025);
  clip-path: polygon(4px 0, calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 4px calc(100% - 4px), 0 calc(100% - 4px), 0 4px, 4px 4px);
}
.file .label span { position: relative; }

/* "Пиксельный" press: 1 art pixel squash on pointer-down (1 frame), 160ms stepped bounce on release */
.art { transform-origin: 50% 100%; }
.is-pressed .art { transform: scale(1.03125, 0.96875); transition: transform var(--press-down) steps(1, end); }
.is-pop .art { animation: px-pop var(--press-pop) steps(1, end); }
@keyframes px-pop {
  0%   { transform: scale(1.03125, 0.96875); }
  35%  { transform: scale(0.96875, 1.03125); }
  100% { transform: none; }
}

/* ================= Taskbar · v3 ================= */
.taskbar {
  position: fixed; left: 0; right: 0; bottom: 0; height: 92px; z-index: 9000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 36px;
  background: var(--surface-base);
  border-top: 4px solid var(--border-strong);
}
.tb-items { display: flex; gap: 8px; align-items: flex-start; }
.tray { display: flex; align-items: center; gap: 16px; height: 64px; }
.tray-lang { font-weight: 700; font-size: var(--type-label-size); line-height: var(--type-label-lh); color: var(--text-secondary); }
.tray-sep { width: 4px; height: 24px; background: var(--border-subtle); }
.tray-time { font-family: var(--font-display); font-size: var(--type-display-sm-size); line-height: var(--type-display-sm-lh); color: var(--text-primary); font-variant-numeric: tabular-nums; }

/* Taskbar item (521:1171) — 76×76, icon 64 at (6,4). Open = icon only; Hover = dark 24px bar; Active = tile + coral 48px bar */
.tb {
  position: relative; width: 76px; height: 76px; flex: none;
}
.tb::before { /* Active tile: 68×68 box + 4px edge bars inset 8 → stepped corners */
  content: ""; position: absolute; inset: 0; background: var(--control-ghost-selected); opacity: 0;
  clip-path: polygon(8px 0, 68px 0, 68px 4px, 72px 4px, 72px 8px, 76px 8px, 76px 68px, 72px 68px, 72px 72px, 68px 72px, 68px 76px, 8px 76px, 8px 72px, 4px 72px, 4px 68px, 0 68px, 0 8px, 4px 8px, 4px 4px, 8px 4px);
}
.tb .art { position: absolute; left: 6px; top: 4px; width: 64px; height: 64px; }
.tb .art img { width: 64px; height: 64px; }
.tb .ind { position: absolute; top: 68px; left: 26px; width: 24px; height: 4px; background: var(--border-strong); opacity: 0; }
.tb:hover .ind { opacity: 1; }
.tb[data-state="active"]::before { opacity: 1; }
.tb[data-state="active"] .ind { opacity: 1; left: 14px; width: 48px; background: var(--indicator-active); }
.tb:focus-visible::before { opacity: 1; background: var(--control-glass-selected); }
.tb.is-new { animation: tb-in 120ms steps(3, end); }
@keyframes tb-in { from { transform: scale(0.5); opacity: 0; } to { transform: none; opacity: 1; } }

/* ================= Icon button (677:6018) ================= */
.ibtn {
  position: relative; width: 32px; height: 32px; flex: none;
  display: grid; place-items: center;
  --tile: transparent;
  color: var(--ib-glyph, var(--icon-muted));
}
.ibtn::before { content: ""; position: absolute; inset: 0; background: var(--tile);
  clip-path: polygon(4px 0, 28px 0, 28px 4px, 32px 4px, 32px 28px, 28px 28px, 28px 32px, 4px 32px, 4px 28px, 0 28px, 0 4px, 4px 4px); }
.ibtn .glyph { position: relative; }
.ibtn:focus-visible { --ring: var(--control-focus-ring); }
/* Neutral surface */
.ibtn:hover, .ibtn:focus-visible { color: var(--icon-primary); }
.ibtn:hover { --tile: var(--control-ghost-hover); }
.ibtn:active { --tile: var(--control-ghost-pressed); color: var(--icon-primary); }
.ibtn:disabled { color: var(--icon-disabled); --tile: transparent; cursor: default; }
.ibtn.danger:hover { --tile: var(--control-danger-hover); color: var(--icon-on-danger); }
.ibtn.danger:active { --tile: var(--control-danger-pressed); color: var(--icon-on-danger); }
/* Accent surface (title bar of the active window; colours from the App collection) */
.win.is-active .win-title .ibtn { color: var(--icon-primary); }
.win.is-active .win-title .ibtn:hover { --tile: var(--app-hover); }
.win.is-active .win-title .ibtn:active { --tile: var(--app-pressed); }
.win.is-active .win-title .ibtn.danger:hover { --tile: var(--control-danger-hover); color: var(--icon-on-danger); }
.win.is-active .win-title .ibtn.danger:active { --tile: var(--control-danger-pressed); color: var(--icon-on-danger); }

/* ================= Window frame (601:712 / 642:1498) ================= */
.win {
  position: absolute;
  padding: 4px;                      /* 4px outline with notched corners */
  display: flex;
}
.win[data-app="notepad"]  { --app-accent: #ff7a59; --app-hover: #ffab8f; --app-pressed: #d65a3c; }
.win[data-app="explorer"] { --app-accent: #ffb547; --app-hover: #ffe7a3; --app-pressed: #e89a3c; }
.win[data-app="case"]     { --app-accent: #7cc47a; --app-hover: #a8dca5; --app-pressed: #4f9a5a; }
.win[data-app="game"]     { --app-accent: #3ec4d6; --app-hover: #8fe0ea; --app-pressed: #2a9bb0; }
.win-app {
  position: relative; flex: 1; min-width: 0; min-height: 0;
  display: flex; flex-direction: column;
  overflow: hidden;
  background: var(--surface-base);
}
.win-title {
  height: 44px; flex: none;
  display: flex; align-items: center; gap: 8px;
  padding: 0 6px 0 12px;
  background: var(--surface-raised);
  cursor: default;
  touch-action: none;
}
.win.is-active .win-title { background: var(--app-accent); }
.win-title .app-icon { flex: none; }
.win-title .title {
  flex: 1 0 0; min-width: 1px;
  font-weight: 700; font-size: 16px; line-height: var(--type-label-lh);
  color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.win[data-app="explorer"] .win-title .title { color: var(--text-primary); }
.win.is-active .win-title .title { color: var(--text-primary); }
.win-btns { display: flex; gap: 2px; flex: none; }
.div-strong { height: 4px; flex: none; background: var(--border-strong); }
.div-subtle { height: 4px; flex: none; background: var(--border-subtle); }
.statusbar {
  height: 32px; flex: none;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px;
  background: var(--surface-raised);
  font-weight: 600; font-size: var(--type-caption-size); line-height: var(--type-caption-lh);
  color: var(--text-muted); white-space: pre;
}

/* Maximized = "full window1": the whole area above the taskbar, outline outside the viewport */
.win.is-max { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; padding: 0; }
.win.is-max::before { display: none; }

/* Resize handles: 8px strips over the 4px outline (4px outside, 4px inside), 16px corners */
.rz { position: absolute; z-index: 6; touch-action: none; }
.rz-n, .rz-s { left: 12px; right: 12px; height: 8px; cursor: ns-resize; }
.rz-e, .rz-w { top: 12px; bottom: 12px; width: 8px; cursor: ew-resize; }
.rz-n { top: -4px; } .rz-s { bottom: -4px; } .rz-e { right: -4px; } .rz-w { left: -4px; }
.rz-ne, .rz-nw, .rz-se, .rz-sw { width: 16px; height: 16px; }
.rz-nw { left: -4px; top: -4px; cursor: nwse-resize; }
.rz-se { right: -4px; bottom: -4px; cursor: nwse-resize; }
.rz-ne { right: -4px; top: -4px; cursor: nesw-resize; }
.rz-sw { left: -4px; bottom: -4px; cursor: nesw-resize; }
.win.is-max .rz { display: none; }
.win.is-resizing, .win.is-resizing * { user-select: none; }

/* Desktop icons glide to their new cell when the screen size changes */
.desktop.is-laid .file { transition: background-color 120ms ease-out, box-shadow 120ms ease-out, left 240ms cubic-bezier(0.2, 0.8, 0.2, 1), top 240ms cubic-bezier(0.2, 0.8, 0.2, 1); }
.win.is-min { visibility: hidden; pointer-events: none; }

/* ---------- Notepad ---------- */
.np-content {
  flex: 1 1 0; min-height: 0; overflow: hidden;
  display: flex; flex-direction: column; gap: 12px;
  padding: 24px;
  color: var(--text-primary);
}
.np-content h1 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: var(--type-display-size); line-height: var(--type-display-lh); }
.np-content p { margin: 0; font-size: var(--type-body-size); line-height: var(--type-body-lh); }

/* ---------- Explorer ---------- */
.ex-toolbar {
  height: 48px; flex: none;
  display: flex; align-items: center; gap: 4px;
  padding: 0 8px;
  background: var(--surface-raised);
}
.ex-address {
  flex: 1 0 0; min-width: 1px; height: 36px;
  display: flex; align-items: center;
  padding: 0 8px 0 4px;
  background: var(--surface-base);
  border: 2px solid var(--border-subtle);
  overflow: hidden;
}
.ex-address .chev { color: var(--icon-muted); }
/* Breadcrumb item (641:1335) */
.crumb {
  position: relative; flex: none;
  padding: 5px 8px;
  font-weight: 700; font-size: var(--type-label-size); line-height: var(--type-label-lh);
  color: var(--text-secondary); white-space: nowrap;
}
.crumb::before { content: ""; position: absolute; inset: 0; background: var(--tile, transparent);
  clip-path: polygon(4px 0, calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 4px calc(100% - 4px), 0 calc(100% - 4px), 0 4px, 4px 4px); }
.crumb span { position: relative; }
.crumb:hover { --tile: var(--control-ghost-hover); }
.crumb:active { --tile: var(--control-ghost-pressed); }
.crumb:focus-visible { --ring: var(--control-focus-ring); }
.crumb.is-current { color: var(--text-primary); cursor: default; --tile: transparent; }

.ex-content {
  flex: 1 1 0; min-height: 0;
  display: flex; flex-wrap: wrap; align-content: flex-start; align-items: flex-start; gap: 8px;
  padding: 16px;
  background: var(--surface-base);
}

/* Explorer item (641:1399) — 112 wide, padding 8, gap 6, icon 64 */
.ex-item {
  position: relative; width: 112px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 8px;
}
.ex-item .art { position: relative; } /* sit above the hover tile (::before) */
.ex-item .art, .ex-item .art img { width: 64px; height: 64px; }
.ex-item .name {
  position: relative; width: 96px;
  font-weight: 700; font-size: var(--type-label-size); line-height: var(--type-label-lh);
  color: var(--text-primary); text-align: center; white-space: pre-line; overflow-wrap: anywhere;
}
/* Case file (647:1759) — 256 wide, padding 8/8/12/8, gap 8, thumbnail 240×135 */
.case-file {
  position: relative; width: 256px;
  display: flex; flex-direction: column; gap: 8px;
  padding: 8px 8px 12px;
}
.case-file .thumb {
  position: relative; width: 240px; height: 135px; flex: none;
  clip-path: polygon(4px 0, 236px 0, 236px 4px, 240px 4px, 240px 131px, 236px 131px, 236px 135px, 4px 135px, 4px 131px, 0 131px, 0 4px, 4px 4px);
  background-size: cover; background-position: center;
}
.case-file .thumb.placeholder {
  background: linear-gradient(rgba(0, 0, 0, .2), rgba(0, 0, 0, .2)), url("../assets/img/case-placeholder.png") center / contain no-repeat;
  image-rendering: pixelated;
}
.case-file .name {
  position: relative;
  font-weight: 700; font-size: var(--type-label-size); line-height: var(--type-label-lh);
  color: var(--text-primary); text-align: center;
}
/* shared tile states for explorer items and case files */
.ex-item::before, .case-file::before {
  content: ""; position: absolute; inset: 0; background: var(--tile, transparent);
  clip-path: polygon(4px 0, calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 4px calc(100% - 4px), 0 calc(100% - 4px), 0 4px, 4px 4px);
}
.ex-item:hover, .case-file:hover { --tile: var(--control-ghost-hover); }
.ex-item.is-pressed, .case-file.is-pressed { --tile: var(--control-ghost-pressed); }
.case-file.is-open { --tile: var(--control-selected); }
.ex-item:focus-visible, .case-file:focus-visible { --ring: var(--control-focus-ring); }

/* ---------- Case viewer window ---------- */
.cv-body { position: relative; flex: 1 1 0; min-height: 0; background: var(--surface-base); }
.cv-scroll { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
.cv-scroll::-webkit-scrollbar { display: none; }
.cv-scroll > .case { padding: 64px 24px; }   /* 952 column, centred by .cs-root margin auto (= 120px sides in the 1192 window) */
.cv-body > .sb { right: 4px; top: 4px; bottom: 8px; }

/* Outline / table of contents (691:5642) */
.toc { position: absolute; right: 28px; top: 266px; z-index: 5; }
.toc-collapsed { width: 24px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; padding: 8px 0; cursor: pointer; }
.toc-collapsed i { display: block; width: 12px; height: 2px; background: var(--text-muted); }
.toc-collapsed i.is-current { width: 20px; background: var(--text-primary); }
.toc-expanded {
  position: absolute; right: 32px; top: -244px;
  width: 264px; padding: 8px;
  display: none; flex-direction: column;
  background: var(--surface-base);
  --ring: var(--border-strong);
  clip-path: polygon(4px 0, calc(100% - 4px) 0, calc(100% - 4px) 2px, calc(100% - 2px) 2px, calc(100% - 2px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 2px) calc(100% - 4px), calc(100% - 2px) calc(100% - 2px), calc(100% - 4px) calc(100% - 2px), calc(100% - 4px) 100%, 4px 100%, 4px calc(100% - 2px), 2px calc(100% - 2px), 2px calc(100% - 4px), 0 calc(100% - 4px), 0 4px, 2px 4px, 2px 2px, 4px 2px);
}
.toc.is-open .toc-expanded { display: flex; }

/* List item (662:5035) — 40 tall, padding-left 8, right 12, gap 12 */
.li {
  position: relative; width: 100%; height: 40px; flex: none;
  display: flex; align-items: center; gap: 12px;
  padding: 0 12px 0 8px;
  font-size: var(--type-body-size); line-height: var(--type-body-lh); color: var(--text-primary);
  text-align: left;
}
.li::before { content: ""; position: absolute; inset: 0; background: var(--tile, transparent);
  clip-path: polygon(4px 0, calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 4px calc(100% - 4px), 0 calc(100% - 4px), 0 4px, 4px 4px); }
.li > * { position: relative; }
.li img { width: 32px; height: 32px; flex: none; }
.li .lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li:hover { --tile: var(--control-ghost-hover); }
.li:active, .li.is-selected { --tile: var(--control-ghost-pressed); }
.toc .li.is-selected { --tile: var(--control-ghost-selected); }
.li:focus-visible { --ring: var(--control-focus-ring); }

/* ================= Start menu (663:4825) ================= */
.start {
  position: fixed; left: 0; bottom: 88px; z-index: 8000;
  width: 344px; height: 600px;
  padding: 4px;
  display: none;
}
.start.is-open { display: flex; animation: start-in 120ms steps(3, end); }
@keyframes start-in { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
.start-app { flex: 1; display: flex; flex-direction: column; overflow: hidden; background: var(--surface-base); }
.start-search { height: 64px; flex: none; padding: 12px; background: var(--surface-raised); }
.start-list { position: relative; flex: 1 1 0; min-height: 0; }
.start-list .sa-view { position: absolute; inset: 0; padding: 8px 4px; overflow-y: auto; scrollbar-width: none; }
.start-list .sa-view::-webkit-scrollbar { display: none; }
.start-list > .sb { right: 4px; top: 8px; bottom: 4px; }
/* Start menu group (662:5043) */
.sm-group { height: 32px; padding: 8px 0 0 12px; font-weight: 700; font-size: var(--type-label-size); line-height: var(--type-label-lh); color: var(--text-secondary); }

/* Input (662:4859) — 40 tall, plate + 2px stepped border */
.input {
  position: relative; height: 40px;
  display: flex; align-items: center; gap: 8px;
  padding: 0 4px 0 12px;
  --ring: var(--control-field-border);
  color: var(--icon-muted);
}
.input::before { content: ""; position: absolute; inset: 0; background: var(--control-field-bg);
  clip-path: polygon(4px 0, calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 4px calc(100% - 4px), 0 calc(100% - 4px), 0 4px, 4px 4px); }
.input > * { position: relative; }
.input:hover { --ring: var(--control-field-border-hover); }
.input:focus-within { --ring: var(--control-focus-ring); color: var(--icon-primary); }
.input.is-filled { color: var(--icon-primary); }
.input input {
  flex: 1; min-width: 0; height: 24px; border: 0; padding: 0; background: transparent; outline: none;
  font-size: var(--type-body-size); line-height: var(--type-body-lh); color: var(--text-primary);
  caret-color: var(--text-primary);
}
.input input::placeholder { color: var(--text-placeholder); opacity: 1; }
.input .clear { display: none; }
.input.is-filled .clear { display: grid; color: var(--icon-primary); }

/* ================= Scrollbar (691:5557) ================= */
.sb { position: absolute; width: 16px; z-index: 4; }
.sb.is-hidden { visibility: hidden; }
.sb-track { position: absolute; left: 7px; top: 0; bottom: 0; width: 2px; background: var(--border-subtle); }
.sb-thumb {
  position: absolute; left: 4px; top: 0; width: 8px; height: 96px;
  background: var(--text-muted);
  clip-path: polygon(2px 0, 6px 0, 6px 2px, 8px 2px, 8px calc(100% - 2px), 6px calc(100% - 2px), 6px 100%, 2px 100%, 2px calc(100% - 2px), 0 calc(100% - 2px), 0 2px, 2px 2px);
  cursor: default;
}
.sb-thumb:hover { background: var(--text-secondary); }
.sb.is-drag .sb-thumb { background: var(--text-primary); }

/* ================= Window motion — short, stepped ================= */
.win.anim-open  { animation: win-open 120ms steps(3, end); }
.win.anim-close { animation: win-close 100ms steps(2, end) forwards; pointer-events: none; }
@keyframes win-open  { from { transform: scale(0.94); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes win-close { to { transform: scale(0.94); opacity: 0; } }
/* maximize / restore / minimize: smooth, not stepped */
.win.anim-fly { transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 220ms cubic-bezier(0.2, 0.8, 0.2, 1); will-change: transform; }

@media (prefers-reduced-motion: reduce) {
  .is-pressed .art, .is-pop .art { transform: none; animation: none; }
  .win.anim-open, .win.anim-close, .tb.is-new, .start.is-open { animation: none; }
  .win.anim-fly { transition: none; }
}

/* ================= Scrollable window bodies (explorer, notepad) ================= */
.scroll-body { position: relative; flex: 1 1 0; min-height: 0; background: var(--surface-base); }
.scroll-body > .scroll-view { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
.scroll-body > .scroll-view::-webkit-scrollbar { display: none; }
.scroll-body > .sb { right: 4px; top: 4px; bottom: 4px; }

/* TOC: invisible bridge between the collapsed lines and the expanded menu so the hover is not lost */
.toc.is-open::before {
  content: ""; position: absolute; z-index: -1;
  right: 0; top: -244px; width: 320px; height: 576px;   /* menu (264) + gap (32) + lines (24) */
}

/* ================= Asteroids.exe (games/asteroids/asteroids.js) ================= */
.game-body { position: relative; flex: 1 1 0; min-height: 0; overflow: hidden; background: var(--game-space); }
.ast-canvas { display: block; cursor: default; }
.ast.is-playing .ast-canvas { cursor: none; }   /* the pixel crosshair takes over only while playing */
.ast-hud {
  position: absolute; left: 16px; right: 16px; top: 16px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;   /* level sits under the hearts */
  pointer-events: none;
}
.ast-hud[hidden] { display: none; }
.ast-lives { display: flex; gap: 4px; }
.ast-lives img { display: block; }
.ast-lvl {
  margin: 0; display: flex; align-items: baseline; gap: 8px;
  font-family: var(--font-display); font-size: var(--type-display-sm-size); line-height: var(--type-display-sm-lh);
  color: var(--text-on-dark);
}
.ast-lvl span { color: var(--ill-violet-pale); }
/* current score, top right (same as on the phone) */
.ast-points {
  position: absolute; right: 16px; top: 16px; margin: 0;
  font-family: var(--font-display); font-size: var(--type-display-sm-size); line-height: var(--type-display-sm-lh);
  color: var(--text-on-dark); font-variant-numeric: tabular-nums; pointer-events: none;
}
.ast-points[hidden] { display: none; }
.ast-lvl b { font-weight: 400; min-width: 3ch; font-variant-numeric: tabular-nums; }   /* room for 3 digits, LVL never shifts */
.ast-screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px;
  padding: 24px; text-align: center;
  color: var(--text-on-dark); pointer-events: none;
}
.ast-screen[hidden] { display: none; }
.ast-screen p { margin: 0; }
.ast-screen[data-screen="gameover"], .ast-screen[data-screen="pause"], .ast-screen[data-screen="away"] { background: var(--label-bg); }
.ast-title {
  font-family: var(--font-display);
  font-size: var(--type-display-xl-size); line-height: var(--type-display-xl-lh);
}
.ast-score { font-size: var(--type-lead-size); line-height: var(--type-lead-lh); font-variant-numeric: tabular-nums; }
.ast-keys {
  display: grid; grid-template-columns: auto auto; gap: 12px 16px; align-items: center; text-align: left;
  font-size: var(--type-body-size); line-height: var(--type-body-lh);
}
.ast-k { font-weight: 700; color: var(--ill-violet-pale); }
.ast-v { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.ast-screen kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 28px; height: 28px; padding: 0 8px 2px;
  font: 600 var(--type-caption-size)/var(--type-caption-lh) var(--font-body);
  color: var(--text-primary); background: var(--surface-raised);
  box-shadow: inset 0 -4px 0 var(--icon-disabled);
  /* Keycap (Figma): Tile · vertical + Tile · horizontal = square 2px notches, no diagonals */
  clip-path: polygon(2px 0, calc(100% - 2px) 0, calc(100% - 2px) 2px, 100% 2px, 100% calc(100% - 2px), calc(100% - 2px) calc(100% - 2px), calc(100% - 2px) 100%, 2px 100%, 2px calc(100% - 2px), 0 calc(100% - 2px), 0 2px, 2px 2px);
}
.ast-v kbd + kbd { margin-left: -4px; }
.ast-hint kbd { margin: 0 4px; vertical-align: middle; }
.ast-hint { font-weight: 600; font-size: var(--type-caption-size); line-height: var(--type-caption-lh); color: var(--ill-violet-pale); animation: ast-blink 1s steps(1, end) infinite; }
@keyframes ast-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ast-hint { animation: none; } }

/* ================= Pond.exe (games/pond/pond.js) — screens reuse the Asteroids.exe styles (.ast-*) ================= */
.pond-canvas { display: block; }
.pond .ast-screen[data-screen="menu"], .pond .ast-screen[data-screen="over"] { background: var(--label-bg); }   /* the field is busy: start and game-over screens get the same backdrop as pause */
