.command-palette {
  position:fixed;inset:clamp(16px,12dvh,150px) 0 auto;margin:0 auto;padding:0;
  box-sizing:border-box;width:min(520px,calc(100vw - 24px));max-width:none;max-height:78dvh;
  border:1px solid var(--bu-outline,#dadadd);border-radius:16px;background:var(--bu-layer,#fff);
  color:var(--bu-ink,#171717);box-shadow:0 20px 60px -12px #0003,0 4px 10px #0001;
  font:400 14px/1.5 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei UI",sans-serif;
  overflow:hidden;
}
.command-palette[open]{display:flex;flex-direction:column;animation:board-command-in 175ms cubic-bezier(.21,.81,.28,1)}
.command-palette::backdrop{background:rgb(0 0 0 / .34);animation:board-command-backdrop 140ms ease-out}
@keyframes board-command-in{from{opacity:0;filter:blur(4px);transform:translateY(-5px) scale(.99)}}
@keyframes board-command-backdrop{from{opacity:0}}
.command-palette *{box-sizing:border-box}
.command-search{display:flex;align-items:center;gap:10px;min-height:42px;padding:0 10px 0 14px;border-bottom:1px solid var(--bu-border,#dcdcdc);flex:none}
.command-search>svg,.command-palette [role=option]>svg{width:16px;height:16px;flex:none;color:var(--bu-secondary,#626262)}
.command-search>svg{width:18px;height:18px}
.command-palette .command-search>input[type=text]{appearance:none;width:100%;min-width:0;flex:1;margin:0;padding:0;height:40px;min-height:0;box-shadow:none;border:none;outline:none;border-radius:0;background:transparent;color:inherit;font:inherit}
.command-palette .command-search>input[type=text]:is(:focus,:focus-visible,:hover){box-shadow:none;outline:none;border:0;background:transparent}
.command-search input::placeholder{color:var(--bu-muted,#737373)}
.command-palette button.command-dismiss{display:grid;place-items:center;flex:none;cursor:pointer;min-width:32px;min-height:32px;color:var(--bu-secondary,#666);border:0;box-shadow:none;background:transparent;border-radius:6px;padding:0;margin:0}
.command-palette button.command-dismiss:hover{background:var(--bu-hover,#f4f4f4)}
.command-palette kbd,.search-trigger kbd{font:500 11px/1.2 Inter,system-ui,sans-serif;min-width:16px;text-align:center;padding:2px 4px;border:1px solid var(--bu-border,#ddd);background:var(--bu-panel,#fff);color:var(--bu-secondary,#666);border-radius:4px;box-shadow:0 1px 0 #00000012}
.command-scroll{min-height:0;overflow:auto;max-height:min(48dvh,380px);padding:4px;overscroll-behavior:contain;scrollbar-width:thin}
.command-palette [role=group]+[role=group]{margin-top:4px}
.command-group-title{padding:6px 8px 4px;font-size:12px;font-weight:500;color:var(--bu-muted,#737373)}
.command-palette [role=option]{display:flex;align-items:center;gap:9px;min-height:32px;padding:6px 8px;border-radius:10px;cursor:pointer;line-height:20px;user-select:none}
.command-palette [role=option][aria-selected=true]{background:var(--bu-selected,#f0f0f0)}
.command-palette [role=option] small{margin-left:auto;color:var(--bu-muted,#737373);font-size:12px;white-space:nowrap}
.command-palette [role=option] kbd{margin-left:auto}
.command-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.command-empty{margin:0;padding:34px 12px;text-align:center;color:var(--bu-muted,#737373)}
.command-keys{display:flex;align-items:center;gap:16px;min-height:36px;padding:6px 12px;border-top:1px solid var(--bu-border,#ddd);font-size:12px;color:var(--bu-muted,#737373)}
.command-keys span{display:inline-flex;align-items:center;gap:4px}
@media(max-width:600px){.command-palette{inset-block-start:max(16px,env(safe-area-inset-top));max-height:calc(100dvh - 32px)}
  .command-palette .command-search>input[type=text]{font-size:16px}.command-palette [role=option]{min-height:40px}.command-scroll{max-height:min(54dvh,380px)}}
@media(pointer:coarse) and (hover:none){.command-keys,.command-dismiss kbd{display:none}.command-dismiss::after{content:"×";font-size:22px;line-height:1}}
@media(prefers-reduced-motion:reduce){.command-palette[open],.command-palette::backdrop{animation:none}}
html[data-motion=reduced] .command-palette[open],html[data-motion=reduced] .command-palette::backdrop,
:host-context(html[data-motion=reduced]) .command-palette[open],:host-context(html[data-motion=reduced]) .command-palette::backdrop{animation:none}
@media(forced-colors:active){.command-palette [aria-selected=true]{outline:1px solid Highlight;outline-offset:-1px}}
