/* ============================================================
   AGI Hunt — 视觉系统
   1. 设计令牌  2. 基础样式  3. 通用组件  4. 页头页脚
   5. 首页  6. 工具库  7. 详情抽屉  8. 命令面板
   9. 开发者工具  10. 响应式
   ============================================================ */

/* ---------- 1. 设计令牌 ---------- */
:root {
  color-scheme: light;

  --bg: #f6f6f2;
  --bg-elevated: #fbfbf8;
  --surface: #ffffff;
  --surface-2: #f1f1ec;
  --surface-3: #e9e9e3;

  --ink: #14161b;
  --ink-2: #4b505b;
  --ink-3: #868c99;
  --ink-4: #b3b7c0;

  --line: #e3e3dc;
  --line-strong: #d1d1c8;

  --accent: #3d4fe0;
  --accent-hover: #3141c4;
  --accent-soft: #eceefe;
  --accent-ink: #2a37a8;

  --ok: #1a7f5a;
  --ok-soft: #e6f4ee;
  --warn: #a8661a;
  --warn-soft: #fbf1e2;
  --danger: #c03a3a;
  --danger-soft: #fbeaea;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 26px;

  --shadow-xs: 0 1px 2px rgba(20, 22, 27, .04);
  --shadow-sm: 0 2px 8px rgba(20, 22, 27, .05);
  --shadow-md: 0 12px 32px -12px rgba(20, 22, 27, .18);
  --shadow-lg: 0 28px 70px -24px rgba(20, 22, 27, .28);

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, "JetBrains Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  --header-h: 64px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --blur-bg: rgba(246, 246, 242, .82);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e0f12;
  --bg-elevated: #121418;
  --surface: #16181d;
  --surface-2: #1c1f25;
  --surface-3: #24272e;

  --ink: #f1f2f4;
  --ink-2: #b0b6c1;
  --ink-3: #7f8794;
  --ink-4: #5a616d;

  --line: #262a31;
  --line-strong: #363b45;

  --accent: #8494ff;
  --accent-hover: #9aa7ff;
  --accent-soft: rgba(132, 148, 255, .12);
  --accent-ink: #c3cbff;

  --ok: #4fd1a1;
  --ok-soft: rgba(79, 209, 161, .12);
  --warn: #e0b070;
  --warn-soft: rgba(224, 176, 112, .12);
  --danger: #ff8b8b;
  --danger-soft: rgba(255, 139, 139, .12);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, .45);
  --shadow-md: 0 14px 36px -14px rgba(0, 0, 0, .7);
  --shadow-lg: 0 32px 80px -28px rgba(0, 0, 0, .8);
  --blur-bg: rgba(14, 15, 18, .82);
}

/* ---------- 2. 基础样式 ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body.no-scroll { overflow: hidden; }

h1, h2, h3, h4 { margin: 0; font-weight: 650; line-height: 1.25; letter-spacing: -.02em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--accent); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 99px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--ink-4); }

/* ---------- 3. 通用组件 ---------- */
.container {
  width: min(1240px, 100% - 48px);
  margin-inline: auto;
}

.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;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3);
}
.eyebrow::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px;
  border-radius: 10px; border: 1px solid transparent;
  font-size: 14px; font-weight: 550; white-space: nowrap;
  transition: background .18s var(--ease), border-color .18s var(--ease),
              color .18s var(--ease), transform .18s var(--ease), box-shadow .18s var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-hover); }

.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink-2); }
.btn-ghost:hover { border-color: var(--line-strong); color: var(--ink); background: var(--bg-elevated); }

.btn-quiet { background: transparent; color: var(--ink-2); }
.btn-quiet:hover { background: var(--surface-2); color: var(--ink); }

.btn-sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 9px;
  color: var(--ink-2); border: 1px solid transparent;
  transition: background .16s, color .16s, border-color .16s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px;
  border-radius: 99px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2);
  font-size: 12px; white-space: nowrap;
  transition: background .16s, border-color .16s, color .16s;
}
.chip:hover { border-color: var(--line-strong); color: var(--ink); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: var(--bg); }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 11px; font-weight: 550; letter-spacing: .01em;
  background: var(--surface-2); color: var(--ink-2);
}
.badge-free { background: var(--ok-soft); color: var(--ok); }
.badge-paid { background: var(--warn-soft); color: var(--warn); }
.badge-freemium { background: var(--accent-soft); color: var(--accent-ink); }

kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 5px; border: 1px solid var(--line);
  border-bottom-width: 2px;
  background: var(--surface); color: var(--ink-3);
  font-family: var(--font-mono); font-size: 10px; line-height: 1;
}

