/* GPD Link web client. Colours: neutral dark glass + one accent; the PC's Noctalia palette replaces these after
   connecting (app.js sets --accent, --on-accent, --bg, --fg, --surface from the hello message). */
:root {
  --accent: #8fe3c0; --on-accent: #06281c; --bg: #0b0d0c; --fg: #e9eeea; --surface: #1a1f1c; --error: #ffb4ab;
  /* glass: the PC's system setting (gpd-glass) arrives as these vars, from gpd-link theme_css() and live from app.js
     Glass.apply(); these defaults are the old look. --g-a pane alpha, --g-a-hi the denser capsule / title bars,
     --g-dark the always-dark mixer + view menu, --gf-s/m/l the backdrop-filter of small / medium / large surfaces
     (were 12-18 / 20-26 / 28-30 px), --g-noise Frost's fine grain layer, --g-tshadow text on near-clear glass */
  --g-a: 72%; --g-a-hi: 86%; --g-dark: .88; --g-noise: none; --g-tshadow: none;
  --gf-s: blur(16px); --gf-m: blur(24px) saturate(1.5); --gf-l: blur(30px) saturate(1.5);
  --glass: color-mix(in srgb, var(--surface) var(--g-a), transparent);
  --line: color-mix(in srgb, var(--fg) 12%, transparent);
  --dim: color-mix(in srgb, var(--fg) 62%, transparent);
  /* design tokens (~/gpd-setup/design/tokens.md): radii, motion */
  --r-ctl: 12px; --r-card: 16px; --r-pop: 18px; --r-sheet: 24px; --r-pill: 999px;
  --ease: cubic-bezier(.2,.9,.25,1); --t-fast: 150ms; --t-std: 210ms; --t-slow: 320ms;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}
/* browsers without color-mix() (before 2023): plain translucent values, so nothing turns invisible */
@supports not (color: color-mix(in srgb, red, blue)) {
  :root { --glass: rgba(26, 31, 28, .86); --line: rgba(233, 238, 234, .14); --dim: rgba(233, 238, 234, .62); }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root { --glass: #1d221f; }
  .dbar { background: #161a18 !important; }
}
@media (prefers-reduced-transparency: reduce) {
  /* !important: beats the glass vars app.js sets inline */
  :root { --glass: #1d221f !important; --g-dark: 1 !important; --g-a-hi: 100% !important; --g-noise: none !important;
    --g-tshadow: none !important; --gf-s: none !important; --gf-m: none !important; --gf-l: none !important; }
  .dbar { background: #161a18 !important; }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; overflow: hidden; overscroll-behavior: none; }
body {
  background: var(--bg); color: var(--fg);
  font: 500 15px/1.35 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-user-select: none; user-select: none; touch-action: none;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
[hidden] { display: none !important; }

/* ---------- stage */
#stage { position: fixed; inset: 0; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, var(--bg) 0%, var(--bg) 60%);
  background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--accent) 7%, var(--bg)) 0%, var(--bg) 60%); }
#views { position: absolute; inset: 0; transform-origin: 0 0; will-change: transform; }
.view { position: absolute; border-radius: var(--r-ctl); overflow: hidden; background: #000;
  box-shadow: 0 18px 60px rgba(0,0,0,.55), 0 0 0 1px var(--line); transition: opacity var(--t-std) var(--ease); }
.view canvas, .view video { display: block; width: 100%; height: 100%; }
.view video { object-fit: fill; pointer-events: none; background: #000; }
.view video::-webkit-media-controls { display: none !important; }
.view.wait { opacity: .35; }
.view .tag { position: absolute; left: 10px; bottom: 10px; padding: 5px 10px; border-radius: 999px; font-size: 12px;
  background: var(--g-noise), var(--glass); -webkit-backdrop-filter: var(--gf-s); backdrop-filter: var(--gf-s); border: 1px solid var(--line); }
body.single .view { border-radius: 0; box-shadow: none; }
body.single .view .tag { display: none; }
body.control:not(.tpad) #stage { cursor: crosshair; }   /* any pointer, not only "mouse" devices: a laptop reporting touch points lost it (2026-11-25) */
body.locked #stage { cursor: none; }
#cursor { position: absolute; left: 0; top: 0; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%;
  border: 2px solid var(--accent); box-shadow: 0 0 14px rgba(143, 227, 192, 0.7), inset 0 0 6px rgba(143, 227, 192, 0.5); box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 70%, transparent), inset 0 0 6px color-mix(in srgb, var(--accent) 50%, transparent);
  opacity: 0; transition: opacity var(--t-slow) var(--ease); pointer-events: none; will-change: transform; }
