/* ===== NONG.ME — 参考 atoama 风格改版 ===== */

/* --- CSS 变量（浅色 / 深色） --- */
:root {
  /* 底色 */
  --bg: #f5f0e8;
  --surface: #ffffff;
  --surface-elevated: #faf8f3;
  /* 文字 */
  --text: #2c2418;
  --text-secondary: #7a6e5a;
  --text-muted: #a89b87;
  /* 主色：柔和绿 */
  --primary: #3a7d44;
  --primary-light: rgba(58,125,68,0.10);
  --primary-ring: rgba(58,125,68,0.25);
  --primary-hover: #2f6b38;
  /* 边框 / 阴影 */
  --border: #e2d9c8;
  --ring: #e8e0d0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  /* 稀有度色 */
  --rarity-1: #5b8c3e;
  --rarity-2: #3a6fb5;
  --rarity-3: #7b3fb5;
  --rarity-4: #c8960c;
  /* 圆角 */
  --radius: 10px;
  --radius-lg: 14px;
  /* 顶栏高度 */
  --header-h: 56px;
  --max-w: 720px;
}

[data-theme="dark"] {
  --bg: #1a1712;
  --surface: #252118;
  --surface-elevated: #2a2620;
  --text: #d4c8a8;
  --text-secondary: #8c8068;
  --text-muted: #6b6050;
  --primary: #5cb85c;
  --primary-light: rgba(92,184,92,0.12);
  --primary-ring: rgba(92,184,92,0.25);
  --primary-hover: #6dc86d;
  --border: #3d3830;
  --ring: #3d3830;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
}

/* --- Reset --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* --- Sticky 顶栏（毛玻璃） --- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--header-h);
  background: rgba(245,240,232,0.78);
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}
[data-theme="dark"] .topbar {
  background: rgba(26,23,18,0.78);
}
.topbar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.topbar-brand {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text);
  white-space: nowrap;
}
.topbar-brand span {
  color: var(--primary);
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.topbar-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  width: 34px;
  height: 34px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: background 0.15s, color 0.15s;
}
.topbar-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
}
.topbar-btn.active {
  background: var(--primary-light);
  color: var(--primary);
}

/* --- 主内容区 --- */
.main-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 16px 60px;
}

/* --- 页面标题区 --- */
.page-header {
  padding: 28px 0 16px;
}
.page-badge {
  display: inline-flex;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-ring);
  margin-bottom: 8px;
  letter-spacing: 0.3px;
}
.page-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.2;
  color: var(--text);
}
.page-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.5;
}

/* --- 分类标签栏 --- */
.cat-bar {
  display: flex;
  gap: 6px;
  padding: 4px 0 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.cat-bar::-webkit-scrollbar { display: none; }
.cat-chip {
  font-size: 12px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  user-select: none;
}
.cat-chip:hover {
  border-color: var(--primary-ring);
  color: var(--primary);
}
.cat-chip.active {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary-ring);
  font-weight: 600;
}

/* --- 搜索栏 --- */
.search-wrap {
  padding: 0 0 12px;
}
.search-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-input::placeholder { color: var(--text-muted); }
.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* --- 筛选栏 --- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 0 10px;
}
.filter-chip {
  font-size: 11px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.filter-chip:hover {
  border-color: var(--primary-ring);
  color: var(--primary);
}
.filter-chip.active {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary-ring);
}
.filter-reset {
  display: none;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 7px;
  border: 1px dashed var(--rarity-4);
  background: transparent;
  color: var(--rarity-4);
  cursor: pointer;
  transition: all 0.15s;
}
.filter-reset.show { display: inline-flex; align-items: center; gap: 3px; }
.filter-reset:hover { background: rgba(200,150,12,0.08); }