.mono-mark {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; flex: 0 0 auto;
  border-radius: 10px;
  background: hsl(var(--h) 58% 94%);
  color: hsl(var(--h) 48% 34%);
  font-family: var(--font-mono);
  font-size: 15px; font-weight: 600; letter-spacing: -.02em;
  border: 1px solid hsl(var(--h) 40% 88%);
  user-select: none;
}
html[data-theme="dark"] .mono-mark {
  background: hsl(var(--h) 30% 19%);
  color: hsl(var(--h) 70% 78%);
  border-color: hsl(var(--h) 25% 26%);
}
.mono-mark.is-lg { width: 52px; height: 52px; border-radius: 13px; font-size: 18px; }
.mono-mark.is-sm { width: 30px; height: 30px; border-radius: 8px; font-size: 12px; }

/* 站点图标：覆盖在首字色块之上，加载失败时自动退回首字 */
.logo-initial { line-height: 1; }
.tool-logo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  padding: 15%;
  background: #f4f5f7;
  object-fit: contain;
  border-radius: inherit;
  opacity: 0;
  transition: opacity .18s var(--ease);
}
.tool-logo.is-loaded { opacity: 1; }

/* 分类图标 */
.cat-ico {
  width: 16px; height: 16px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  color: hsl(var(--h) 52% 44%);
}
.cat-ico svg {
  width: 100%; height: 100%;
  fill: none; stroke: currentColor; stroke-width: 1.9;
  stroke-linecap: round; stroke-linejoin: round;
}
.cat-ico.is-xs { width: 13px; height: 13px; }
.cat-ico.is-inline { width: 14px; height: 14px; vertical-align: -3px; margin-right: 5px; }
html[data-theme="dark"] .cat-ico { color: hsl(var(--h) 62% 70%); }
.filter-item.is-on .cat-ico { color: inherit; }
.active-filters .chip .cat-ico { color: inherit; }

/* 分区 */
.section { padding: 64px 0; }
.section + .section { padding-top: 0; }

/* ---------- 4. 页头 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  height: var(--header-h);
  background: var(--blur-bg);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  height: 100%; display: flex; align-items: center; gap: 28px;
}
.brand {
  display: inline-flex; align-items: center; gap: 11px;
  font-size: 16px; font-weight: 600; letter-spacing: -.035em;
  flex: 0 0 auto;
}
/* 标记：环 + 点。环是索引，点是选中项，缺口给点让位。裸标记，不套容器。 */
.brand-mark {
  --logo-dot: var(--accent);
  width: 30px; height: 30px; flex: 0 0 auto;
  display: block;
  color: var(--ink);
  transition: transform .42s var(--ease), color .2s var(--ease);
}
.brand-mark svg { width: 100%; height: 100%; }
.brand:hover .brand-mark { color: var(--accent); transform: rotate(30deg); }
.brand-sub {
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 400;
  color: var(--ink-3); letter-spacing: .1em; text-transform: uppercase;
  padding-left: 10px; margin-left: 2px;
  border-left: 1px solid var(--line);
}

.nav { display: flex; align-items: center; gap: 4px; margin-left: 10px; }
.nav a {
  position: relative;
  padding: 7px 12px; border-radius: 8px;
  font-size: 14px; color: var(--ink-2);
  transition: color .16s, background .16s;
}
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 550; }
.nav a[aria-current="page"]::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: 1px;
  height: 2px; border-radius: 2px; background: var(--accent);
}
.header-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }

.search-trigger {
  display: inline-flex; align-items: center; gap: 10px;
  height: 34px; padding: 0 8px 0 11px;
  border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface);
  color: var(--ink-3); font-size: 13px;
  transition: border-color .16s, color .16s, background .16s;
}
.search-trigger:hover { border-color: var(--line-strong); color: var(--ink-2); }
.search-trigger svg { width: 15px; height: 15px; }
.search-trigger .kbd-group { display: flex; gap: 3px; margin-left: 14px; }

.nav-toggle { display: none; }

/* 移动端菜单 */
.mobile-nav {
  position: fixed; inset: var(--header-h) 0 auto 0; z-index: 55;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--line);
  padding: 10px 24px 20px;
  display: none;
  box-shadow: var(--shadow-md);
}
.mobile-nav.is-open { display: block; animation: slideDown .22s var(--ease); }
.mobile-nav a {
  display: block; padding: 12px 4px;
  font-size: 16px; color: var(--ink-2);
  border-bottom: 1px solid var(--line);
}
.mobile-nav a:last-child { border-bottom: 0; }
.mobile-nav a[aria-current="page"] { color: var(--accent); }

@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- 5. 首页（工具库） ---------- */
.search-inline {
  display: flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 12px; min-width: 300px;
  border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface);
  transition: border-color .16s, box-shadow .16s;
}
.search-inline:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-inline svg { width: 15px; height: 15px; color: var(--ink-3); flex: 0 0 auto; }
.search-inline input {
  flex: 1; min-width: 0; height: 100%; border: 0; background: none;
  outline: none; font-size: 13px;
}
.search-inline input::placeholder { color: var(--ink-4); }