#cursor.on { opacity: .95; transition: none; }
/* trackpad: a steady arrow, tip on the point (2026-11-20) */
#cursor.arrow { width: 13px; height: 20px; margin: -2px 0 0 -2px; border: 0; border-radius: 0; box-shadow: none;
  /* the GPD's own cursor (macOS theme, 64 px Xcursor cropped, hotspot 6,6 -> 2,2 at this size) */
  background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAA6CAYAAADcKStOAAAIo0lEQVR42s3aXWwT2RUH8P94xjOOncQ2sddhgzFrQhYEu7RNq5YmUqSWSizSqqVSgrpQQV8AVaIqVaUU8YDEG29AQQKeECISWCAhqoD4CKWlpIUSEGRJoU34CASRLwcc7BnP3LmnD3snmoRAnBCSvdKV4kSJf3PuPWfuHAcYM4jIg2/ZkMT8VuEkAJ5NmzZ5e3t7vwMAdXV1igOdzSFXVlZqRCRZltWazWZ/DwBbt27VZhPnAeCNRqPFADyGYVwlIhoaGvoNAOzdu3fWcDIALRgMhgAUZbPZvxMR55zTixcvvgKADRs2+GYDJwMoKikpKQMQGh4ebqVvhsUYs1+8ePGr2VpWGYC/uLg4CiCayWT+SUTEGLMsy+KziVMABPx+fzmAuUNDQ9dFxBgR2ZZlcSJiPT09v5jpPeeGVaTT6etERD09PezUqVM6EdmmaXLGmP7s2bMvZzJyblh8cHDwBhFRX1+frWkaO3LkSI6IbMYYMcaMmcQ5sLluWDqdZsFgkABYTU1No3BPnjz52UzgxoUNDAywsrIyAkAArFQq5ca9evz48U8+NO6tsHA4TABIlmXyeDzWmTNnckRk27ZNjLHMh8YVBJMkaVxcZ2dnjQs3szCBGsE1Nze7cf0PHjz44YfAFQQDMIJTVdW6fPlyjohszvkHwxUMc3AASNO0N3AdHR3fA4BUKqXOOGws7sqVKyM4y7Ke3blz5zMAqK+vV2cc5sYVFxeb169f14nIJqJpxU0J5saVlpa+gWtvb1/yvrgpw8bBGQ7ONM2u1tbWyvfBvRfMjQuHw2Z7e7sb1+ngDh065J1xmBsXjUbzY3F3795NTiVy0wJ7F86yrK9bW1srJhu5aYM5ty8AFIvF8l1dXe7I3b106VIFAGzatMk74zA3bt68ecbDhw+njJt22FtwTOBunjlzJgJAmgj3QWBu3Pz5843nz5+PRM4wjH8Vgps2mCRJJMvyqKmqKgGgJUuWGH19faNwTU1NEQAe0Y6YuYiNneXl5cb9+/cNxhgTuKs7d+4sHQ+nTKkDI0kgojdeJ5NJnkgkPEQESRp9oFUUBblcTtu3b5+5Z88eALA1TattbGw87ff7f97Y2JhNpVJyQ0OD/V7HnvH20urVq0c2uRhcvB41GWMW++aJ2iAiyuVy50UbwumlTP6g6BRQSZL42P0FgLW1teUZY2SaJk1mWJZ1o6urK5ZKpWQikgpeSkVRwBhDbW1t/vjx43zFihXS06dPvR6PB5xzyLIMxph88OBBdvjwYS5JkieTyXR3dnaeJyKViLgkSSPHdEVRuKIozOfzMU3TdL/fr6mquqShoeFvRCQVFDGv10sAqKamxnj16pVFRLR9+3YdACmKMhIxSZKotLTUHBgYyBMRZbPZfgA/BlAJYBGAhQCSABYAmAcgBiAIQHU1EGUA0oQtTY/HA8uyUFtbmz937pxcWloqc86xefNmWVVV27Ztp3cLWZaRyWSUY8eOcQC23++P3L59+5fJZNJcvHixFolE5EgkIkejUSUajWqxWKyooqKiJJlMhpYvXx5KJBJaQeUiGo0SAFq1apWu67opNjPZtk1ExNesWWO4N7+zB6uqqvKMMZNzTrlc7n/l5eUJAHMBfAQgAqBMzLCIWDEATVg8E7UIbAC0cuVKPZ/PW05hHBgYeGQYhsU5p5aWFh2A7c5U8bV97ty5kRPtzZs3vwKgVFdXBwH4ARSJ6RMg1YWS3gnr7u62Gxoa9FwuZzkl4NGjR/+oqqr66cDAQKeInrls2bK8O1qu0qETkUlENDw8fB6AXF1d7RfvJ7umxwWS3rqU6XT6BhGRruuWq/ZQd3f3X8PhcC2Azy9cuLBXZLm9f/9+HQB3QE4iKIpiPXjwwBCPdubZs2d/4HTGC20njAsThZARET1+/LgZwGder/e7AL5fU1Pzha7rrzjnNDg4mA8Gg6a73jmZum3bNp2ILNFs/vNk+7mj+mMOjDGWF5H6C4AqVVWrVFVdHAgEPgfw6f379085tXHLli1vlA4AFIlEzOHhYYNzTqZp9u3evfvj+vp6ub6+Xp50R1G0Om0XaqGmaQsAxAFUaJpWCWDRjh07fm1Zls05pzt37hiSJDH3rUssLT98+LDubIeenp7fTaaNoAAIBAKBGIC56XT6mkCdBvCJz+dLACgXqT0HwFxVVT8FsLS3t/ffThLU1dUZzrHH3SGqrq42RBJwwzBuAyiqrq72ustCIV3rOdls9j/9/f0XAVT4fL64qD0lIs0DAObEYrFPACw4efLkdicJUqmU4U4C5zwGgDc3N+tODbx169YXhT6UyKKehPx+f/m9e/f+GI/HF4rbRdRV/Lyi3pSIYrkokUj8aHh4+DnnnAzDyMfj8bwLRABYXV2dIR6ELSJiuVyuGYAiHuWkiT6yUQWgTLxxRCxbQPzMqTeKKIxl0Wh0IYAFbW1th5ws3rVrl+6AVq9erbe0tDi1zHZOEaZpfn306NGPRAJ4JvrkTRFRCySTyaDAFYkoya4rcy6itKioaB6AhevXr//SNE2dc04PHz7Mr1u3Lnft2rWRfeWAXr9+/d+Ojo4/bdy4MS62hVpI2XCiob7rFuG6iACAaElJySIAi7q7uy+4PrSw3KB0On3v4sWL2+Px+FIAIZFEzh1gQpgkEO7bhPSOi9AAhEKhUALAggMHDmwhIu4UZHFPbTt9+vQfACwXpSZRVlb2cTgcDorflzHNQxJLHAAQ0zSt0uv1Ls1kMl1ERP39/Vebmpp+C2AZgASASnEBUQClYstMGK2ptsBlgfP5fL4SwzBw4sSJVQDktWvXXgTAAHhDoZD18uVLA0AegCW+bwPgYk47zFl2VUTAL96UgsGg3+PxsKGhIQOAKb4/FkSFLMv7fJzo4LyBQMDr9/s9/f39lgvDXJiCQNMBGy9hMAYyadB0wNz/EuEulGOfO6f8h6cjSzEG9t7j/67eRDDvwcuIAAAAAElFTkSuQmCC") no-repeat 0 0 / 100% 100%; filter: drop-shadow(0 1px 2px rgba(0,0,0,.35)); transition: none; }
#cursor.arrow.on { opacity: 1; }

/* ---------- gate (connecting / approval / errors) and the server's plain pages */
.gate { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px; background: var(--bg); z-index: 5;
  transition: opacity var(--t-std) var(--ease), visibility var(--t-std); }
.gate.off { opacity: 0; visibility: hidden; pointer-events: none; }
/* one card, like a panel of this desktop: fixed size, so changing text never moves anything */
.card { width: min(340px, calc(100vw - 32px)); min-height: 196px; padding: 20px 20px 18px; border-radius: var(--r-sheet); text-align: left;
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(0,0,0,.45);
  display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; row-gap: 4px; align-content: start; }
.mark { grid-row: 1 / span 2; width: 44px; height: 44px; border-radius: var(--r-ctl); background: var(--accent); color: var(--on-accent); display: grid; place-items: center; }
.mark svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gate h1 { margin: 2px 0 0; font-size: 17px; font-weight: 650; letter-spacing: -.01em; align-self: end; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gate p { margin: 0; color: var(--dim); font-size: 14px; line-height: 1.35; min-height: 2.7em; }
.bar { grid-column: 1 / -1; margin-top: 14px; height: 4px; border-radius: var(--r-pill); overflow: hidden; background: rgba(233, 238, 234, .1); background: color-mix(in srgb, var(--fg) 10%, transparent); }
.bar i { display: block; width: 38%; height: 100%; border-radius: var(--r-pill); background: var(--accent); transform: translateX(-110%); animation: slide 1.5s cubic-bezier(.45,0,.3,1) infinite; will-change: transform; }
@keyframes slide { 0% { transform: translateX(-110%); } 100% { transform: translateX(275%); } }
.gate.still .bar i { animation: none; transform: none; width: 100%; opacity: .28; }
@media (prefers-reduced-motion: reduce) { .bar i { animation-duration: 3s; } }
body.plain { display: block; }
@keyframes pulse { 0%, 100% { transform: scale(.82); opacity: .75; } 50% { transform: scale(1); opacity: 1; } }
.pill { grid-column: 1 / -1; justify-self: end; margin-top: 12px; min-height: 40px; padding: 0 20px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 650; font-size: 14px; }

/* ---------- dock */
#dock { position: fixed; left: 50%; bottom: calc(14px + var(--safe-b)); transform: translateX(-50%); display: flex; align-items: center; gap: 2px; padding: 5px;
  border-radius: 999px; background: var(--g-noise), var(--glass); -webkit-backdrop-filter: var(--gf-m); backdrop-filter: var(--gf-m);
  border: 1px solid var(--line); box-shadow: 0 14px 44px rgba(0,0,0,.5); z-index: 4;
  transition: transform var(--t-slow) var(--ease), opacity var(--t-std) var(--ease); max-width: calc(100vw - 16px); }
