/* The desk: a screen in the page (1440 × 900 DIPs, scaled to the page's
   width), on which Glance is shown as it is used: the monitor at its right
   edge, the workbench at its left, music at its top, torn onto the desktop,
   sized, and full screen. Drawn and played by desk.js. */

.desk-sec { padding-top: 24px; }
.vdesk { position: relative; width: 100%; aspect-ratio: 1440 / 900; margin-top: 32px; border-radius: 18px; overflow: hidden;
  border: 1px solid var(--glass-edge); background: #1a1440; box-shadow: var(--shadow); touch-action: pan-y;
  -webkit-user-select: none; user-select: none; }
.vdesk .screen { position: absolute; left: 0; top: 0; width: 1440px; height: 900px; transform-origin: 0 0; overflow: hidden;
  background: #1a1440 url("img/desk-wall.webp?v=2") center / cover no-repeat; }
.vdesk.live .screen { cursor: default; }

/* The taskbar, as plain as a taskbar is: a few programs in its middle. */
.vdesk .taskbar { position: absolute; left: 0; right: 0; bottom: 0; height: 48px; display: flex; align-items: center; justify-content: center; gap: 6px;
  background: rgba(24, 20, 48, 0.72); -webkit-backdrop-filter: blur(30px) saturate(150%); backdrop-filter: blur(30px) saturate(150%);
  border-top: 1px solid rgba(255, 255, 255, 0.08); }
.vdesk .taskbar i { width: 40px; height: 40px; border-radius: 6px; display: grid; place-items: center; transition: background .15s; }
.vdesk .taskbar i svg { display: block; width: 28px; height: 28px; }
.vdesk .taskbar i:hover { background: rgba(255, 255, 255, 0.1); }
.vdesk .taskbar i:active svg { transform: scale(0.88); }

/* What comes from an edge: placed and slid by desk.js, by its left and top (a transform, or a promise of one, would
   wall Windows 11's sheet off from the desktop it blends with: see bench.css). */
.vdesk .edge { position: absolute; left: 0; top: 0; }
.vdesk .edge[data-at="right"] .gp { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

/* The music widget: its canvas (its shadow drawn in it too), drawn by music.js. */
.vdesk .mw { position: absolute; left: 0; top: 0; pointer-events: none; }
.vdesk .mw canvas { display: block; width: 100%; height: 100%; }
.vdesk .mw[hidden] { display: none; }

/* Where a widget let go would stick, as Glance draws it (widget.rs `paint_hint`): in each look a pane of its own,
   firmer once letting go would stick it there. desk.js sets how strong it is as its opacity. Glass: the glass's
   colour under its rim. Windows 11: the accent's wash under a hairline, as Windows' own snap preview. Chart paper: a
   pencilled outline on the paper's colour, dashed until firm. A music widget: its own ground's colour, its corners. */
.vdesk .hint { position: absolute; left: 0; top: 0; pointer-events: none; visibility: hidden; box-sizing: border-box;
  border-radius: 24px; background: rgba(20, 20, 26, 0.32); border: 1px solid rgba(255, 255, 255, 0.2); }
.vdesk .hint.on { visibility: visible; }
.vdesk .hint.firm { background: rgba(20, 20, 26, 0.6); }
[data-look="win11"] .vdesk .hint { border-radius: 8px; background: rgba(153, 235, 255, 0.14); border-color: rgba(153, 235, 255, 0.45); }
[data-look="win11"] .vdesk .hint.firm { background: rgba(153, 235, 255, 0.26); border-color: #99ebff; }
[data-look="paper"] .vdesk .hint { border-radius: 16px; background: rgba(20, 35, 31, 0.45); border: 1.5px dashed #6b7b73; }
[data-look="paper"] .vdesk .hint.firm { background: rgba(20, 35, 31, 0.75); border-style: solid; border-color: #a1b0a8; }
.vdesk .hint.own, [data-look] .vdesk .hint.own { border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(var(--ground), 0.5); }
.vdesk .hint.own.firm, [data-look] .vdesk .hint.own.firm { border-color: rgba(255, 255, 255, 0.3); background: rgba(var(--ground), 0.85); }

/* The full screen, over everything, the taskbar too. */
.vdesk .full { position: absolute; inset: 0; opacity: 0; visibility: hidden; }
.vdesk .full.on { visibility: visible; }

/* Esc pressed, as the desk plays it. */
.vdesk .esc { position: absolute; left: 50%; bottom: 72px; padding: 14px 26px; border-radius: 14px; transform: translateX(-50%);
  font: 600 26px/1 var(--sans); color: #1d1a33; background: rgba(250, 250, 255, 0.94);
  box-shadow: 0 6px 0 rgba(170, 168, 200, 0.9), 0 12px 30px rgba(0, 0, 0, 0.4); opacity: 0; pointer-events: none; }

/* Keys pressed together, as the desk plays them: each key as Esc is drawn, a plus between them, all pressed at once. */
.vdesk .keys { position: absolute; left: 50%; bottom: 72px; display: flex; align-items: center; gap: 12px; transform: translateX(-50%);
  opacity: 0; pointer-events: none; white-space: nowrap; }
.vdesk .keys b { padding: 14px 26px; border-radius: 14px; font: 600 26px/1 var(--sans); color: #1d1a33; background: rgba(250, 250, 255, 0.94);
  box-shadow: 0 6px 0 rgba(170, 168, 200, 0.9), 0 12px 30px rgba(0, 0, 0, 0.4); }
.vdesk .keys i { font: 600 26px/1 var(--sans); font-style: normal; color: rgba(255, 255, 255, 0.92); text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); }
.vdesk .keys.down b { transform: translateY(5px); box-shadow: 0 1px 0 rgba(170, 168, 200, 0.9), 0 6px 18px rgba(0, 0, 0, 0.4); }

/* Search and quick look (find.js), over the desktop and the edges, under the full screen: only they take the pointer. */
.vdesk .find { position: absolute; inset: 0; pointer-events: none; }
.vdesk .find .gs { pointer-events: auto; }

/* The pointer, while the desk plays itself. */
.vdesk .pointer { position: absolute; left: 0; top: 0; width: 26px; height: 38px; pointer-events: none; transform-origin: 0 0;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.45)); }

/* Under the desk: what is shown now, the parts to go to, and the sound. */
.desk-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; margin-top: 18px; }
.desk-say { flex: 1 1 100%; margin: 0; min-height: 1.75em; color: var(--ink-2); font-size: 15.5px; }
/* The looks at its left, the parts and the sound at its right. */
.desk-tools { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.desk-tools [data-looks] { margin-right: auto; }
/* (On a phone the five parts share the row's width, set closer, that they stay within the page.) */
@media (max-width: 440px) {
  .desk-tools [data-chapters] { display: flex; width: 100%; }
  .desk-tools [data-chapters] button { flex: 1 1 auto; padding: 7px 4px; font-size: 13px; white-space: nowrap; }
}
.desk-sound { appearance: none; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 12px; cursor: pointer;
  font: inherit; font-size: 14.5px; color: var(--ink-2); background: rgba(10, 12, 34, 0.25); border: 1px solid var(--glass-edge); }
.desk-sound svg { width: 18px; height: 18px; flex: none; }
.desk-sound[aria-pressed="true"] { color: var(--button-ink); background: var(--button); border-color: var(--button); font-weight: 600; }
.desk-sound .on, .desk-sound[aria-pressed="true"] .off { display: none; }
.desk-sound[aria-pressed="true"] .on { display: block; }

/* The hero's way down to it. */
.to-desk { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; color: var(--ink-2); font-size: 15px; text-decoration: none; }
.to-desk svg { width: 18px; height: 18px; animation: to-desk 1.8s ease-in-out infinite; }
.to-desk:hover { color: var(--ink); }
@keyframes to-desk { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .to-desk svg { animation: none; } }