/* --- 统计条 --- */
.stats-bar,
#headerStat,
#levelSortBadge {
  font-size: 12px;
  color: var(--text-muted);
}
.stats-bar {
  padding: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* --- 等级 / 排序栏 --- */
.level-sort-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 0 0 12px;
}
.level-sort-bar label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
}
.level-sort-bar input[type="number"] {
  width: 64px;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  background: var(--surface);
  color: var(--text);
  outline: none;
  text-align: center;
  transition: border-color 0.15s;
}
.level-sort-bar input[type="number"]:focus { border-color: var(--primary); }
.level-sort-bar select {
  padding: 5px 26px 5px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  background: var(--surface);
  color: var(--text);
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%237a6e5a'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  transition: border-color 0.15s;
}
.level-sort-bar select:focus { border-color: var(--primary); }

/* --- 卡片网格（ring 风格） --- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 560px) {
  .card-grid { grid-template-columns: 1fr 1fr; }
}

/* --- 卡片 --- */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--ring);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  transition: border-color 0.15s, transform 0.15s;
  position: relative;
}
.card:hover {
  border-color: var(--primary-ring);
  transform: translateY(-1px);
}
.card:active { transform: scale(0.99); }

/* 卡片图片区 */
.card-img {
  width: 82px;
  min-height: 82px;
  background: var(--surface-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  border-right: 1px solid var(--ring);
}
.card-img img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
}
.card-img.loaded img { opacity: 1; }
.card-img.loaded img:hover { transform: scale(1.08); }
.card-img.error img { display: none; }
.emoji-fallback { width: 40px; height: 40px; display: block; }
.card-img.loaded .emoji-fallback { display: none; }
.no-img-svg { width: 100%; height: 100%; }

/* 卡片 body */
.card-body {
  flex: 1;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-width: 0;
}
.card-name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}
.grade-tag {
  font-size: 10px;
  padding: 1px 8px;
  border-radius: 5px;
  font-weight: 600;
}
.card-info {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
}
.hourly-tag {
  font-size: 10px;
  font-weight: 600;
  background: rgba(255,152,0,0.10);
  color: #e65100;
  padding: 1px 5px;
  border-radius: 5px;
  white-space: nowrap;
}
[data-theme="dark"] .hourly-tag {
  background: rgba(255,152,0,0.15);
  color: #ff8a50;
}
.exp-multi {
  font-size: 9px;
  color: var(--primary);
  background: var(--primary-light);
  border-radius: 4px;
  padding: 1px 5px;
  font-weight: 600;
  cursor: help;
  border: 1px solid var(--primary-ring);
}