#dock.away { transform: translate(-50%, calc(100% + 30px)); opacity: 0; pointer-events: none; }
#dock button { width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center; transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
#dock button:active { transform: scale(.92); }
#dock button:hover { background: rgba(233, 238, 234, 0.09); background: color-mix(in srgb, var(--fg) 9%, transparent); }
#dock button.on { background: var(--accent); color: var(--on-accent); }
#dock svg, #sheet svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#b-sound:not(.on) .wave { opacity: .3; }
/* picture in picture: the hidden <video> that carries a canvas picture (WebCodecs / JPEG rungs) into the PiP window */
#pip-video { position: fixed; left: 0; top: 0; width: 2px; height: 2px; opacity: 0; pointer-events: none; z-index: -1; }
#pip-video:fullscreen { width: 100%; height: 100%; opacity: 1; object-fit: contain; background: #000; }
/* the mse rung's own <video> floats on Firefox Android by going fullscreen: keep its shape (it is 'fill' in the page) */
.view video:fullscreen { object-fit: contain !important; width: 100vw; height: 100vh; }
@media (hover: hover) and (pointer: fine) { #dock { bottom: auto; top: 12px; } #dock.away { transform: translate(-50%, calc(-100% - 30px)); } }
#handle { position: fixed; left: 50%; bottom: calc(4px + var(--safe-b)); transform: translateX(-50%); width: 96px; height: 28px; z-index: 3; display: grid; place-items: center; }
#handle i { width: 44px; height: 5px; border-radius: var(--r-pill); background: rgba(233, 238, 234, 0.45); background: color-mix(in srgb, var(--fg) 45%, transparent); box-shadow: 0 1px 6px rgba(0,0,0,.6); }
@media (hover: hover) and (pointer: fine) { #handle { bottom: auto; top: 0; } }

/* ---------- small overlays */
#stats { position: fixed; left: calc(10px + env(safe-area-inset-left, 0px)); top: calc(10px + var(--safe-t)); z-index: 3; padding: 6px 11px; border-radius: 999px;
  font: 600 12px/1.2 ui-monospace, "JetBrains Mono", Menlo, monospace; font-variant-numeric: tabular-nums; color: var(--fg);
  background: var(--g-noise), var(--glass); -webkit-backdrop-filter: var(--gf-s); backdrop-filter: var(--gf-s); border: 1px solid var(--line); pointer-events: none; }
#live { position: fixed; right: calc(10px + env(safe-area-inset-right, 0px)); top: calc(10px + var(--safe-t)); z-index: 3; display: flex; align-items: center; gap: 7px;
  padding: 6px 12px 6px 10px; border-radius: 999px; font-size: 12px; background: var(--g-noise), var(--glass); -webkit-backdrop-filter: var(--gf-s); backdrop-filter: var(--gf-s);
  border: 1px solid rgba(255, 180, 171, 0.5);
  border: 1px solid color-mix(in srgb, var(--error) 50%, transparent); pointer-events: none; }
#live span { width: 8px; height: 8px; border-radius: 50%; background: var(--error); animation: pulse 1.6s ease-in-out infinite; }
#toast { position: fixed; left: 50%; top: calc(64px + var(--safe-t)); transform: translateX(-50%); z-index: 6; padding: 10px 16px; border-radius: 14px; max-width: 86vw;
  background: var(--g-noise), var(--glass); -webkit-backdrop-filter: var(--gf-m); backdrop-filter: var(--gf-m); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0,0,0,.45); text-align: center; }

/* ---------- on-screen keys */
#keys { position: fixed; left: 50%; bottom: calc(80px + var(--safe-b)); transform: translateX(-50%); z-index: 4; display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; padding: 6px;
  width: min(430px, calc(100vw - 16px)); border-radius: var(--r-sheet); background: var(--g-noise), var(--glass); -webkit-backdrop-filter: var(--gf-m); backdrop-filter: var(--gf-m); border: 1px solid var(--line); }
#keys button { height: 48px; border-radius: var(--r-ctl); background: rgba(233, 238, 234, 0.08); background: color-mix(in srgb, var(--fg) 8%, transparent); font-size: 14px; font-weight: 600; }
#keys button:active { background: rgba(233, 238, 234, 0.22); background: color-mix(in srgb, var(--fg) 22%, transparent); }
#keys button.on { background: var(--accent); color: var(--on-accent); }
#typer { position: fixed; left: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; border: 0; padding: 0; font-size: 16px; resize: none; }

/* ---------- sheet */
#sheet { position: fixed; left: 50%; bottom: calc(80px + var(--safe-b)); transform: translateX(-50%); z-index: 5; width: min(420px, calc(100vw - 16px));
  max-height: min(70vh, 560px); display: flex; flex-direction: column; border-radius: 24px; background: var(--g-noise), var(--glass);
  -webkit-backdrop-filter: var(--gf-l); backdrop-filter: var(--gf-l); border: 1px solid var(--line); box-shadow: 0 20px 60px rgba(0,0,0,.6);
  animation: rise var(--t-std) var(--ease); touch-action: pan-y; }
@media (hover: hover) and (pointer: fine) { #sheet { bottom: auto; top: 80px; } }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 12px) scale(.97); } }
#sheet header { display: flex; align-items: center; justify-content: space-between; padding: 14px 10px 6px 20px; }
#sheet h2 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
#sheet-close { width: 44px; height: 44px; border-radius: 50%; color: var(--dim); }
#sheet-body { padding: 4px 10px 12px; overflow-y: auto; display: grid; gap: 6px; }
.row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 12px; border-radius: 16px; text-align: left; width: 100%;
  background: rgba(233, 238, 234, 0.06);
  background: color-mix(in srgb, var(--fg) 6%, transparent); }
.row.on { background: var(--accent); color: var(--on-accent); }
.row b { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row small { color: var(--dim); font-size: 12px; }
.row.on small { color: inherit; opacity: .75; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 16px; background: rgba(233, 238, 234, 0.06); background: color-mix(in srgb, var(--fg) 6%, transparent); }
.seg button { height: 48px; border-radius: 12px; font-weight: 600; font-size: 14px; }
.seg button.on { background: var(--accent); color: var(--on-accent); }
.chip { min-width: 48px; height: 40px; padding: 0 12px; border-radius: 12px; background: rgba(233, 238, 234, 0.1); background: color-mix(in srgb, var(--fg) 10%, transparent); font-size: 13px; font-weight: 600; }
.chip.on { background: var(--accent); color: var(--on-accent); }
.chip.danger { color: var(--error); }
.person { display: grid; gap: 8px; padding: 12px; border-radius: 16px; background: rgba(233, 238, 234, 0.06); background: color-mix(in srgb, var(--fg) 6%, transparent); }
.person div { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.person b { flex: 1; }

/* ---------- picker: every source as a live thumbnail (first screen when there is a choice; the screen button) */
#picker { position: fixed; inset: 0; z-index: 5; overflow-y: auto; touch-action: pan-y; background: var(--bg);
  padding: calc(12px + var(--safe-t)) 16px calc(24px + var(--safe-b)); animation: fade .2s var(--ease); }
@keyframes fade { from { opacity: 0; } }
#picker header { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1100px; margin: 0 auto 14px; }
#picker h2 { margin: 0; font-size: 20px; font-weight: 650; letter-spacing: -.01em; }
#picker header small { color: var(--dim); font-size: 13px; }
#picker-close { width: 44px; height: 44px; border-radius: 50%; color: var(--dim); flex: none; }
#tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 42vw), 1fr)); gap: 12px; max-width: 1100px; margin: 0 auto; }
@media (min-width: 700px) { #tiles { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; } }
/* a phone on its side (short and wide): smaller cards, so a whole row and the Open button fit without covering one */
@media (max-height: 520px) and (min-width: 560px) { #tiles { grid-template-columns: repeat(auto-fill, minmax(min(200px, 30vw), 1fr)); gap: 12px; } }
.tile { display: grid; gap: 8px; text-align: left; border-radius: 16px; padding: 6px; transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.tile:active { transform: scale(.97); }
.tile:hover { background: color-mix(in srgb, var(--fg) 6%, transparent); }
.tile .pic { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-ctl); overflow: hidden; background: #000;
  box-shadow: 0 0 0 1px var(--line), 0 10px 30px rgba(0,0,0,.4); }
.tile.on .pic { box-shadow: 0 0 0 3px var(--accent), 0 10px 30px rgba(0,0,0,.4); }
.tile .pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity var(--t-std) var(--ease); }
.tile .pic.has img { opacity: 1; }
.tile .ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--dim); }
.tile .pic.has .ph { display: none; }
.tile .ph svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tile .cap { display: grid; padding: 0 4px; min-width: 0; }
.tile .cap b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .cap small { color: var(--dim); font-size: 12px; }
.tile.on .cap b { color: var(--accent); }
#hdmi-out { max-width: 1100px; margin: 22px auto 0; padding: 14px 16px; border-radius: 18px; display: grid; gap: 12px;
  background: rgba(233, 238, 234, 0.06); background: color-mix(in srgb, var(--fg) 6%, transparent); }
