.command-palette {
    width: min(680px, calc(100vw - 40px));
    max-width: none;
    max-height: min(720px, calc(100dvh - 72px));
    margin: 11vh auto auto;
    padding: 0;
    overflow: visible;
    border: 1px solid var(--border-gold, rgba(212, 175, 55, .24));
    border-radius: 18px;
    color: var(--text, #f5f5f7);
    background: var(--surface, #111215);
    box-shadow: var(--shadow-lg, 0 24px 64px rgba(0,0,0,.65)), 0 0 0 1px rgba(255,255,255,.025);
}
.command-palette[open] { animation: command-palette-in 170ms cubic-bezier(.2,.8,.2,1) both; }
.command-palette::backdrop { background: rgba(0,0,0,.72); animation: command-backdrop-in 120ms ease both; }
.command-palette-shell { overflow: hidden; border-radius: inherit; }
.command-palette-search-row { min-height: 68px; display: flex; align-items: center; gap: 14px; padding: 0 20px; border-bottom: 1px solid var(--border, rgba(255,255,255,.08)); }
.command-palette-search-row > i { color: var(--gold, #d4af37); font-size: 17px; }
.command-palette-search-row input { min-width: 0; flex: 1; height: 60px; padding: 0; border: 0; outline: 0; color: inherit; background: transparent; font: 400 16px/1.4 Inter, sans-serif; }
.command-palette-search-row input::placeholder { color: var(--text-muted, #85858b); }
.command-palette-esc, .command-palette kbd { border: 1px solid var(--border, rgba(255,255,255,.1)); border-radius: 5px; padding: 3px 6px; color: var(--text-secondary, #a1a1a6); background: var(--surface-raised, #17181c); font: 500 10px/1.2 "JetBrains Mono", monospace; }
.command-palette-context { display: flex; align-items: center; min-height: 30px; padding: 7px 20px 0; color: var(--text-muted, #777); font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.command-palette-results { max-height: min(510px, calc(100dvh - 210px)); overflow: auto; padding: 7px 9px 11px; overscroll-behavior: contain; scrollbar-color: rgba(255,255,255,.16) transparent; }
.command-group-heading { padding: 12px 10px 6px; color: var(--text-muted, #73737a); font-size: 9px; font-weight: 700; letter-spacing: .14em; }
.command-row, .command-ask-row { position: relative; width: 100%; min-height: 54px; display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid transparent; border-radius: 10px; color: inherit; background: transparent; text-align: left; cursor: pointer; transition: background 120ms ease, border-color 120ms ease; }
.command-row:hover, .command-row.is-active, .command-ask-row:hover { border-color: var(--border-gold, rgba(212,175,55,.22)); background: var(--surface-hover, #212328); }
.command-row.is-active { box-shadow: inset 2px 0 var(--gold, #d4af37); }
.command-row-icon, .command-ask-mark { width: 32px; height: 32px; flex: 0 0 32px; display: grid; place-items: center; border: 1px solid var(--border, rgba(255,255,255,.07)); border-radius: 9px; color: var(--text-secondary, #a1a1a6); background: var(--surface-raised, #17181c); }
.command-row.is-active .command-row-icon, .command-ask-mark { color: var(--gold, #d4af37); }
.command-row-copy { min-width: 0; flex: 1; display: grid; gap: 2px; }
.command-row-label { overflow: hidden; color: var(--text, #f5f5f7); font-size: 12px; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.command-row-description { overflow: hidden; color: var(--text-secondary, #a1a1a6); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.command-row-shortcut { flex: none; }
.command-pin { width: 28px; height: 28px; flex: none; border: 0; border-radius: 7px; color: var(--text-muted, #777); background: transparent; font-size: 17px; cursor: pointer; opacity: 0; }
.command-row:hover .command-pin, .command-row.is-active .command-pin, .command-pin:focus-visible, .command-pin.is-pinned { opacity: 1; }
.command-pin.is-pinned { color: var(--gold, #d4af37); }
.command-pin:focus-visible, .command-palette button:focus-visible { outline: 2px solid var(--gold, #d4af37); outline-offset: 2px; }
.command-ask-row { min-height: 62px; margin-top: 8px; border-top: 1px solid var(--border, rgba(255,255,255,.08)); border-radius: 0 0 10px 10px; }
.command-empty { padding: 24px 14px; color: var(--text-secondary, #a1a1a6); font-size: 12px; line-height: 1.6; }
.command-error { margin: 8px 10px; padding: 10px 12px; border: 1px solid rgba(255,82,82,.3); border-radius: 8px; color: var(--danger, #ff5252); font-size: 12px; }
.command-palette-footer { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 16px; border-top: 1px solid var(--border, rgba(255,255,255,.08)); color: var(--text-muted, #777); font-size: 10px; }
.command-palette-footer span { display: flex; align-items: center; gap: 5px; }
.command-palette-footer button { padding: 4px 0; border: 0; color: var(--text-muted, #777); background: transparent; font: inherit; cursor: pointer; }
.command-palette-footer button:hover { color: var(--gold, #d4af37); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
body.light-mode .command-palette { border-color: rgba(0,0,0,.12); background: #fff; box-shadow: 0 24px 64px rgba(0,0,0,.16); }
body.light-mode .command-palette::backdrop { background: rgba(0,0,0,.38); }
body.light-mode .command-row:hover, body.light-mode .command-row.is-active, body.light-mode .command-ask-row:hover { background: #f1f2f4; }
@keyframes command-palette-in { from { opacity: 0; transform: translateY(-8px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes command-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 840px) { .command-palette { width: calc(100vw - 28px); margin: 8vh auto auto; max-height: calc(100dvh - 32px); } .command-palette-results { max-height: calc(100dvh - 185px); } }
@media (max-width: 560px) { .command-palette { position: fixed; inset: auto 10px 10px; width: auto; max-width: none; max-height: min(82dvh, 720px); margin: 0; border-radius: 18px; } .command-palette-search-row { min-height: 60px; padding: 0 14px; } .command-palette-search-row input { height: 56px; font-size: 15px; } .command-palette-results { max-height: calc(82dvh - 132px); } .command-palette-footer { min-height: 42px; padding: 0 12px; } .command-row { min-height: 58px; } .command-row-description { max-width: 230px; } }
@media (prefers-reduced-motion: reduce) { .command-palette[open], .command-palette::backdrop, .command-row, .command-ask-row { animation: none; transition: none; } }
