/* The command palette (⌘K), mock 2. Markup: views/cmdk.js. Every rule of the palette lives here.
   A wide window high on the screen (14 % from the top), the field 56 px over a thin line, lines 36 px. */
.backdrop:has(> .modal.cmdk) { padding-top: 14vh; }
.cmdk { width: min(680px, calc(100vw - 24px)); overflow: hidden; background: color-mix(in lch, var(--elev) 88%, transparent); -webkit-backdrop-filter: blur(22px) saturate(1.2); backdrop-filter: blur(22px) saturate(1.2); }
.cmdk input { flex: none; width: 100%; height: 56px; padding: 0 20px; border: 0; border-bottom: 1px solid var(--border-soft); outline: none; background: transparent; color: var(--text); font: inherit; font-size: var(--fs-read); }
.cmdk input::placeholder { color: var(--text-4); }
.cmdk .opts { display: flex; flex-direction: column; gap: 2px; max-height: min(62vh, 480px); overflow-y: auto; padding: 6px; }
.cmdk .opt { flex: none; gap: 9px; min-height: 36px; padding: 0 12px; }
.cmdk .opt .m-ic { display: inline-flex; flex: none; color: var(--icon); }
.cmdk .opt .m-ic svg, .cmdk .opt .m-ic .i { width: 16px; height: 16px; }
.cmdk .opt .opt-l { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmdk .opt .hint { margin-left: 0; color: var(--text-4); font-size: var(--fs-caption); white-space: nowrap; }
@media (hover: none) and (pointer: coarse) { .cmdk .keys { display: none; } }
/* a phone: the window at the top edge, not a sheet from below — the keyboard takes the bottom */
@media (max-width: 860px) {
  .backdrop:has(> .modal.cmdk) { align-items: flex-start !important; padding: 10px 8px 0 !important; }
  .backdrop > .modal.cmdk { width: 100% !important; border-radius: var(--r-lg); max-height: 70dvh; animation: fade var(--t) var(--ease); padding-bottom: 0; }
  .backdrop > .modal.cmdk::before { display: none; }
}
