/* DevOS web client. System font, light and dark from the system setting,
   no inline styles (the page's policy forbids them).

   The colours are the phone's, from the icon (design/theme/palette.py):
   violet for what wants you, steel blue for what is at work, charcoal ink
   on a cool white in light, and the black ground with charcoal cards in
   dark. */

:root {
  color-scheme: light dark;
  --bg: #f3f3f7;
  --surface: #ffffff;
  --surface-2: #e9e9f0;
  --text: #1c1f27;
  --muted: #5a5a72;
  --border: #d9dae4;
  --accent: #6a56ab;
  --accent-text: #ffffff;
  --accent-soft: #ece8f6;
  --steel: #4a6688;
  --danger: #b0304f;
  --danger-soft: #f9e8ec;
  --warn-text: #7a4300;
  --warn-soft: #fff3e0;
  --ok: #1a7360;
  --focus: #6a56ab;
  --code-bg: #eeeef4;
  /* Over a desktop's picture, which stays dark in both themes. */
  --over: 28 31 39;
  --over-text: #e4dded;
  --over-ok: #7bc7b2;
  --radius: 12px;
  --gutter: 16px;
  --shadow: 0 1px 2px rgb(0 0 0 / 6%), 0 1px 1px rgb(0 0 0 / 4%);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0c10;
    --surface: #1c1f27;
    --surface-2: #262a34;
    --text: #e4dded;
    --muted: #a19db4;
    --border: #383c47;
    --accent: #b4a2de;
    --accent-text: #14111e;
    --accent-soft: #2a2540;
    --steel: #8ba1b9;
    --danger: #eb889c;
    --danger-soft: #3a1a24;
    --warn-text: #f3c470;
    --warn-soft: #2e2311;
    --ok: #7bc7b2;
    --focus: #b4a2de;
    --code-bg: #13151b;
    --shadow: none;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: anywhere;
}

a {
  color: var(--accent);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -48px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  z-index: 10;
}

.skip:focus {
  top: 8px;
}

[hidden] {
  display: none !important;
}

/* Top bar */

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px var(--gutter);
  padding-top: max(10px, env(safe-area-inset-top));
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}

.brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.top nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.top nav a {
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}

.top nav a[aria-current="page"] {
  color: var(--text);
  background: var(--surface-2);
}

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 16px var(--gutter) calc(48px + env(safe-area-inset-bottom));
}

main:focus {
  outline: none;
}

h1 {
  font-size: 1.5rem;
  line-height: 1.25;
  margin: 8px 0 16px;
  letter-spacing: -0.01em;
}

h1:focus {
  outline: none;
}

h2 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 24px 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.875rem;
}

/* Buttons */

button,
.button {
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

button:hover:not(:disabled),
.button:hover {
  background: var(--surface-2);
}

button:disabled {
  opacity: 0.55;
  cursor: default;
}

button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}

button.primary:hover:not(:disabled) {
  background: color-mix(in srgb, var(--accent) 88%, var(--text));
}

button.danger {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 45%, var(--border));
}

button.danger:hover:not(:disabled) {
  background: var(--danger-soft);
}

button.link {
  border: 0;
  background: none;
  color: var(--accent);
  padding: 4px 6px;
  min-height: 32px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* Notices */

.notice {
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  margin: 12px 0;
}

.notice.warn {
  background: var(--warn-soft);
  border-color: color-mix(in srgb, var(--warn-text) 30%, var(--border));
  color: var(--warn-text);
}

.notice.error {
  background: var(--danger-soft);
  border-color: color-mix(in srgb, var(--danger) 35%, var(--border));
  color: var(--danger);
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 40px 16px;
}

/* Machine lines */

.machines {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
}

.machine-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--warn-soft);
  color: var(--warn-text);
  border: 1px solid color-mix(in srgb, var(--warn-text) 25%, var(--border));
}

.machine-line strong {
  color: inherit;
}

.machine-line .grow {
  flex: 1 1 200px;
}

/* Filters */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 4px 0 8px;
}

.seg {
  display: inline-flex;
  padding: 3px;
  border-radius: 12px;
  background: var(--surface-2);
  gap: 2px;
}

