/* The search palette (palette.js). Uses the same tokens as site.css and the app's index.css. */
.search-kbd, .pal kbd { font: 600 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); background: var(--surface); border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px; padding: 3px 5px; }
.search-kbd { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); pointer-events: none; }
/* Search palette */
body.pal-open { overflow: hidden; }
.pal[hidden] { display: none; }
.pal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: clamp(24px, 10vh, 96px) 16px 16px; }
.pal-back { position: absolute; inset: 0; background: rgba(10, 11, 18, .45); backdrop-filter: blur(3px); animation: pal-fade .12s ease-out; }
.pal-box { position: relative; width: 100%; max-width: 640px; max-height: calc(100vh - 48px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.55), 0 0 0 1px rgba(0,0,0,.04); overflow: hidden; animation: pal-pop .14s ease-out; }
@keyframes pal-fade { from { opacity: 0 } } @keyframes pal-pop { from { opacity: 0; transform: translateY(-8px) scale(.985) } }
.pal-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); color: var(--muted); }
.pal-head input, .pal-head input:focus { flex: 1; min-width: 0; width: auto; border: 0; outline: 0; box-shadow: none; border-radius: 0; background: transparent; font: inherit; font-size: 17px; color: var(--text); padding: 4px 0; }
.pal-head input::-webkit-search-cancel-button { display: none; }
.pal-head kbd { cursor: pointer; }
.pal-body { overflow-y: auto; padding: 6px; scroll-padding: 6px; }
.pal-body.pal-stale { opacity: .45; pointer-events: none; }
.pal-group + .pal-group { margin-top: 4px; }
.pal-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 10px 4px; }
.pal-item { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.pal-item[aria-selected="true"] { background: var(--accent-soft); }
.pal-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--surface-2); color: var(--text-2); }
.pal-ico svg { width: 18px; height: 18px; }
.pal-ico-sport, .pal-ico-ranking { background: var(--accent-soft); color: var(--accent); }
.pal-ico-guide { background: var(--green-soft); color: var(--green); }
.pal-ico-state { background: var(--amber-soft); color: var(--amber); }
.pal-item[aria-selected="true"] .pal-ico { background: var(--surface); }
.pal-main { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.pal-name { font-weight: 600; font-size: 14.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pal-name mark { background: none; color: var(--accent); }
.pal-detail { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pal-aside { font-size: 12.5px; font-weight: 600; color: var(--accent); white-space: nowrap; padding: 4px 8px; border-radius: 7px; opacity: 0; }
.pal-item[aria-selected="true"] .pal-aside, .pal-item:hover .pal-aside { opacity: 1; }
.pal-aside:hover { background: var(--surface); text-decoration: none; }
.pal-none { padding: 28px 16px; text-align: center; color: var(--muted); font-size: 14px; }
.pal-foot { display: flex; align-items: center; gap: 14px; padding: 8px 14px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); background: var(--surface-2); }
.pal-foot kbd { margin-right: 3px; }
.pal-foot-r { margin-left: auto; font-weight: 600; }
@media (max-width: 720px) {
  .pal { padding: 8px; } .pal-box { max-height: calc(100vh - 16px); border-radius: 12px; }
  .pal-foot span:not(.pal-foot-r) { display: none; } .pal-aside { display: none; } .search-kbd { display: none; }
}
