
/* ===== 基础重置 ===== */
*, *::before, *::after {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    --primary-bg: #212121;
    --text-primary: #fff;
    --text-secondary: rgba(255, 255, 255, 0.72);
    --accent-color: #ff6b6b;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-hover: rgba(255, 255, 255, 0.1);
    --transition-timing: cubic-bezier(0.19, 1, 0.22, 1);
    --nav-card-bg: rgba(27, 27, 27, 0.78);
    --nav-card-hover: rgba(255, 255, 255, 0.1);
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.skip-link {
    position: fixed;
    top: -60px;
    left: 20px;
    z-index: 100;
    padding: 10px 16px;
    color: #1b1b1b;
    background: #4ecdc4;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: top 0.18s ease;
}

.skip-link:focus {
    top: 12px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    background-color: var(--primary-bg);
    font-size: 14px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== 星空背景 ===== */
.background {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background: #151515;
}

#startrack {
    position: absolute;
    left: 50%;
    top: 50%;
    display: block;
    transform: translate(-50%, -50%) rotate(0deg);
    animation: star-rotate 240s linear infinite;
    will-change: transform;
    pointer-events: none;
}

@keyframes star-rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.cover {
    position: absolute;
    bottom: -42%;
    left: 0;
    height: 100%;
    width: 100%;
    background: linear-gradient(0deg, #202020 30%, rgba(32, 32, 32, 0));
    pointer-events: none;
}

/* ===== 布局容器 ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.main {
    position: relative;
    z-index: 1;
}

/* 首页：锁定一屏，主视觉占据剩余高度，页脚始终可见 */
.home-page {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
    display: flex;
    flex-direction: column;
}
.home-page > .main {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
}
.home-page .intro {
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    padding: 0;
}
.home-page .intro > .container { width: 100%; }
.home-page > .footer,
.nav-page > .footer {
    flex: 0 0 auto;
    padding: 12px 0;
}
.home-page .footer p,
.nav-page .footer p {
    margin: 0;
    line-height: 1.5;
}
.home-page .footer .c,
.nav-page .footer .c { margin-top: 2px; }

.ch {
    width: 100%;
    padding: 80px 0;
    animation: fadedown 1s var(--transition-timing);
}

@keyframes fadedown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.clear::after {
    content: "";
    display: block;
    height: 0;
    visibility: hidden;
    clear: both;
}

/* ===== 首页介绍区域 ===== */
.intro {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hello {
    text-align: center;
    padding: 40px 20px;
}

.hello h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 300;
    margin-bottom: 20px;
    opacity: 0.92;
    min-height: 1.2em;
    transition: opacity 0.3s ease;
}

.hello h1.is-fading {
    opacity: 0.2;
}

.hello h2 {
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.circle {
    display: inline-flex;
    gap: 8px;
}

.circle span {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-color);
    animation: pulse 2s ease-in-out infinite;
}

.circle span:nth-child(2) {
    animation-delay: 0.3s;
    background: #4ecdc4;
}

.circle span:nth-child(3) {
    animation-delay: 0.6s;
    background: #ffe66d;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
}

/* ===== 章节标题 ===== */
.chtitle {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 300;
    text-align: center;
    margin-bottom: 40px;
    opacity: 0.9;
    position: relative;
    padding-bottom: 15px;
}

.chtitle::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
}

/* ===== 个人介绍区域 ===== */
.about {
    padding: 60px 0;
}

.introduct {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 30px;
}

.avatar-container {
    position: relative;
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s var(--transition-timing), border-color 0.3s;
}

.avatar:hover {
    transform: scale(1.05);
    border-color: var(--accent-color);
}

.intro-text {
    max-width: 600px;
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
}

/* ===== 链接卡片区域 ===== */
.gate {
    padding: 60px 0;
}

.links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.links .clear {
    display: contents;
}

.links a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.item {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: background-color 0.3s var(--transition-timing), transform 0.3s var(--transition-timing), border-color 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.item:hover {
    background: var(--card-hover);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
}

.item .avatar {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    flex-shrink: 0;
}

.item .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.item .inner {
    flex: 1;
    min-width: 0;
}

.item .inner h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item .inner p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== 页脚 ===== */
.footer {
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 8px 0;
}

.footer .c {
    opacity: 0.8;
    font-size: 0.8rem;
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    .ch {
        padding: 50px 0;
    }

    .hello h2 {
        flex-direction: column;
        gap: 15px;
    }

    .circle {
        order: -1;
    }

    .links {
        grid-template-columns: 1fr;
    }

    .item {
        padding: 18px;
    }

    .item .avatar {
        width: 48px;
        height: 48px;
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .avatar {
        width: 100px;
        height: 100px;
    }

    .item {
        padding: 16px;
    }
}

/* ===== 减少动画偏好 ===== */
@media (max-height: 620px) {
  .home-page .hello { padding: 12px 20px; }
  .home-page .hello h1 {
    margin-bottom: 10px;
    font-size: clamp(1.5rem, 4vw, 2.2rem);
  }
  .home-page .hello h2 { font-size: clamp(2.4rem, 8vw, 4rem); }
  .home-page .cta-row { margin-top: 18px; }
  .home-page > .footer, .nav-page > .footer { padding: 6px 0; }
  .home-page .footer p, .nav-page .footer p { margin: 0; font-size: .76rem; }
  .home-page .footer .c, .nav-page .footer .c { font-size: .66rem; line-height: 1.35; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    #startrack {
        animation: none !important;
    }

    .nav-pending {
        opacity: 1;
        animation: none !important;
    }
}

/* ============================================================
   以下为导航页（nav.html）追加样式，沿用上面的变量与卡片语言
   ============================================================ */
.nav-page { position: relative; z-index: 1; }

.nav-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(33, 33, 33, .82);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.nav-bar-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
}

.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 10px;
  background: rgba(255, 255, 255, .04);
  color: var(--text-primary);
  font-size: 13px;
  text-decoration: none;
  transition: background .2s, border-color .2s;
}

.nav-back:hover { background: rgba(255, 255, 255, .09); border-color: rgba(255, 255, 255, .18); }

.nav-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
}
.nav-count { font-size: 12px; color: var(--text-secondary); white-space: nowrap; font-variant-numeric: tabular-nums; }