.seg button {
  border: 0;
  background: none;
  min-height: 34px;
  padding: 4px 12px;
  border-radius: 9px;
  color: var(--muted);
}

.seg button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

select {
  font: inherit;
  font-size: 0.9375rem;
  min-height: 40px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

/* Cards */

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card.needs {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}

.card-main {
  display: block;
  padding: 12px 52px 12px 14px;
  color: inherit;
  text-decoration: none;
  border-radius: var(--radius);
}

.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.card.unread .card-title::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.card-sub {
  display: block;
  color: var(--muted);
  font-size: 0.9375rem;
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
  font-size: 0.8125rem;
  color: var(--muted);
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.8125rem;
  line-height: 1.6;
}

.chip.machine {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.chip.status-working {
  color: var(--steel);
}

.chip.status-failed {
  color: var(--danger);
}

.branch {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
}

.fold {
  width: 100%;
  justify-content: space-between;
  background: var(--surface);
}

.fold::after {
  content: "▸" / "";
  color: var(--muted);
}

.fold[aria-expanded="true"]::after {
  content: "▾" / "";
}

/* Card actions menu */

.actions {
  position: absolute;
  top: 6px;
  right: 6px;
}

.actions > summary {
  list-style: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  cursor: pointer;
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1;
}

.actions > summary::-webkit-details-marker {
  display: none;
}

.actions > summary:hover {
  background: var(--surface-2);
}

.actions[open] > summary {
  background: var(--surface-2);
  color: var(--text);
}

.menu {
  position: absolute;
  right: 0;
  top: 44px;
  z-index: 4;
  min-width: 220px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgb(0 0 0 / 18%);
  display: grid;
  gap: 2px;
}

.menu button {
  justify-content: flex-start;
  border: 0;
  min-height: 38px;
  background: none;
  width: 100%;
}

.menu .menu-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  padding: 8px 10px 2px;
}

.menu hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 4px 0;
}

/* Prompt cards */

.prompt {
  margin: 0 14px 12px;
  padding: 12px;
  border-radius: 10px;
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border));
}

.prompt .question {
  margin: 0 0 10px;
  white-space: pre-wrap;
  font-weight: 500;
}

.prompt .options {
  display: grid;
  gap: 6px;
}

.prompt .options button {
  justify-content: flex-start;
  text-align: left;
  background: var(--surface);
}

.prompt .options button.no {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 45%, var(--border));
}

.prompt .options button.selected {
  border-color: var(--accent);
}

.prompt .free {
  display: flex;
  gap: 6px;
}

.prompt .free input {
  flex: 1;
  min-width: 0;
}

.flash {
  margin: 8px 0 0;
  font-weight: 600;
}

.flash.error {
  color: var(--danger);
}

/* Pairing */

.pair {
  max-width: 520px;
  margin: 0 auto;
}

.steps {
  padding-left: 1.25rem;
  margin: 0 0 16px;
}

.steps li {
  margin: 4px 0;
}

.ways {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.ways h2 {
  font-size: 1.05rem;
  margin: 0 0 4px;
}

.ways dt {
  font-weight: 600;
  margin-top: 12px;
}

.ways dd {
  margin: 2px 0 0;
  color: var(--muted);
}

.cmd {
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin: 8px 0 0;
}

.cmd code {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  color: var(--text);
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  overflow-x: auto;
  white-space: pre;
}

.qr {
  width: min(320px, 100%);
  margin: 8px auto 12px;
  padding: 12px;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid var(--border);
}

.qr svg {
  display: block;
  width: 100%;
  height: auto;
}

.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-align: center;
  margin: 12px 0;
}

.found {
  list-style: none;
  padding: 0;
  margin: 8px 0;
  display: grid;
  gap: 6px;
}

.found li {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
}

/* Session */

.session-head {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.session-head h1 {
  margin: 4px 0 0;
}

.back {
  font-weight: 500;
  text-decoration: none;
}

.chat {
  display: grid;
  gap: 10px;
  margin: 8px 0 16px;
}

.msg {
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  max-width: 100%;
  min-width: 0;
}

.msg.you {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 25%, var(--border));
  justify-self: end;
  max-width: 92%;
}

