/* FreeNav 新标签页 —— 自包含样式（明/暗跟随系统） */
:root {
  --bg: #f7f8fb;
  --panel: #ffffff;
  --text: #1b2330;
  --muted: #7a8493;
  --border: #e6e9f0;
  --accent: #6d8bff;
  --accent-2: #8b5cf6;
  --shadow: 0 8px 24px rgba(20, 30, 60, .08);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --panel: #131c2e;
    --text: #e7ecf5;
    --muted: #8b97ab;
    --border: #243047;
    --accent: #7c9bff;
    --accent-2: #a78bfa;
    --shadow: 0 8px 24px rgba(0, 0, 0, .35);
  }
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: radial-gradient(1200px 600px at 50% -10%, color-mix(in srgb, var(--accent) 12%, var(--bg)), var(--bg));
  color: var(--text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* 顶栏 */
.nt-header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 28px 14px;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
}
.nt-brand { font-size: 19px; font-weight: 800; letter-spacing: .3px; white-space: nowrap; }
.nt-mark { color: var(--accent); margin-right: 4px; }
.nt-search {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}
.nt-search-ico { position: absolute; left: 14px; font-size: 15px; opacity: .6; }
#ntSearch {
  width: 100%;
  padding: 12px 14px 12px 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
#ntSearch:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.nt-open {
  white-space: nowrap;
  font-size: 14px; font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color .15s, color .15s;
}
.nt-open:hover { border-color: var(--accent); }

/* 场景筛选 chips */
.nt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 28px 10px;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
}
.nt-chip {
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: transform .12s, border-color .15s, background .15s;
  border-left: 4px solid var(--cat, #ccc);
}
.nt-chip:hover { transform: translateY(-1px); }
.nt-chip.active { border-color: var(--cat, var(--accent)); background: color-mix(in srgb, var(--cat, var(--accent)) 16%, var(--panel)); }

/* 卡片网格 */
.nt-main { flex: 1; max-width: 1100px; width: 100%; margin: 0 auto; padding: 8px 28px 24px; }
.nt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.nt-card {
  display: block;
  text-decoration: none;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  box-shadow: var(--shadow);
  transition: transform .14s ease, border-color .15s ease;
  border-top: 3px solid var(--cat, var(--accent));
}
.nt-card:hover { transform: translateY(-3px); border-color: var(--cat, var(--accent)); }
.nt-card-head { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.nt-logo { width: 26px; height: 26px; border-radius: 7px; object-fit: cover; background: var(--border); flex: 0 0 auto; }
.nt-fallback {
  width: 26px; height: 26px; border-radius: 7px;
  display: none; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--cat, var(--accent)) 18%, var(--panel));
  color: var(--text); font-weight: 800; font-size: 13px; flex: 0 0 auto;
}
.nt-name { font-weight: 700; font-size: 15px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-price { font-size: 11px; font-weight: 700; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.nt-desc { margin: 0 0 10px; font-size: 12.5px; line-height: 1.5; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nt-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.nt-badge { font-size: 11px; color: var(--muted); background: color-mix(in srgb, var(--border) 60%, var(--panel)); border-radius: 6px; padding: 2px 7px; }
.nt-empty { text-align: center; color: var(--muted); margin-top: 40px; }

/* 页脚 */
.nt-footer {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px;
  padding: 14px 28px 20px;
  font-size: 12px; color: var(--muted);
  max-width: 1100px; width: 100%; margin: 0 auto;
}
.nt-tip { opacity: .8; }