#hdmi-out .hrow { display: flex; align-items: center; gap: 12px; }
#hdmi-out .htitle { flex: 1; display: grid; min-width: 0; }
#hdmi-out .htitle small, #hdmi-out .hnote { color: var(--dim); font-size: 12px; }
#hdmi-out .hsels { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#hdmi-out .hsel { display: grid; gap: 4px; font-size: 12px; color: var(--dim); }
#hdmi-out select { font: inherit; font-size: 15px; color: var(--fg); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; height: 44px; padding: 0 10px; }
.switch { flex: none; width: 52px; height: 32px; border-radius: 16px; position: relative; background: color-mix(in srgb, var(--fg) 18%, transparent); transition: background var(--t-fast) var(--ease); }
.switch i { position: absolute; left: 3px; top: 3px; width: 26px; height: 26px; border-radius: 50%; background: var(--fg); transition: transform var(--t-fast) var(--ease); }
.switch.on { background: var(--accent); }
.switch.on i { transform: translateX(20px); background: var(--on-accent); }
.switch:disabled, #hdmi-out select:disabled { opacity: .5; }

/* ---------- floating (Android picture in picture shows the whole fullscreen page in a small window, 2026-11-21):
   just the picture, no controls */
@media (max-height: 260px) and (max-width: 520px) {
  #dock, #handle, #stats, #toast, #keys, #sheet, #picker, #live { display: none !important; }
  body.single .view { border-radius: 0; }
}

/* ---------- switching (2026-11-21): the live picture recedes behind the picker like Mission Control, and a chosen
   card grows into a soft splash that dissolves into the live picture */
#stage { transition: transform var(--t-slow) var(--ease), opacity var(--t-slow) var(--ease); transform-origin: 50% 45%; }
body.picking #stage { transform: scale(.92); opacity: .5; }
body.picking #picker { -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); }
#picker { background: rgba(11, 13, 12, .55); background: color-mix(in srgb, var(--bg) 55%, transparent); }
.splash { position: fixed; inset: 0; z-index: 3; pointer-events: none; display: grid; place-items: center; overflow: hidden;
  transition: opacity var(--t-slow) var(--ease); }
.splash .shot { position: absolute; object-fit: contain; background: #000; filter: blur(16px) saturate(1.25) brightness(.72); }
.splash .capsule { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 20px 12px 14px; border-radius: 999px; max-width: calc(100vw - 48px);
  background: rgba(26, 31, 28, .9); background: color-mix(in srgb, var(--surface) var(--g-a-hi), transparent);
  -webkit-backdrop-filter: var(--gf-m); backdrop-filter: var(--gf-m);
  border: 1px solid var(--line); box-shadow: 0 16px 50px rgba(0,0,0,.5); animation: pop var(--t-slow) var(--ease) .08s backwards; }
.splash .capsule div { display: grid; min-width: 0; }
.splash .capsule b { font-weight: 650; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.splash .capsule small { color: var(--dim); font-size: 12px; }
.splash .ring { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid rgba(233, 238, 234, .16);
  border: 2.5px solid color-mix(in srgb, var(--fg) 16%, transparent); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.splash.out { opacity: 0; }
.splash.out .capsule { transform: scale(.96); transition: transform var(--t-slow) var(--ease); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.94); } }
@media (prefers-reduced-motion: reduce) { #stage, .splash, .splash .shot { transition: none; } .splash .ring { animation-duration: 2s; } }

/* ---- desk: several sources as one desktop (2026-11-21) ---- */
.view .dclose, .view .dgrip { display: none; }
body.desk .view { transition: opacity var(--t-std) var(--ease); }
body.desk .view.moving { transition: none; box-shadow: 0 26px 80px rgba(0,0,0,.65), 0 0 0 2px var(--accent); }
body.desk .view .tag { top: 8px; bottom: auto; left: 8px; padding: 7px 12px 7px 12px; font-weight: 600; touch-action: none;
  cursor: grab; user-select: none; -webkit-user-select: none; z-index: 2; }
body.desk .view .dclose { display: grid; place-items: center; position: absolute; top: 8px; right: 8px; width: 30px; height: 30px;
  border-radius: 50%; font-size: 18px; line-height: 1; color: var(--fg); z-index: 2;
  background: var(--g-noise), var(--glass); -webkit-backdrop-filter: var(--gf-s); backdrop-filter: var(--gf-s); border: 1px solid var(--line); }
body.desk .view .dclose:active { transform: scale(.9); }
body.desk .view .dgrip { display: block; position: absolute; right: 0; bottom: 0; width: 34px; height: 34px; touch-action: none; z-index: 2;
  cursor: nwse-resize; background: linear-gradient(135deg, transparent 55%, color-mix(in srgb, var(--fg) 55%, transparent) 56%, color-mix(in srgb, var(--fg) 55%, transparent) 60%,
  transparent 61%, transparent 70%, color-mix(in srgb, var(--fg) 55%, transparent) 71%, color-mix(in srgb, var(--fg) 55%, transparent) 75%, transparent 76%); opacity: .8; }
#desk-bar { position: absolute; top: max(10px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 4;
  display: flex; gap: 6px; padding: 5px; border-radius: 999px; background: var(--g-noise), var(--glass);
  -webkit-backdrop-filter: var(--gf-m); backdrop-filter: var(--gf-m); border: 1px solid var(--line);
  box-shadow: 0 14px 44px rgba(0,0,0,.5); animation: rise var(--t-std) var(--ease); }
#desk-bar button { height: 34px; padding: 0 14px; border-radius: 999px; font: 600 13px/1 Inter, ui-sans-serif, system-ui, sans-serif; color: var(--fg); }
#desk-bar #desk-add { width: 34px; padding: 0; font-size: 18px; }
#desk-bar button:active { transform: scale(.94); background: color-mix(in srgb, var(--fg) 10%, transparent); }
#picker .pk-actions { display: flex; align-items: center; gap: 4px; }
#picker-select { height: 36px; padding: 0 14px; border-radius: 999px; font: 600 14px/1 Inter, ui-sans-serif, system-ui, sans-serif; color: var(--accent); }
.tile .check { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; border-radius: 50%; z-index: 2;
  border: 2px solid rgba(255,255,255,.85); background: rgba(0,0,0,.25); transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.tile.on .check { background: var(--accent); border-color: var(--accent); transform: scale(1.08);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%2306281c' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 16px; background-position: center; background-repeat: no-repeat; }
#picker-bar { position: sticky; bottom: max(14px, env(safe-area-inset-bottom)); display: flex; justify-content: center; margin-top: 18px; }
#picker-open { height: 48px; padding: 0 26px; border-radius: 999px; font: 650 15px/1 Inter, ui-sans-serif, system-ui, sans-serif;
  background: var(--accent); color: var(--on-accent); box-shadow: 0 14px 44px rgba(0,0,0,.45); animation: lift var(--t-std) var(--ease); }
@keyframes lift { from { opacity: 0; transform: translateY(10px) scale(.97); } }
#picker-open:disabled { background: color-mix(in srgb, var(--fg) 12%, transparent); color: var(--dim); box-shadow: none; }
#picker-open:active:not(:disabled) { transform: scale(.96); }

/* ---------- boot screen (boot.js): black, the desktop's pixel stars and shooting stars, the PC's wallpaper dimmed.
   The same layer is drawn by every hop of a QR load, so nothing pops in and out; the app removes it once. */
.boot { position: fixed; inset: 0; z-index: 50; background: #000; overflow: hidden; pointer-events: none;
  transition: opacity var(--t-slow) var(--ease); }
.boot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; opacity: 0;
  transition: opacity var(--t-slow) var(--ease); }
.boot.bg img { opacity: 1; }
.boot.poster img { object-fit: fill; filter: none; transition: none; }
.boot.poster canvas { opacity: 0; }
.boot.poster.out { transition-duration: .25s; }
.boot canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.boot .bcap { position: absolute; left: 50%; bottom: calc(48px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  display: flex; align-items: center; gap: 9px; max-width: calc(100vw - 48px); background: none; border: 0;
  color: rgba(240, 240, 240, .78); font: 500 13px/1.2 Inter, system-ui, sans-serif; letter-spacing: -.005em; white-space: nowrap;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .9); }
.boot .bcap span { overflow: hidden; text-overflow: ellipsis; }
.boot .ring { flex: none; width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .14);
  border-top-color: var(--accent, #52d98b); animation: spin .8s linear infinite; }
.boot.out { opacity: 0; }
body.booting #gate, body.booting #dock, body.booting #handle, body.booting #stats, body.booting #live, body.booting #toast { visibility: hidden; }
body.plain.booting { background: #000; }
/* waiting / problem states on the boot screen (2026-11-21): centred like a lock screen, glass button */
.boot .bcap, .boot .bmsg { transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease); }
.boot .bmsg { position: absolute; left: 50%; top: 46%; transform: translate(-50%, calc(-50% + 10px)); width: min(330px, calc(100vw - 48px));
  display: flex; flex-direction: column; align-items: center; text-align: center; opacity: 0; pointer-events: none;
  color: #fff; font-family: Inter, system-ui, sans-serif; text-shadow: 0 1px 14px rgba(0, 0, 0, .65); }
.boot.msg .bmsg { opacity: 1; transform: translate(-50%, -50%); pointer-events: auto; }
.boot.msg .bcap { opacity: 0; transform: translateX(-50%) translateY(6px); }
.boot .bmark { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 18px;
  background: rgba(255, 255, 255, .12); border: .5px solid rgba(255, 255, 255, .2);
  -webkit-backdrop-filter: var(--gf-s); backdrop-filter: var(--gf-s); box-shadow: 0 8px 30px rgba(0, 0, 0, .35); }
.boot .bmark svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; opacity: .92; }
.boot .bmsg h1 { margin: 0; font-size: 22px; line-height: 1.2; font-weight: 640; letter-spacing: -.02em; }
.boot .bmsg p { margin: 8px 0 0; font-size: 15px; line-height: 1.42; color: rgba(240, 240, 240, .74); letter-spacing: -.005em; }
.boot .bmsg p:empty { display: none; }
.boot .bmsg button { margin-top: 24px; min-width: 148px; height: 46px; padding: 0 26px; border-radius: var(--r-pill); cursor: pointer;
  font: 600 15px/1 Inter, system-ui, sans-serif; letter-spacing: -.01em; color: #fff; text-shadow: none;
  background: rgba(255, 255, 255, .16); border: .5px solid rgba(255, 255, 255, .26);
  -webkit-backdrop-filter: var(--gf-m); backdrop-filter: var(--gf-m);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .14);
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease); -webkit-tap-highlight-color: transparent; }
.boot .bmsg button:active { transform: scale(.95); background: rgba(255, 255, 255, .24); }
.boot .bmsg button[hidden] { display: none; }
#gate { display: none; }
@media (prefers-reduced-motion: reduce) { .boot, .boot img, .boot .bcap, .boot .bmsg { transition: none; } }

