/* ═══════════════════════════════════════════════════
   不打烊的杂货铺 — Design System v8
   ═══════════════════════════════════════════════════ */

/* ── Design Tokens ── */
:root {
  --bg: #F8F5EF;
  --bg-alt: #F0EDE7;
  --surface: #FFFFFF;
  --surface-hover: #F8F5EF;
  --brand: #6B4F3A;
  --brand-soft: rgba(107,79,58,0.08);
  --brand-glow: rgba(107,79,58,0.05);
  --ai-color: #5b6fcf;
  --ai-bg: rgba(91,111,207,0.08);
  --axure-color: #4a9e6b;
  --axure-bg: rgba(74,158,107,0.08);
  --sidebar-bg: #F8F5EF;
  --sidebar-border: #EAE5DD;
  --sidebar-hover: rgba(107,79,58,0.06);
  --border: #EAE5DD;
  --border-light: #F0EDE7;
  --text-strong: #222;
  --text-primary: #333;
  --text-secondary: #777;
  --text-muted: #999;
  --shadow-sm: 0 1px 4px rgba(107,79,58,0.06);
  --shadow-md: 0 2px 8px rgba(107,79,58,0.08);
  --shadow-lg: 0 4px 16px rgba(107,79,58,0.10);
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;
  --transition: 180ms ease;
  --sidebar-w: 64px;
  --rightbar-w: 260px;
}

/* ── Dark Theme ── */
[data-theme="dark"] {
  --bg: #1E1C19;
  --bg-alt: #252320;
  --surface: #2D2A26;
  --surface-hover: #35322E;
  --brand: #D4B89A;
  --brand-soft: rgba(212,184,154,0.08);
  --brand-glow: rgba(212,184,154,0.05);
  --ai-color: #8b9cf0;
  --ai-bg: rgba(139,156,240,0.1);
  --axure-color: #6dbd8a;
  --axure-bg: rgba(109,189,138,0.1);
  --sidebar-bg: #1E1C19;
  --sidebar-border: #3A3632;
  --sidebar-hover: rgba(212,184,154,0.08);
  --border: #3A3632;
  --border-light: #2E2B28;
  --text-strong: #EAE5DD;
  --text-primary: #D4CFC7;
  --text-secondary: #999;
  --text-muted: #777;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.15);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.2);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.25);
}

/* ═══════════════════════════════════════════════════
   Reset & Base
   ═══════════════════════════════════════════════════ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 16px; }
body {
  font-family: "Noto Sans SC", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text-primary); line-height: 1.6;
  -webkit-font-smoothing: antialiased; font-size: 14px;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 2px; }

.container { max-width: calc(76vw); margin: 0 auto; padding: 0 24px; }

/* ═══════════════════════════════════════════════════
   Layout
   ═══════════════════════════════════════════════════ */

.app-layout { display: flex; min-height: 100vh; }

/* ── Left Sidebar ── */
.sidebar {
  width: var(--sidebar-w); min-width: var(--sidebar-w);
  height: 100vh; position: fixed; top: 0; left: 0; z-index: 100;
  background: var(--sidebar-bg); border-right: 1px solid var(--sidebar-border);
  display: flex; flex-direction: column;
  transition: background var(--transition), border-color var(--transition);
}
.sidebar-brand { display: flex; justify-content: center; padding: 16px 0 8px; }
.sidebar-logo-svg { color: var(--brand); margin: 8px 0 8px; }

.sidebar-nav { flex: 1; padding: 0 10px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; }
.sidebar-nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 4px; border-radius: var(--radius-sm);
  font-size: 11px; font-weight: 400; color: var(--text-muted);
  transition: all var(--transition);
}
.sidebar-nav-item:hover { background: var(--sidebar-hover); color: var(--text-primary); }
.sidebar-nav-item.active { color: var(--brand); }
.nav-icon { display: flex; align-items: center; justify-content: center; }
.nav-icon i { font-size: 18px; }
.nav-label { line-height: 1; }