/* 工具卡片 */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(292px, 1fr));
  gap: 12px;
}
.tool-card {
  position: relative;
  display: flex; flex-direction: column;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform .2s var(--ease), border-color .2s, box-shadow .2s, background .2s;
}
.tool-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}
.tool-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tc-top { display: flex; align-items: flex-start; gap: 11px; }
.tc-id { min-width: 0; flex: 1; }
.tc-id h3 {
  font-size: 15px; font-weight: 600; letter-spacing: -.01em;
  display: flex; align-items: center; gap: 6px;
  min-width: 0;
}
.tc-title {
  font: inherit; color: inherit; letter-spacing: inherit;
  padding: 0; border: 0; background: none; text-align: left; cursor: pointer;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  border-radius: 4px;
}
.tc-title:hover { color: var(--accent); }
.tc-id .vendor {
  font-size: 12px; color: var(--ink-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tc-desc {
  margin-top: 12px; font-size: 13px; line-height: 1.65; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.tc-tags { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 5px; }
.tc-tags span {
  font-size: 11px; color: var(--ink-3);
  background: var(--surface-2); border-radius: 5px;
  padding: 2px 7px; line-height: 1.5;
}
.tc-foot {
  margin-top: 16px; padding-top: 13px;
  border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
}
.tc-foot .visit {
  font-size: 12.5px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 4px;
  transition: color .16s;
}
.tc-foot .visit svg { width: 13px; height: 13px; }
.tool-card:hover .tc-foot .visit { color: var(--accent); }
.fav-btn {
  width: 26px; height: 26px; border-radius: 6px;
  display: grid; place-items: center;
  color: var(--ink-4); flex: 0 0 auto;
  transition: color .16s, background .16s;
}
.fav-btn:hover { color: var(--ink); background: var(--surface-2); }
.fav-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.fav-btn.is-on { color: var(--accent); }
.fav-btn.is-on svg { fill: var(--accent); stroke: var(--accent); }

/* 列表视图 */
.tool-grid.is-list { grid-template-columns: 1fr; gap: 8px; }
.tool-grid.is-list .tool-card {
  flex-direction: row; align-items: center; gap: 16px;
  padding: 14px 18px;
}
.tool-grid.is-list .tc-top { flex: 0 0 240px; align-items: center; }
.tool-grid.is-list .tc-desc {
  margin: 0; flex: 1; -webkit-line-clamp: 1;
  padding-right: 8px;
}
.tool-grid.is-list .tc-tags { display: none; }
.tool-grid.is-list .tc-foot {
  margin: 0; padding: 0; border: 0; flex: 0 0 auto; gap: 16px;
}
.tool-grid.is-list .fav-btn { order: -1; }

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-elevated);
  padding: 52px 0 32px;
  margin-top: 40px;
}
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-brand p { margin-top: 14px; font-size: 13px; line-height: 1.7; color: var(--ink-3); max-width: 34ch; }
.footer-col h4 {
  font-size: 11px; font-family: var(--font-mono); letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-3); font-weight: 500;
}
.footer-col ul { margin-top: 14px; display: grid; gap: 9px; }
.footer-col a { font-size: 13px; color: var(--ink-2); transition: color .16s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  margin-top: 40px; padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 12px; color: var(--ink-4);
}
.footer-bottom .mono { font-family: var(--font-mono); letter-spacing: .02em; }

/* ---------- 6. 工具库 ---------- */
.page-head {
  padding: 44px 0 26px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-elevated);
}
.page-head h1 { font-size: clamp(26px, 3.4vw, 34px); letter-spacing: -.03em; }
.page-head .eyebrow { margin-bottom: 12px; }
.page-head p { margin-top: 8px; color: var(--ink-3); font-size: 14px; max-width: 60ch; }
.page-head-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }

.browse { display: grid; grid-template-columns: 216px 1fr; gap: 36px; padding: 30px 0 80px; align-items: start; }

