/* ============================================================
   遇见导航 — full-width dashboard-inspired static site
   Works = large cover cards; Websites = compact icon+text rows.
   Themes: auto (follows OS) / light / dark.
   ============================================================ */

:root {
  --bg: #eef0f2;
  --surface: #ffffff;
  --surface-soft: #f9fafb;
  --surface-hover: #f4f6f8;
  --text: #1c1e24;
  --text-muted: #9b9fa8;
  --text-body: #6f7480;
  --border: #eceef1;
  --shadow: 0 12px 32px rgba(28, 30, 36, .05);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --accent: #d4ff5c;
  --accent-text: #1c1e24;
  --purple: #c7bcff;
  --blue: #b4d3ff;
  --green: #a7e6ca;
  --peach: #ffd6b0;
  --hot: #ff7a59;
  --rec: #7c6bff;
  --new: #1aa87a;
  --sidebar-width: 224px;
  --bottom-nav-height: 68px;
  --font-display: 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-body: 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', system-ui, -apple-system, sans-serif;
  color-scheme: light;
}

[data-theme='dark'] {
  --bg: #17181d;
  --surface: #22242b;
  --surface-soft: #2a2c34;
  --surface-hover: #30333c;
  --text: #f0f1f5;
  --text-muted: #777d8a;
  --text-body: #a4a9b4;
  --border: #33363f;
  --shadow: 0 12px 32px rgba(0, 0, 0, .28);
  --purple: #6f63a8;
  --blue: #5e82bd;
  --green: #4f937a;
  --peach: #b98058;
  --hot: #ff8c6e;
  --rec: #9a8dff;
  --new: #43c79a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scrollbar-width: none; -ms-overflow-style: none; }
/* clip avoids creating a scroll container that would break position: sticky */
html, body { overflow-x: clip; }
html::-webkit-scrollbar, body::-webkit-scrollbar, *::-webkit-scrollbar { display: none; width: 0; height: 0; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  transition: background-color .35s ease, color .35s ease;
}
button, a { font-family: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }

/* Layout — full width, only a small gutter (screenshot padding was presentation). */
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: 100vh;
  background: var(--surface);
  transition: background-color .35s ease;
}

/* Sidebar */
.sidebar {
  padding: 32px 20px 24px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow: hidden;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  margin-bottom: 48px;
}
.brand-mark { width: 30px; height: 30px; color: var(--text); display: inline-flex; }
.brand-mark svg { width: 100%; height: 100%; }
.brand-name {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -.04em;
}
.side-nav { display: flex; flex-direction: column; gap: 8px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 13px 14px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-body);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.nav-item svg {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.nav-item:hover { background: var(--surface-hover); color: var(--text); }
.nav-item.active {
  background: var(--accent);
  color: var(--accent-text);
  box-shadow: 0 6px 18px rgba(212, 255, 92, .28);
}
.sidebar-note {
  margin-top: auto;
  padding: 16px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidebar-note span { font-size: 12px; font-weight: 700; }
.sidebar-note small { font-size: 11px; color: var(--text-muted); }

/* Main */
.main { padding: 32px 40px 40px; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 28px;
}
.topbar h1 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -.035em;
}
.topbar p { margin: 0; color: var(--text-muted); font-size: 13px; max-width: 720px; line-height: 1.55; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.icon-btn {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  color: var(--text-body);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color .2s ease, transform .2s ease, border-color .2s ease;
}
.icon-btn:hover { background: var(--surface-hover); color: var(--text); transform: translateY(-2px); }
.icon-btn svg { width: 19px; height: 19px; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.icon-moon, .icon-auto { display: none; }
[data-theme-mode='auto'] .icon-auto { display: block; }
[data-theme-mode='auto'] .icon-sun { display: none; }
[data-theme-mode='dark'] .icon-moon { display: block; }
[data-theme-mode='dark'] .icon-sun { display: none; }

.theme-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 16px);
  background: var(--text);
  color: var(--surface);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 60;
}
.theme-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Stat cards */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
.stat-card {
  padding: 18px 22px;
  border-radius: var(--radius-md);
  min-height: 86px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  grid-template-areas:
    "label value"
    "note value";
  align-content: center;
  align-items: center;
  column-gap: 12px;
  position: relative;
  overflow: hidden;
  color: #252732;
  transition: transform .25s ease, box-shadow .25s ease;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(28,30,36,.08); }
.stat-purple { background: var(--purple); }
.stat-blue { background: var(--blue); }
.stat-green { background: var(--green); }
.stat-peach { background: var(--peach); }
body[data-page='work'] .stats { display: none; }
.stat-label {
  grid-area: label;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  opacity: .85;
}
.stat-icon {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: rgba(255,255,255,.45);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}
.stat-value {
  grid-area: value;
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -.04em;
  margin: 0;
  line-height: 1;
  text-align: right;
}
.stat-note { grid-area: note; font-size: 11px; opacity: .65; margin-top: 4px; }

/* Section */
.section { margin-bottom: 40px; }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.section-title { margin: 0; font-family: var(--font-display); font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.section-sub { margin: 4px 0 0; font-size: 12px; color: var(--text-muted); }
.section-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
}
.section-head-actions { display: flex; align-items: center; gap: 10px; }
.frequent-clear {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 11px;
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background-color .2s ease;
}
.frequent-clear:hover { color: var(--hot); border-color: var(--hot); background: var(--surface-hover); }

/* Works — large cover cards */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}
.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
  animation: cardIn .5s ease both;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 36px rgba(28,30,36,.10);
  border-color: transparent;
}
[data-theme='dark'] .card:hover { box-shadow: 0 18px 36px rgba(0,0,0,.4); }
.card-cover {
  position: relative;
  aspect-ratio: 8 / 5;
  overflow: hidden;
  /* Skeleton placeholder shown until the lazily-loaded cover image arrives. */
  background: linear-gradient(110deg, var(--surface-soft) 25%, var(--surface-hover) 45%, var(--surface-soft) 65%);
  background-size: 250% 100%;
  animation: cover-shimmer 1.6s linear infinite;
}
@keyframes cover-shimmer { to { background-position: -200% 0; } }
.card-cover img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  opacity: 0;
  transition: opacity .45s ease, transform .4s ease;
}
.card-cover img.is-loaded { opacity: 1; }
.card-cover img.is-error { display: none; }
.card:hover .card-cover img { transform: scale(1.04); }
.card-type {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(8px);
  color: #252732;
  font-size: 11px;
  font-weight: 700;
}
.card-type svg { width: 12px; height: 12px; stroke: currentColor; stroke-width: 2.2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.card-open {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(8px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #252732;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .25s ease, transform .25s ease;
}
.card:hover .card-open { opacity: 1; transform: translateY(0); }
.card-open svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.card-body { padding: 18px 20px 20px; }
.card-title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.01em;
  display: flex;
  align-items: center;
  gap: 7px;
}
.card-title .mark-inline {
  flex: none;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  letter-spacing: 0;
}
.card-desc {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-body);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 37px;
}