/* ── Mobile Header ── */
.mobile-header { display: none; position: fixed; top: 0; left: 0; right: 0; z-index: 90; height: 56px; background: var(--sidebar-bg); border-bottom: 1px solid var(--sidebar-border); align-items: center; justify-content: space-between; padding: 0 16px; }
.mobile-menu-btn { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius); color: var(--text-primary); }
.mobile-brand { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.mobile-theme-toggle { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius); color: var(--text-secondary); }
.mobile-theme-toggle .icon-sun { display: none; }
.mobile-theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .mobile-theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .mobile-theme-toggle .icon-moon { display: none; }
.sidebar-overlay { display: none; position: fixed; inset: 0; z-index: 95; background: rgba(0,0,0,0.35); opacity: 0; pointer-events: none; transition: opacity var(--transition); }
.sidebar-overlay.show { opacity: 1; pointer-events: auto; }

/* ── Main Content ── */
.main-content { margin-left: var(--sidebar-w); flex: 1; min-width: 0; }

/* ── Right Sidebar ── */
.right-sidebar {
  width: var(--rightbar-w); min-width: var(--rightbar-w);
  padding: 166px 16px 24px;
}
.right-sidebar::-webkit-scrollbar { width: 0; }
.r-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  margin-bottom: 24px; overflow: hidden;
}
.r-card-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 0; }
.r-card-title { font-size: 13px; font-weight: 600; color: var(--text-strong); }
.r-card-action { width: 24px; height: 24px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; color: var(--text-muted); transition: all var(--transition); }
.r-card-action:hover { background: var(--bg-alt); color: var(--text-primary); }
.r-card-body { padding: 14px 16px 18px; }

