:root {
  --orange: #F2621E;
  --orange-dark: #D64B14;
  --orange-soft: #FFF0E6;
  --ink: #242424;
  --ink-2: #555555;
  --muted: #8A8A8A;
  --bg: #F7F8FA;
  --card: #FFFFFF;
  --line: #E8EAED;
  --moss: #4F7A5B;
  --mustard: #C9902F;
  --clay: #B96B45;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
::selection { background: #FFD9C0; color: var(--orange-dark); }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.wrap { width: min(100% - 32px, 1400px); margin-inline: auto; }

.sprite symbol, .topbrand svg, .topbar-random svg, .side-all svg, .side-link svg,
.banner-search-icon, .search-clear svg, .banner-hot svg, .title-mark svg,
.section-title svg, .cat-head svg, .to-top svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* top bar */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 44px;
  z-index: 60;
  background: linear-gradient(90deg, #FF8A45 0%, #F2621E 58%, #DC5317 100%);
  color: #fff;
  box-shadow: 0 1px 6px rgba(130, 60, 20, .12);
}
.topbar-inner { height: 44px; display: flex; align-items: center; gap: 26px; padding: 0 16px; }
.topbrand { display: flex; align-items: center; gap: 8px; flex: none; }
.topbrand-mark { width: 27px; height: 27px; border-radius: 7px; background: #fff; color: var(--orange); display: grid; place-items: center; }
.topbrand-mark svg { width: 17px; height: 17px; }
.topbrand-text { display: flex; flex-direction: column; line-height: 1.05; }
.topbrand-text strong { font-size: 15px; letter-spacing: .04em; white-space: nowrap; }
.topbrand-text small { font-family: Georgia, serif; font-size: 7px; letter-spacing: .18em; opacity: .75; margin-top: 3px; }
.topbar-nav { display: flex; align-items: center; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.topbar-nav::-webkit-scrollbar { display: none; }
.topbar-link { position: relative; border: 0; background: transparent; color: rgba(255,255,255,.88); padding: 13px 10px; font-size: 12px; white-space: nowrap; }
.topbar-link:hover, .topbar-link.active { color: #fff; }
.topbar-link.active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 6px; height: 2px; border-radius: 2px; background: #fff; }
.topbar-actions { margin-left: auto; flex: none; }
.topbar-random { display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(255,255,255,.55); background: rgba(255,255,255,.14); color: #fff; border-radius: 6px; padding: 5px 10px; font-size: 12px; }
.topbar-random svg { width: 14px; height: 14px; }
.topbar-random:hover { background: rgba(255,255,255,.25); }

/* layout */
.app-shell { padding-top: 44px; }
.sidebar {
  position: fixed;
  left: 0; top: 44px; bottom: 0;
  width: 150px;
  z-index: 40;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.side-all {
  display: flex; align-items: center; gap: 7px;
  margin: 10px 8px 6px;
  padding: 9px 8px;
  border-radius: 7px;
  background: linear-gradient(90deg, #FF8A45, #F2621E);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  flex: none;
}
.side-all svg { width: 15px; height: 15px; flex: none; }
.side-scroll { flex: 1; overflow-y: auto; padding: 0 8px 12px; scrollbar-width: thin; }
.side-group-title { padding: 10px 7px 4px; font-size: 10.5px; letter-spacing: .06em; color: #A3A3A3; }
.side-group-wrap + .side-group-wrap { border-top: 1px dashed #F0F0F0; margin-top: 4px; padding-top: 4px; }
.side-link {
  display: flex; align-items: center; gap: 6px;
  width: 100%;
  border: 0; background: transparent;
  padding: 7px 7px;
  border-radius: 7px;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.4;
  min-height: 30px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
}
.side-link svg { width: 15px; height: 15px; flex: none; color: var(--orange); }
.side-link span { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.side-link em { display: none; font-style: normal; font-size: 9.5px; color: #AAA; }
.side-link:hover { background: #F8F8F8; }
.side-link.active { background: var(--orange-soft); color: var(--orange-dark); font-weight: 700; }
.side-foot { display: none; }

.main { margin-left: 150px; padding: 14px 18px 60px; min-width: 0; }

/* banner */
.banner {
  position: relative;
  overflow: hidden;
  min-height: 300px;
  border-radius: 14px;
  padding: 42px 46px;
  color: #fff;
  background: linear-gradient(120deg, #FFA15B 0%, #F2621E 52%, #D64B14 100%);
}
.banner-art { position: absolute; right: 10px; top: 8px; width: 500px; height: auto; opacity: .92; pointer-events: none; }
.banner-inner { position: relative; z-index: 2; max-width: 650px; }
.banner h1 { margin: 0 0 10px; font-size: clamp(28px, 3.2vw, 39px); line-height: 1.25; letter-spacing: .02em; }
.banner p { margin: 0 0 22px; font-size: 13.5px; opacity: .9; }
.banner-search { display: flex; align-items: center; width: 100%; max-width: 650px; height: 46px; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 8px 22px rgba(120, 50, 10, .18); }
.search-tabs { display: flex; height: 100%; border-right: 1px solid #EEE; flex: none; }
.search-tabs button { border: 0; background: transparent; color: #888; padding: 0 14px; font-size: 12px; height: 100%; }
.search-tabs button.active { background: var(--orange-soft); color: var(--orange-dark); font-weight: 700; }
.banner-search-icon { width: 17px; height: 17px; color: var(--orange); margin: 0 8px 0 12px; flex: none; }
.banner-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; font-size: 13px; color: #333; background: transparent; }
.banner-search input::placeholder { color: #A5A5A5; }
.banner-search input::-webkit-search-cancel-button { display: none; }
.search-clear { width: 22px; height: 22px; border: 0; border-radius: 50%; background: #F3F3F3; color: #777; display: grid; place-items: center; flex: none; }
.search-clear svg { width: 12px; height: 12px; }
.search-submit { align-self: stretch; width: 86px; flex: none; border: 0; background: var(--orange); color: #fff; font-size: 13px; font-weight: 700; }
.search-submit:hover { background: var(--orange-dark); }
.banner-hot { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 18px; font-size: 11.5px; }
.banner-hot > span { opacity: .85; }
.banner-hot #banner-hot-links { display: flex; flex-wrap: wrap; gap: 8px; }
.hot-chip { border: 1px solid rgba(255,255,255,.42); background: rgba(255,255,255,.16); color: #fff; border-radius: 999px; padding: 3px 10px; font-size: 11px; }
.hot-chip:hover { background: rgba(255,255,255,.3); }

/* sections */
.section-title { display: flex; align-items: center; gap: 9px; margin: 26px 0 13px; }
.title-mark { width: 4px; height: 18px; border-radius: 3px; background: var(--orange); transform: rotate(-2deg); }
.section-title h2 { margin: 0; font-size: 18px; }
.title-badge { background: var(--orange-soft); color: var(--orange-dark); border: 1px solid #FFD5BB; border-radius: 999px; padding: 1px 8px; font-size: 10px; }
.section-title a { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: #888; }
.section-title a:hover { color: var(--orange-dark); }
.section-title svg { width: 13px; height: 13px; }

.cards { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 11px; }
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100px;
  padding: 12px;
  background: var(--card);
  border: 1px solid #EFEFEF;
  border-radius: 10px;
  transition: .18s ease;
}
.card:hover { transform: translateY(-2px); border-color: #F4B98F; box-shadow: 0 8px 18px rgba(90, 55, 25, .09); }
.card-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.card-icon { position: relative; width: 34px; height: 34px; flex: none; border-radius: 8px; background: #FFF6EE; display: grid; place-items: center; overflow: hidden; }
.card-icon .letter { position: absolute; font-family: Georgia, serif; font-size: 16px; font-weight: 700; color: var(--orange); }
.card-icon img { position: relative; z-index: 2; width: 100%; height: 100%; object-fit: contain; padding: 3px; background: #fff; }
.card-title { display: block; min-width: 0; font-size: 12.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 8px; min-height: 34px; font-size: 11px; line-height: 1.55; color: #888; }
.card-alias { display: block; margin-top: 5px; font-size: 10px; color: var(--clay); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card mark { background: #FFE0A8; color: #333; padding: 0 1px; border-radius: 2px; }

.directory-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 10px; margin: 24px 0 0; border-bottom: 1px solid var(--line); }
.directory-bar p { margin: 0; font-size: 12px; color: #999; }
.text-btn { border: 0; background: transparent; color: var(--orange-dark); font-size: 12px; border-bottom: 1px dashed var(--orange); padding: 1px 0; }
.group { margin-top: 30px; scroll-margin-top: 96px; }
.group-head { display: flex; align-items: center; gap: 9px; }
.group-head .bar { width: 4px; height: 18px; border-radius: 3px; background: var(--orange); transform: rotate(-2deg); }
.group-head h2 { margin: 0; font-size: 17px; }
.group-head .desc { font-size: 11px; color: #999; }
.group-head .count { font-family: Georgia, serif; font-size: 11px; color: #888; background: #fff; border: 1px solid var(--line); padding: 1px 8px; border-radius: 999px; }
.group-head .rule { flex: 1; border-top: 1px dashed var(--line); }
.cat-block { margin-top: 18px; scroll-margin-top: 104px; }
.cat-head { display: flex; align-items: center; gap: 7px; margin-bottom: 9px; }
.cat-head h3 { margin: 0; font-size: 13.5px; }
.cat-head em { font-style: normal; font-size: 10.5px; color: #AAA; }
.cat-head a { margin-left: auto; display: inline-flex; align-items: center; gap: 2px; font-size: 11px; color: #999; }
.cat-head a:hover { color: var(--orange-dark); }
.cat-head svg { width: 11px; height: 11px; transform: rotate(-90deg); }

.empty { text-align: center; padding: 70px 20px 90px; color: #777; }
.empty svg { width: 40px; height: 40px; color: var(--clay); }
.empty h2 { font-size: 18px; margin: 12px 0 5px; }
.empty p { margin: 0; font-size: 12px; color: #999; }

.site-footer { border-top: 1px solid var(--line); background: #fff; color: #999; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; padding: 22px 0; font-size: 11.5px; }
.footer-inner strong { color: #444; font-size: 13px; }
.to-top { position: fixed; right: 22px; bottom: 22px; z-index: 50; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--orange); background: #fff; color: var(--orange); display: grid; place-items: center; box-shadow: 0 4px 14px rgba(90, 50, 20, .16); opacity: 0; visibility: hidden; transform: translateY(8px); transition: .2s ease; }
.to-top svg { width: 18px; height: 18px; }
.to-top.show { opacity: 1; visibility: visible; transform: none; }

/* responsive */
@media (max-width: 1280px) { .cards { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 1080px) { .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } .topbar-nav { gap: 0; } }
@media (max-width: 900px) {
  .app-shell { padding-top: 88px; }
  .sidebar { top: 44px; bottom: auto; width: auto; right: 0; height: 44px; flex-direction: row; align-items: center; border-right: 0; border-bottom: 1px solid var(--line); padding: 0 8px; }
  .side-all, .side-foot { display: none; }
  .side-scroll { display: flex; align-items: center; gap: 6px; width: 100%; height: 100%; overflow-x: auto; padding: 0; scrollbar-width: none; }
  .side-scroll::-webkit-scrollbar { display: none; }
  .side-group-wrap { display: flex; align-items: center; gap: 6px; flex: none; }
  .side-group-title { display: none; }
  .side-link { width: auto; flex: none; border: 1px solid var(--line); background: #fff; }
  .side-link.active::before { display: none; }
  .side-link em { display: none; }
  .main { margin-left: 0; padding: 14px; }
  .banner { padding: 30px; min-height: 270px; }
  .banner-art { width: 400px; opacity: .35; }
}
@media (max-width: 640px) {
  .topbar-inner { gap: 10px; padding: 0 10px; }
  .topbrand-text small { display: none; }
  .topbrand-text strong { font-size: 13px; }
  .topbar-nav { display: none; }
  .topbar-random span, .topbar-random { font-size: 11px; padding: 5px 7px; }
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .banner { padding: 24px 20px; min-height: 250px; }
  .banner h1 { font-size: 26px; }
  .banner p { font-size: 12px; }
  .search-tabs { display: none; }
  .banner-search-icon { margin-left: 12px; }
  .search-submit { width: 64px; }
  .banner-art { display: none; }
  .footer-inner { flex-direction: column; gap: 6px; }
}
@media (max-width: 430px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { padding: 10px; min-height: 96px; }
  .card-icon { width: 30px; height: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