.filters {
  position: sticky; top: calc(var(--header-h) + 24px);
  max-height: calc(100vh - var(--header-h) - 48px);
  overflow-y: auto;
  padding-right: 2px;
}
.filter-group + .filter-group { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.filter-title {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; font-family: var(--font-mono); letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px;
}
.filter-title button { font-size: 10px; color: var(--ink-4); letter-spacing: 0; text-transform: none; }
.filter-title button:hover { color: var(--accent); }
.filter-list { display: grid; gap: 1px; }
.filter-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 9px; border-radius: 7px;
  font-size: 13px; color: var(--ink-2); text-align: left; width: 100%;
  transition: background .14s, color .14s;
}
.filter-item:hover { background: var(--surface-2); color: var(--ink); }
.filter-item .n {
  margin-left: auto; font-family: var(--font-mono); font-size: 10.5px;
  color: var(--ink-4); font-variant-numeric: tabular-nums;
}
.filter-item.is-on { background: var(--ink); color: var(--bg); font-weight: 550; }
.filter-item.is-on .n { color: rgba(255, 255, 255, .55); }
html[data-theme="dark"] .filter-item.is-on .n { color: rgba(0, 0, 0, .45); }

.filter-links { display: flex; flex-wrap: wrap; gap: 6px; }
.price-list { display: grid; gap: 4px; }
.price-item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 6px 9px; border-radius: 7px;
  font-size: 13px; color: var(--ink-2);
  transition: background .14s, color .14s;
}
.price-item:hover { background: var(--surface-2); color: var(--ink); }
.price-item .box {
  width: 14px; height: 14px; border-radius: 4px;
  border: 1px solid var(--line-strong); display: grid; place-items: center;
  flex: 0 0 auto;
}
.price-item.is-on { color: var(--ink); font-weight: 550; }
.price-item.is-on .box { background: var(--accent); border-color: var(--accent); }
.price-item.is-on .box::after {
  content: ''; width: 7px; height: 4px;
  border-left: 1.6px solid #fff; border-bottom: 1.6px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
}

.results-bar {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px; flex-wrap: wrap;
}
.results { min-width: 0; }
.results-count { font-size: 13px; color: var(--ink-3); }
.results-count b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.results-bar .spacer { flex: 1; }
.select-wrap { position: relative; display: inline-flex; align-items: center; }
.select-wrap select {
  appearance: none; -webkit-appearance: none;
  height: 34px; padding: 0 30px 0 11px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); font-size: 12.5px; color: var(--ink-2);
  cursor: pointer;
}
.select-wrap select:hover { border-color: var(--line-strong); }
.select-wrap::after {
  content: ''; position: absolute; right: 12px; top: 50%;
  width: 5px; height: 5px; margin-top: -3px;
  border-right: 1.5px solid var(--ink-3); border-bottom: 1.5px solid var(--ink-3);
  transform: rotate(45deg); pointer-events: none;
}
.view-toggle {
  display: inline-flex; padding: 2px; gap: 2px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
}
.view-toggle button {
  width: 28px; height: 28px; border-radius: 6px;
  display: grid; place-items: center; color: var(--ink-4);
}
.view-toggle button:hover { color: var(--ink); }
.view-toggle button.is-on { background: var(--surface-2); color: var(--ink); }
.view-toggle svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.active-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.active-filters .chip { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); }
.active-filters .chip > svg { width: 11px; height: 11px; }

.empty {
  padding: 72px 24px; text-align: center;
  border: 1px dashed var(--line-strong); border-radius: var(--radius-lg);
  background: var(--bg-elevated);
}
.empty svg { width: 40px; height: 40px; margin: 0 auto 14px; color: var(--ink-4); stroke-width: 1.3; fill: none; stroke: currentColor; }
.empty h3 { font-size: 16px; }
.empty p { margin: 8px auto 20px; font-size: 13px; color: var(--ink-3); max-width: 40ch; }

/* 筛选抽屉（移动端） */
.filter-toggle { display: none; }
.filter-sheet-head { display: none; }