/* ---------- dock groups (2026-11-21): input | screens · Exposé · sound | more. Seldom-used things live in a small
   glass panel that springs up from the ⋯ button. */
#dock .dgroup { display: flex; gap: 2px; padding: 0; border-radius: 999px; transition: background var(--t-std) var(--ease); }
#dock .dgroup:has(button.on) { background: color-mix(in srgb, var(--fg) 7%, transparent); }
#dock .dsep { width: 1px; height: 22px; margin: 0 5px; background: var(--line); flex: none; }
#dock .dsep[hidden] { display: none; }
#dock button[hidden], #dock-more button[hidden], #dock-ws button[hidden] { display: none; }
#dock > button, #dock .dgroup > button { animation: dockin .32s cubic-bezier(.2,.9,.25,1) both; }
@keyframes dockin { from { transform: scale(.6); opacity: 0; } }
#b-more.on { background: color-mix(in srgb, var(--fg) 14%, transparent) !important; color: var(--fg) !important; }
#dock-more, #dock-ws { position: fixed; left: 50%; bottom: calc(76px + var(--safe-b)); z-index: 4; display: grid; grid-template-columns: repeat(2, 76px); gap: 6px;
  padding: 8px; border-radius: var(--r-sheet); background: var(--g-noise), var(--glass); -webkit-backdrop-filter: var(--gf-m); backdrop-filter: var(--gf-m);
  border: 1px solid var(--line); box-shadow: 0 14px 44px rgba(0,0,0,.5);
  transform: translateX(-50%) translateY(10px) scale(.92); transform-origin: 50% 100%; opacity: 0; pointer-events: none;
  transition: transform var(--t-slow) var(--ease), opacity var(--t-std) var(--ease); }
#dock-more.open, #dock-ws.open { transform: translateX(-50%); opacity: 1; pointer-events: auto; }
#dock-more button, #dock-ws button { height: 64px; border-radius: 16px; display: grid; place-items: center; align-content: center; gap: 5px; color: var(--fg);
  font: 500 11px/1 Inter, system-ui, sans-serif; letter-spacing: -.005em; transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
