:root {
  --paper: #f4f6f1;
  --card: #ffffff;
  --ink: #17251f;
  --muted: #66736c;
  --line: #dce3dc;
  --deep: #102b24;
  --deep-2: #173b31;
  --accent: #0b7a60;
  --lime: #d9f275;
  --soft: #e9f1e9;
  --shadow: 0 18px 50px rgba(18, 44, 34, .08);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; line-height: 1.65; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; }
img, svg { display: block; }
.wrap { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 100; top: 10px; left: 10px; padding: 10px 16px; color: white; background: var(--deep); border-radius: 8px; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid #7db9ff; outline-offset: 3px; }

.site-header { position: sticky; z-index: 30; top: 0; border-bottom: 1px solid rgba(220, 227, 220, .9); background: rgba(244, 246, 241, .9); backdrop-filter: blur(16px); }
.nav { min-height: 76px; display: flex; align-items: center; gap: 30px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; letter-spacing: -.5px; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; color: var(--lime); background: var(--deep); border-radius: 11px; font-size: 20px; font-weight: 900; transform: rotate(-5deg); }
.brand > span:last-child { font-size: 16px; line-height: 1.1; }
.brand b { font-weight: 900; }
.brand small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 500; letter-spacing: 2px; }
.nav-links { display: flex; gap: 28px; margin-left: auto; }
.nav-links a { color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none; }
.nav-links a:hover { color: var(--accent); }
.button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: 14px; padding: 0 21px; border: 1px solid transparent; border-radius: 11px; font-weight: 700; text-decoration: none; transition: transform .2s, background .2s, border-color .2s; }
.button:hover { transform: translateY(-2px); }
.button-small { min-height: 38px; padding: 0 15px; font-size: 13px; }
.button-outline { border-color: var(--line); background: transparent; }
.button-outline:hover { border-color: var(--accent); }
.button-accent { color: var(--deep); background: var(--lime); }
.button-accent:hover { background: #e5fa92; }
.button-ghost { color: #e7f0e9; border-color: rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .04); }
.button-dark { color: white; background: var(--deep); }

.hero { position: relative; display: grid; grid-template-columns: 1.45fr .8fr; gap: 50px; margin-top: 28px; padding: 64px; overflow: hidden; color: white; background: var(--deep); border-radius: 26px; }
.hero::before { position: absolute; inset: 0; content: ""; opacity: .13; background-image: linear-gradient(rgba(255,255,255,.25) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.25) 1px, transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(to right, black, transparent 80%); }
.hero::after { position: absolute; right: -120px; bottom: -170px; width: 440px; height: 440px; content: ""; border: 70px solid rgba(217, 242, 117, .08); border-radius: 50%; }
.hero-copy, .hero-board { position: relative; z-index: 1; }
.eyebrow, .section-kicker { margin: 0 0 15px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: 2px; }
.eyebrow { display: flex; align-items: center; gap: 9px; color: var(--lime); }
.eyebrow span { width: 20px; height: 2px; background: var(--lime); }
h1 { margin: 0; font-size: clamp(46px, 6vw, 76px); line-height: 1.07; letter-spacing: -4px; }
h1 em { color: var(--lime); font-style: normal; }
.hero-lede { max-width: 590px; margin: 25px 0 30px; color: #b9c9c0; font-size: 16px; line-height: 1.85; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { margin: 22px 0 0; color: #81988b; font-size: 12px; }
.hero-board { align-self: center; padding: 25px; color: var(--ink); background: #f7f9f4; border: 1px solid rgba(255,255,255,.3); border-radius: 17px; box-shadow: 16px 18px 0 rgba(0,0,0,.12); transform: rotate(1.5deg); }
.board-top { display: flex; justify-content: space-between; padding-bottom: 17px; color: var(--muted); border-bottom: 1px solid var(--line); font-family: ui-monospace, monospace; font-size: 10px; letter-spacing: 1px; }
.live-dot { color: var(--accent); }
.live-dot::before { display: inline-block; width: 6px; height: 6px; margin-right: 5px; content: ""; background: #23a36f; border-radius: 50%; }
.board-number { display: flex; align-items: baseline; gap: 10px; padding: 21px 0; }
.board-number strong { color: var(--deep); font-size: 54px; line-height: 1; letter-spacing: -3px; }
.board-number span { color: var(--muted); font-size: 13px; }
.board-row { display: flex; justify-content: space-between; padding: 11px 0; border-top: 1px dashed var(--line); font-size: 12px; }
.board-row span { color: var(--muted); }
.board-row a { color: var(--accent); font-weight: 800; }
.board-foot { margin: 20px -25px -25px; padding: 12px 25px; color: var(--lime); background: var(--deep-2); border-radius: 0 0 16px 16px; font-family: ui-monospace, monospace; font-size: 10px; letter-spacing: 1.5px; }

.quick-start { display: flex; align-items: center; gap: 9px; padding: 20px 4px 0; overflow-x: auto; white-space: nowrap; }
.quick-start > span { margin-right: 5px; color: var(--muted); font-size: 12px; }
.quick-start button { padding: 6px 13px; color: #4c5e53; border: 1px solid var(--line); background: transparent; border-radius: 99px; font-size: 12px; }
.quick-start button:hover { color: var(--accent); border-color: var(--accent); }
.catalog { padding: 75px 0 85px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 25px; }
.section-heading h2, .guide h2, .about h2 { margin: 0; font-size: 38px; line-height: 1.2; letter-spacing: -1.5px; }
.section-heading > p { margin: 0; color: var(--muted); font-size: 13px; }
.toolbar { display: grid; grid-template-columns: 1fr auto; gap: 12px; }
.search-box { display: flex; min-height: 54px; align-items: center; gap: 12px; padding: 0 17px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.search-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(11,122,96,.09); }
.search-box > span:first-child { color: var(--muted); font-size: 25px; }
.search-box input { width: 100%; color: var(--ink); border: 0; outline: 0; background: transparent; }
.search-box input::placeholder { color: #96a199; }
kbd { padding: 1px 7px; color: #87938b; border: 1px solid var(--line); background: var(--paper); border-radius: 5px; font-family: inherit; font-size: 12px; }
.sort-control { display: flex; align-items: center; gap: 10px; padding: 0 15px; color: var(--muted); background: var(--card); border: 1px solid var(--line); border-radius: 12px; font-size: 12px; }
.sort-control select { padding: 10px 3px; color: var(--ink); border: 0; outline: 0; background: transparent; font-weight: 600; }
.filter-row { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-top: 17px; }
.categories { display: flex; flex-wrap: wrap; gap: 7px; }
.category-button { padding: 7px 13px; color: var(--muted); border: 1px solid transparent; background: transparent; border-radius: 8px; font-size: 12px; }
.category-button:hover { background: var(--soft); }
.category-button.active { color: white; background: var(--deep); }
.filter-options { display: flex; flex-shrink: 0; align-items: center; gap: 15px; padding-top: 7px; font-size: 12px; }
.check-control { display: flex; align-items: center; gap: 6px; color: var(--muted); white-space: nowrap; }
.check-control input { accent-color: var(--accent); }
.favorites-filter { padding: 0; color: var(--muted); border: 0; background: transparent; white-space: nowrap; }
.favorites-filter.active { color: #a56b00; }
.result-line { display: flex; justify-content: space-between; margin: 26px 0 16px; color: var(--muted); font-size: 12px; }
.result-line p { margin: 0; }
.result-line button { padding: 0; color: var(--accent); border: 0; background: transparent; font-size: 12px; }
.skill-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.skill-card { position: relative; display: flex; min-width: 0; min-height: 300px; flex-direction: column; padding: 22px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; transition: transform .2s, border-color .2s, box-shadow .2s; }
.skill-card:hover { border-color: #a9c2b2; box-shadow: var(--shadow); transform: translateY(-4px); }
.card-top { display: flex; align-items: start; justify-content: space-between; gap: 15px; }
.skill-icon { display: grid; width: 43px; height: 43px; flex-shrink: 0; place-items: center; color: var(--deep); background: #e4efdf; border-radius: 12px; font-size: 17px; font-weight: 900; text-transform: uppercase; }
.skill-card[data-category="开发编程"] .skill-icon { background: #e0edff; }
.skill-card[data-category="创作办公"] .skill-icon { background: #fff0d9; }
.skill-card[data-category="联网研究"] .skill-icon { background: #e5e1ff; }
.skill-card[data-category="记忆知识"] .skill-icon { background: #dcefeb; }
.skill-card[data-category="技能管理"] .skill-icon { background: #f4e2ef; }
.favorite-button { width: 32px; height: 32px; padding: 0; color: #89958d; border: 0; background: transparent; border-radius: 8px; font-size: 22px; line-height: 1; }
.favorite-button:hover { background: var(--soft); }
.favorite-button.active { color: #b27a05; }
.card-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 17px; }
.badge { display: inline-flex; align-items: center; padding: 3px 7px; color: var(--muted); background: var(--paper); border-radius: 5px; font-size: 10px; font-weight: 650; }
.badge.verified { color: #087353; background: #e1f3e8; }
.badge.pending { color: #91661b; background: #fff3d9; }
.skill-card h3 { margin: 12px 0 7px; overflow-wrap: anywhere; font-size: 17px; line-height: 1.35; letter-spacing: -.3px; }
.skill-description { display: -webkit-box; margin: 0; overflow: hidden; color: var(--muted); font-size: 13px; line-height: 1.7; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.card-meta { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 20px; color: var(--muted); font-size: 11px; }
.card-meta .stars { color: #8c650c; font-weight: 700; }
.card-meta span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 15px; padding-top: 14px; border-top: 1px solid #edf0ec; }
.details-button { padding: 0; color: var(--accent); border: 0; background: transparent; font-size: 12px; font-weight: 800; }
.repo-link { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 600; text-decoration: none; }
.repo-link:hover { color: var(--accent); }
.load-more-wrap { display: flex; justify-content: center; margin-top: 28px; }
.button-load { min-width: 180px; color: var(--deep); border-color: var(--line); background: var(--card); }
.empty-state { padding: 60px 20px; text-align: center; background: var(--card); border: 1px dashed #bdc9bf; border-radius: 16px; }
.empty-state > span { color: #9caf9f; font-size: 46px; }
.empty-state h3 { margin: 10px 0; }
.empty-state p { margin: 0 0 22px; color: var(--muted); }
.empty-state .button { margin-inline: auto; }
.error-state { grid-column: 1 / -1; padding: 45px; text-align: center; background: var(--card); border: 1px solid #ead3c6; border-radius: 16px; }
.error-state p { color: var(--muted); }
.error-state button { padding: 8px 18px; color: white; border: 0; background: var(--deep); border-radius: 8px; }
.skeleton { height: 300px; background: linear-gradient(100deg, #e8ece6 20%, #f5f7f3 40%, #e8ece6 60%); background-size: 200% 100%; border-radius: 16px; animation: shimmer 1.5s infinite; }
@keyframes shimmer { to { background-position-x: -200%; } }

.guide { display: grid; grid-template-columns: .8fr 1.2fr; gap: 70px; padding: 60px; color: white; background: var(--deep); border-radius: 24px; }
.guide .section-kicker { color: var(--lime); }
.guide-intro > p:last-child { margin-top: 20px; color: #aebfb5; font-size: 14px; }
.guide-steps { display: grid; gap: 12px; }
.guide-steps article { display: flex; gap: 18px; padding: 20px; background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.1); border-radius: 13px; }
.guide-steps article > span { color: var(--lime); font-family: ui-monospace, monospace; font-size: 12px; }
.guide-steps h3 { margin: 0 0 5px; font-size: 15px; }
.guide-steps p { margin: 0; color: #aebfb5; font-size: 12px; }
.code-line { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 8px 10px; overflow: hidden; color: #dce8df; background: rgba(0,0,0,.22); border-radius: 7px; }
.code-line code { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.code-line button { flex-shrink: 0; margin-left: auto; padding: 3px 8px; color: var(--deep); border: 0; background: var(--lime); border-radius: 4px; font-size: 10px; font-weight: 800; }
.about { display: grid; grid-template-columns: .8fr 1.2fr; gap: 70px; padding: 70px 10px; }
.about-copy { color: var(--muted); font-size: 13px; }
.about-copy p { margin: 0 0 16px; }
.about-copy a { color: var(--accent); }
.site-footer { padding: 23px 0; color: #a7b9ad; background: #0b211b; font-size: 11px; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; }
.footer-inner b { color: var(--lime); }
.footer-inner a { color: #dce8df; }

.skill-dialog { width: min(680px, calc(100% - 28px)); max-height: calc(100vh - 60px); padding: 35px; color: var(--ink); border: 0; background: var(--card); border-radius: 20px; box-shadow: 0 30px 100px rgba(0,0,0,.28); }
.skill-dialog::backdrop { background: rgba(8, 26, 20, .65); backdrop-filter: blur(5px); }
.dialog-close { position: absolute; top: 15px; right: 15px; width: 34px; height: 34px; color: var(--muted); border: 0; background: var(--paper); border-radius: 50%; font-size: 24px; line-height: 1; }
.dialog-kicker { margin: 0 0 8px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: 1.5px; }
.skill-dialog h2 { margin: 0 35px 12px 0; overflow-wrap: anywhere; font-size: 27px; line-height: 1.25; }
.dialog-description { color: var(--muted); font-size: 14px; }
.dialog-badges { display: flex; flex-wrap: wrap; gap: 7px; margin: 17px 0; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 22px 0; border-top: 1px solid var(--line); }
.detail-item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.detail-item:nth-child(odd) { padding-right: 15px; }
.detail-item dt { color: var(--muted); font-size: 10px; }
.detail-item dd { margin: 2px 0 0; overflow-wrap: anywhere; font-size: 12px; font-weight: 650; }
.install-label { margin: 0 0 7px; color: var(--muted); font-size: 11px; font-weight: 700; }
.install-box { display: flex; align-items: start; gap: 10px; padding: 14px; color: #e6f0e8; background: var(--deep); border-radius: 10px; }
.install-box code { flex: 1; overflow-wrap: anywhere; font-size: 12px; line-height: 1.7; }
.install-box button { flex-shrink: 0; padding: 5px 10px; color: var(--deep); border: 0; background: var(--lime); border-radius: 6px; font-size: 11px; font-weight: 800; }
.dialog-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }
.dialog-actions .button { min-height: 40px; font-size: 12px; }
.dialog-license { color: var(--muted); font-size: 11px; }
.toast { position: fixed; z-index: 100; bottom: 25px; left: 50%; max-width: calc(100% - 40px); padding: 11px 20px; color: white; background: #173b31; border: 1px solid rgba(255,255,255,.2); border-radius: 99px; box-shadow: 0 10px 35px rgba(0,0,0,.2); opacity: 0; pointer-events: none; transform: translate(-50%, 15px); transition: .2s; font-size: 12px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding: 48px; }
  .hero-board { max-width: 450px; transform: none; }
  .skill-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-row { flex-direction: column; }
  .guide, .about { gap: 35px; padding: 45px; }
}
@media (max-width: 680px) {
  .wrap { width: min(100% - 24px, 1180px); }
  .nav { min-height: 66px; gap: 12px; }
  .nav-links { display: none; }
  .nav > .button { margin-left: auto; }
  .hero { gap: 35px; margin-top: 12px; padding: 30px 24px; border-radius: 18px; }
  h1 { font-size: 46px; letter-spacing: -2.5px; }
  .hero-lede { font-size: 14px; }
  .hero-actions .button { width: 100%; }
  .hero-board { padding: 20px; }
  .board-foot { margin: 18px -20px -20px; }
  .quick-start { padding-top: 15px; }
  .catalog { padding: 52px 0; }
  .section-heading h2, .guide h2, .about h2 { font-size: 31px; }
  .toolbar { grid-template-columns: 1fr; }
  .sort-control { min-height: 46px; justify-content: space-between; }
  .filter-options { flex-wrap: wrap; }
  .skill-grid { grid-template-columns: 1fr; }
  .skill-card { min-height: 280px; }
  .guide, .about { grid-template-columns: 1fr; gap: 28px; padding: 30px 24px; border-radius: 18px; }
  .about { padding-inline: 4px; }
  .footer-inner { flex-direction: column; gap: 8px; }
  .skill-dialog { padding: 27px 22px; }
  .detail-grid { grid-template-columns: 1fr; }
  .dialog-actions { align-items: stretch; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