/* ---------- 7. 详情抽屉 ---------- */
.drawer-backdrop {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(12, 14, 18, .38);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none;
  transition: opacity .26s var(--ease);
}
.drawer-backdrop.is-open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 91;
  width: min(480px, 100%);
  background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  transform: translateX(102%);
  visibility: hidden;
  transition: transform .32s var(--ease), visibility 0s linear .32s;
  display: flex; flex-direction: column;
}
.drawer.is-open {
  transform: none; visibility: visible;
  transition: transform .32s var(--ease), visibility 0s;
}
.drawer-head {
  padding: 18px 22px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px;
}
.drawer-head .label { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); flex: 1; }
.drawer-body { padding: 26px 22px 32px; overflow-y: auto; flex: 1; }
.drawer-hero { display: flex; align-items: center; gap: 14px; }
.drawer-hero h2 { font-size: 24px; letter-spacing: -.03em; }
.drawer-hero .vendor { font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.drawer-tagline { margin-top: 18px; font-size: 15px; color: var(--ink); font-weight: 500; line-height: 1.6; }
.drawer-desc { margin-top: 10px; font-size: 14px; line-height: 1.78; color: var(--ink-2); }
.drawer-meta {
  margin-top: 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--line);
  border-radius: 10px; overflow: hidden;
}
.drawer-meta > div { background: var(--surface); padding: 13px 14px; }
.drawer-meta dt { font-size: 11px; color: var(--ink-3); }
.drawer-meta dd { margin: 3px 0 0; font-size: 13px; font-weight: 500; }
.drawer-actions { margin-top: 20px; display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.drawer-sub { margin-top: 30px; }
.drawer-sub h4 {
  font-size: 11px; font-family: var(--font-mono); letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3); font-weight: 500; margin-bottom: 10px;
}
.alt-list { display: grid; gap: 2px; }
.alt-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 8px; border-radius: 8px; width: 100%; text-align: left;
  transition: background .14s;
}
.alt-item:hover { background: var(--surface-2); }
.alt-item .t { font-size: 13px; font-weight: 500; }
.alt-item .v { font-size: 11.5px; color: var(--ink-3); }
.alt-item svg { width: 14px; height: 14px; color: var(--ink-4); margin-left: auto; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- 8. 命令面板 ---------- */
.palette-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(12, 14, 18, .42);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  display: none; align-items: flex-start; justify-content: center;
  padding-top: 12vh;
}
.palette-backdrop.is-open { display: flex; animation: fadeIn .18s var(--ease); }
.palette {
  width: min(600px, calc(100vw - 32px));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: paletteIn .22s var(--ease);
}
.palette-input {
  display: flex; align-items: center; gap: 12px;
  padding: 0 18px; border-bottom: 1px solid var(--line);
}
.palette-input svg { width: 18px; height: 18px; color: var(--ink-3); flex: 0 0 auto; }
.palette-input input {
  flex: 1; height: 56px; border: 0; background: none; outline: none; font-size: 15px;
}
.palette-input kbd { flex: 0 0 auto; }
.palette-results { max-height: 52vh; overflow-y: auto; padding: 8px; }
.palette-group-label {
  padding: 8px 10px 5px; font-size: 10px; font-family: var(--font-mono);
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-4);
}
.palette-item {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 9px 10px; border-radius: 9px; text-align: left;
  color: var(--ink-2);
}
.palette-item .pi-main { min-width: 0; flex: 1; }
.palette-item .pi-main strong { display: block; font-size: 13.5px; font-weight: 550; color: var(--ink); }
.palette-item .pi-main span { display: block; font-size: 11.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-item .pi-kind {
  font-family: var(--font-mono); font-size: 10px; color: var(--ink-4);
  border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; flex: 0 0 auto;
}
.palette-item.is-active { background: var(--accent-soft); }
.palette-item.is-active .pi-main strong { color: var(--accent-ink); }
.palette-foot {
  border-top: 1px solid var(--line); padding: 9px 16px;
  display: flex; gap: 16px; font-size: 11px; color: var(--ink-3);
  background: var(--bg-elevated);
}
.palette-foot span { display: inline-flex; align-items: center; gap: 5px; }
.palette-empty { padding: 36px 16px; text-align: center; color: var(--ink-3); font-size: 13px; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes paletteIn { from { opacity: 0; transform: translateY(-10px) scale(.99); } to { opacity: 1; transform: none; } }

/* ---------- 9. 开发者工具 ---------- */
.dev-shell { padding: 34px 0 80px; display: grid; grid-template-columns: 232px 1fr; gap: 32px; align-items: start; }
.dev-nav {
  position: sticky; top: calc(var(--header-h) + 24px);
  max-height: calc(100vh - var(--header-h) - 48px);
  overflow-y: auto;
  padding-right: 2px;
}
.dev-nav-title {
  font-size: 11px; font-family: var(--font-mono); letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3); margin: 0 0 10px 9px;
}
.dev-nav-group + .dev-nav-group { margin-top: 20px; }
.dev-nav-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 9px; border-radius: 8px; text-align: left;
  color: var(--ink-2); font-size: 13px;
  transition: background .14s, color .14s;
}
.dev-nav-item:hover { background: var(--surface-2); color: var(--ink); }
.dev-nav-item .b {
  width: 26px; height: 22px; flex: 0 0 auto;
  display: grid; place-items: center; border-radius: 5px;
  font-family: var(--font-mono); font-size: 9.5px;
  background: var(--surface-2); color: var(--ink-3);
}
.dev-nav-item.is-on { background: var(--ink); color: var(--bg); }
.dev-nav-item.is-on .b { background: rgba(255, 255, 255, .16); color: #fff; }
html[data-theme="dark"] .dev-nav-item.is-on .b { background: rgba(0, 0, 0, .3); }
.dev-note {
  margin-top: 24px; padding: 12px 13px;
  border-radius: 9px; border: 1px solid var(--line);
  background: var(--bg-elevated);
  font-size: 11.5px; line-height: 1.7; color: var(--ink-3);
}

.dev-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-width: 0;
  min-height: 520px;
  animation: fadeUp .3s var(--ease);
}
.dev-panel-head {
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap;
}
.dev-panel-head .t { flex: 1; min-width: 200px; }
.dev-panel-head h2 { font-size: 19px; letter-spacing: -.02em; display: flex; align-items: center; gap: 9px; }
.dev-panel-head h2 .tag {
  font-family: var(--font-mono); font-size: 10px; font-weight: 500;
  padding: 2px 6px; border-radius: 4px;
  background: var(--accent-soft); color: var(--accent-ink);
  letter-spacing: .02em;
}
.dev-panel-head p { margin-top: 5px; font-size: 13px; color: var(--ink-3); }
.dev-panel-body { padding: 22px 24px 26px; }

