:root {
  --qiguang-page: #edf8fa;
  --qiguang-surface: #f5fcfd;
  --qiguang-sidebar: #edf9fb;
  --qiguang-ink: #273036;
  --qiguang-muted: #96a3aa;
  --qiguang-line: #e7eff1;
  --qiguang-accent: #18a6af;
  --qiguang-sidebar-width: 172px;
  --qiguang-mobile-sidebar-width: 88px;
  --qiguang-font: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--qiguang-page); color: var(--qiguang-ink); font-family: var(--qiguang-font); }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid color-mix(in srgb, var(--qiguang-accent), white 25%); outline-offset: 3px; }

.qiguang-shell { min-height: 100vh; }
.skip-nav { position: fixed; top: 8px; left: 8px; z-index: 20; padding: 9px 12px; background: var(--qiguang-ink); color: #fff; transform: translateY(-150%); }
.skip-nav:focus { transform: translateY(0); }

.compact-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 10; width: var(--qiguang-sidebar-width); overflow-y: auto; border-right: 1px solid #dbeef0; background: var(--qiguang-sidebar); }
.compact-sidebar::after { position: fixed; top: 0; bottom: 0; left: calc(var(--qiguang-sidebar-width) - 5px); width: 5px; background: var(--qiguang-accent); content: ""; }
.compact-brand { display: flex; min-height: 72px; align-items: center; gap: 10px; padding: 0 20px; border-bottom: 1px solid #e0eff1; font-size: 18px; }
.compact-brand img { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; }
.compact-brand strong { overflow: hidden; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.compact-category-nav { padding: 9px 0 24px; }
.compact-category-link { display: grid; width: 100%; border: 0; background: transparent; text-align: left; cursor: pointer; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 9px; min-height: 53px; padding: 8px 18px; color: #56636a; font-size: 16px; transition: background-color .18s ease, color .18s ease; }
.compact-category-link:hover, .compact-category-link.is-active { background: #e3f7f8; color: #1b4348; font-weight: 700; }
.category-icon, .compact-resource-logo { display: grid; place-items: center; overflow: hidden; flex: 0 0 auto; }
.category-icon { width: 25px; height: 25px; border-radius: 7px; background: #fff; }
.category-icon img { width: 100%; height: 100%; object-fit: cover; }
.category-icon.is-empty { visibility: hidden; }
.compact-category-link small { color: #a8b9bd; font-size: 11px; font-weight: 500; }

.compact-main { min-height: 100vh; margin-left: var(--qiguang-sidebar-width); background: var(--qiguang-surface); }
.compact-main.is-full-width { margin-left: 0; }
.compact-topbar { display: flex; min-height: 72px; align-items: center; gap: 18px; padding: 0 clamp(22px, 3vw, 54px); border-bottom: 1px solid var(--qiguang-line); background: #eefafb; }
.compact-mobile-brand { display: none; overflow: hidden; color: #273036; font-size: 17px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.compact-search { display: flex; min-width: min(100%, 300px); align-items: center; gap: 8px; padding: 0 12px; border: 1px solid #e1ecee; border-radius: 9px; background: #fff; }
.compact-search::before { color: #9fb1b5; content: "搜索"; font-size: 12px; }
.compact-search input { width: 100%; min-height: 36px; border: 0; outline: 0; background: transparent; color: var(--qiguang-ink); font-size: 13px; }
.compact-search button { border: 0; background: transparent; color: #789195; cursor: pointer; font-size: 12px; }
.compact-top-actions { display: flex; flex: 1; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 17px; color: #6f8287; font-size: 13px; }
.compact-top-actions a:hover { color: var(--qiguang-accent); }
.compact-top-actions .compact-submit-link { padding: 7px 10px; border: 1px solid color-mix(in srgb, var(--qiguang-accent), white 55%); border-radius: 7px; color: var(--qiguang-accent); font-weight: 700; }

.compact-notice { margin: 18px clamp(22px, 3vw, 54px) 0; padding: 10px 14px; border-left: 3px solid var(--qiguang-accent); background: #f1fcfc; color: #4b7478; font-size: 13px; }
.compact-notice p { margin: 0; }
.compact-directory { padding: 24px clamp(22px, 3vw, 54px) 48px; }
.compact-resource-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: clamp(18px, 3.2vw, 50px); row-gap: 13px; }
.compact-resource-item { min-width: 0; }
.compact-resource-item a { display: flex; min-width: 0; align-items: center; gap: 12px; min-height: 76px; padding: 8px 2px; border-radius: 8px; transition: background-color .18s ease, transform .18s ease; }
.compact-resource-item a:hover { background: #f1fbfb; transform: translateX(2px); }
.compact-resource-logo { width: 48px; height: 48px; border-radius: 10px; background: #f7f8f8; }
.compact-resource-logo img { width: 100%; height: 100%; object-fit: cover; }
.compact-resource-logo.is-empty { visibility: hidden; }
.compact-resource-copy { min-width: 0; }
.compact-resource-copy strong { display: block; overflow: hidden; color: #323b40; font-size: 16px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.compact-resource-copy small { display: block; overflow: hidden; margin-top: 5px; color: #a0abb0; font-size: 12px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.search-empty { margin: 42px 0; color: var(--qiguang-muted); text-align: center; }
.empty-state { max-width: 580px; padding: 55px 24px; border: 1px dashed #d9e8ea; border-radius: 12px; background: #fbfefe; text-align: center; }
.empty-state h2 { margin: 0; font-size: 18px; }.empty-state p { margin: 10px 0 0; color: var(--qiguang-muted); font-size: 13px; line-height: 1.8; }
.site-footer { display: flex; justify-content: space-between; gap: 16px; padding: 20px clamp(22px, 3vw, 54px) 30px; border-top: 1px solid var(--qiguang-line); color: #a3b0b4; font-size: 12px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 1180px) { .compact-resource-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 24px; } }
@media (max-width: 900px) { .compact-sidebar { position: sticky; top: 0; width: 100%; height: auto; overflow: visible; border-right: 0; border-bottom: 1px solid #dbeef0; }.compact-sidebar::after { position: absolute; top: auto; right: 0; bottom: -4px; left: 0; width: auto; height: 4px; }.compact-brand { display: none; }.compact-category-nav { display: flex; overflow-x: auto; padding: 0 12px; }.compact-category-link { display: flex; flex: 0 0 auto; min-height: 49px; padding: 8px 12px; font-size: 14px; }.compact-category-link small { display: none; }.compact-main { margin-left: 0; }.compact-topbar { padding: 0 18px; }.compact-resource-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.compact-directory { padding: 26px 18px 42px; }.site-footer { padding-right: 18px; padding-left: 18px; } }
@media (max-width: 620px) {
  .compact-sidebar { position: fixed; inset: 0 auto 0 0; width: var(--qiguang-mobile-sidebar-width); height: 100vh; overflow-y: auto; border-right: 1px solid #dbeef0; border-bottom: 0; }
  .compact-sidebar::after { position: fixed; top: 0; right: auto; bottom: 0; left: calc(var(--qiguang-mobile-sidebar-width) - 4px); width: 4px; height: auto; }
  .compact-brand { display: none; }
  .compact-category-nav { display: block; overflow: visible; padding: 7px 0 18px; }
  .compact-category-link { display: grid; grid-template-columns: 1fr; justify-items: center; gap: 4px; min-height: 68px; padding: 8px 4px; text-align: center; font-size: 12px; line-height: 1.2; }
  .compact-category-link small { display: none; }
  .category-icon { width: 23px; height: 23px; }
  .compact-main { min-height: 100vh; margin-left: var(--qiguang-mobile-sidebar-width); }
  .compact-topbar { min-height: 0; flex-wrap: wrap; gap: 8px; padding: 10px 13px; }
  .compact-mobile-brand { display: block; flex: 1; min-width: 0; }
  .compact-search { order: 3; width: 100%; min-width: 100%; }
  .compact-top-actions { flex: 0 0 auto; }
  .compact-top-actions a:not(.compact-submit-link) { display: none; }
  .compact-directory { padding: 18px 13px 34px; }
  .compact-resource-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; row-gap: 10px; }
  .compact-resource-item a { align-items: flex-start; gap: 8px; min-height: 74px; padding: 7px 0; }
  .compact-resource-logo { width: 36px; height: 36px; border-radius: 8px; }
  .compact-resource-copy strong { font-size: 14px; }.compact-resource-copy small { margin-top: 3px; font-size: 11px; }
  .site-footer { flex-direction: column; padding: 18px 13px 28px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; }.compact-category-link, .compact-resource-item a { transition: none; } }
