:root {
  color-scheme: light;
  --page: #f1f4f7;
  --surface: #fff;
  --text: #3c3c3c;
  --muted: #727680;
  --line: #e0e6f5;
  --primary: #3e4a5c;
  --link: #2d405a;
  --soft: #f5f7fb;
  --radius: 12px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--page);
}
:root[data-theme="dark"] { color-scheme: dark; --page: #171d26; --surface: #202936; --text: #e1e7ef; --muted: #a2acbb; --line: #344155; --primary: #adbfd7; --link: #d2e0f3; --soft: #293545; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 95px; }
body { margin: 0; background-image: url('/assets/pattern.svg'); }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, summary { cursor: pointer; }
button { color: inherit; }
button, input, a { -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: wait; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid #6688be; outline-offset: 4px; }
[hidden] { display: none !important; }
ul { padding: 0; margin: 0; list-style: none; }
h1, h2, p { margin: 0; }
.wide { max-width: 1900px; margin-inline: auto; padding-inline: 32px; }
.icon { flex: none; vertical-align: middle; }
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.topbar .wide { display: flex; justify-content: space-between; align-items: center; height: 36px; padding-inline: 56px; }
.topbar span { letter-spacing: 1px; }
.header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.header-inner { height: 68px; display: flex; align-items: center; gap: 30px; padding-inline: 52px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--primary); font-size: 23px; font-weight: 700; white-space: nowrap; letter-spacing: -.7px; }
.brand-mark { height: 34px; width: 34px; border: 1.5px solid currentColor; outline: 1px solid currentColor; outline-offset: -5px; border-radius: 9px 12px 8px 11px; display: grid; place-items: center; font-family: Georgia, serif; font-size: 19px; transform: rotate(-7deg); }
.top-nav { display: flex; flex: 1; align-items: stretch; justify-content: center; height: 100%; gap: clamp(14px, 2.2vw, 38px); color: var(--link); font-size: 16px; }
.top-nav > a { position: relative; display: flex; align-items: center; padding-inline: 6px; white-space: nowrap; }
.top-nav > a[aria-current]::after { content: ''; height: 4px; border-radius: 3px; background: var(--primary); position: absolute; bottom: 0; inset-inline: 0; }
.top-nav a:hover, .subcategories a:hover, .breadcrumbs a:hover { color: #6382af; }
.nav-more { position: relative; }
.nav-more summary { display: flex; gap: 6px; align-items: center; height: 100%; white-space: nowrap; list-style: none; }
summary::-webkit-details-marker { display: none; }
.nav-more summary svg { width: 15px; }
.nav-more > div { position: absolute; top: calc(100% + 6px); right: 0; min-width: 150px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 8px; box-shadow: 0 10px 30px #101b3012; }
.nav-more > div a { display: block; padding: 11px 15px; border-radius: 6px; }
.nav-more > div a:hover { background: var(--soft); }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); }
.theme-toggle { border: none; flex: none; }
.page-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 20px; }
.sidebar { position: sticky; top: 88px; max-height: calc(100dvh - 106px); overflow-y: auto; scrollbar-width: thin; }
.mobile-categories > summary { display: none; }
.category-list { display: grid; gap: 6px; }
.category-link { display: flex; gap: 12px; align-items: center; padding: 12px 15px 12px 40px; min-height: 52px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-size: 15px; color: var(--muted); transition: border-color .18s; }
.category-link:hover, .category-item.active > .category-link { border-color: var(--primary); color: var(--text); }
.category-link .icon { color: var(--category-color); }
.color-0 { --category-color: #6b7280; }.color-1 { --category-color: #fa987d; }.color-2 { --category-color: #9891b5; }.color-3 { --category-color: #52949b; }.color-4 { --category-color: #b5a0d0; }.color-5 { --category-color: #6485b9; }.color-6 { --category-color: #e4b651; }.color-7 { --category-color: #aba4dc; }.color-8 { --category-color: #f0a180; }.color-9 { --category-color: #75b844; }
.sidebar-children { background: var(--surface); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); padding: 9px 16px 12px 40px; }
.category-item.active:has(.sidebar-children) > .category-link { border-radius: var(--radius) var(--radius) 0 0; }
.sidebar-children a { display: block; padding: 7px 0; font-size: 13px; color: var(--muted); }
.sidebar-children a[aria-current], .sidebar-children a:hover { color: var(--primary); font-weight: 600; }
.sidebar-note { display: flex; gap: 18px; align-items: center; padding: 25px 10px; opacity: .7; }
.sidebar-note span { height: 1px; background: var(--line); flex: 1; }
.sidebar-note i { width: 8px; height: 8px; border: 1px solid var(--line); border-radius: 50%; }
main { min-width: 0; }
main:focus { outline: none; }
.search-hero { height: 342px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); position: relative; overflow: hidden; margin-bottom: 25px; }
.hero-content { position: relative; z-index: 1; padding: 45px 30px 0; text-align: center; }
.hero-content h1 { font-size: 40px; line-height: 1.3; font-weight: 700; margin-bottom: 22px; }
#search-form { width: min(100%, 624px); margin-inline: auto; }
.search-engines { margin: 0; padding: 0; border: 0; display: flex; justify-content: center; }
.search-engines label { position: relative; cursor: pointer; }
.search-engines input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.search-engines span { display: block; min-width: 60px; padding: 9px 12px; font-size: 14px; color: var(--muted); border: 1px solid transparent; border-radius: 11px 11px 0 0; position: relative; top: 1px; }
.search-engines input:checked + span { border-color: var(--line); border-bottom-color: var(--surface); background: var(--surface); color: var(--text); z-index: 1; }
.search-engines input:focus-visible + span { outline: 2px solid #6688be; outline-offset: -4px; }
.search-input-wrap { display: flex; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.search-input-wrap:focus-within { border-color: #879ab9; }
.search-input-wrap input { flex: 1; min-width: 0; width: 100%; border: 0; background: transparent; padding: 12px 16px; height: 45px; color: var(--text); outline: none; }
.search-input-wrap input::placeholder { color: #989da7; font-size: 13px; }
.search-input-wrap button { width: 114px; flex: none; border: 0; border-radius: 5px; background: var(--primary); color: var(--surface); }
.search-input-wrap button:hover { filter: brightness(1.12); }
.hero-art { position: absolute; bottom: -4px; left: 0; width: 100%; height: 172px; object-fit: cover; object-position: center bottom; pointer-events: none; }
[data-theme="dark"] .hero-art { filter: invert(.85); opacity: .6; }
.breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; color: var(--muted); font-size: 13px; margin: 0 0 15px 3px; }
.breadcrumbs [aria-current] { color: var(--text); }
.category-hero { height: 242px; }
.category-hero .hero-content { padding-top: 28px; }
.category-hero h1 { font-size: 32px; margin-bottom: 7px; }
.hero-count { color: var(--muted); margin-bottom: 10px; font-size: 12px; }
.category-hero .hero-art { opacity: .13; height: 120px; }
.catalog-section { margin-bottom: 30px; scroll-margin-top: 94px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 6px 16px 0; min-height: 30px; }
.section-heading h2 { font-size: 20px; font-weight: 700; white-space: nowrap; }
.section-title { display: flex; align-items: center; gap: 22px; min-width: 0; flex: 1; }
.subcategories { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); min-width: 0; }
.more-link { display: flex; align-items: center; justify-content: center; gap: 5px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 5px 13px; white-space: nowrap; color: var(--muted); font-size: 13px; }
.more-link svg { width: 13px; height: 13px; }
.more-link:hover { border-color: var(--primary); color: var(--text); }
.card-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px 20px; }
.site-card { display: block; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); position: relative; min-height: 112px; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.site-card:hover { border-color: var(--primary); transform: translateY(-4px); box-shadow: 0 2px 15px #0000000f; }
.site-heading { display: flex; align-items: center; gap: 7px; height: 32px; margin-bottom: 8px; }
.site-logo { display: inline-grid; place-items: center; position: relative; width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--soft); color: var(--primary); font-weight: 600; font-size: 16px; overflow: hidden; }
.site-logo img { position: absolute; inset: 0; border-radius: 50%; object-fit: contain; background: var(--surface); border: 1px solid var(--line); }
.site-name { font-size: 15px; font-weight: 650; line-height: 18px; min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.site-description { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12px; color: var(--muted); line-height: 18px; height: 36px; overflow-wrap: anywhere; }
.visit-arrow { position: absolute; right: 10px; bottom: 9px; width: 17px; height: 17px; background: var(--surface); color: var(--primary); opacity: 0; transform: translateX(-3px); transition: opacity .18s, transform .18s; }
.site-card:hover .visit-arrow, .site-card:focus-visible .visit-arrow { opacity: 1; transform: translateX(0); }
.search-results { padding-bottom: 30px; }
#search-status { color: var(--muted); margin-bottom: 18px; min-height: 20px; }
.text-button { border: 0; background: none; color: var(--link); padding: 8px; }
.button { display: inline-flex; align-items: center; justify-content: center; background: var(--primary); border: 1px solid var(--primary); color: var(--surface); border-radius: 7px; padding: 10px 20px; }
.load-more { display: flex; margin: 24px auto 0; }
.empty-category { border: 1px dashed var(--line); border-radius: var(--radius); padding: 30px; color: var(--muted); text-align: center; }
.muted { color: var(--muted); font-size: 13px; }
.footer { padding: 35px 0 30px; margin-top: 20px; border-top: 1px solid var(--line); text-align: center; color: var(--muted); font-size: 12px; line-height: 2; }
.footer > a { color: var(--primary); font-size: 17px; font-weight: 650; }
.footer > span { font-size: 11px; }
.back-top { position: fixed; bottom: 20px; right: 20px; z-index: 15; color: var(--link); }
.not-found { text-align: center; padding: 90px 20px; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); }
.not-found > span { color: var(--muted); font-size: 70px; font-weight: 700; }
.not-found p { margin: 20px 0; color: var(--muted); }
.noscript { margin: 15px; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 12px; top: -80px; padding: 12px 20px; background: var(--surface); border: 1px solid var(--line); z-index: 40; }
.skip-link:focus { top: 12px; }
@media (min-width: 1600px) { .card-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 1199px) {
  .card-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
  .header-inner { padding-inline: 32px; gap: 15px; }
  .top-nav { gap: 12px; font-size: 14px; }
  .brand { font-size: 20px; }
  .section-title { display: block; }
  .subcategories { margin-top: 9px; }
  .site-card { padding: 14px; }
}
@media (max-width: 959px) {
  .page-layout { grid-template-columns: 160px minmax(0, 1fr); gap: 16px; }
  .category-link { padding-left: 22px; }
  .wide { padding-inline: 20px; }
  .top-nav > a:nth-of-type(n+5) { display: none; }
  .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
}
@media (max-width: 767px) {
  :root { --radius: 8px; }
  .wide { padding-inline: 12px; }
  .topbar .wide { padding-inline: 20px; height: 32px; font-size: 11px; }
  .topbar span { letter-spacing: 0; }
  .header-inner { height: 64px; padding-inline: 20px; justify-content: space-between; }
  .brand { font-size: 22px; }
  .top-nav { display: none; }
  .page-layout { display: flex; flex-direction: column; margin-top: 14px; gap: 14px; }
  .sidebar { position: static; max-height: none; overflow: visible; width: 100%; }
  .mobile-categories > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--link); }
  .mobile-categories[open] > summary { margin-bottom: 8px; }
  .mobile-categories[open] > summary .icon { transform: rotate(180deg); }
  .category-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .category-link { padding: 11px 18px; min-height: 46px; font-size: 14px; }
  .sidebar-children, .sidebar-note { display: none; }
  .category-item.active:has(.sidebar-children) > .category-link { border-radius: var(--radius); }
  main { width: 100%; }
  .search-hero { height: 245px; margin-bottom: 22px; }
  .hero-content { padding: 26px 14px 0; }
  .hero-content h1 { font-size: 28px; margin-bottom: 17px; }
  .search-engines span { min-width: 54px; padding: 7px 10px; font-size: 13px; }
  .search-input-wrap input { height: 44px; padding-inline: 12px; font-size: 16px; }
  .search-input-wrap button { width: 68px; }
  .hero-art { height: 88px; width: 640px; max-width: none; left: 50%; transform: translateX(-50%); }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .site-card { padding: 13px 11px; min-height: 105px; }
  .site-name { font-size: 14px; font-weight: 600; }
  .site-logo { width: 28px; height: 28px; }
  .site-logo img { width: 28px; height: 28px; }
  .site-heading { gap: 6px; }
  .site-description { font-size: 11px; }
  .section-heading { align-items: flex-start; gap: 8px; margin-bottom: 12px; }
  .section-heading h2 { font-size: 19px; }
  .section-title { overflow: hidden; }
  .subcategories { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; gap: 13px; padding-bottom: 5px; scrollbar-width: thin; }
  .more-link { padding: 6px 10px; }
  .catalog-section { margin-bottom: 25px; }
  .category-hero { height: 225px; }
  .category-hero h1 { margin-bottom: 6px; }
  .category-hero .hero-art { height: 75px; }
  .breadcrumbs { font-size: 12px; margin-bottom: 13px; }
  .back-top { right: 12px; bottom: 14px; width: 38px; height: 38px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } .site-card:hover { transform: none; } }