.dev-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.dev-grid.is-single { grid-template-columns: 1fr; }

.field { display: flex; flex-direction: column; min-width: 0; }
.field-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
  min-height: 26px;
}
.field-head label {
  font-size: 11px; font-family: var(--font-mono); letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-3);
}
.field-head .spacer { flex: 1; }
.field-actions { display: flex; align-items: center; gap: 4px; }

textarea.input-area,
input.input-line,
select.input-select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-elevated);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12.5px; line-height: 1.7;
  padding: 12px 13px;
  outline: none;
  transition: border-color .16s, box-shadow .16s, background .16s;
}
textarea.input-area { resize: vertical; min-height: 220px; }
textarea.input-area:focus,
input.input-line:focus,
select.input-select:focus {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
textarea.input-area::placeholder, input.input-line::placeholder { color: var(--ink-4); }
input.input-line { height: 40px; padding: 0 13px; }
select.input-select {
  height: 36px; padding: 0 30px 0 11px; font-family: var(--font-sans);
  font-size: 13px; appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%),
                    linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 15px) 15px, calc(100% - 10px) 15px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  background-color: var(--bg-elevated);
}

.code-out {
  margin: 0; padding: 13px;
  min-height: 220px; max-height: 460px;
  overflow: auto;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg-elevated);
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.7;
  white-space: pre-wrap; word-break: break-word;
  color: var(--ink-2);
}
.code-out.is-compact { min-height: 0; max-height: none; }

.status-line {
  display: flex; align-items: center; gap: 8px;
  margin-top: 8px; font-size: 11.5px; color: var(--ink-3);
  min-height: 18px;
}
.status-line .st {
  width: 6px; height: 6px; border-radius: 50%; background: var(--ink-4); flex: 0 0 auto;
}
.status-line.ok .st { background: var(--ok); }
.status-line.err .st { background: var(--danger); }
.status-line.ok { color: var(--ok); }
.status-line.err { color: var(--danger); }

.seg {
  display: inline-flex; padding: 2px; gap: 2px;
  background: var(--surface-2); border-radius: 8px;
}
.seg button {
  height: 26px; padding: 0 11px; border-radius: 6px;
  font-size: 12px; color: var(--ink-3);
  transition: background .14s, color .14s, box-shadow .14s;
}
.seg button.is-on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-xs); font-weight: 550; }

.check-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; }
.check {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--ink-2); cursor: pointer;
}
.check input { accent-color: var(--accent); width: 14px; height: 14px; margin: 0; }

.kv-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.kv-table tr { border-bottom: 1px solid var(--line); }
.kv-table tr:last-child { border-bottom: 0; }
.kv-table th {
  text-align: left; font-weight: 500; color: var(--ink-3);
  padding: 9px 10px 9px 0; width: 104px; vertical-align: top;
  font-family: var(--font-mono); font-size: 11px;
}
.kv-table td { padding: 9px 0; color: var(--ink); word-break: break-all; }
.kv-table td .copy-mini {
  margin-left: 6px; color: var(--ink-4); font-size: 10.5px;
}
.kv-table td .copy-mini:hover { color: var(--accent); }