#dock-more button::after, #dock-ws button::after { content: attr(title); opacity: .75; }
#dock-more button:active, #dock-ws button:active { transform: scale(.94); }
#dock-more button:hover, #dock-ws button:hover { background: color-mix(in srgb, var(--fg) 9%, transparent); }
#dock-more button.on, #dock-ws button.on { background: var(--accent); color: var(--on-accent); }
#dock-more svg, #dock-ws svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) and (pointer: fine) { #dock-more { bottom: auto; top: 70px; transform-origin: 50% 0; transform: translateX(-50%) translateY(-10px) scale(.92); } #dock-more.open { transform: translateX(-50%); } }
.boot .bmark { color: #fff; }

/* ---- desk title bars (2026-11-21): above each tile, never on the picture. Traffic lights + name (the grab area). ---- */
body.desk .view .tag, body.desk .view .dclose, body.desk .view .dgrip { display: none; }
.dbar { position: absolute; display: flex; align-items: center; gap: 8px; padding: 0 8px; box-sizing: border-box;
  border-radius: var(--r-ctl) var(--r-ctl) 0 0; background: color-mix(in srgb, var(--bg, #111) var(--g-a-hi), transparent);
  -webkit-backdrop-filter: var(--gf-m); backdrop-filter: var(--gf-m);
  border: 1px solid var(--line); border-bottom: 0; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.dbar[hidden] { display: none; }
.dbar.moving { transition: none; cursor: grabbing; }
.dlights { display: flex; gap: 7px; flex: none; }
.dl { width: 13px; height: 13px; padding: 0; border-radius: 50%; border: 0; position: relative; flex: none;
  box-shadow: inset 0 0 0 .5px rgba(0,0,0,.25); }
.dl::before { content: ''; position: absolute; inset: -8px; }          /* a finger-sized target around the small light */
.dl-close { background: #ff5f57; } .dl-min { background: #febc2e; } .dl-max { background: #28c840; }
.dl:active { filter: brightness(.8); }
.dname { flex: 1; min-width: 0; text-align: center; font: 600 12px/1 Inter, ui-sans-serif, system-ui, sans-serif; color: var(--fg);
  opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
body.desk .view { border-radius: 0 0 var(--r-ctl) var(--r-ctl); }
/* invisible resize zones (2026-11-22): the box is the title bar + picture; zones reach ~40 px outside, a little in */
.dzones { position: absolute; pointer-events: none; }
.dzones.moving { transition: none; }
.dzones[hidden] { display: none; }
.dz { position: absolute; pointer-events: auto; touch-action: none; }
.dz-n { left: 28px; right: 28px; top: -38px; height: 38px; cursor: ns-resize; }
.dz-s { left: 28px; right: 28px; bottom: -38px; height: 50px; cursor: ns-resize; }
.dz-w { left: -38px; width: 50px; top: 30px; bottom: 28px; cursor: ew-resize; }
.dz-e { right: -38px; width: 50px; top: 18px; bottom: 28px; cursor: ew-resize; }
.dz-nw { left: -44px; top: -44px; width: 50px; height: 50px; cursor: nwse-resize; }
.dz-ne { right: -44px; top: -44px; width: 50px; height: 50px; cursor: nesw-resize; }
.dz-sw { left: -44px; bottom: -44px; width: 64px; height: 64px; cursor: nesw-resize; }
.dz-se { right: -44px; bottom: -44px; width: 64px; height: 64px; cursor: nwse-resize; }
/* trackpad mode (2026-11-22): a swipe that starts beside a tile is the trackpad, not a resize: the zones only reach
   14 px out (and 6 px in). The 38 px reach resized tiles under the user's finger while moving the arrow. */
body.tpad .dz-n { top: -14px; height: 20px; } body.tpad .dz-s { bottom: -14px; height: 20px; }
body.tpad .dz-w { left: -14px; width: 20px; } body.tpad .dz-e { right: -14px; width: 20px; }
body.tpad .dz-nw, body.tpad .dz-ne { top: -18px; width: 26px; height: 26px; } body.tpad .dz-nw { left: -18px; } body.tpad .dz-ne { right: -18px; }
body.tpad .dz-sw, body.tpad .dz-se { bottom: -18px; width: 30px; height: 30px; } body.tpad .dz-sw { left: -18px; } body.tpad .dz-se { right: -18px; }
.dguide { position: absolute; pointer-events: none; background: var(--accent, #52d98b); opacity: .55; }
.dguide.x { top: 0; bottom: 0; width: 1px; }
.dguide.y { left: 0; right: 0; height: 1px; }
.dguide[hidden] { display: none; }
#desk-grid.on { background: color-mix(in srgb, var(--accent, #52d98b) 30%, transparent); }
#desk-bar .dmin { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  background: color-mix(in srgb, var(--fg) 10%, transparent); }
#desk-bar button { white-space: nowrap; }
#cursor.arrow.feed { opacity: .45; }
#dock-ws { grid-template-columns: repeat(3, 76px); }
@media (hover: hover) and (pointer: fine) { #dock-ws { bottom: auto; top: 70px; transform-origin: 50% 0; transform: translateX(-50%) translateY(-10px) scale(.92); } #dock-ws.open { transform: translateX(-50%); } }

/* ---- boot = the PC's login window (2026-11-22): G+ mark in a soft circle, the PC's name, and in the password
   pill a live status line (what Link is doing right now); the step's time under it, tap for the step log ---- */
.boot .bcap { display: none; }
.boot .blogin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(300px, calc(100vw - 40px));
  display: flex; flex-direction: column; align-items: center; pointer-events: auto; cursor: default;
  font-family: Inter, "Inter Variable", system-ui, sans-serif; color: #fff; transition: opacity var(--t-slow) var(--ease); }
.boot .bav { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 12px;
  background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18), 0 8px 30px rgba(0, 0, 0, .35); }
.boot .bav svg { width: 30px; height: 30px; color: #fff; }
.boot .bname { font-size: 15px; font-weight: 600; margin-bottom: 14px; text-shadow: 0 1px 10px rgba(0, 0, 0, .5); }
.boot .bpill { box-sizing: border-box; min-width: 240px; max-width: 100%; height: 36px; padding: 0 16px; border-radius: 18px;
  display: flex; align-items: center; justify-content: center; gap: 9px; background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .20); -webkit-backdrop-filter: var(--gf-s); backdrop-filter: var(--gf-s);
  font-size: 13px; font-weight: 500; letter-spacing: -.005em; white-space: nowrap; }
.boot .bpill span { overflow: hidden; text-overflow: ellipsis; }
.boot .bhint { margin-top: 12px; font-size: 12px; color: rgba(255, 255, 255, .6); font-feature-settings: "tnum"; min-height: 15px; }
.boot .blog { margin: 10px 0 0; padding: 10px 12px; list-style: none; max-height: 40vh; overflow: auto; width: 100%; box-sizing: border-box;
  border-radius: 12px; background: rgba(0, 0, 0, .55); font: 500 11px/1.5 ui-monospace, "JetBrains Mono", monospace;
  color: rgba(255, 255, 255, .78); white-space: pre-wrap; }
.boot .blog[hidden] { display: none; }
.boot.msg .blogin { opacity: 0; pointer-events: none; }
/* coming back with the last picture under it: only the pill, low on the screen, so the picture stays readable */
.boot.poster .blogin { top: auto; bottom: calc(40px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); }
.boot.poster .bav, .boot.poster .bname, .boot.poster .bhint { display: none; }
/* desk items in the ⋯ menu; a count on ⋯ while views are minimised (2026-11-22) */
#b-more { position: relative; }
#b-more.count::after { content: attr(data-count); position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; border-radius: 8px;
  background: var(--accent, #52d98b); color: var(--on-accent, #000); font: 700 10px/16px Inter, system-ui, sans-serif; text-align: center; }
/* maximised tile: "[grid] All views ••" replaces the lights, plain to see and a big target */
.dback { display: none; align-items: center; gap: 5px; height: 26px; padding: 0 10px 0 8px; white-space: nowrap; border-radius: var(--r-pill); border: 0; flex: none;
  background: color-mix(in srgb, var(--fg, #fff) 14%, transparent); color: var(--fg, #fff); font: 600 12px/1 Inter, system-ui, sans-serif; }
.dback svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dback i { font-style: normal; letter-spacing: 2px; opacity: .6; font-size: 10px; }
.dback::before { content: ''; position: absolute; inset: -8px; }
.dback:active { transform: scale(.95); }
.dbar.max .dback { display: inline-flex; position: relative; }
.dbar.max .dlights { display: none; }
.boot[hidden] { display: none; }
.boot.out .blogin { pointer-events: none; }
.dbar { container-type: inline-size; }
@container (max-width: 120px) { .dname { display: none; } }
/* short screens (a folded phone on its side): the ⋯ menu goes wide instead of tall, never past the top */
@media (max-height: 520px) {
  #dock-more { grid-template-columns: repeat(5, 70px); }
  #dock-more button { height: 56px; }
}
#dock-more { max-height: calc(100dvh - 96px - var(--safe-b, 0px)); overflow: auto; }
/* the handle hides while the dock is up (it showed through the dock's bottom edge) */
#dock:not(.away):not([hidden]) ~ #handle { opacity: 0; pointer-events: none; transition: opacity var(--t-std) var(--ease); }
@media (max-height: 520px) { #dock-more { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 70px; } }

/* ---- fullscreen tile: floating glass button + its menu (2026-11-22; after gpd-bubble / the dictation mic:
   round glass, hairline highlight edge, soft shadow). transform/opacity only. */
#fab { position: fixed; left: 0; top: 0; z-index: 63; width: 56px; height: 56px; border-radius: 50%; padding: 0; display: grid; place-items: center;
  color: #fff; border: 0; touch-action: none; -webkit-tap-highlight-color: transparent; will-change: transform;
  background: color-mix(in srgb, var(--surface) 30%, rgba(22, 22, 26, .6)); -webkit-backdrop-filter: var(--gf-s); backdrop-filter: var(--gf-s);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, rgba(255,255,255,.12)), 0 8px 24px rgba(0,0,0,.38), 0 1px 3px rgba(0,0,0,.4);
  transition: opacity var(--t-slow) var(--ease); }
#fab[hidden] { display: none; }
#fab svg { width: 24px; height: 24px; fill: currentColor; stroke: none; transition: transform var(--t-std) var(--ease); }
#fab.dim { opacity: .7; }
#fab.held svg { transform: scale(.88); }
#fab.open svg { transform: rotate(90deg); }
#fab-scrim { position: fixed; inset: 0; z-index: 61; background: transparent; touch-action: none; }
#fab-scrim[hidden] { display: none; }
#fab-menu { position: fixed; z-index: 63; min-width: 196px; padding: 8px; border-radius: 22px; display: flex; flex-direction: column; gap: 2px;
  background: rgba(30, 30, 34, .66); -webkit-backdrop-filter: var(--gf-l); backdrop-filter: var(--gf-l);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), inset 0 0 0 1px rgba(255,255,255,.10), 0 18px 48px rgba(0,0,0,.45);
  opacity: 0; transform: scale(.4); transition: transform 260ms cubic-bezier(.34,1.4,.64,1), opacity 180ms var(--ease); }
#fab-menu[hidden] { display: none; }
#fab-menu.in { opacity: 1; transform: none; }
#fab-menu .fab-title { padding: 6px 12px 8px; font: 600 11px/1.2 Inter, system-ui, sans-serif; letter-spacing: .02em; color: rgba(255,255,255,.55);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.fab-item { display: flex; align-items: center; gap: 14px; height: 46px; padding: 0 16px 0 12px; border: 0; border-radius: 14px; background: transparent;
  color: #fff; font: 500 15px/1 Inter, system-ui, sans-serif; text-align: left; white-space: nowrap;
  opacity: 0; transform: scale(.6); transition: transform 300ms cubic-bezier(.34,1.5,.64,1), opacity 200ms var(--ease), background-color var(--t-fast);
  transition-delay: calc(var(--i, 0) * 20ms); }
#fab-menu.in .fab-item { opacity: 1; transform: none; }
.fab-item:active { background: rgba(255,255,255,.12); }
.fab-item.on { color: var(--accent, #52d98b); }
.fab-item svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
@media (max-height: 520px) { .fab-item { height: 40px; } #fab-menu { padding: 6px; } }
@media (prefers-reduced-motion: reduce) { #fab-menu, .fab-item { transition-duration: 1ms; transition-delay: 0ms; } }
@media (max-height: 440px) { #fab-menu { display: grid; grid-template-columns: auto auto; column-gap: 4px; } #fab-menu .fab-title { grid-column: 1 / -1; } }

/* ---- per-source sound (2026-11-22, the user's design): small vertical strips, macOS Control Center look.
   Each strip: icon + name, a pill fader (fill + thumb follow the finger 1:1) with a segmented VU column beside it,
   a round mute under it. The desk mixer opens from the dock's mixer button; the fullscreen popup holds one strip.
   Only transform / opacity / filter animate. */
#b-sound { position: relative; }
#b-sound .mx-icon { display: none; }
#b-sound.mixer > svg:first-child { display: none; }
#b-sound.mixer .mx-icon { display: block; }
#b-sound.mixer.live:not(.on)::after { content: ''; position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #30d158;
  transform: translate(13px, -13px); box-shadow: 0 0 8px #30d158; }
:root { --mx-spring: cubic-bezier(.22, 1, .36, 1); --mx-h: clamp(104px, 26vh, 168px); }
/* the palette follows the wallpaper (server pushes Noctalia's colours, {t:'theme'}): registered so they fade */
@property --accent { syntax: '<color>'; inherits: true; initial-value: #8fe3c0; }
@property --on-accent { syntax: '<color>'; inherits: true; initial-value: #06281c; }
@property --surface { syntax: '<color>'; inherits: true; initial-value: #1a1f1c; }
@property --accent-hi { syntax: '<color>'; inherits: true; initial-value: #8fe3c0; }
:root { transition: --accent 600ms ease, --accent-hi 600ms ease, --on-accent 600ms ease, --surface 600ms ease; }
@media (prefers-reduced-motion: reduce) { :root { transition: none; } }
#mixer, #fab-menu { -webkit-backdrop-filter: var(--gf-l); backdrop-filter: var(--gf-l);
  background: var(--g-noise), color-mix(in srgb, var(--surface) 30%, rgb(22 22 26 / var(--g-dark))); border-radius: 18px;   /* tinted, but always dark glass: white text + light thumb keep their contrast on a light palette too */
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), inset 0 0 0 .5px rgba(255,255,255,.12), 0 1px 2px rgba(0,0,0,.25), 0 10px 24px rgba(0,0,0,.28), 0 28px 64px rgba(0,0,0,.34); }
#mixer { position: fixed; left: 50%; bottom: calc(76px + var(--safe-b)); z-index: 6; max-width: calc(100vw - 24px); padding: 12px 10px 10px;
  color: #fff; font-family: system-ui, -apple-system, Inter, sans-serif; translate: -50% 0;
  opacity: 0; transform: scale(.92); pointer-events: none; will-change: transform, opacity;
  transition: transform 200ms cubic-bezier(.4, 0, 1, 1), opacity 170ms ease-in; }
#mixer.open { opacity: 1; transform: none; pointer-events: auto;
  transition: transform 280ms var(--mx-spring), opacity 200ms ease-out; }
@media (hover: hover) and (pointer: fine) { #mixer { bottom: auto; top: 70px; } }
.mx-strips { display: flex; gap: 4px; overflow-x: auto; overscroll-behavior: contain; scrollbar-width: none; touch-action: pan-x; }
.mx-empty { padding: 8px 12px; font-size: 13px; color: rgba(255,255,255,.55); }
.mx-strip { --v: 0; width: 62px; flex: none; display: grid; justify-items: center; gap: 6px; padding: 2px 0 2px;
  opacity: 0; transform: translateY(6px) scale(.97); transition: opacity 160ms ease-in, transform 160ms ease-in; }
#mixer .mx-strip { transform: none; }
#mixer.open .mx-strip, #fab-menu.in .mx-strip { opacity: 1; transform: none; transition: opacity 220ms ease-out, transform 280ms var(--mx-spring);
  transition-delay: calc(var(--i, 0) * 18ms + 40ms); }
.mx-ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: rgba(255,255,255,.12); transition: background 200ms, color 200ms; }
.mx-ic svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mx-strip:not(.muted):not(.none) .mx-ic { background: color-mix(in srgb, var(--accent-hi) 26%, transparent); color: var(--accent-hi); }
.mx-name { max-width: 60px; margin-top: -2px; font-size: 11px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx-col { display: flex; gap: 5px; height: var(--mx-h); }
/* the fader: drawn 10 px wide, touched 36 px wide; inset 11 px top/bottom so the thumb never leaves the track */
.mx-fader { position: relative; width: 36px; height: 100%; touch-action: none; cursor: grab; display: flex; justify-content: center; outline: none; }
.mx-track { position: absolute; top: 4px; bottom: 4px; width: 10px; border-radius: 99px; background: rgba(255,255,255,.4); overflow: hidden;
  box-shadow: inset 0 0 0 .5px rgba(255,255,255,.18); }
.mx-fill { position: absolute; inset: 0; border-radius: inherit; background: var(--accent-hi); transform-origin: 50% 100%; transform: scaleY(var(--v));
  transition: transform 120ms var(--mx-spring), filter 260ms, opacity 260ms; }
.mx-thumb { position: absolute; left: 50%; top: 4px; width: 26px; height: 15px; margin-left: -13px; border-radius: 99px; background: #f5f5f7;
  box-shadow: 0 0 0 .5px rgba(0,0,0,.25), 0 1px 1px rgba(0,0,0,.2), 0 2px 8px rgba(0,0,0,.45), 0 0 0 3px color-mix(in srgb, var(--accent-hi) 22%, transparent);
  transform: translateY(calc((1 - var(--v)) * (var(--mx-h) - 23px))); transition: transform 120ms var(--mx-spring), scale 160ms var(--mx-spring); }
.mx-strip.drag .mx-fill, .mx-strip.drag .mx-thumb { transition: scale 160ms var(--mx-spring); }
.mx-strip.drag .mx-thumb { scale: 1.08; }
.mx-strip.tick .mx-thumb { animation: mx-tick 180ms ease-out; }
@keyframes mx-tick { 40% { scale: 1.22; } }
.mx-fader:focus-visible .mx-thumb { box-shadow: 0 0 0 3px rgba(10,132,255,.6), 0 2px 6px rgba(0,0,0,.35); }
.mx-strip.muted .mx-fill, .mx-strip.none .mx-fill { filter: saturate(0); opacity: .38; }
/* VU: a fixed green -> amber -> red column cut into segments, uncovered from the bottom by scaling a cover down */
.mx-vu { position: relative; width: 4px; margin: 4px 0; border-radius: 99px; overflow: hidden;
  background: linear-gradient(to top, #30d158 0 62%, #ffd60a 74%, #ff9f0a 86%, #ff453a 100%);
  -webkit-mask: repeating-linear-gradient(to top, #000 0 3px, transparent 3px 4px); mask: repeating-linear-gradient(to top, #000 0 3px, transparent 3px 4px);
  transition: opacity 260ms; }
.mx-vu-c { position: absolute; inset: 0; background: #2a2a2e; transform-origin: 50% 0; transform: scaleY(1); will-change: transform; }
.mx-peak { position: absolute; left: 0; right: 0; top: 0; height: 100%; opacity: 0; will-change: transform, opacity; }
.mx-peak::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: #fff; }
.mx-strip.muted .mx-vu { opacity: .45; }
.mx-strip.none .mx-vu { opacity: .15; }
.mx-mute { position: relative; width: 36px; height: 36px; border-radius: 50%; border: 0; display: grid; place-items: center; color: #fff;
  background: rgba(255,255,255,.14); transition: background 220ms, color 220ms, transform 140ms var(--mx-spring); }
.mx-mute::before { content: ''; position: absolute; inset: -4px; border-radius: 50%; }   /* 44 px to touch */
.mx-mute:active { transform: scale(.9); }
.mx-mute svg { grid-area: 1 / 1; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.mx-mute g { transition: opacity 220ms ease, transform 260ms var(--mx-spring); transform-origin: 40% 50%; }
.mx-mute .off { opacity: 0; transform: scale(.8); }
.mx-strip.muted .mx-mute .on, .mx-strip.none .mx-mute .on { opacity: 0; transform: scale(.8); }
.mx-strip.muted .mx-mute .off, .mx-strip.none .mx-mute .off { opacity: 1; transform: none; }
.mx-strip.muted .mx-mute, .mx-strip.none .mx-mute { background: rgba(255,255,255,.08); color: rgba(255,255,255,.6); }
.mx-strip:not(.muted):not(.none) .mx-mute { background: var(--accent-hi); color: #111; }
.mx-pct { margin-top: -2px; font-size: 10px; font-weight: 500; color: rgba(255,255,255,.55); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* fullscreen popup: the shown view's strip beside the actions */
#fab-menu { transition: transform 200ms cubic-bezier(.4, 0, 1, 1), opacity 170ms ease-in, filter 200ms ease-in; transform: scale(.92); filter: blur(6px); }
#fab-menu.in { transition: transform 280ms var(--mx-spring), opacity 200ms ease-out, filter 240ms ease-out; filter: none; }
.fab-item { transform: translateY(4px) scale(.97); transition: transform 280ms var(--mx-spring), opacity 200ms ease-out, background-color var(--t-fast);
  transition-delay: calc(var(--i, 0) * 18ms + 30ms); }
#fab-menu:not(.in) .fab-item { transition-delay: 0ms; transition-duration: 150ms; }
.fab-cols { display: flex; align-items: stretch; gap: 4px; }
.fab-list { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
#fab-menu.has-vol .fab-cols { --mx-h: clamp(96px, 24vh, 150px); }
.fab-vol { width: 56px; padding-top: 4px; border-left: .5px solid rgba(255,255,255,.12); padding-left: 4px; }
.fab-vol .mx-ic, .fab-vol .mx-name { display: none; }
@media (max-height: 440px) { #fab-menu { display: flex; } .fab-list { display: grid; grid-template-columns: auto auto; column-gap: 4px; } }
@media (max-width: 420px) { .mx-strip { width: 54px; } .mx-name { max-width: 52px; } }
@media (prefers-reduced-motion: reduce) {
  #mixer, #mixer.open, #fab-menu, #fab-menu.in, .mx-strip, .fab-item, .mx-fill, .mx-thumb, .mx-mute g { transition-duration: 1ms !important; transition-delay: 0s !important; filter: none !important; }
  .mx-strip.tick .mx-thumb { animation: none; } }
@media (prefers-reduced-transparency: reduce) { #mixer, #fab-menu { -webkit-backdrop-filter: none; backdrop-filter: none; background: #2c2c30; } }
/* glass text on near-clear glass (system glass tint < .4): a soft shadow keeps white text readable over a bright picture */
:where(#dock, #stats, #live, #toast, #keys, #sheet, .view .tag, #desk-bar, #dock-more, #dock-ws, #mixer, #fab-menu, #kbd .kb-panel, .splash .capsule) { text-shadow: var(--g-tshadow); }

/* the other PC / the Cardputer in the picker (2026-12-05) */
.tiles-head { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 8px; padding: 14px 6px 0; border-top: 1px solid color-mix(in srgb, var(--fg) 10%, transparent); margin-top: 6px; }
.tiles-head b { font-weight: 650; font-size: 15px; }
.tiles-head small { color: var(--dim); font-size: 12px; }

/* level meters (2026-12-05): a thin bar under a tile's title, and along the bottom of the dock's sound button */
.dlvl { position: absolute; left: 10px; right: 10px; bottom: 1px; height: 2px; border-radius: 2px; pointer-events: none;
  background: linear-gradient(90deg, var(--accent) 0 calc(var(--l, 0) * 100%), transparent 0); transition: background 90ms linear; }
.dlvl.hot { background: linear-gradient(90deg, var(--accent) 0 80%, #ffb84d 80% calc(var(--l, 0) * 100%), transparent 0); }
#b-sound::after { content: ''; position: absolute; left: 11px; bottom: 6px; height: 2px; border-radius: 2px; pointer-events: none;
  width: calc(var(--l, 0) * 22px); background: var(--accent); transition: width 90ms linear; }
#b-czpad.on, #b-keys.on { color: var(--accent); }

/* the Cardputer's floating keys */
#czpad { position: fixed; z-index: 60; right: 12px; bottom: 76px; padding: 4px 6px 6px; border-radius: 14px; touch-action: none;
  user-select: none; -webkit-user-select: none; color: #fff;
  background: var(--g-noise), color-mix(in srgb, var(--surface) 30%, rgb(22 22 26 / var(--g-dark)));
  backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3); box-shadow: 0 10px 40px rgb(0 0 0 / .45); }
#czpad[hidden] { display: none; }
#czpad .czp-head { display: flex; align-items: center; gap: 4px; padding: 1px 0 4px; cursor: grab;
  font: 600 11px/1 Inter, ui-sans-serif, system-ui, sans-serif; }
#czpad .czp-vit { flex: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 1px 6px; max-width: 170px; white-space: nowrap; }
#czpad .czl { display: inline-flex; align-items: center; gap: 3px; font: 700 9px/1.2 Inter, ui-sans-serif, system-ui, sans-serif; color: #8a8f9c; letter-spacing: .02em; cursor: pointer; }
#czpad .czl i { width: 6px; height: 6px; border-radius: 50%; background: #5fd38d; flex: none; }
#czpad .czl.warn i { background: #ffb347; } #czpad .czl.bad i { background: #ff6b6b; }
#czpad .czl b { font-weight: 600; color: #c9ccd4; font-feature-settings: "tnum"; }
#czpad .czp-head button { width: 24px; height: 20px; border-radius: 6px; color: #fff; background: rgb(255 255 255 / .08); font-size: 12px; }
#czpad .czp-body { display: flex; gap: 5px; align-items: center; }
#czpad .czp-col { display: grid; gap: 3px; }
#czpad .czp-dpad { display: grid; grid-template-columns: repeat(3, 36px); grid-template-rows: repeat(3, 36px); gap: 2px; }
#czpad .czp-col button { min-width: 44px; height: 34px; padding: 0 6px; }
#czpad button[data-c] { border-radius: 9px; color: #fff; background: rgb(255 255 255 / .1); font: 600 12px/1 Inter, ui-sans-serif, system-ui, sans-serif; }
#czpad button[data-c].ok { background: var(--accent); color: var(--on-accent); border-radius: 50%; }
#czpad button[data-c].on { background: rgb(255 255 255 / .32); transform: scale(.94); }
#czpad button[data-c].ok.on { filter: brightness(1.2); }

/* minimised views in the ⋯ menu: first, and marked (2026-12-05) */
#dock-more .dmin { box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--accent); }
#dock-more .dmin::after { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 68px; }

/* the pad starts in the corner away from the ⋯ button (2026-12-05) */
#czpad.lside { left: 12px; right: auto; }
#czpad .czp-head button[hidden] { display: none; }
/* the view buttons (2026-12-05): ‹ › only where the bar has room; All views always */
@media (max-width: 520px) { #dock #b-vprev, #dock #b-vnext { display: none; } }

:root{--accent:#afc6ff;--on-accent:#002d6c;--error:#ffb4ab;--bg:#111319;--fg:#e2e2ea;--surface:#1e1f25;--accent-hi:#afc6ff;}

:root{--g-a:66.0%;--g-a-hi:80.0%;--g-dark:0.840;--gf-s:blur(6.7px) saturate(1.45) brightness(0.92);--gf-m:blur(10.0px) saturate(1.45) brightness(0.92);--gf-l:blur(12.5px) saturate(1.45) brightness(0.92);--g-noise:none;--g-tshadow:none;}