/* 收藏按钮 */
.fav-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  background: rgba(255,255,255,0.7);
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  opacity: 0.4;
  transition: all 0.15s;
  backdrop-filter: blur(4px);
}
.fav-btn:hover { opacity: 0.8; transform: scale(1.1); }
.fav-btn.faved { opacity: 1; background: #e8a840; color: #fff; }

.card.faved-card {
  border-left: 3px solid #d4a030;
  background: linear-gradient(135deg, rgba(255,215,0,0.06), var(--surface) 40%);
}

/* 收藏视图中的卡片不需要左侧金边（本身已是收藏） */
.favorites-view .card.faved-card { border-left: 1px solid var(--ring); }

/* --- 列表视图 --- */
.card-grid.list-view { grid-template-columns: 1fr; gap: 0; }
.card-grid.list-view .card {
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--ring);
  height: 64px;
  align-items: center;
}
.card-grid.list-view .card:first-child { border-top: 1px solid var(--ring); }
.card-grid.list-view .card:hover { background: var(--primary-light); transform: none; }
.card-grid.list-view .card-img {
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  border-right: none;
  background: transparent;
  margin-left: 4px;
}
.card-grid.list-view .card-img img { width: 30px; height: 30px; }
.card-grid.list-view .card-body {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
}
.card-grid.list-view .card-name { font-size: 13px; max-width: 140px; }
/* --- 空状态 --- */
.empty-state {
  display: none;
  text-align: center;
  padding: 60px 20px;
}
.empty-state.show { display: block; }
.empty-state-icon svg { width: 56px; height: 56px; opacity: 0.35; }
.empty-state-text { font-size: 15px; color: var(--text-secondary); margin-top: 12px; }
.empty-state-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* --- 收藏工具栏 --- */
.fav-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.fav-select-btn {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}
.fav-select-btn:hover { border-color: var(--primary-ring); color: var(--primary); }
.fav-select-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-light); }
.fav-clear-btn {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}
.fav-clear-btn:hover { border-color: #e88; color: #e55; }
.stats-count {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: auto;
}

/* --- 批量操作栏 --- */
.batch-bar {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(120%);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  z-index: 400;
  box-shadow: 0 2px 16px rgba(0,0,0,0.10);
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1), opacity 0.28s cubic-bezier(0.4,0,0.2,1);
  opacity: 0; pointer-events: none;
}
.batch-bar.show { transform: translateX(-50%) translateY(0); opacity: 1; pointer-events: auto; }
.batch-count {
  font-size: 13px;
  color: var(--text-secondary);
  margin-right: 8px;
  white-space: nowrap;
}
.batch-bar button {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card-bg);
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.batch-bar button:hover { background: var(--surface-hover); border-color: var(--border-hover); }
.batch-bar button.batch-unfav {
  color: var(--text-secondary);
  border-color: var(--border);
}
.batch-bar button.batch-unfav.has-selection { color: #c44; border-color: #e88; }
.batch-bar button.batch-unfav.has-selection:hover { background: #fee; }
.batch-bar button:last-child {
  margin-left: 8px;
  border: none;
  background: none;
  color: var(--text-muted);
  padding: 5px 8px;
}
.batch-bar button:last-child:hover { color: var(--text-secondary); background: var(--surface-hover); }

/* --- 收藏勾选框 --- */
.card.selectable { position: relative; }
.fav-check {
  display: none;
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(0,0,0,0.04);
  z-index: 5;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0; color: transparent;
}
.fav-check.show { display: block; }
.card.selectable:hover .fav-check.show { background: rgba(58,125,68,0.06); }
.fav-check.checked {
  background: rgba(58,125,68,0.12);
  border: 2px solid var(--primary);
}
.fav-check.checked::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 34px; height: 34px;
  border-radius: 50%;
  background-color: var(--primary);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E") center/22px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E") center/22px no-repeat;
}

/* --- 详情弹窗 --- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.50);
  backdrop-filter: blur(3px);
  z-index: 500;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 24px 12px;
  overflow-y: auto;
}
.overlay.show { display: flex; }
.panel {
  background: var(--surface);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 540px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.20);
  position: relative;
  overflow: hidden;
}
.panel-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.35);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: background 0.15s;
}
.panel-close:hover { background: rgba(0,0,0,0.55); }

.panel-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 20px 10px;
}
.panel-thumb {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  background: var(--surface-elevated);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1.5px solid var(--ring);
}
.panel-thumb img { max-width: 60px; max-height: 60px; object-fit: contain; opacity: 0; transition: opacity 0.2s; }
.panel-thumb.loaded img { opacity: 1; }
.panel-thumb.loaded .emoji-fallback { display: none; }
.panel-thumb.error img { display: none; }
.panel-name { font-size: 18px; font-weight: 700; color: var(--text); }
.panel-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 4px; }
.panel-tag {
  font-size: 10px;
  padding: 2px 10px;
  border-radius: 6px;
  font-weight: 500;
  border: 1px solid transparent;
  line-height: 1.6;
}

.panel-body { padding: 8px 20px 24px; }
.panel-section { margin-bottom: 14px; }
.panel-section h3 {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.panel-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.panel-stat { display: flex; flex-direction: column; gap: 1px; }
.panel-stat-label { font-size: 11px; color: var(--text-muted); }
.panel-stat-value { font-size: 14px; font-weight: 600; color: var(--text); }

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--ring);
}
.info-col { padding: 12px; }
.info-col:first-child { border-right: 1px solid var(--ring); background: var(--surface-elevated); }
.info-col:last-child { background: var(--surface); }
.info-col-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--ring);
}
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-size: 12px;
}
.info-row:not(:last-child) { border-bottom: 1px solid rgba(128,128,128,0.06); }
.info-key { color: var(--text-secondary); }
.info-val { font-weight: 500; color: var(--text); }

/* --- 底部 Footer --- */
.footer {
  text-align: center;
  padding: 24px 16px;
  font-size: 11px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  margin-top: 40px;
  line-height: 1.8;
}

