:root {
  color-scheme: light;
  --bg: #f7f8fc;
  --card: #fff;
  --ink: #182033;
  --muted: #697386;
  --line: #e6e9f0;
  --accent: #5765f2;
  --shadow: 0 10px 30px #20274a0d;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #11131a;
  --card: #1b1e27;
  --ink: #f1f4fb;
  --muted: #a4adbd;
  --line: #2a2e3a;
  --accent: #9ca6ff;
  --shadow: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    15px/1.5 Inter,
    ui-sans-serif,
    system-ui,
    "Microsoft YaHei",
    sans-serif;
}
main {
  max-width: 1120px;
  margin: auto;
  padding: 20px 28px 70px;
}
header {
  height: 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.7px;
  text-decoration: none;
  color: var(--ink);
}
.brand span {
  color: var(--accent);
}
.internal-notice{margin-left:18px;color:var(--muted);font-size:13px;font-weight:600;letter-spacing:0;white-space:nowrap}
.icon {
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--card);
  border-radius: 10px;
  width: 38px;
  height: 38px;
  font-size: 19px;
  cursor: pointer;
}
.set-home {
  margin-left: auto;
  margin-right: 8px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}
.set-home:hover { border-color: var(--accent); color: var(--accent); }
.hero {
  text-align: center;
  margin: 78px auto 44px;
}
.hero h1 {
  max-width: 760px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.7;
  margin: 0 auto 25px;
}
#search {
  max-width: 690px;
  height: 56px;
  margin: auto;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--card);
  border-radius: 16px;
  display: flex;
  padding: 5px;
}
#search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px #5765f225;
}
select {
  width: 105px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  padding: 0 8px;
  outline: 0;
}
html[data-theme="dark"] select option {
  background: #1b1e27;
  color: #f1f4fb;
}
input {
  min-width: 0;
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: 16px inherit;
  padding: 0 14px;
  outline: 0;
}
button {
  font: inherit;
}
#search button,
.primary {
  border: 0;
  background: var(--accent);
  color: #fff;
  border-radius: 11px;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 650;
}
nav {
  display: flex;
  gap: 8px;
  overflow: auto;
  padding: 4px 0 26px;
  scrollbar-width: none;
}
.chip {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 99px;
  padding: 7px 13px;
  white-space: nowrap;
  cursor: pointer;
}
.chip.active,
.chip:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.section {
  margin: 23px 0 34px;
}
.section h2 {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 13px;
  font-weight: 600;
}
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.site {
  display: flex;
  align-items: center;
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 14px;
  padding: 15px;
  text-decoration: none;
  color: var(--ink);
  transition:
    transform 0.16s,
    border 0.16s;
}
.site:hover {
  transform: translateY(-2px);
  border-color: #a9b0ff;
}
.favicon {
  width: 26px;
  height: 26px;
  object-fit: contain;
  margin-right: 12px;
  border-radius: 6px;
}
.fallback {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  background: #5765f21c;
  color: var(--accent);
  font-weight: 800;
  margin-right: 12px;
  border-radius: 6px;
}
.site b,
.site small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.site b {
  font-size: 14px;
}
.site small {
  font-size: 12px;
  color: var(--muted);
  margin-top: 1px;
}
.loading {
  text-align: center;
  color: var(--muted);
}
footer {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 25px;
}
footer a {
  color: inherit;
}