/* Work cards: taller cover (120px), mark pinned to cover top-right, 2-line description. */
.work-card {
  height: 232px;
  display: flex;
  flex-direction: column;
}
.work-card .card-cover {
  aspect-ratio: auto;
  flex: 0 0 120px;
  height: 120px;
}
.work-card .card-mark {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  font-size: 10px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 999px;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.work-card .card-open { top: auto; bottom: 12px; }
.work-card .card-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
}
.work-card .card-title { margin-bottom: 4px; font-size: 14px; }
.work-card .card-desc {
  font-size: 11px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 32px;
}
.work-card .card-marks, .work-card .card-tags { margin-top: auto; padding-top: 8px; }

/* Websites — compact icon + text rows, like sapi.run */
.site-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 10px;
}
.site-card {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 11px 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background-color .2s ease;
  animation: cardIn .45s ease both;
}
.site-card:hover {
  transform: translateY(-2px);
  background: var(--surface-hover);
  box-shadow: 0 10px 22px rgba(28,30,36,.07);
  border-color: transparent;
}
[data-theme='dark'] .site-card:hover { box-shadow: 0 10px 22px rgba(0,0,0,.35); }
.site-icon {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  color: #252732;
  background: linear-gradient(135deg, var(--purple), var(--green));
}
.site-icon-img { padding: 5px; background: #fff; color: #252732; object-fit: contain; }
[data-theme='dark'] .site-icon-img { background: #fff; }
/* Site-logo fallback fills the whole icon tile (the SVG carries its own background). */
.icon-fallback-logo { padding: 0 !important; background: transparent !important; object-fit: cover !important; }
.site-info { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.35; }
.site-info strong {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.site-info small {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Marks (fixed visual constants from data.json) and plain tags */
.card-marks, .card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.site-card .card-tags, .site-card .card-marks { margin-top: 0; flex: none; }
.mark, .tag {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-body);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 9px;
  white-space: nowrap;
}
.mark-hot { color: #fff; background: var(--hot); border-color: transparent; }
.mark-rec { background: var(--rec); border-color: transparent; color: #fff; }
.mark-new { background: var(--new); border-color: transparent; color: #fff; }
.card-tags.compact .mark { font-size: 9px; padding: 3px 7px; }

/* Frequent block: sapi.run-style icon-above-name navigation tiles, capped at two rows. */
.frequent-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 2px;
  max-height: 184px;
  overflow: hidden;
}
.frequent-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 96px;
  min-width: 84px;
  padding: 10px 4px 8px;
  border-radius: 12px;
  background: transparent;
  transition: background-color .2s ease, transform .2s ease;
  animation: cardIn .4s ease both;
}
.frequent-item:hover {
  background: var(--surface-hover);
  transform: translateY(-1px);
}
.frequent-item:first-child {
  background: var(--surface-hover);
}
.frequent-icon {
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  color: #252732;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(20, 22, 27, .06);
  object-fit: contain;
  padding: 4px;
}
.frequent-icon-img { padding: 2px; }
.frequent-name {
  max-width: 100%;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.frequent-item:first-child .frequent-name { color: var(--hot); }
[data-theme='dark'] .frequent-icon { color: #14161b; }

/* External-link exit prompt */
.exit-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(18, 20, 25, .48);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .2s ease;
}
.exit-modal.show { display: flex; opacity: 1; }
.exit-dialog {
  width: min(420px, 100%);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px 28px 24px;
  text-align: center;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
  transform: translateY(10px) scale(.98);
  transition: transform .25s ease;
}
.exit-modal.show .exit-dialog { transform: translateY(0) scale(1); }
.exit-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  border-radius: 16px;
  background: var(--accent);
  color: var(--accent-text);
}
.exit-dialog h2 { font-family: var(--font-display); font-size: 20px; margin: 0 0 10px; }
.exit-message { margin: 0 0 18px; font-size: 13px; line-height: 1.7; color: var(--text-body); }
.exit-target {
  display: block;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  word-break: break-all;
  max-height: 72px;
  overflow: hidden;
}
.exit-countdown { margin: 0 0 20px; font-size: 12px; color: var(--text-muted); }
.exit-countdown strong { color: var(--text); font-size: 15px; }
.exit-actions { display: flex; gap: 10px; }
.exit-btn {
  flex: 1;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  border: 1px solid var(--border);
  transition: transform .15s ease, background-color .2s ease;
}
.exit-btn:active { transform: scale(.97); }
.exit-btn.ghost { background: var(--surface-soft); color: var(--text-body); }
.exit-btn.primary { background: var(--accent); color: var(--accent-text); border-color: transparent; }

.empty-state {
  grid-column: 1 / -1;
  padding: 48px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  background: var(--surface-soft);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
}
.footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
}
.footer-icp { color: var(--text-muted); }
.footer-icp:hover { color: var(--text); text-decoration: underline; }

/* Mobile bottom nav (hidden on desktop) */
.bottom-nav { display: none; }

@keyframes cardIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 1100px) {
  .main { padding: 28px 26px 36px; }
  .sidebar { padding: 28px 16px; }
  .work-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
  .site-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}
@media (max-width: 820px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main { padding: 22px 18px calc(var(--bottom-nav-height) + 28px); }
  .topbar { margin-bottom: 20px; }
  .topbar h1 { font-size: 24px; }
  .topbar p { font-size: 12px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 26px; }
  .stat-card { min-height: 74px; padding: 14px 14px; border-radius: 14px; }
  .stat-label { font-size: 11px; gap: 5px; }
  .stat-icon { width: 21px; height: 21px; border-radius: 6px; font-size: 10px; }
  .stat-value { font-size: 26px; margin: 0; }
  .stat-note { font-size: 10px; margin-top: 3px; }
  .section { margin-bottom: 32px; }
  .section-head { margin-bottom: 14px; }
  .section-title { font-size: 18px; }
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .site-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .card { border-radius: 14px; }
  .card-cover { aspect-ratio: 4 / 3; }
  .card-type { top: 8px; left: 8px; padding: 4px 8px; font-size: 10px; }
  .card-open { display: none; }
  .card-body { padding: 12px; }
  .card-title { font-size: 14px; }
  .card-desc { font-size: 11px; min-height: 32px; }
  .card-tags { margin-top: 8px; gap: 4px; }
  .tag { font-size: 9px; padding: 3px 7px; }
  .site-card { padding: 9px 10px; gap: 8px; border-radius: 12px; }
  .site-icon { width: 32px; height: 32px; border-radius: 9px; font-size: 14px; }
  .site-info strong { font-size: 12px; }
  .site-info small { font-size: 10px; }
  .site-card .card-tags:not(.compact) { display: none; }
  .footer { justify-content: flex-end; text-align: right; }
  .theme-toast { bottom: calc(var(--bottom-nav-height) + 18px); }
  .bottom-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    height: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-top: 1px solid var(--border);
    box-shadow: 0 -8px 24px rgba(28,30,36,.06);
  }
  .bottom-nav .nav-item {
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 8px 0;
    border-radius: 0;
    font-size: 11px;
    background: transparent !important;
    color: var(--text-body);
    box-shadow: none !important;
  }
  .bottom-nav .nav-item.active {
    font-weight: 700;
  }
  /* Icon keeps its accent pill; active text just turns the same accent color. */
  .bottom-nav .nav-item.active span {
    color: var(--accent) !important;
    font-weight: 700;
  }
  .bottom-nav .nav-item.active svg {
    background: var(--accent);
    border-radius: 12px;
    padding: 6px;
    box-sizing: content-box;
    color: #14161b;
  }
  .bottom-nav .nav-item svg { width: 20px; height: 20px; }
}
@media (max-width: 420px) {
  .main { padding: 18px 12px calc(var(--bottom-nav-height) + 24px); }
  .topbar { align-items: center; }
  .topbar h1 { font-size: 20px; }
  .topbar p { font-size: 11px; }
  .icon-btn { width: 38px; height: 38px; }
  .stat-label { font-size: 10px; }
  .stat-note { display: none; }
  .stat-value { font-size: 22px; margin: 0; }
  .work-grid { gap: 8px; }
  .site-grid { grid-template-columns: 1fr; }
  .card-body { padding: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