/* --- 暗色模式切换动画 --- */
body { transition: background 0.2s, color 0.2s; }

/* --- 骨架屏 --- */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, rgba(128,128,128,0.06) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-lg);
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skel-card { display: flex; border: 1px solid var(--ring); border-radius: var(--radius-lg); overflow: hidden; height: 82px; }
.skel-img { width: 82px; min-width: 82px; }
.skel-body { flex: 1; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.skel-name { height: 14px; width: 55%; background: var(--ring); border-radius: 4px; }
.skel-meta { height: 10px; width: 75%; background: var(--ring); border-radius: 4px; }
.skel-info { height: 10px; width: 40%; background: var(--ring); border-radius: 4px; }

/* --- 暗色模式图标切换 --- */
[data-theme="dark"] .moon-icon { display: none !important; }
[data-theme="dark"] .sun-icon { display: inline-block !important; }

/* --- 底部导航（移动端） --- */
.bottom-nav {
  display: none;
}
@media (max-width: 560px) {
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    z-index: 250;
    padding: 6px 0 env(safe-area-inset-bottom);
    justify-content: space-around;
  }
  [data-theme="dark"] .bottom-nav { background: rgba(26,23,18,0.92); }
  .bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 0;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 11px;
    cursor: pointer;
    transition: color 0.15s;
    flex: 1;
    min-width: 0;
    font-weight: 500;
  }
  .bottom-nav a.active { color: var(--primary); font-weight: 600; }
}

