/* =========================================================
   Kit/css/cmd_palette.css — 搜尋欄＋Ctrl + / 命令面板樣式（給不載入 Kit/style.css 的 home.php 用）
   內容 = Kit/style.css「全域搜尋」～「命令面板 — 手機版」段落的原樣複本（index.php 仍由 style.css 提供）。
   修改面板樣式時兩處要同步；日後可把 style.css 該段刪除、index.php 改載本檔以去重。
   ========================================================= */
/* style.css :root 舊變數 → 只在搜尋元件範圍內補上，不汙染首頁 :root */
.search-nav-item, .search-overlay, .cmd-palette-overlay {
  --accent-gold: var(--gs-gold, #eebb4d);
  --accent-gold-bright: var(--gs-gold-hi, #ffd700);
  --text-muted: var(--gs-muted, #888);
  --border-soft: rgba(186, 147, 105, 0.25);
  --border-softer: rgba(186, 147, 105, 0.14);
  --shadow-strong: 0 18px 45px rgba(0, 0, 0, 0.65);
  --glass-strong: var(--gs-bg-plate, #0a0a0d);
  --radius-sm: 8px;
  --radius-md: 12px;
  --transition: 0.25s ease;
}
/* 首頁沒有 Bootstrap reboot：補上 index.php 由 Bootstrap／style.css 其他段落帶來、會影響面板外觀的規則 */
.cmd-palette-overlay, .cmd-palette-overlay * { box-sizing: border-box; }
.cmd-palette-overlay input, .search-nav-item input { font-family: inherit; line-height: inherit; }
.search-result-badge i { margin-right: 4px; }

/* =========================================================
   全域搜尋
   ========================================================= */
.search-nav-item { position: relative; z-index: 1050; }
.nav-search-wrapper { position: relative; display: flex; align-items: center; }

.btn-search-toggle {
  background: none; border: none; color: var(--accent-gold);
  font-size: 1.1rem; cursor: pointer; padding: 8px 10px;
  transition: var(--transition);
}
.btn-search-toggle:hover { color: var(--accent-gold-bright); transform: scale(1.1); }

.search-input-wrapper {
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 0; overflow: hidden; opacity: 0;
  transition: width 0.3s ease, opacity 0.3s ease;
  display: flex; align-items: center;
}
.search-input-wrapper.active { width: 300px; opacity: 1; z-index: 1050; }

/* 搜尋遮罩 */
.search-overlay {
  display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(3px);
  z-index: 1045;
}
.search-overlay.show { display: block; }

.search-input {
  background: rgba(20, 20, 24, 0.95) !important;
  border: 1px solid var(--accent-gold) !important;
  color: #fff !important; border-radius: var(--radius-sm) !important;
  font-size: 0.9rem; padding: 7px 36px 7px 12px; width: 100%;
}
.search-input::placeholder { color: var(--text-muted) !important; }
.search-input:focus {
  outline: none !important;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.25) !important;
  border-color: var(--accent-gold-bright) !important;
}

.btn-search-close {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; font-size: 0.85rem; padding: 4px;
}
.btn-search-close:hover { color: #fff; }

/* 搜尋結果下拉 */
.search-results-dropdown {
  position: absolute; top: calc(100% + 6px); left: 0; width: 400px;
  max-height: 440px; overflow-y: auto;
  background: var(--glass-strong);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-strong);
  display: none; z-index: 1060;
}
.search-results-dropdown.show { display: block; }

.search-result-item {
  display: flex; flex-direction: column; padding: 12px 16px;
  cursor: pointer; border-bottom: 1px solid var(--border-softer);
  transition: var(--transition);
}
.search-result-item:hover,
.search-result-item.active { background: rgba(255, 215, 0, 0.06); }
.search-result-item:last-child { border-bottom: none; }

.search-result-header { display: flex; align-items: center; gap: 8px; }

.search-result-title {
  font-weight: 600; color: var(--accent-gold-bright); font-size: 0.95rem;
  flex: 1;
}
.search-result-title mark {
  background: rgba(255, 215, 0, 0.3); color: #fff;
  padding: 0 2px; border-radius: 2px;
}

.search-result-badge {
  font-size: 0.65rem; padding: 2px 8px; border-radius: 10px;
  white-space: nowrap; font-weight: 600; letter-spacing: 0.5px;
}
.search-badge-shop { background: rgba(255, 193, 7, 0.2); color: #ffc107; }
.search-badge-maps { background: rgba(40, 167, 69, 0.2); color: #28a745; }
.search-badge-info { background: rgba(23, 162, 184, 0.2); color: #17a2b8; }
.search-badge-page { background: rgba(170, 130, 255, 0.2); color: #aa82ff; }

.search-result-desc {
  font-size: 0.8rem; color: var(--text-muted); margin-top: 3px;
  line-height: 1.4;
}
.search-result-desc mark {
  background: rgba(255, 215, 0, 0.2); color: #ccc;
  padding: 0 1px; border-radius: 2px;
}

.search-result-context {
  font-size: 0.75rem; color: #666; margin-top: 4px;
  line-height: 1.4; font-style: italic;
}
.search-result-context mark {
  background: rgba(255, 215, 0, 0.2); color: #aaa;
  padding: 0 1px; border-radius: 2px; font-style: normal;
}

.search-no-result {
  padding: 20px; text-align: center; color: var(--text-muted); font-size: 0.9rem;
}

/* 手機版搜尋 — 漢堡選單內的內嵌搜尋已由獨立按鈕 + 命令面板取代 */
@media (max-width: 991.98px) {
  .search-nav-item { display: none !important; }
}

/* 手機版常駐搜尋按鈕已改用 Kit/css/theme.css 的 .gs-iconbtn，原規則已刪除 */

/* =========================================================
   Ctrl + / 命令面板搜尋 — 270C 主題
   ========================================================= */
.cmd-palette-overlay {
  display: none;
  position: fixed; inset: 0;
  background: radial-gradient(ellipse at center,
      rgba(20, 16, 8, 0.78) 0%,
      rgba(0, 0, 0, 0.85) 100%);
  backdrop-filter: blur(8px) saturate(1.2);
  -webkit-backdrop-filter: blur(8px) saturate(1.2);
  z-index: 2000;
  padding: 80px 20px 20px;
  align-items: flex-start;
  justify-content: center;
  animation: cmdFadeIn 0.18s ease-out;
}
.cmd-palette-overlay.show { display: flex; }

/* 面板關閉時強制暫停所有動畫（保險：釋放 CPU/GPU 資源）*/
.cmd-palette-overlay:not(.show) .orb,
.cmd-palette-overlay:not(.show) .palette-corner,
.cmd-palette-overlay:not(.show) .cmd-palette,
.cmd-palette-overlay:not(.show) .cmd-palette::before {
  animation-play-state: paused !important;
}

/* 隨機飄移粒子 — 背景裝飾，圍繞面板隨機方向漂浮 */
.cmd-palette-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
  /* 預設隱形；面板開啟後緩慢漸顯 */
  opacity: 0;
  transition: opacity 3s ease-out;
}
.cmd-palette-overlay.show .cmd-palette-particles {
  opacity: 1;
}
.orb {
  position: absolute;
  width: var(--size, 4px);
  height: var(--size, 4px);
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(255, 215, 0, 0.85) 0%,
    rgba(255, 193, 7, 0.45) 50%,
    rgba(255, 193, 7, 0) 75%);
  box-shadow: 0 0 6px rgba(255, 215, 0, 0.55);
  opacity: 0;
  animation:
    cmdOrbDrift var(--dur, 22s) ease-in-out infinite var(--delay, 0s),
    cmdOrbFade var(--dur, 22s) ease-in-out infinite var(--delay, 0s);
  /* will-change 只在面板開啟時啟用，避免持續吃 GPU */
}
.cmd-palette-overlay.show .orb {
  will-change: transform, opacity;
}
.orb.orb-bright {
  background: radial-gradient(circle,
    rgba(255, 224, 133, 0.95) 0%,
    rgba(255, 213, 79, 0.5) 50%,
    rgba(255, 213, 79, 0) 75%);
  box-shadow: 0 0 8px rgba(255, 224, 133, 0.65);
}
.orb.orb-warm {
  background: radial-gradient(circle,
    rgba(255, 167, 38, 0.85) 0%,
    rgba(255, 112, 67, 0.4) 50%,
    rgba(255, 87, 34, 0) 75%);
  box-shadow: 0 0 8px rgba(255, 152, 0, 0.5);
}
.orb.orb-large {
  filter: blur(1px);
  box-shadow: 0 0 14px rgba(255, 215, 0, 0.45);
}
/* 隨機飄移：起點 → 隨機 (dx, dy) → 反向 → 回起點，無方向偏好 */
@keyframes cmdOrbDrift {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(0.85);
  }
  25% {
    transform: translate3d(calc(var(--dx) * 0.5), calc(var(--dy) * 0.7), 0) scale(1);
  }
  50% {
    transform: translate3d(var(--dx), var(--dy), 0) scale(0.95);
  }
  75% {
    transform: translate3d(calc(var(--dx) * 0.5), calc(var(--dy) * 0.3), 0) scale(1.05);
  }
}
@keyframes cmdOrbFade {
  0%, 100% { opacity: 0; }
  15%, 85% { opacity: 0.85; }
  50% { opacity: 1; }
}

/* 奇幻角落劍刃裝飾 — L 形金色框 + 中心劍尖 */
.palette-corner {
  position: absolute;
  width: 28px; height: 28px;
  pointer-events: none;
  z-index: 3;
  animation: cmdCornerPulse 3.5s ease-in-out infinite;
}
/* L 形邊（::before 橫、::after 直）*/
.palette-corner::before,
.palette-corner::after {
  content: '';
  position: absolute;
  background: linear-gradient(135deg, #ffd54f 0%, #ffc107 60%, rgba(255, 193, 7, 0) 100%);
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}
.palette-corner::before { width: 22px; height: 2px; }   /* 橫 */
.palette-corner::after  { width: 2px; height: 22px; }   /* 直 */

/* 左上 */
.palette-corner-tl { top: -1px; left: -1px; }
.palette-corner-tl::before { top: 0; left: 0; }
.palette-corner-tl::after  { top: 0; left: 0; }
/* 右上 */
.palette-corner-tr { top: -1px; right: -1px; transform: scaleX(-1); }
.palette-corner-tr::before { top: 0; left: 0; }
.palette-corner-tr::after  { top: 0; left: 0; }
/* 左下 */
.palette-corner-bl { bottom: -1px; left: -1px; transform: scaleY(-1); }
.palette-corner-bl::before { top: 0; left: 0; }
.palette-corner-bl::after  { top: 0; left: 0; }
/* 右下 */
.palette-corner-br { bottom: -1px; right: -1px; transform: scale(-1, -1); }
.palette-corner-br::before { top: 0; left: 0; }
.palette-corner-br::after  { top: 0; left: 0; }

/* 動畫延遲讓 4 個角錯落呼吸（對角同步）*/
.palette-corner-tl, .palette-corner-br { animation-delay: 0s; }
.palette-corner-tr, .palette-corner-bl { animation-delay: 1.75s; }

@keyframes cmdCornerPulse {
  0%, 100% {
    opacity: 0.7;
    filter: drop-shadow(0 0 2px rgba(255, 215, 0, 0.3));
  }
  50% {
    opacity: 1;
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.7));
  }
}

@keyframes cmdFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes cmdSlideUp {
  from { transform: translateY(-14px) scale(0.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes cmdGoldShimmer {
  0%, 100% { background-position: 0% 50%; opacity: 0.85; }
  50% { background-position: 100% 50%; opacity: 1; }
}
@keyframes cmdResultEnter {
  from { opacity: 0; transform: translateX(-6px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes cmdChipFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-1px); }
}
@keyframes cmdEdgeGlow {
  0%, 100% { box-shadow:
      0 0 0 1px rgba(255, 215, 0, 0.06),
      0 24px 64px rgba(0, 0, 0, 0.75),
      0 0 90px rgba(255, 215, 0, 0.08);
  }
  50% { box-shadow:
      0 0 0 1px rgba(255, 215, 0, 0.1),
      0 24px 64px rgba(0, 0, 0, 0.75),
      0 0 110px rgba(255, 215, 0, 0.15);
  }
}

.cmd-palette {
  position: relative;
  z-index: 1;
  width: 100%; max-width: 640px;
  background:
    radial-gradient(circle at top right, rgba(255, 215, 0, 0.06), transparent 40%),
    radial-gradient(circle at bottom left, rgba(255, 215, 0, 0.04), transparent 40%),
    linear-gradient(180deg, rgba(28, 24, 14, 0.98) 0%, rgba(14, 14, 18, 0.98) 100%);
  border: 1px solid rgba(255, 215, 0, 0.22);
  border-radius: 14px;
  box-shadow:
    0 0 0 1px rgba(255, 215, 0, 0.06),
    0 24px 64px rgba(0, 0, 0, 0.75),
    0 0 90px rgba(255, 215, 0, 0.08);
  display: flex; flex-direction: column;
  overflow: hidden;
  max-height: calc(100vh - 120px);
  animation:
    cmdSlideUp 0.22s cubic-bezier(0.16, 1, 0.3, 1),
    cmdEdgeGlow 5s ease-in-out infinite 0.5s;
}
/* 頂部金色發光線（裝飾） */
.cmd-palette::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg,
      transparent 0%,
      rgba(255, 215, 0, 0.3) 15%,
      rgba(255, 215, 0, 0.9) 50%,
      rgba(255, 215, 0, 0.3) 85%,
      transparent 100%);
  background-size: 200% 100%;
  animation: cmdGoldShimmer 4s ease-in-out infinite;
}
/* 四角裝飾 */
.cmd-palette::after {
  content: ''; position: absolute; inset: 6px;
  border: 1px solid transparent;
  background:
    linear-gradient(135deg, rgba(255, 215, 0, 0.4), transparent 20%, transparent 80%, rgba(255, 215, 0, 0.4)) border-box;
  -webkit-mask:
    linear-gradient(#000 0 0) padding-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none; border-radius: 10px;
  opacity: 0.5;
}

/* 270C 品牌條 */
.cmd-palette-brand {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 18px 9px;
  background:
    linear-gradient(90deg,
      rgba(255, 215, 0, 0.1) 0%,
      rgba(255, 215, 0, 0.04) 40%,
      transparent 100%);
  border-bottom: 1px solid rgba(255, 215, 0, 0.1);
  position: relative; z-index: 1;
}
.cmd-palette-brand-name { display: flex; align-items: center; gap: 12px; }
.cmd-palette-brand-mark {
  font-family: 'Oswald', "Noto Sans TC","Microsoft JhengHei","PingFang TC", sans-serif; font-weight: 700;
  font-size: 1rem; letter-spacing: 2px;
  background: linear-gradient(180deg, #ffe085 0%, #ffc107 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 12px rgba(255, 215, 0, 0.4);
}
.cmd-palette-brand-divider {
  width: 1px; height: 14px; background: rgba(255, 215, 0, 0.25);
}
.cmd-palette-brand-sub {
  font-size: 0.72rem; color: #aaa; letter-spacing: 1.5px;
  font-family: 'Oswald', "Noto Sans TC","Microsoft JhengHei","PingFang TC", sans-serif;
}
.cmd-palette-brand-meta {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.68rem; color: #888;
  line-height: 1;
}
.cmd-palette-brand-meta kbd {
  background: rgba(255, 215, 0, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 3px;
  padding: 4px 7px;
  font-family: 'Oswald', "Noto Sans TC","Microsoft JhengHei","PingFang TC", sans-serif; font-size: 0.65rem;
  color: #ffc107; letter-spacing: 0.5px;
  box-shadow: 0 1px 0 rgba(255, 215, 0, 0.1) inset;
  line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 18px;
}
.cmd-palette-brand-meta span {
  color: #666; padding: 0 2px;
  display: inline-flex; align-items: center;
  line-height: 1;
}

.cmd-palette-header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 215, 0, 0.08);
  background: rgba(255, 215, 0, 0.015);
  position: relative;
}
.cmd-palette-icon {
  color: var(--accent-gold, #ffc107);
  font-size: 1.1rem;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}
.cmd-palette-input {
  flex: 1; background: transparent; border: none; outline: none;
  color: #fff; font-size: 1.05rem; padding: 4px 0;
  caret-color: var(--accent-gold, #ffc107);
  font-weight: 500;
}
.cmd-palette-input::placeholder { color: #555; font-weight: 400; }
.cmd-palette-esc {
  font-size: 0.7rem; padding: 4px 9px;
  background: rgba(255, 215, 0, 0.06);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 4px; color: #ffc107;
  font-family: 'Oswald', "Noto Sans TC","Microsoft JhengHei","PingFang TC", sans-serif; letter-spacing: 1px;
  box-shadow: 0 1px 0 rgba(255, 215, 0, 0.08) inset;
  line-height: 1;
  display: inline-flex; align-items: center;
}

.cmd-palette-results {
  flex: 1; overflow-y: auto;
  max-height: 60vh;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 215, 0, 0.2) transparent;
}
.cmd-palette-results::-webkit-scrollbar { width: 8px; }
.cmd-palette-results::-webkit-scrollbar-track { background: transparent; }
.cmd-palette-results::-webkit-scrollbar-thumb {
  background: rgba(255, 215, 0, 0.15); border-radius: 4px;
}
.cmd-palette-results::-webkit-scrollbar-thumb:hover { background: rgba(255, 215, 0, 0.3); }

.cmd-palette-results .search-result-item {
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255, 215, 0, 0.04);
  border-left: 2px solid transparent;
  transition: background 0.12s ease, border-color 0.12s ease, padding-left 0.12s ease;
  animation: cmdResultEnter 0.25s ease-out backwards;
}
.cmd-palette-results .search-result-item:nth-child(1) { animation-delay: 0.02s; }
.cmd-palette-results .search-result-item:nth-child(2) { animation-delay: 0.05s; }
.cmd-palette-results .search-result-item:nth-child(3) { animation-delay: 0.08s; }
.cmd-palette-results .search-result-item:nth-child(4) { animation-delay: 0.11s; }
.cmd-palette-results .search-result-item:nth-child(5) { animation-delay: 0.14s; }
.cmd-palette-results .search-result-item:nth-child(6) { animation-delay: 0.17s; }
.cmd-palette-results .search-result-item:nth-child(7) { animation-delay: 0.20s; }
.cmd-palette-results .search-result-item:nth-child(8) { animation-delay: 0.23s; }
.cmd-palette-results .search-result-item:nth-child(n+9) { animation-delay: 0.26s; }
.cmd-palette-results .search-result-item:last-child { border-bottom: none; }
.cmd-palette-results .search-result-item:hover {
  background: rgba(255, 215, 0, 0.04);
}
.cmd-palette-results .search-result-item.active {
  background: linear-gradient(90deg,
      rgba(255, 215, 0, 0.14) 0%,
      rgba(255, 215, 0, 0.03) 60%,
      transparent 100%);
  border-left-color: var(--accent-gold, #ffc107);
  padding-left: 22px;
  box-shadow: inset 0 0 30px rgba(255, 215, 0, 0.04);
}
.cmd-palette-results .search-result-item.active .search-result-title {
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
}

.cmd-palette-empty {
  text-align: center; padding: 50px 30px;
  color: #888;
}
.cmd-palette-empty i {
  font-size: 2.5rem; color: #444; margin-bottom: 16px; display: block;
}
.cmd-palette-empty-title { font-size: 1rem; color: #aaa; margin-bottom: 6px; }
.cmd-palette-empty-hint {
  font-size: 0.85rem; color: #666; margin-bottom: 18px; text-align: center;
}

/* 命令面板 — 最近搜尋 + 熱門 雙列表 */
.cmd-palette-empty-rich { padding: 22px 20px; }
.cmd-palette-section-title {
  font-size: 0.72rem; color: #888; letter-spacing: 1px;
  text-transform: uppercase; margin: 4px 0 10px;
  padding-left: 2px;
}
.cmd-palette-section-title:not(:first-child) { margin-top: 18px; }
.cmd-palette-section-title i { color: var(--accent-gold, #ffc107); }

.cmd-palette-chips {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.cmd-chip {
  display: inline-block; padding: 6px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 215, 0, 0.15);
  border-radius: 20px;
  color: #ccc; font-size: 0.85rem;
  cursor: pointer; transition: all 0.2s;
}
.cmd-chip:hover {
  background: rgba(255, 215, 0, 0.12);
  border-color: rgba(255, 215, 0, 0.5);
  color: #ffd54f;
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.18);
}
.cmd-chip-recent {
  background: rgba(13, 202, 240, 0.06);
  border-color: rgba(13, 202, 240, 0.2);
}
.cmd-chip-recent:hover {
  background: rgba(13, 202, 240, 0.15);
  border-color: rgba(13, 202, 240, 0.5);
  color: #0dcaf0;
}
.cmd-chip-portal {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.06), rgba(255, 152, 0, 0.04));
  border-color: rgba(255, 215, 0, 0.28);
  color: #ffd54f;
}
.cmd-chip-portal:hover {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.18), rgba(255, 152, 0, 0.12));
  border-color: rgba(255, 215, 0, 0.6);
  color: #ffe082;
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.15);
}
.cmd-chip-portal i {
  font-size: 0.65rem;
  opacity: 0.7;
}
.cmd-chip-portal:hover i {
  opacity: 1;
}

.cmd-palette-footer {
  display: flex; align-items: center; gap: 16px;
  padding: 10px 18px;
  border-top: 1px solid rgba(255, 215, 0, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 215, 0, 0.02) 0%, rgba(0, 0, 0, 0.4) 100%);
  font-size: 0.75rem; color: #888;
}
.cmd-palette-footer kbd {
  display: inline-block; padding: 2px 6px; margin-right: 4px;
  background: rgba(255, 215, 0, 0.06);
  border: 1px solid rgba(255, 215, 0, 0.18);
  border-radius: 3px; color: #ffc107;
  font-family: 'Oswald', "Noto Sans TC","Microsoft JhengHei","PingFang TC", sans-serif; font-size: 0.7rem;
  min-width: 18px; text-align: center;
  box-shadow: 0 1px 0 rgba(255, 215, 0, 0.06) inset;
}
.cmd-palette-count {
  margin-left: auto;
  color: var(--accent-gold, #ffc107);
  font-weight: 600;
  font-family: 'Oswald', "Noto Sans TC","Microsoft JhengHei","PingFang TC", sans-serif;
  letter-spacing: 0.5px;
}

.search-badge-quest { background: rgba(255, 99, 132, 0.2); color: #ff6384; }
.search-badge-portal {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.18), rgba(255, 152, 0, 0.18));
  color: #ffd54f;
  border: 1px solid rgba(255, 215, 0, 0.3);
}

/* 命令面板 — 降低動畫偏好（a11y / 低階機友善）*/
@media (prefers-reduced-motion: reduce) {
  /* 粒子完全隱藏（純裝飾，無功能損失）*/
  .cmd-palette-particles { display: none !important; }

  /* 移除所有循環動畫，靜態樣式保留 */
  .palette-corner,
  .cmd-palette,
  .cmd-palette::before,
  .cmd-palette-results .search-result-item {
    animation: none !important;
  }

  /* 入場仍保留簡單淡入（無 slide/scale）*/
  .cmd-palette {
    animation: cmdFadeIn 0.15s ease-out !important;
  }

  /* chip hover 仍微動但不放大 */
  .cmd-chip:hover {
    transform: none;
    box-shadow: none;
  }

  /* 遮罩 backdrop-filter 也降低 */
  .cmd-palette-overlay {
    animation: none !important;
    backdrop-filter: blur(4px);
  }
}

/* 命令面板 — 手機版 */
@media (max-width: 575.98px) {
  .cmd-palette-overlay { padding: 30px 10px 10px; }
  .cmd-palette { max-width: 100%; max-height: calc(100vh - 60px); }
  .cmd-palette-brand { padding: 8px 14px 7px; }
  .cmd-palette-brand-mark { font-size: 0.9rem; }
  .cmd-palette-brand-sub { font-size: 0.65rem; }
  .cmd-palette-header { padding: 12px 14px; }
  .cmd-palette-input { font-size: 1rem; }
  .cmd-palette-footer {
    flex-wrap: wrap; gap: 10px 14px; font-size: 0.7rem; padding: 10px 14px;
  }
  .cmd-palette-empty { padding: 35px 20px; }
  .cmd-palette-empty-rich { padding: 18px 16px; }
  .cmd-palette-empty i { font-size: 2rem; }
  .cmd-palette-results .search-result-item { padding: 12px 14px; }
  .cmd-palette-results .search-result-item.active { padding-left: 18px; }
}