.msg.note {
  background: none;
  border-style: dashed;
  color: var(--muted);
  font-size: 0.9375rem;
}

.msg .who {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 2px;
}

.msg p,
.msg ul,
.msg ol,
.msg blockquote,
.msg pre {
  margin: 6px 0;
}

.msg > :last-child {
  margin-bottom: 0;
}

.msg ul,
.msg ol {
  padding-left: 1.4rem;
}

.msg blockquote {
  padding-left: 12px;
  border-left: 3px solid var(--border);
  color: var(--muted);
}

.msg .md-h {
  font-weight: 700;
  margin-top: 10px;
}

.msg code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.875em;
  background: var(--code-bg);
  padding: 1px 4px;
  border-radius: 4px;
}

.msg pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  overflow-x: auto;
  overflow-wrap: normal;
  white-space: pre;
}

.msg pre code {
  background: none;
  padding: 0;
  font-size: 0.8125rem;
}

.msg hr {
  border: 0;
  border-top: 1px solid var(--border);
}

.steps-run {
  font-size: 0.875rem;
  color: var(--muted);
}

.steps-run > summary {
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  width: fit-content;
}

.steps-run > summary:hover {
  background: var(--surface-2);
}

.steps-run ol {
  list-style: none;
  margin: 4px 0 0;
  padding: 0 0 0 10px;
  border-left: 2px solid var(--border);
  display: grid;
  gap: 2px;
}

.steps-run li {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 6em;
  overflow: hidden;
}

.steps-run li.failed {
  color: var(--danger);
}

.session-prompt .prompt {
  margin: 0 0 12px;
}