/* --- 面板详情补充样式 --- */
.panel-rarity-bar { height: 3px; }
.panel-name-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.panel-head-info { flex: 1; min-width: 0; }
.panel-harvest {
  font-size: 10px;
  padding: 2px 10px;
  border-radius: 6px;
  font-weight: 500;
  line-height: 1.6;
  background: var(--surface-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--ring);
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.1s, border-color 0.15s;
}
.panel-harvest:hover { border-color: var(--primary-ring); color: var(--primary); }
.panel-harvest:active { transform: scale(0.96); }
.panel-fav {
  font-size: 10px;
  padding: 2px 10px;
  border-radius: 6px;
  font-weight: 500;
  line-height: 1.6;
  cursor: pointer;
  color: var(--text-muted);
  background: var(--surface-elevated);
  border: 1px solid var(--ring);
  transition: all 0.15s;
}
.panel-fav:hover { border-color: var(--primary-ring); color: var(--primary); }
.panel-fav.faved { background: linear-gradient(135deg,#fef7e6,#fce4b8); color:#b06a0c; border-color:#f0c878; }
[data-theme="dark"] .panel-fav.faved { background: linear-gradient(135deg,#3a2818,#4a3018); color:#f0b860; border-color:#6a4a28; }

.panel-strip {
  border-radius: var(--radius);
  padding: 10px 14px;
  margin: 8px 0;
  font-size: 13px;
  line-height: 1.5;
  background: var(--surface-elevated);
  border: 1px solid var(--ring);
}
.harvest-card { background: var(--surface-elevated); }
.hc-row { display: flex; align-items: center; gap: 6px; padding: 4px 0; font-size: 12px; }
.hc-row:not(:last-child) { border-bottom: 1px solid rgba(128,128,128,0.06); }
.hc-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.hc-season { color: #2e7d32; font-weight: 500; }
.hc-season .hc-dot { background: #43a047; }
.hc-season b { color: #1b5e20; }
.hc-cycle { color: #6a8eb5; font-weight: 500; }
.hc-cycle .hc-dot { background: #6a8eb5; }

.phase-bar { flex-direction: column; gap: 6px; }
.phase-bar-row { display: flex; align-items: center; }
.phase-bar-dot { width: 10px; height: 10px; border-radius: 50%; background: #c8960c; flex-shrink: 0; box-shadow: 0 1px 3px rgba(200,150,12,0.35); }
.phase-bar-line { flex: 1; height: 2px; min-width: 10px; background: linear-gradient(to right, #d4c49a, #e8ddd0); }
.phase-bar-labels { display: flex; justify-content: space-between; margin-top: 4px; }
.phase-bar-label { font-size: 11px; color: var(--text-muted); text-align: center; }
.phase-bar-label .ph-name { font-size: 12px; color: var(--text); font-weight: 600; display: block; margin-bottom: 1px; }
.phase-bar-label .ph-time { font-size: 10px; color: var(--text-muted); display: block; }

/* --- 列表视图（列对齐） --- */
.card-grid.list-view {
  grid-template-columns: 1fr;
  gap: 0;
}
.card-grid.list-view .card {
  display: flex;
  align-items: center;
  height: 44px;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--ring);
  transition: background 0.12s;
}
.card-grid.list-view .card:first-child { border-top: 1px solid var(--ring); }
.card-grid.list-view .card:hover {
  background: var(--primary-light);
  transform: none;
}
.card-grid.list-view .card:active { transform: none; }

/* 收藏列 */
.card-grid.list-view .fav-btn {
  position: static;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  font-size: 11px;
  border-radius: 50%;
  border: none;
  background: none;
  color: var(--text-muted);
  opacity: 0.35;
  margin: 0 2px 0 8px;
  padding: 0;
  cursor: pointer;
  transition: opacity 0.15s;
}
.card-grid.list-view .card:hover .fav-btn { opacity: 0.7; }
.card-grid.list-view .fav-btn.faved { opacity: 1; color: #e8a840; }

/* 图片 */
.card-grid.list-view .card-img {
  width: 40px;
  height: 40px;
  min-width: auto;
  min-height: auto;
  flex-shrink: 0;
  border-right: none;
  background: var(--surface-elevated);
  margin: 0 10px;
  border-radius: 8px;
}
.card-grid.list-view .card-img img { width: 26px; height: 26px; }
.card-grid.list-view .emoji-fallback { width: 20px; height: 20px; }

/* 内容区 */
.card-grid.list-view .card-body {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 0 12px 0 0;
  min-width: 0;
}
.card-grid.list-view .card-name {
  width: 120px;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-grid.list-view .card-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  margin-right: 12px;
}
.card-grid.list-view .grade-tag {
  font-size: 9px;
  padding: 0 5px;
  border-radius: 3px;
}
.card-grid.list-view .card-info {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 10px;
  color: var(--text-secondary);
  margin-left: auto;
}
.card-grid.list-view .card-info span {
  min-width: 44px;
  text-align: right;
}
.card-grid.list-view .hourly-tag {
  font-size: 9px;
  padding: 0 4px;
  border-radius: 3px;
  min-width: auto;
  text-align: left;
}
.card-grid.list-view .exp-multi { display: none; }

@media (max-width: 560px) {
  .card-grid.list-view .card { height: 40px; }
  .card-grid.list-view .fav-btn { width: 18px; height: 18px; font-size: 10px; margin: 0 0 0 6px; }
  .card-grid.list-view .card-img { width: 32px; height: 32px; margin: 0 6px; border-radius: 6px; }
  .card-grid.list-view .card-img img { width: 20px; height: 20px; }
  .card-grid.list-view .card-body { padding: 0 6px 0 0; }
  .card-grid.list-view .card-name { width: 80px; font-size: 12px; }
  .card-grid.list-view .card-meta { gap: 3px; margin-right: 6px; }
  .card-grid.list-view .card-info { gap: 6px; font-size: 9px; }
  .card-grid.list-view .card-info span { min-width: 34px; }
}

/* --- 移动端适配 --- */
@media (max-width: 560px) {
  .page-title { font-size: 22px; }
  .card-grid { grid-template-columns: 1fr; }
  .panel { max-width: 100%; border-radius: 14px 14px 0 0; margin-top: auto; }
  .overlay { padding: 0; align-items: flex-end; }
}