.nav-search { position: relative; flex: 1; min-width: 0; max-width: 460px; margin-left: auto; }

.nav-search input {
  width: 100%;
  height: 38px;
  padding: 0 40px 0 34px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 11px;
  background: rgba(255, 255, 255, .05);
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}

.nav-search input::placeholder { color: rgba(255, 255, 255, .58); }
.nav-search input::-webkit-search-cancel-button { display: none; }

.nav-search input:focus {
  background: rgba(255, 255, 255, .08);
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(255, 107, 107, .14);
}

.nav-search svg {
  position: absolute; left: 11px; top: 50%;
  transform: translateY(-50%);
  width: 14px; height: 14px; fill: rgba(255, 255, 255, .4);
}

.nav-clear {
  position: absolute; right: 5px; top: 50%;
  transform: translateY(-50%);
  width: 30px; height: 30px;
  border: 0; border-radius: 7px;
  background: transparent;
  color: rgba(255, 255, 255, .66);
  font-size: 18px; line-height: 1;
  cursor: pointer;
  display: none;
}

.nav-clear:hover { background: rgba(255, 255, 255, .1); color: #fff; }

/* 分类横条 */
.nav-chips {
  display: flex;
  gap: 6px;
  padding: 0 0 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-chips::-webkit-scrollbar { display: none; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding: 5px 11px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 999px;
  background: rgba(255, 255, 255, .03);
  color: var(--text-secondary);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .18s var(--transition-timing), border-color .18s, color .18s;
}

.chip:hover { background: rgba(255, 255, 255, .08); color: #fff; }

.chip[aria-pressed="true"] {
  background: rgba(255, 107, 107, .16);
  border-color: rgba(255, 107, 107, .55);
  color: #fff;
}

.chip b { font-weight: 600; font-size: 10.5px; color: rgba(255, 255, 255, .62); }
.chip[aria-pressed="true"] b { color: rgba(255, 255, 255, .8); }

/* 模块与分栏 */
.nav-module {
  --module-accent: #9fb4ff;
  position: relative;
  padding: 34px 0 10px;
  scroll-margin-top: 130px;
}

.nav-module:first-child { padding-top: 20px; }
.nav-module + .nav-module { border-top: 1px solid rgba(255, 255, 255, .07); }
.nav-module[data-module="workspace"] { --module-accent: #ff9b9b; }
.nav-module[data-module="infrastructure"] { --module-accent: #66d9ce; }
.nav-module[data-module="mirrors"] { --module-accent: #f0ca72; }
.nav-module[data-module="delivery"] { --module-accent: #f3a7bd; }
.nav-module[data-module="reference"] { --module-accent: #a7b9ff; }
.nav-module[data-module="ai"] { --module-accent: #c6a7ff; }

.module-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.module-title-block { min-width: 0; }
.module-kicker {
  margin: 0 0 7px;
  color: var(--module-accent);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .16em;
  line-height: 1.4;
}
.module-title-line { display: flex; align-items: baseline; gap: 10px; }
.module-title-line h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.3;
}
.module-number { color: rgba(255, 255, 255, .42); font-size: 11px; font-variant-numeric: tabular-nums; }
.module-note { max-width: 660px; margin: 7px 0 0; color: rgba(255, 255, 255, .58); font-size: 12px; line-height: 1.65; }
.module-index {
  flex: none;
  color: rgba(255, 255, 255, .13);
  font-size: 28px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.05em;
  line-height: 1;
}

/* 小模块：每个原分类独立成块，块内入口左右两列 */
.small-modules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}
.small-module {
  min-width: 0;
  padding: 14px 16px 15px;
  border: 1px solid rgba(255, 255, 255, .065);
  border-radius: 12px;
  background: rgba(255, 255, 255, .016);
}
.small-module:last-child:nth-child(odd) { grid-column: 1 / -1; }
.small-module.is-empty:last-child:nth-child(odd) { grid-column: auto; }
.small-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 2px;
}
.small-heading { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.small-heading h3 {
  margin: 0;
  color: rgba(255, 255, 255, .9);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .01em;
  line-height: 1.45;
}
.small-count { color: rgba(255, 255, 255, .36); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.small-note { margin: 0 0 8px; color: rgba(255, 255, 255, .48); font-size: 10.5px; line-height: 1.55; }
.small-empty {
  margin-top: 6px;
  padding: 14px 12px;
  border: 1px dashed rgba(255, 255, 255, .1);
  border-radius: 9px;
  color: rgba(255, 255, 255, .42);
  font-size: 11.5px;
  line-height: 1.5;
  text-align: center;
}
.small-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 26px;
  align-items: start;
}
.small-columns .nav-list + .nav-list {
  padding-left: 26px;
  border-left: 1px solid rgba(255, 255, 255, .06);
}
.small-columns.is-single { grid-template-columns: 1fr; }
.small-columns.is-single .nav-list { padding-left: 0; border-left: 0; }

/* 紧凑入口行，说明仅在悬停/键盘聚焦时浮出 */
.nav-list { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nav-card {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 49px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: inherit;
  text-decoration: none;
  transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}
.nav-card:hover,
.nav-card:focus-visible {
  z-index: 30;
  background: rgba(255, 255, 255, .058);
  border-color: rgba(255, 255, 255, .08);
  transform: translateX(2px);
}

.nav-card .ico {
  flex: none;
  position: relative;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 9px;
  background: #eceef1;
  color: #1d1d1d;
}
.nav-card .ico.tone-dark { background: #26282d; border-color: rgba(255, 255, 255, .13); }
.nav-card .ico img { display: block; width: 24px; height: 24px; object-fit: contain; }
.nav-card .ico-letter { display: none; font-size: 14px; font-weight: 700; line-height: 1; }
.nav-card .ico.is-fallback .ico-letter { display: block; }
.nav-card .ico.is-fallback.c1 { background: rgba(255, 107, 107, .16); border-color: rgba(255, 107, 107, .28); color: #ffb5b5; }
.nav-card .ico.is-fallback.c2 { background: rgba(78, 205, 196, .16); border-color: rgba(78, 205, 196, .28); color: #9ae9e0; }
.nav-card .ico.is-fallback.c3 { background: rgba(255, 230, 109, .14); border-color: rgba(255, 230, 109, .26); color: #f5e39a; }
.nav-card .ico.is-fallback.c4 { background: rgba(120, 160, 255, .16); border-color: rgba(120, 160, 255, .28); color: #b5c8ff; }
.nav-card .ico.is-fallback.c5 { background: rgba(200, 140, 255, .16); border-color: rgba(200, 140, 255, .28); color: #ddc2ff; }

.link-copy { flex: 1; min-width: 0; }
.link-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.nav-card .t {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, .9);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-card .d {
  position: absolute;
  top: calc(100% + 7px);
  left: 8px;
  z-index: 40;
  width: max-content;
  min-width: 0;
  max-width: min(340px, calc(100% - 16px));
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 9px;
  background: #2b2d33;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .42);
  color: rgba(255, 255, 255, .78);
  font-size: 12px;
  line-height: 1.55;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity .16s ease, transform .16s ease;
}
.nav-card .d::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 37px;
  width: 8px;
  height: 8px;
  background: #2b2d33;
  border-top: 1px solid rgba(255, 255, 255, .12);
  border-left: 1px solid rgba(255, 255, 255, .12);
  transform: rotate(45deg);
}
.nav-card:hover .d,
.nav-card:focus-visible .d { opacity: 1; transform: translateY(0); }

.tag {
  flex: none;
  margin-left: auto;
  padding: 0 5px;
  border-radius: 4px;
  font-size: 9.5px;
  line-height: 16px;
  white-space: nowrap;
}

.tag-intra { background: rgba(255, 107, 107, .18); color: #ffa3a3; }
.tag-login { background: rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .68); }

.nav-pending {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 50;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 999px;
  background: #292929;
  color: var(--text-secondary);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%);
  animation: nav-pending-in .2s ease .4s forwards;
}

@keyframes nav-pending-in {
  to { opacity: 1; }
}

.nav-empty { padding: 60px 0; text-align: center; color: rgba(255, 255, 255, .66); font-size: 13px; }
.nav-empty.is-error { color: #ff9b9b; }

/* 首页新增：进入导航的按钮与高亮卡 */
.cta-row { display: flex; justify-content: center; margin-top: 34px; }

.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 26px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff6b6b, #4ecdc4);
  color: #1b1b1b;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: transform .25s var(--transition-timing), box-shadow .25s;
}

.cta:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(255, 107, 107, .3); }

.item.is-cta { border-color: rgba(255, 107, 107, .45); background: rgba(255, 107, 107, .1); }
.item.todo { opacity: .75; border-style: dashed; }
.item.todo .inner p { color: rgba(255, 255, 255, .62); }

@media (max-width: 900px) {
  .small-modules { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-bar-inner { flex-wrap: wrap; gap: 9px 10px; padding: 11px 0; }
  .nav-search { order: 3; flex: 0 0 100%; width: 100%; max-width: none; margin-left: 0; }
  .nav-search input { height: 42px; font-size: 16px; }
  .nav-clear { width: 32px; height: 32px; }
  .nav-chips { padding-bottom: 10px; }
  .chip { min-height: 36px; padding: 7px 12px; }
  .nav-module { padding-top: 26px; scroll-margin-top: 158px; }
  .small-module { padding: 13px 14px 14px; }
  .home-page > .footer, .nav-page > .footer { padding: 6px 0; }
  .home-page .footer p, .nav-page .footer p { line-height: 1.35; }
}

@media (max-width: 640px) {
  .small-columns { grid-template-columns: 1fr; }
  .small-columns .nav-list + .nav-list {
    margin-top: 2px;
    padding-top: 2px;
    padding-left: 0;
    border-top: 1px solid rgba(255, 255, 255, .06);
    border-left: 0;
  }
}

@media (hover: none) {
  .nav-card {
    align-items: flex-start;
    min-height: 58px;
    padding: 9px;
  }
  .nav-card:hover,
  .nav-card:focus-visible { transform: none; }
  .nav-card .d {
    position: static;
    width: auto;
    min-width: 0;
    max-width: none;
    margin-top: 2px;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    color: rgba(255, 255, 255, .54);
    font-size: 10.5px;
    opacity: 1;
    transform: none;
  }
  .nav-card .d::before { display: none; }
}

@media (pointer: coarse) {
  .nav-back { min-height: 40px; }
  .nav-clear { width: 34px; height: 34px; }
  .chip { min-height: 40px; padding: 8px 13px; }
  .nav-card { min-height: 58px; }
}

/* ============================================================
   修正：原站 .chtitle 作为 grid 子项只占一格，卡片被挤到右侧
   ============================================================ */
.links > .chtitle {
  grid-column: 1 / -1;
  width: 100%;
  margin-bottom: 12px;
}

/* 细节收尾：分类条右侧渐隐、待填卡片可读性 */
.nav-chips {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent 100%);
  mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent 100%);
}

/* 键盘可达性：焦点环只在键盘导航时出现 */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--brand, #ff6b6b);
  outline-offset: 2px;
}