/* ── Clock ── */
.clock-widget { text-align: center; padding: 22px 12px; }
.clock-time { font-family: "JetBrains Mono", monospace; font-size: 28px; font-weight: 600; color: var(--text-strong); letter-spacing: 1px; line-height: 1; }
.clock-date { font-size: 13px; color: var(--text-secondary); margin-top: 10px; }
.clock-week { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.clock-lunar { font-size: 12px; color: var(--text-muted); margin-top: 4px; opacity: 0.7; }
.clock-lunar::before { content: ""; display: block; width: 24px; height: 1px; background: var(--border); margin: 8px auto 6px; }

/* ── Weather ── */
.weather-body { padding: 12px 16px 16px; }
.weather-main { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.weather-icon { font-size: 40px; line-height: 1; }
.weather-temp-col { min-width: 0; }
.weather-temp-row { display: flex; align-items: baseline; gap: 10px; }
.weather-temp { font-family: "JetBrains Mono", monospace; font-size: 28px; font-weight: 600; color: var(--text-strong); line-height: 1; }
.weather-desc { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.weather-hilo { display: flex; gap: 8px; font-size: 11px; font-family: "JetBrains Mono", monospace; color: var(--text-muted); }
.weather-meta { display: flex; gap: 16px; font-size: 12px; color: var(--text-muted); padding: 10px 0; border-top: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light); margin-bottom: 12px; }
.weather-meta span { display: flex; align-items: center; gap: 4px; }
.weather-forecast { display: flex; justify-content: space-around; }
.forecast-day { text-align: center; }
.forecast-day-name { font-size: 11px; color: var(--text-muted); margin-bottom: 2px; }
.forecast-day-icon { font-size: 18px; line-height: 1; margin-bottom: 2px; }
.forecast-day-temp { font-size: 11px; font-family: "JetBrains Mono", monospace; color: var(--text-secondary); }
.forecast-day-temp span { color: var(--text-muted); }

/* ── Work Log Widget ── */
.worklog-card { display: block; cursor: pointer; padding: 20px 16px; transition: all var(--transition); }
.worklog-card:hover { border-color: var(--brand); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.worklog-widget { display: flex; align-items: center; gap: 14px; }
.worklog-icon { width: 42px; height: 42px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0; }
.worklog-info { min-width: 0; }
.worklog-title { font-size: 14px; font-weight: 600; color: var(--text-strong); line-height: 1.2; }
.worklog-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ── Quote ── */
.quote-text { font-size: 12px; font-weight: 400; color: var(--text-secondary); line-height: 1.6; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; cursor: default; }
.quote-author { font-size: 12px; color: var(--text-muted); margin-top: 10px; }
.quote-author::before { content: ""; display: block; width: 20px; height: 1px; background: var(--border); margin-bottom: 8px; }

/* ═══════════════════════════════════════════════════
   Hero
   ═══════════════════════════════════════════════════ */

.hero {
  padding: 40px 0 32px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(107,79,58,0.02) 0%, transparent 100%);
}
.hero-identity { font-size: 16px; font-weight: 500; color: var(--text-primary); margin-bottom: 8px; letter-spacing: 0.5px; display: flex; align-items: center; gap: 6px; line-height: 1.2; }
.hero-identity strong { font-weight: 500; }
.hero-lamp { font-size: 18px; line-height: 1; }
.hero h1 {
  font-family: "Noto Serif SC", Georgia, serif;
  font-size: 30px; font-weight: 700; letter-spacing: 0.5px; line-height: 1.3;
  color: var(--brand); margin-bottom: 8px;
}
.hero h1 em { font-style: normal; color: var(--brand); }
.hero-desc { font-size: 13px; font-weight: 400; color: var(--text-secondary); line-height: 1.5; opacity: 0.8; }

/* ═══════════════════════════════════════════════════
   Search Block
   ═══════════════════════════════════════════════════ */

.search-block { padding: 0 0 32px; }
.search-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 20px 24px; }
.search-tabs { display: flex; gap: 4px; margin-bottom: 12px; overflow-x: auto; }
.search-tab { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 500; padding: 6px 16px; border-radius: 20px; color: var(--text-muted); background: var(--bg); border: 1px solid var(--border); transition: all var(--transition); white-space: nowrap; flex-shrink: 0; }
.search-tab svg { width: 13px; height: 13px; }
.search-tab:hover { color: var(--text-primary); border-color: var(--text-secondary); }
.search-tab.active { color: #fff; background: var(--brand); border-color: var(--brand); }
.search-form { display: flex; margin-bottom: 12px; }
.search-form input { flex: 1; padding: 10px 16px; border: 1px solid var(--border); border-right: none; border-radius: 24px 0 0 24px; font-size: 13px; font-family: inherit; background: var(--bg); color: var(--text-primary); outline: none; transition: border-color var(--transition); }
.search-form input:focus { border-color: var(--brand); }
.search-form input::placeholder { color: var(--text-muted); }
.se-dropdown { position: relative; flex-shrink: 0; outline: none; }
.se-dropdown-btn { display: flex; align-items: center; gap: 5px; padding: 10px 14px; border: 1px solid var(--border); border-left: none; border-right: none; background: var(--bg); color: var(--text-primary); font-size: 12px; font-weight: 500; white-space: nowrap; transition: background var(--transition); }
.se-dropdown-btn:hover { background: var(--bg-alt); }
.se-dropdown-menu { display: none; position: absolute; top: 100%; right: 0; min-width: 120px; margin-top: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 4px 0; z-index: 200; }
.se-dropdown:focus-within .se-dropdown-menu { display: block; }
.se-option { display: block; width: 100%; padding: 8px 16px; font-size: 13px; color: var(--text-secondary); text-align: left; transition: all var(--transition); }
.se-option:hover { background: var(--bg-alt); color: var(--text-primary); }
.se-option.active { color: var(--brand); font-weight: 500; }
.search-form button[type="submit"] { padding: 10px 16px; border-radius: 0 24px 24px 0; background: var(--brand); color: #fff; border: none; display: flex; align-items: center; justify-content: center; transition: background var(--transition); flex-shrink: 0; }
.search-form button[type="submit"]:hover { background: #5a4230; }
.se-row { display: none; }

/* ═══════════════════════════════════════════════════
   Section
   ═══════════════════════════════════════════════════ */

.section { padding: 0 0 32px; }
.section-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.section-card-header { display: flex; align-items: center; gap: 8px; padding: 16px 24px; border-bottom: 1px solid var(--border-light); flex-wrap: wrap; }
.section-card-body { padding: 16px 24px 24px; }
.section-title { font-family: "Noto Serif SC", Georgia, serif; font-size: 20px; font-weight: 600; color: var(--text-strong); line-height: 1.2; }
.section-badge { display: flex; align-items: center; justify-content: center; line-height: 1; }
.section-badge i { font-size: 22px; }
.section-badge.ai i { color: var(--ai-color); }
.section-badge.ax i { color: var(--axure-color); }
.section-count { font-size: 11px; color: var(--text-muted); font-weight: 500; padding: 2px 8px; border-radius: 10px; background: var(--bg-alt); margin-left: 4px; line-height: 1; }
.section-header { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }

/* ── Search & Filter ── */
.search-box { position: relative; flex: 1; min-width: 160px; max-width: 240px; }
.header-search { max-width: 200px; flex: 0 1 auto; margin-left: auto; }
.search-box svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: var(--text-muted); pointer-events: none; }
.search-box input { width: 100%; padding: 8px 12px 8px 32px; border: 1px solid var(--border); border-radius: 20px; font-size: 13px; font-family: inherit; background: var(--bg); color: var(--text-primary); outline: none; transition: border-color var(--transition); }
.search-box input::placeholder { color: var(--text-muted); }
.search-box input:focus { border-color: var(--brand); }
.filter-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.filter-chip { font-size: 12px; font-weight: 500; padding: 4px 12px; border-radius: 16px; background: var(--bg); color: var(--text-secondary); border: 1px solid var(--border); transition: all var(--transition); white-space: nowrap; }
.filter-chip:hover { border-color: var(--text-muted); }
.filter-chip.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.no-results { grid-column: 1/-1; text-align: center; padding: 40px 20px; color: var(--text-muted); font-size: 13px; }

/* ═══════════════════════════════════════════════════
   Tool Tabs
   ═══════════════════════════════════════════════════ */

.tool-tabs { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; flex-shrink: 0; }
.tool-tab { font-size: 12px; font-weight: 500; padding: 4px 14px; border-radius: 16px; color: var(--text-muted); background: var(--bg); border: 1px solid var(--border); transition: all var(--transition); white-space: nowrap; flex-shrink: 0; }
.tool-tab:hover { color: var(--text-primary); border-color: var(--text-muted); }
.tool-tab.active { color: #fff; background: var(--brand); border-color: var(--brand); }

/* ═══════════════════════════════════════════════════
   Grid — 4 Columns
   ═══════════════════════════════════════════════════ */

.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tool-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

/* ── Card ── */
.card {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px;
  cursor: pointer; box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  position: relative; overflow: hidden;
}
.card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; opacity: 0; transition: opacity var(--transition); pointer-events: none; }
.card.ai::after { background: linear-gradient(135deg, rgba(91,111,207,0.03), transparent); }
.card.ax::after { background: linear-gradient(135deg, rgba(74,158,107,0.03), transparent); }
.card:hover { background: var(--surface-hover); box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--brand-soft); }
.card:hover::after { opacity: 1; }
.card:active { transform: scale(0.985); }

.card-icon {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: transform var(--transition);
}
.card:hover .card-icon { animation: toolBounce 0.4s ease; }
.card-icon.ai { background: linear-gradient(135deg, #5b6fcf, #8b9cf0); color: #fff; }
.card-icon.ax { background: linear-gradient(135deg, #4a9e6b, #6dbd8a); color: #fff; }
.card-icon svg { width: 16px; height: 16px; }
.card-info { min-width: 0; flex: 1; }
.card-name { font-size: 14px; font-weight: 500; line-height: 1.2; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-strong); }
.card-sub { font-size: 12px; font-weight: 400; color: var(--text-secondary); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-arrow { flex-shrink: 0; color: var(--text-muted); opacity: 0.35; transition: all var(--transition); }
.card-arrow svg { width: 12px; height: 12px; }
.card:hover .card-arrow { opacity: 0.7; color: var(--brand); }

/* ── Tool Card ── */
.tool-card { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; cursor: pointer; box-shadow: var(--shadow-sm); transition: all var(--transition); min-width: 0; overflow: hidden; }
.tool-card:hover { background: var(--surface-hover); border-color: var(--brand-soft); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.tool-card-icon { width: 32px; height: 32px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; }
.tool-card-icon img { width: 100%; height: 100%; object-fit: cover; }
.tool-card:hover .tool-card-icon { animation: toolBounce 0.4s ease; }
.tool-card-info { min-width: 0; }
.tool-card-name { font-size: 13px; font-weight: 500; color: var(--text-strong); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tool-card-desc { font-size: 11px; font-weight: 400; color: var(--text-secondary); line-height: 1.2; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ═══════════════════════════════════════════════════
   About
   ═══════════════════════════════════════════════════ */

.about-content { min-width: 0; font-size: 14px; color: var(--text-secondary); line-height: 1.5; }
.about-grid { display: flex; gap: 40px; align-items: center; }
.about-lead { font-family: "Noto Serif SC", Georgia, serif; font-size: 17px; color: var(--text-strong); line-height: 1.6; margin-bottom: 16px; letter-spacing: -0.1px; }
.about-content p + p { margin-top: 10px; }
.about-links { display: flex; gap: 8px; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border-light); }
.about-link { font-size: 13px; color: var(--text-muted); padding: 6px 12px; border-radius: 20px; background: var(--bg-alt); border: 1px solid var(--border); display: inline-flex; align-items: center; gap: 5px; transition: all var(--transition); }
.about-link:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }
.about-link i { font-size: 12px; }
.about-mark { flex-shrink: 0; text-align: center; }
.about-mark-svg { display: block; margin: 0 auto; }
.about-mark-text { font-size: 13px; color: var(--brand); margin-top: 8px; letter-spacing: 2px; font-weight: 600; }

/* ═══════════════════════════════════════════════════
   Footer
   ═══════════════════════════════════════════════════ */

.footer { text-align: center; padding: 32px 0 24px; color: var(--text-muted); font-size: 11px; font-weight: 300; letter-spacing: 0.3px; border-top: 1px solid var(--border); margin-top: 32px; line-height: 1.4; }
.footer .beian { margin-top: 8px; font-size: 10px; display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.footer .beian a { color: var(--text-muted); transition: color var(--transition); }
.footer .beian a:hover { color: var(--text-secondary); }

/* ═══════════════════════════════════════════════════
   Corner Theme Toggle
   ═══════════════════════════════════════════════════ */

.corner-theme-toggle {
  position: fixed; top: 16px; right: 16px; z-index: 99;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.corner-theme-toggle:hover { color: var(--brand); border-color: var(--brand); }
.corner-theme-toggle .icon-sun { display: none; }
.corner-theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .corner-theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .corner-theme-toggle .icon-moon { display: none; }

/* ═══════════════════════════════════════════════════
   Back to Top / Animation
   ═══════════════════════════════════════════════════ */

.back-to-top {
  position: fixed; bottom: 24px; right: 16px; z-index: 99;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: center; color: var(--text-secondary);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: all var(--transition);
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { box-shadow: var(--shadow-md); color: var(--brand); border-color: var(--brand); }
.back-to-top svg { width: 16px; height: 16px; }

.animate-in { opacity: 0; transform: translateY(16px); transition: opacity 350ms ease-out, transform 350ms ease-out; }
.animate-in.visible { opacity: 1; transform: translateY(0); }

@keyframes toolBounce { 0%{transform:scale(1)}40%{transform:scale(1.15)}65%{transform:scale(0.92)}85%{transform:scale(1.03)}100%{transform:scale(1)} }

@media (prefers-reduced-motion: reduce) {
  .animate-in { opacity: 1; transform: none; transition: none; }
  .card:hover, .tool-card:hover { transform: none; }
  .card:hover .card-icon, .tool-card:hover .tool-card-icon { animation: none; }
}

/* ═══════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════ */

@media (max-width: 1199px) {
  .right-sidebar { display: none; }
  .container { max-width: 100%; }
}

@media (max-width: 960px) {
  .container { padding: 0 20px; }
  .hero { padding: 32px 0 24px; }
  .hero h1 { font-size: 25px; }
  .hero-desc { font-size: 12px; }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .tool-grid { grid-template-columns: repeat(3, 1fr); }
  .search-card { padding: 18px; }
  .section-card-header { gap: 6px; }
}

@media (max-width: 767px) {
  .app-layout { flex-direction: column; }
  .sidebar { transform: translateX(-100%); transition: transform var(--transition); z-index: 100; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay { display: block; }
  .sidebar-overlay.show { opacity: 1; pointer-events: auto; }
  .mobile-header { display: flex; }
  .main-content { margin-left: 0; padding-top: 56px; }

  /* Show right sidebar at bottom on mobile */
  .right-sidebar { display: block !important; width: 100%; min-width: 0; padding: 0 0 32px; }

  .container { padding: 0 14px; }

  /* Hero */
  .hero { padding: 20px 0 18px; }
  .hero h1 { font-size: 21px; letter-spacing: 0; }
  .hero-identity { font-size: 13px; gap: 4px; }
  .hero-desc { font-size: 12px; }
  .hero .hero-lamp { font-size: 16px; }

  /* Search */
  .search-card { padding: 14px; }
  .search-tabs { gap: 2px; }
  .search-tab { font-size: 11px; padding: 5px 10px; gap: 3px; }
  .search-tab svg { width: 11px; height: 11px; }
  .search-form input { padding: 9px 12px; font-size: 13px; }
  .search-form button[type="submit"] { padding: 9px 14px; }
  .se-dropdown-btn { padding: 9px 10px; font-size: 11px; }

  /* Grid */
  .grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .tool-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }

  /* Product Cards */
  .card { padding: 10px; gap: 8px; }
  .card-icon { width: 32px; height: 32px; flex-shrink: 0; }
  .card-icon svg { width: 14px; height: 14px; }
  .card-name { font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; overflow: hidden; line-height: 1.3; }
  .card-sub { font-size: 11px; }
  .card-arrow { opacity: 0.3; flex-shrink: 0; }
  .card-arrow svg { width: 10px; height: 10px; }

  /* Tool Cards */
  .tool-card { padding: 8px 10px; gap: 8px; }
  .tool-card-icon { width: 28px; height: 28px; }
  .tool-card-name { font-size: 12px; }
  .tool-card-desc { display: none; }

  /* Section */
  .section { padding: 0 0 24px; }
  .section-card-header { padding: 10px 14px; gap: 4px; flex-wrap: wrap; }
  .section-card-body { padding: 10px 14px 14px; }
  .section-title { font-size: 16px; }
  .section-badge i { font-size: 18px; }
  .section-count { font-size: 10px; padding: 1px 6px; }

  /* Filter chips wrap to second row */
  .section-card-header .header-search { max-width: 140px; margin-left: auto; }
  .filter-chips { order: 10; width: 100%; padding-top: 4px; }
  .filter-chip { font-size: 11px; padding: 3px 10px; }

  /* Tool tabs wrap to second row */
  .tool-tabs { margin-left: 0; order: 10; width: 100%; padding-top: 4px; }

  /* About */
  .about-grid { flex-direction: column; gap: 16px; align-items: flex-start; }
  .about-mark { align-self: center; }
  .about-mark-svg { width: 52px; height: 52px; }
  .about-mark-text { font-size: 11px; }
  .about-lead { font-size: 15px; }
  .about-links { flex-direction: column; gap: 6px; }
  .about-link { justify-content: center; }

  /* Footer */
  .footer { padding: 24px 0 20px; margin-top: 24px; }

  /* Back to top */
  .back-to-top { bottom: 14px; right: 10px; width: 32px; height: 32px; }
  .back-to-top svg { width: 14px; height: 14px; }
}