.composer {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: end;
  padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.composer textarea {
  font: inherit;
  width: 100%;
  min-height: 44px;
  max-height: 40vh;
  resize: vertical;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.composer .status {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
  min-height: 1.3em;
}

.composer .status.error {
  color: var(--danger);
}

/* Computers */

.computer {
  padding: 14px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  display: grid;
  gap: 6px;
}

.computer p {
  margin: 0;
}

.computer h2 {
  margin: 0;
  font-size: 1.05rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text);
}

.computer .remotes {
  display: grid;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.computer .remotes h3 {
  margin: 0;
  font-size: 0.95rem;
}

.computer .remotes .row {
  justify-content: space-between;
  align-items: center;
}

/* The Xirp desktop app closed or signed out: a quiet line, not a warning. */
.xirp-note {
  justify-content: space-between;
}

.state-ok {
  color: var(--ok);
}

.state-warn {
  color: var(--warn-text);
}

/* Toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  max-width: min(520px, calc(100% - 32px));
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--text);
  color: var(--bg);
  font-weight: 500;
  box-shadow: 0 8px 24px rgb(0 0 0 / 25%);
  z-index: 20;
}

.toast:empty {
  display: none;
}

@media (prefers-reduced-motion: no-preference) {
  .toast {
    transition: opacity 0.2s;
  }
}

@media (min-width: 640px) {
  :root {
    --gutter: 24px;
  }
}

/* Desktops: a session's sandbox, or a Mac's own screen over the page. */
.desktop-panel {
  margin: 0 0 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.5rem 0.9rem;
}
.desktop-panel > summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.3rem 0;
}
.desktop {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.6rem;
}

/* The picture, with the pill, the toolbar and the menu over it, as Chrome
   Remote Desktop lays them out. Over the picture the colors stay dark in
   both themes, since the picture is a desktop. */
.desk-view {
  position: relative;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
}
.desk-view.driving {
  box-shadow: 0 0 0 2px var(--accent);
}
.desk-view.full {
  border-radius: 0;
  box-shadow: none;
}
.desk-stage {
  overflow: auto;
  max-height: 80vh;
}
.desk-view.full .desk-stage {
  width: 100%;
  height: 100%;
  max-height: none;
}
.desktop-canvas {
  display: block;
  width: 100%;
  height: auto;
  background: #000;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  touch-action: none;
  cursor: default;
}
.desktop-canvas:focus-visible {
  outline: none;
}
.desk-view.full .desktop-canvas {
  height: 100%;
  aspect-ratio: auto;
}
.desktop-canvas.actual,
.desk-view.full .desktop-canvas.actual {
  width: auto;
  height: auto;
  max-width: none;
  aspect-ratio: auto;
  object-fit: none;
}
.desktop-canvas.pixelated {
  image-rendering: pixelated;
}
.desk-pills {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  gap: 6px;
  align-items: center;
  max-width: calc(100% - 150px);
  z-index: 2;
}
.desk-pill {
  margin: 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgb(var(--over) / 78%);
  color: var(--over-text);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.desk-pill:empty {
  display: none;
}
.desk-pill.driving {
  background: var(--accent);
  color: var(--accent-text);
}
.desk-pills button {
  min-height: 30px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8125rem;
}
.desk-bar {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 12px;
  background: rgb(var(--over) / 78%);
  z-index: 2;
}
.desk-bar.hidden {
  opacity: 0;
  pointer-events: none;
}
.desk-bar button {
  min-height: 36px;
  min-width: 36px;
  padding: 6px;
  border: 0;
  background: transparent;
  color: var(--over-text);
}
.desk-bar button:hover:not(:disabled),
.desk-bar button[aria-pressed="true"],
.desk-bar button[aria-expanded="true"] {
  background: rgb(255 255 255 / 16%);
}
.desk-bar svg,
.desk-menu-head svg {
  width: 20px;
  height: 20px;
}
.desk-state {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  max-width: 80%;
  padding: 10px 16px;
  border-radius: 12px;
  background: rgb(var(--over) / 82%);
  color: var(--over-text);
  text-align: center;
  z-index: 1;
  pointer-events: none;
}
.desk-state:empty {
  display: none;
}
.desk-stats {
  position: absolute;
  left: 8px;
  bottom: 8px;
  margin: 0;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgb(0 0 0 / 72%);
  color: var(--over-ok);
  font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre;
  z-index: 2;
  pointer-events: none;
}
.desk-clip {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  align-items: center;
  max-width: calc(100% - 24px);
  padding: 6px 6px 6px 14px;
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 8px 24px rgb(0 0 0 / 30%);
  z-index: 2;
}
.desk-clip > span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 32ch;
}
.desk-menu {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(360px, 100%);
  overflow: auto;
  padding: 12px 16px 24px;
  background: var(--surface);
  color: var(--text);
  border-left: 1px solid var(--border);
  z-index: 3;
}
.desk-menu-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.desk-menu-head button:last-child {
  min-width: 40px;
  padding: 6px;
}
.desk-menu h3 {
  margin: 18px 0 6px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.desk-menu .field {
  display: grid;
  gap: 4px;
  margin: 6px 0;
  font-size: 0.9375rem;
}
.desk-menu select {
  font: inherit;
  min-height: 38px;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 6px 0;
}
.check input {
  margin-top: 4px;
}
.check .hint {
  display: block;
  color: var(--muted);
  font-size: 0.8125rem;
}
.desk-keys {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 6px;
}
.desk-keys button {
  justify-content: space-between;
  min-height: 36px;
  font-size: 0.875rem;
}
.desk-keys kbd {
  font: 0.75rem ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--muted);
}
.desk-files {
  list-style: none;
  margin: 8px 0;
  padding: 0;
  display: grid;
  gap: 4px;
}
.desk-files button {
  width: 100%;
  min-height: 36px;
  justify-content: space-between;
  text-align: left;
}
.desk-files .name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.desk-help {
  margin: 0 0 8px;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.875rem;
}
.desk-choice {
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
}
.desk-choice p {
  margin: 0 0 8px;
}

@media (prefers-reduced-motion: no-preference) {
  .desk-bar {
    transition: opacity 0.2s;
  }
}
.screen-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--bg);
  overflow: auto;
  padding: 1rem max(1rem, env(safe-area-inset-right)) 1rem max(1rem, env(safe-area-inset-left));
}
.screen-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
