:root {
  color-scheme: light;
  --ink: #192338;
  --muted: #5e6b80;
  --accent: #6653e8;
  --accent-hover: #5541d1;
  --line: #e5e7f0;
  --paper: #fafbfe;
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 4px;
}
svg { flex: none; width: 18px; height: 18px; vertical-align: middle; }
.skip { position: absolute; z-index: 10; top: 8px; left: 12px; padding: 8px 14px; background: white; transform: translateY(-150%); }
.skip:focus { transform: none; }
.wrap { width: min(1120px, calc(100% - 80px)); margin-inline: auto; }
.site-header {
  position: sticky; z-index: 5; top: 0; min-height: 72px; padding: 0 clamp(20px, 4vw, 60px);
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  border-bottom: 1px solid var(--line); background: rgb(255 255 255 / 94%); backdrop-filter: blur(14px);
}
.brand { display: inline-flex; gap: 10px; align-items: center; font-size: 21px; font-weight: 750; letter-spacing: -.04em; white-space: nowrap; }
.brand strong { color: var(--accent); font-family: Georgia, serif; letter-spacing: -.02em; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; background: var(--accent); color: white; border-radius: 9px; }
.top-links { display: flex; align-items: center; gap: 24px; font-size: 14px; color: var(--muted); }
.top-links a { padding: 8px 0; }
nav a:hover, nav [aria-current] { color: var(--accent); }
nav [aria-current] { font-weight: 650; }
.mobile-menu { display: none; }
.hero {
  border-bottom: 1px solid var(--line);
  background: radial-gradient(circle, #aebce945 1px, transparent 1.4px) 0 0 / 21px 21px,
              linear-gradient(105deg, #f6f8ff 15%, #edf0ff 100%);
}
.hero-grid {
  min-height: 348px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: center; gap: 26px;
}
.hero-copy { padding: 38px 0; }
.kicker { display: flex; align-items: center; gap: 8px; margin: 0 0 7px; color: #5d4ccb; font-size: 12px; font-weight: 740; letter-spacing: .12em; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 14px; font-size: clamp(37px, 4.4vw, 63px); letter-spacing: -.055em; line-height: 1.15; }
h1 span { color: #5b4bd4; }
.intro { max-width: 34em; margin-bottom: 21px; color: var(--muted); font-size: 17px; line-height: 1.8; }
.hero-art { width: 100%; max-width: 500px; height: auto; justify-self: end; }
.hero-link, .back { display: inline-flex; align-items: center; gap: 8px; padding-block: 5px; color: #5341c5; font-size: 14px; font-weight: 650; }
.hero-link:hover, .back:hover { text-decoration: underline; text-underline-offset: 4px; }
.library { padding: 35px 0 52px; scroll-margin-top: 74px; }
.section-heading, .controls, .card-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-heading h2 { margin: 0; font-size: 25px; line-height: 1.3; letter-spacing: -.035em; }
.count { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; align-self: end; }
.controls { margin: 19px 0 18px; flex-wrap: wrap; }
.filters { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.filters button {
  min-height: 38px; padding: 5px 13px; display: inline-flex; align-items: center; gap: 6px;
  border-radius: 8px; border: 1px solid var(--line); background: white; color: var(--muted); font-size: 13px;
}
.filters button svg { width: 15px; height: 15px; }
.filters button:hover { border-color: #b2a7f4; }
.filters button[aria-pressed="true"] { color: white; border-color: var(--accent); background: var(--accent); }
.search {
  display: flex; width: min(100%, 255px); min-height: 38px; align-items: center; gap: 8px; padding: 0 11px;
  color: var(--muted); background: white; border: 1px solid var(--line); border-radius: 8px;
}
.search:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.search input { min-width: 0; width: 100%; border: 0; outline: none; background: transparent; color: var(--ink); font-size: 14px; }
.search input:focus-visible { outline: none; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: 16px; margin-top: 18px; }
.card {
  display: flex; position: relative; flex-direction: column; min-width: 0; padding: 10px;
  border: 1px solid var(--line); border-radius: 14px; background: white;
  box-shadow: 0 5px 14px #263b6810; transition: border-color 150ms, box-shadow 150ms;
}
.card:has(.card-link:hover), .card:focus-within { border-color: #b5acf3; box-shadow: 0 7px 20px #4f42a519; }
.cover {
  position: relative; isolation: isolate; overflow: hidden; height: 134px; border-radius: 9px;
  background: linear-gradient(112deg, var(--cover-start), var(--cover-end));
  color: var(--cover-ink);
}
.violet { --cover-start: #f0edff; --cover-end: #dcd9ff; --cover-ink: #5440bc; --tile: #6a55e8; --cover-orbit: #b0a5f4; }
.mint { --cover-start: #e9faf4; --cover-end: #cdeee6; --cover-ink: #176554; --tile: #268c77; --cover-orbit: #85c9b7; }
.category {
  position: absolute; z-index: 2; top: 11px; left: 11px; display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px; color: var(--cover-ink); background: #ffffffdc; border-radius: 6px; font-size: 12px; font-weight: 650;
}
.category svg { width: 15px; height: 15px; }
.cover-orbit { position: absolute; width: 54%; height: 100px; top: 24px; left: 31%; border: 1px solid var(--cover-orbit); border-radius: 50%; opacity: .72; transform: rotate(-14deg); }
.cover-paper {
  position: absolute; display: grid; align-content: center; gap: 7px; width: 88px; height: 70px; top: 31px; left: calc(50% - 62px);
  padding: 14px; border: 1px solid white; border-radius: 11px; background: #ffffffad; transform: rotate(-13deg);
  box-shadow: 0 12px 24px #22307118;
}
.cover-paper i { height: 4px; width: 100%; border-radius: 3px; background: var(--cover-orbit); }
.cover-paper i:last-child { width: 63%; }
.cover-tile {
  position: absolute; display: grid; place-items: center; width: 62px; height: 62px; top: 42px; left: calc(50% + 5px);
  border: 1px solid #ffffff65; border-radius: 14px; background: var(--tile); color: white;
  box-shadow: 0 10px 18px #263b6830; transform: rotate(9deg);
}
.cover-tile svg { width: 33px; height: 33px; }
.card-content { flex: 1; padding: 13px 7px 10px; }
.card h3 { margin-bottom: 7px; font-size: 18px; letter-spacing: -.025em; line-height: 1.45; }
.card h3 a { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.card h3 svg { width: 16px; color: var(--accent); }
.card-link::after { content: ""; position: absolute; inset: 0; border-radius: 14px; }
.card-content p { margin-bottom: 10px; color: var(--muted); font-size: 14px; line-height: 1.75; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 0; padding: 0; list-style: none; }
.tags li { padding: 1px 7px; border-radius: 5px; background: #f2f3f8; color: #546078; font-size: 11px; }
.card-footer { border-top: 1px solid #eef0f6; margin: 1px 7px 0; padding: 10px 0 3px; }
.card-footer span { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; }
.card-footer span svg { width: 15px; height: 15px; }
.download {
  position: relative; z-index: 1; min-height: 38px; padding: 6px 10px; display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; border-radius: 8px; color: white; background: var(--accent); font-size: 13px; font-weight: 630; white-space: nowrap;
}
.download svg { width: 16px; height: 16px; }
.download:hover { background: var(--accent-hover); }
.empty { margin: 22px 0 0; padding: 28px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 12px; }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); background: #fff; font-size: 12px; }
.site-footer .wrap { min-height: 66px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.site-footer span:last-child { letter-spacing: .11em; }
.detail { padding-block: 33px 56px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(235px, 300px); gap: 36px; align-items: start; margin-top: 26px; }
.detail h1 { font-size: clamp(31px, 4vw, 50px); }
.detail-copy section { padding-top: 19px; margin-top: 19px; border-top: 1px solid var(--line); }
.detail-copy h2 { font-size: 18px; margin-bottom: 7px; }
.detail-copy section p, blockquote { color: var(--muted); margin: 0; }
blockquote { padding: 10px 13px; border-left: 2px solid var(--accent); background: #f1effd; }
.detail-aside { grid-column: 2; grid-row: 1; background: white; border: 1px solid var(--line); border-radius: 14px; padding: 10px; }
.detail-aside > div:last-child { padding: 12px 4px 4px; display: flex; justify-content: space-between; align-items: center; gap: 6px; flex-wrap: wrap; }
.detail-aside p { color: var(--muted); font-size: 13px; margin: 0; }
@media (max-width: 740px) {
  .wrap { width: calc(100% - 36px); }
  .hero-grid { min-height: 285px; gap: 8px; }
  .intro { font-size: 15px; }
  .detail-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .detail-aside { grid-column: 1; grid-row: auto; }
}
@media (max-width: 600px) {
  .top-links { display: none; }
  .mobile-menu { position: relative; display: block; }
  .mobile-menu summary { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 8px; list-style: none; display: grid; place-items: center; cursor: pointer; }
  .mobile-menu summary::-webkit-details-marker { display: none; }
  .mobile-menu nav { position: absolute; top: 43px; right: 0; min-width: 117px; display: grid; padding: 6px; background: white; border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 6px 20px #263b681a; }
  .mobile-menu nav a { padding: 7px 10px; font-size: 14px; }
}
@media (max-width: 490px) {
  .site-header { min-height: 60px; padding-inline: 18px; }
  .brand { font-size: 19px; }
  .hero-grid { grid-template-columns: 1fr; gap: 0; padding-top: 25px; }
  .hero-copy { padding: 0; }
  .hero-art { max-width: 268px; justify-self: center; }
  .intro { margin-bottom: 10px; }
  .library { padding: 26px 0 32px; scroll-margin-top: 62px; }
  .controls { gap: 9px; margin-top: 13px; }
  .search { width: 100%; min-height: 42px; }
  .download { min-height: 42px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
.blue { --cover-start: #edf5ff; --cover-end: #d6e6ff; --cover-ink: #2556a8; --tile: #3d6ac7; --cover-orbit: #9bb9eb; }