.swatch-row { display: flex; align-items: center; gap: 14px; }
.swatch {
  width: 84px; height: 84px; border-radius: 12px; flex: 0 0 auto;
  border: 1px solid var(--line); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.shade-strip { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; margin-top: 14px; }
.shade-strip button {
  height: 34px; border-radius: 6px; border: 1px solid rgba(0, 0, 0, .06);
  position: relative;
}
.shade-strip button span {
  position: absolute; inset: auto 0 2px 0; text-align: center;
  font-family: var(--font-mono); font-size: 8.5px;
}

.match-list { display: grid; gap: 6px; max-height: 260px; overflow: auto; }
.match-item {
  display: flex; gap: 10px; padding: 8px 10px; border-radius: 7px;
  background: var(--bg-elevated); border: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 11.5px;
}
.match-item .idx { color: var(--ink-4); flex: 0 0 auto; }
.match-item .val { word-break: break-all; }
.match-item mark { background: var(--accent-soft); color: var(--accent-ink); border-radius: 3px; padding: 0 2px; }
.preview-area {
  border: 1px solid var(--line); border-radius: 10px;
  padding: 16px 18px; background: var(--surface);
  min-height: 220px; max-height: 460px; overflow: auto;
  font-size: 14px; line-height: 1.75;
}
.preview-area h1, .preview-area h2, .preview-area h3 { margin: 1.1em 0 .5em; }
.preview-area h1 { font-size: 24px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.preview-area h2 { font-size: 19px; }
.preview-area h3 { font-size: 16px; }
.preview-area > :first-child { margin-top: 0; }
.preview-area p { margin: .7em 0; }
.preview-area ul, .preview-area ol { margin: .7em 0; padding-left: 1.4em; }
.preview-area ul { list-style: disc; }
.preview-area ol { list-style: decimal; }
.preview-area li { margin: .25em 0; }
.preview-area code {
  font-family: var(--font-mono); font-size: .86em;
  background: var(--surface-2); padding: .15em .4em; border-radius: 4px;
}
.preview-area pre {
  background: var(--surface-2); padding: 13px; border-radius: 8px;
  overflow: auto; margin: .9em 0;
}
.preview-area pre code { background: none; padding: 0; font-size: 12px; }
.preview-area blockquote {
  margin: .8em 0; padding: 2px 0 2px 14px;
  border-left: 3px solid var(--accent); color: var(--ink-2);
}
.preview-area a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.preview-area table { border-collapse: collapse; width: 100%; margin: .8em 0; font-size: 13px; }
.preview-area th, .preview-area td { border: 1px solid var(--line); padding: 6px 9px; text-align: left; }
.preview-area hr { border: 0; border-top: 1px solid var(--line); margin: 1.2em 0; }

.diff-out { font-family: var(--font-mono); font-size: 12px; line-height: 1.65; white-space: pre-wrap; }
.diff-line { display: flex; gap: 10px; padding: 1px 6px; border-radius: 3px; }
.diff-line .sign { width: 10px; flex: 0 0 auto; color: var(--ink-4); user-select: none; }
.diff-add { background: var(--ok-soft); }
.diff-add .sign { color: var(--ok); }
.diff-del { background: var(--danger-soft); }
.diff-del .sign { color: var(--danger); }
.diff-same { color: var(--ink-3); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.stat-box {
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--bg-elevated);
}
.stat-box .lb { font-size: 11px; color: var(--ink-3); }
.stat-box .vl {
  display: block; margin-top: 3px;
  font-size: 20px; font-weight: 600; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.stat-box .vl.is-text { font-size: 14px; font-weight: 500; letter-spacing: 0; }

.notice {
  display: flex; gap: 10px; padding: 10px 12px;
  border-radius: 8px; background: var(--warn-soft);
  color: var(--warn); font-size: 11.5px; line-height: 1.6;
  margin-top: 14px;
}
.notice svg { width: 14px; height: 14px; flex: 0 0 auto; margin-top: 1px; }

/* ---------- Toast ---------- */
.toast-root {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  z-index: 200; display: flex; flex-direction: column; gap: 8px;
  align-items: center; pointer-events: none;
}
.toast {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 99px;
  background: var(--ink); color: var(--bg);
  font-size: 12.5px; box-shadow: var(--shadow-lg);
  animation: toastIn .22s var(--ease);
}
.toast svg { width: 14px; height: 14px; }
.toast.is-out { animation: toastOut .2s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(6px); } }

/* ---------- 关于页 ---------- */
.prose { max-width: 720px; }
.prose h2 { font-size: 20px; margin: 38px 0 12px; }
.prose h2:first-child { margin-top: 0; }
.prose p { margin: 10px 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.8; }
.prose ul { margin: 12px 0; padding-left: 18px; list-style: disc; color: var(--ink-2); font-size: 14.5px; line-height: 1.8; }
.prose li { margin: 5px 0; }
.prose code { font-family: var(--font-mono); font-size: 12.5px; background: var(--surface-2); padding: 2px 6px; border-radius: 4px; }
.prose strong { color: var(--ink); font-weight: 600; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 22px 0 8px; }
.info-card { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.info-card h3 { font-size: 14px; margin-bottom: 6px; }
.info-card p { font-size: 12.5px; color: var(--ink-3); line-height: 1.7; }

/* 动画 */
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.page-enter { animation: fadeUp .32s var(--ease); }
.stagger > * { animation: fadeUp .38s var(--ease) both; }
.stagger > *:nth-child(1) { animation-delay: .01s; }
.stagger > *:nth-child(2) { animation-delay: .035s; }
.stagger > *:nth-child(3) { animation-delay: .06s; }
.stagger > *:nth-child(4) { animation-delay: .085s; }
.stagger > *:nth-child(5) { animation-delay: .11s; }
.stagger > *:nth-child(6) { animation-delay: .135s; }
.stagger > *:nth-child(7) { animation-delay: .16s; }
.stagger > *:nth-child(8) { animation-delay: .185s; }
.stagger > *:nth-child(9) { animation-delay: .21s; }
.stagger > *:nth-child(10) { animation-delay: .235s; }
.stagger > *:nth-child(11) { animation-delay: .26s; }
.stagger > *:nth-child(12) { animation-delay: .285s; }

/* ---------- 10. 响应式 ---------- */
@media (max-width: 1080px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-grid .footer-col:last-child { display: none; }
  .browse { grid-template-columns: 190px 1fr; gap: 26px; }
  .dev-shell { grid-template-columns: 200px 1fr; gap: 24px; }
}

@media (max-width: 900px) {
  .nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .header-actions { margin-left: auto; }
  .search-trigger .kbd-group { display: none; }
  .search-trigger { width: 34px; padding: 0; justify-content: center; }
  .search-trigger .st-label { display: none; }

  .browse { grid-template-columns: 1fr; gap: 0; }
  .search-inline { min-width: 0; flex: 1; }
  .filters {
    position: fixed; inset: auto 0 0 0; z-index: 95;
    background: var(--surface);
    border-radius: 20px 20px 0 0;
    padding: 8px 20px 28px;
    max-height: 82vh; overflow-y: auto;
    transform: translateY(102%);
    visibility: hidden;
    transition: transform .3s var(--ease), visibility 0s linear .3s;
    box-shadow: var(--shadow-lg);
    display: block;
  }
  .filters.is-open {
    transform: none; visibility: visible;
    transition: transform .3s var(--ease), visibility 0s;
  }
  .filter-sheet-head {
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: -8px; background: var(--surface);
    margin: 0 -20px 14px; padding: 14px 20px 12px;
    border-bottom: 1px solid var(--line);
    z-index: 2;
  }
  .filter-sheet-head h3 { font-size: 16px; }
  .filter-toggle { display: inline-flex; }
  .filter-scrim {
    position: fixed; inset: 0; z-index: 94;
    background: rgba(12, 14, 18, .38);
    display: none;
  }
  .filter-scrim.is-open { display: block; animation: fadeIn .2s; }

  .dev-shell { grid-template-columns: 1fr; }
  .dev-nav {
    position: static;
    display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px;
    max-height: none;
    scrollbar-width: none;
  }
  .dev-nav::-webkit-scrollbar { display: none; }
  .dev-nav-title { display: none; }
  .dev-nav-group { display: contents; }
  .dev-nav-item { flex: 0 0 auto; padding: 7px 11px; border: 1px solid var(--line); background: var(--surface); }
  .dev-nav-item .name { display: inline; }
  .dev-note { display: none; }

  .dev-grid { grid-template-columns: 1fr; }
  .tool-grid.is-list .tc-top { flex-basis: 200px; }
  .tool-grid.is-list .tc-desc { display: none; }
}

@media (max-width: 720px) {
  .container { width: calc(100% - 32px); }
  .brand-sub { display: none; }
  .section { padding: 46px 0; }

  .tool-grid { grid-template-columns: 1fr; }
  .tool-grid.is-list .tool-card { flex-direction: column; align-items: stretch; gap: 10px; padding: 16px; }
  .tool-grid.is-list .tc-top { flex: 1 1 auto; width: 100%; }
  .tool-grid.is-list .tc-desc { display: -webkit-box; -webkit-line-clamp: 2; }
  .tool-grid.is-list .tc-foot { justify-content: space-between; padding-top: 11px; border-top: 1px solid var(--line); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-grid .footer-col:last-child { display: block; }
  .footer-bottom { flex-direction: column; gap: 8px; }

  .page-head { padding: 30px 0 20px; }
  .page-head-top { flex-direction: column; align-items: stretch; gap: 16px; }
  .results-bar { gap: 8px; }
  .results-count { order: 3; width: 100%; }
  .search-inline input, #palette-input { font-size: 16px; }
  textarea.input-area, input.input-line { font-size: 16px; }

  .drawer { width: 100%; border-left: 0; }
  .drawer-body { padding: 22px 18px 30px; }

  .dev-panel-head { padding: 18px; }
  .dev-panel-body { padding: 18px; }
  textarea.input-area { min-height: 160px; }
  .code-out { min-height: 160px; max-height: 340px; }
  .shade-strip { grid-template-columns: repeat(4, 1fr); }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .toast-root { bottom: 18px; width: calc(100% - 32px); }
  .toast { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
