:root {
  --page-bg: #f4f7fc;
  --surface: #fff;
  --text: #171b27;
  --muted: #7d8496;
  --line: #e8ecf4;
  --primary: #3567f6;
  --primary-soft: #edf2ff;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --shadow: 0 18px 48px #27385f14;
  --content-width: 1360px;
  --motion-fast: 0.2s;
  --motion-medium: 0.3s;
  --motion-slow: 0.6s;
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring-avatar: cubic-bezier(0.69, 0.39, 0, 1.21);
  --ease-spring-flip: cubic-bezier(0, 0, 0, 1.29);
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  color: var(--text);
  background:
    radial-gradient(circle at 12% 5%, #4c82ff14, transparent 26rem),
    radial-gradient(circle at 90% 14%, #6df1c914, transparent 24rem),
    var(--page-bg);
  -webkit-font-smoothing: antialiased;
  margin: 0;
  font-family:
    Inter,
    PingFang SC,
    Microsoft YaHei,
    system-ui,
    -apple-system,
    sans-serif;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
}
.sr-only {
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  width: 1px;
  height: 1px;
  padding: 0;
  position: absolute;
  overflow: hidden;
}
:where(a, button, input, textarea, select, [tabindex]):focus-visible {
  outline-offset: 3px;
  outline: 3px solid #3567f657;
}
.site-shell {
  width: min(calc(100% - 40px), var(--content-width));
  margin-inline: auto;
}
[data-reveal] {
  opacity: 1;
  transition:
    opacity 0.58s cubic-bezier(0.2, 0.7, 0.2, 1) var(--reveal-delay, 0s),
    transform 0.58s cubic-bezier(0.2, 0.7, 0.2, 1) var(--reveal-delay, 0s);
  transform: none;
}
[data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}
.site-header {
  z-index: 30;
  height: 56px;
  box-shadow: none;
  backdrop-filter: none;
  background: 0 0;
  border-bottom: 1px solid #0000;
  transition:
    background-color 0.26s,
    border-color 0.26s,
    box-shadow 0.26s,
    backdrop-filter 0.26s;
  position: sticky;
  top: 0;
}
.site-header.is-scrolled {
  backdrop-filter: blur(16px) saturate(145%);
  background: #ffffffeb;
  border-bottom-color: #e4e9f3c7;
  box-shadow: 0 8px 24px #23304e0e;
}
.header-inner {
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  height: 100%;
  display: flex;
  position: relative;
}
.brand {
  letter-spacing: -0.025em;
  white-space: nowrap;
  flex: 0 0 190px;
  align-items: center;
  gap: 9px;
  width: 190px;
  min-width: 0;
  font-size: 16px;
  display: inline-flex;
}
.brand-mark {
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  display: grid;
}
.brand-mark img {
  object-fit: contain;
  width: 44px;
  height: 44px;
  display: block;
}
.brand-label-stack {
  flex: 1;
  min-width: 0;
  display: grid;
  overflow: hidden;
}
.brand-label-stack > * {
  white-space: nowrap;
  text-overflow: ellipsis;
  opacity: 1;
  min-width: 0;
  transition:
    opacity 0.25s var(--ease-standard),
    transform 0.25s var(--ease-standard);
  grid-area: 1/1;
  overflow: hidden;
  transform: none;
}
[data-header-context-title] {
  opacity: 0;
  transform: translateY(100%);
}
.brand-lockup {
  align-content: center;
  gap: 1px;
  display: grid;
}
.brand-name {
  color: #202533;
  letter-spacing: -0.055em;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.05;
  display: block;
}
.brand-name em {
  color: #ef3828;
  letter-spacing: -0.04em;
  font-style: normal;
}
.brand-subtitle {
  color: #7c8799;
  align-items: baseline;
  gap: 7px;
  line-height: 1;
  display: flex;
}
.brand-subtitle b {
  color: #364053;
  letter-spacing: 0.12em;
  font-size: 10px;
  font-weight: 800;
}
.brand-subtitle small {
  color: #9da7b6;
  letter-spacing: 0.13em;
  font-size: 7px;
  font-weight: 700;
}
.site-primary-navigation {
  background: #ffffffb8;
  border: 1px solid #dce2ede6;
  border-radius: 12px;
  flex: none;
  align-items: center;
  gap: 5px;
  padding: 4px;
  display: flex;
  box-shadow: 0 5px 16px #23304e0b;
}
.site-primary-navigation a {
  color: #4f5d72;
  white-space: nowrap;
  border-radius: 9px;
  justify-content: center;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 800;
  transition:
    color 0.18s,
    background-color 0.18s,
    box-shadow 0.18s;
  display: inline-flex;
}
.site-primary-navigation a:hover {
  color: var(--primary);
  background: var(--primary-soft);
}
.site-primary-navigation a[aria-current="page"] {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 5px 12px #3567f633;
}
.header-actions {
  flex: none;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  display: flex;
}
.icon-button,
.menu-button,
.shop-button,
.social-button {
  color: #343a4a;
  box-shadow: none;
  cursor: pointer;
  background: 0 0;
  border-radius: 10px;
  place-items: center;
  padding: 0;
  transition:
    color 0.2s,
    background-color 0.2s,
    border-color 0.2s,
    transform 0.2s;
  display: grid;
}
.social-button,
.shop-button {
  justify-content: center;
  align-items: center;
}
.icon-button {
  border: 0;
  width: 40px;
  height: 40px;
}
.icon-button svg {
  fill: currentColor;
  width: 22px;
  height: 22px;
}
.menu-button {
  border: 0;
  align-content: center;
  justify-items: center;
  gap: 3px;
  width: 36px;
  height: 36px;
  display: none;
}
.menu-button span {
  background: currentColor;
  border-radius: 99px;
  width: 17px;
  height: 2px;
}
.mobile-quick-menu,
.mobile-menu-backdrop {
  display: none;
}
.shop-button,
.social-button {
  color: #343a4a;
  white-space: nowrap;
  background: #ffffffad;
  border: 1px solid #dce1ebdb;
  border-radius: 10px;
  justify-content: center;
  align-items: center;
  gap: 7px;
  width: auto;
  min-height: 38px;
  padding: 0 11px;
  font-size: 12px;
  font-weight: 720;
  display: inline-flex;
  box-shadow: 0 3px 10px #23304e0b;
}
.shop-button img,
.social-button img {
  object-fit: contain;
  border-radius: 6px;
  flex: none;
  width: 22px;
  height: 22px;
}
.social-button-bilibili img {
  border-radius: 6px;
}
@media (hover: hover) and (pointer: fine) {
  .icon-button:hover,
  .menu-button:hover {
    color: var(--primary);
    background: #3567f617;
    transform: translateY(-1px);
  }
  .shop-button:hover,
  .social-button:hover {
    color: #d94b14;
    background: #ff661f14;
    border-color: #ff5b1f3d;
    transform: translateY(-1px);
  }
}
@media (width>=761px) and (width<=1100px) {
  .header-inner {
    gap: 18px;
  }
  .header-actions :is(.shop-button, .social-button) {
    width: 38px;
    padding: 0;
  }
  .header-actions :is(.shop-button, .social-button) > span {
    display: none;
  }
}
@media (width<=1100px) {
  .site-shell {
    width: min(calc(100% - 24px), var(--content-width));
  }
  .header-inner {
    gap: 8px;
  }
  .menu-button {
    width: 44px;
    height: 44px;
    display: grid;
  }
  .header-actions > .icon-button {
    width: 44px;
    height: 44px;
  }
  .brand {
    flex: auto;
    gap: 7px;
  }
  .brand-mark,
  .brand-mark img {
    width: 36px;
    height: 36px;
  }
  .brand-name {
    font-size: 18px;
  }
  .brand-subtitle small {
    display: none;
  }
  .header-actions {
    gap: 4px;
  }
  .social-button {
    gap: 0;
    width: 36px;
    min-height: 36px;
    padding: 0;
  }
  .social-button--qq img {
    width: 24px;
    height: 24px;
  }
  .social-button > span:last-child,
  .header-actions > .social-button,
  .header-actions > .shop-button,
  .site-primary-navigation,
  .site-header .site-custom-navigation {
    display: none;
  }
  body.mobile-menu-open {
    overflow: hidden;
  }
  .mobile-menu-backdrop {
    z-index: 39;
    backdrop-filter: blur(2px);
    background: #16223a1f;
    border: 0;
    width: 100%;
    height: calc(100vh - 56px);
    padding: 0;
    display: block;
    position: fixed;
    inset: 56px 0 0;
  }
  .mobile-quick-menu {
    z-index: 40;
    max-height: calc(100vh - 80px);
    max-height: calc(100dvh - 80px - env(safe-area-inset-bottom, 0px));
    overscroll-behavior: contain;
    background: #fffffff7;
    border: 1px solid #d6e0f2eb;
    border-radius: 18px;
    padding: 14px;
    display: block;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    overflow-y: auto;
    box-shadow: 0 18px 44px #2f426c2e;
  }
  .mobile-quick-menu-title {
    color: #7a879d;
    letter-spacing: 0.12em;
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 800;
  }
  .mobile-quick-menu-links {
    gap: 6px;
    display: grid;
  }
  .mobile-quick-link {
    color: #28364e;
    background: #fbfcff;
    border: 1px solid #e3e9f3;
    border-radius: 12px;
    grid-template-columns: 28px minmax(0, 1fr) auto 20px;
    align-items: center;
    gap: 9px;
    min-height: 46px;
    padding: 0 10px;
    font-size: 14px;
    font-weight: 720;
    display: grid;
  }
  .mobile-quick-link img {
    object-fit: contain;
    border-radius: 6px;
    width: 24px;
    height: 24px;
    display: block;
  }
  .mobile-quick-link.is-site-navigation,
  .mobile-quick-link.mobile-shop-subscription {
    grid-template-columns: 28px minmax(0, 1fr) 20px;
  }
  .mobile-quick-link[aria-current="page"] {
    color: #225fb9;
    background: #eef5ff;
    border-color: #a9c4f2;
  }
  .mobile-quick-nav-icon {
    color: #326fca;
    background: #eaf2ff;
    border-radius: 8px;
    place-items: center;
    width: 26px;
    height: 26px;
    display: grid;
  }
  .mobile-quick-nav-icon svg {
    width: 17px;
    height: 17px;
  }
  .mobile-quick-link small {
    color: #75849a;
    white-space: nowrap;
    background: #f0f4fa;
    border-radius: 6px;
    padding: 3px 6px;
    font-size: 10px;
    font-weight: 650;
  }
  .mobile-quick-link-arrow {
    color: #9aa8bb;
    text-align: center;
    font-size: 17px;
  }
  .mobile-quick-link > span:nth-child(2) {
    overflow-wrap: anywhere;
    min-width: 0;
  }
  .mobile-quick-link:active {
    background: #f1f6ff;
    border-color: #b8cdf4;
  }
}
@media (width<=380px) {
  .brand {
    gap: 6px;
  }
  .brand-mark,
  .brand-mark img {
    width: 28px;
    height: 28px;
  }
  .brand-name {
    letter-spacing: -0.06em;
    font-size: 16px;
  }
  .brand-subtitle {
    display: none;
  }
}
[hidden] {
  display: none !important;
}
body.search-open {
  overflow: hidden;
}
.search-overlay {
  z-index: 100;
  backdrop-filter: blur(16px) saturate(80%);
  background: #f8faffbd;
  justify-content: center;
  align-items: flex-start;
  padding: 128px 20px 40px;
  display: flex;
  position: fixed;
  inset: 0;
}
.search-dialog {
  width: min(640px, 100%);
  max-height: calc(100vh - 168px);
  color: var(--text);
  background: #fffffff5;
  border: 1px solid #e2e7f1;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 28px 80px #2c3c6029;
}
.search-dialog-header {
  border-bottom: 1px solid #e8ebf2;
  justify-content: space-between;
  align-items: center;
  min-height: 57px;
  padding: 13px 20px;
  display: flex;
}
.search-dialog-header strong {
  font-size: 16px;
}
.search-dialog-header button {
  color: #697284;
  cursor: pointer;
  background: 0 0;
  border: 0;
  border-radius: 9px;
  place-items: center;
  width: 32px;
  height: 32px;
  font-size: 22px;
  display: grid;
}
.search-dialog-header button:hover {
  background: #f1f4f9;
}
.search-dialog-body {
  max-height: calc(100vh - 225px);
  padding: 18px 20px 20px;
  overflow-y: auto;
}
.search-field {
  background: #f2f5fa;
  border: 1px solid #dfe5ef;
  border-radius: 10px;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 12px;
  transition: all 0.2s;
  display: flex;
}
.search-field:focus-within {
  background: #fff;
  border-color: #6f8fff;
  box-shadow: 0 0 0 3px #3567f61a;
}
.search-field svg {
  color: #70798c;
  flex: none;
  width: 18px;
  height: 18px;
}
.search-field input {
  color: #2e3544;
  width: 100%;
  font: inherit;
  background: 0 0;
  border: 0;
  outline: 0;
  font-size: 14px;
}
.search-field input::placeholder {
  color: #939baa;
}
.search-shortcuts {
  color: #959dab;
  text-align: center;
  margin: 15px 0 0;
  font-size: 12px;
}
.search-shortcuts kbd {
  color: inherit;
  font: inherit;
  background: 0 0;
  border: 0;
}
.search-results > p:first-child {
  color: #7d8595;
  margin: 17px 4px 10px;
  font-size: 12px;
}
.search-result-list {
  gap: 9px;
  display: grid;
}
.search-result-list > a {
  background: #fff;
  border: 1px solid #e3e7f0;
  border-radius: 13px;
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px;
  transition: all 0.18s;
  display: grid;
}
.search-result-list > a:hover {
  background: #f9faff;
  border-color: #b9c7fb;
  transform: translateY(-1px);
}
.search-result-list .cover-visual {
  border-radius: 10px;
  width: 78px;
  height: 78px;
}
.cover-visual {
  isolation: isolate;
  color: #fff;
  background: linear-gradient(
    135deg,
    var(--cover-start, #315fce),
    var(--cover-end, #80a8e8)
  );
  display: block;
  position: relative;
  overflow: hidden;
}
.cover-visual > .cover-visual__image {
  z-index: 2;
  object-fit: cover;
  width: 100%;
  height: 100%;
  display: block;
  position: absolute;
  inset: 0;
}
.cover-visual__fallback {
  z-index: 1;
  text-align: center;
  place-content: center;
  justify-items: center;
  gap: 6px;
  padding: 12px;
  display: grid;
  position: absolute;
  inset: 0;
}
.cover-visual__fallback b {
  letter-spacing: -0.08em;
  font-size: clamp(22px, 4vw, 54px);
  line-height: 1;
}
.cover-visual__fallback small {
  color: #ffffffc2;
  font-size: 10px;
  font-weight: 700;
}
.cover-visual--compact .cover-visual__fallback {
  gap: 3px;
  padding: 5px;
}
.cover-visual--compact .cover-visual__fallback b {
  font-size: 17px;
}
.cover-visual--compact .cover-visual__fallback small {
  display: none;
}
.search-result-copy {
  gap: 7px;
  min-width: 0;
  display: grid;
}
.search-result-title {
  align-items: center;
  gap: 10px;
  display: flex;
}
.search-result-title strong {
  white-space: nowrap;
  text-overflow: ellipsis;
  min-width: 0;
  font-size: 14px;
  overflow: hidden;
}
.search-result-title small {
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 6px;
  flex: none;
  margin-left: auto;
  padding: 4px 7px;
  font-size: 9px;
}
.search-result-description {
  color: #7e8697;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 11px;
  line-height: 1.55;
  overflow: hidden;
}
.search-result-meta {
  color: #969eac;
  flex-wrap: wrap;
  gap: 5px 8px;
  font-size: 9px;
  display: flex;
}
.search-result-meta b {
  color: #5576ec;
  background: #edf1ff;
  border-radius: 5px;
  padding: 3px 5px;
  font-weight: 650;
}
.search-empty {
  color: #9199a8;
  text-align: center;
  margin: 20px 0 6px;
  font-size: 12px;
}
@media (width<=1100px), (height<=600px) {
  .search-overlay {
    padding: clamp(12px, 8dvh, 76px) 12px 12px;
    padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
  }
  .search-dialog {
    flex-direction: column;
    max-height: 100%;
    display: flex;
  }
  .search-dialog-header {
    flex: none;
    padding: 8px 14px;
  }
  .search-dialog-header button {
    width: 44px;
    height: 44px;
  }
  .search-dialog-body {
    overscroll-behavior: contain;
    min-height: 0;
    max-height: none;
    padding-inline: 14px;
  }
  .search-field {
    height: 48px;
  }
  .search-field input {
    min-width: 0;
    font-size: 16px;
  }
  .search-result-list > a {
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
  }
  .search-result-list .cover-visual {
    width: 62px;
    height: 62px;
  }
  .search-result-title strong {
    white-space: normal;
    overflow-wrap: anywhere;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    display: -webkit-box;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  [data-reveal] {
    opacity: 1;
    transition: none;
    transform: none;
  }
}
@view-transition {
  navigation: auto;
}
.site-header {
  view-transition-name: site-header;
}
@keyframes page-transition-out {
  to {
    opacity: 0;
    transform: translateY(-8px);
  }
}
@keyframes page-transition-in {
  0% {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
::view-transition-old(root) {
  animation: 0.24s ease-in both page-transition-out;
}
::view-transition-new(root) {
  animation: 0.5s ease-out 0.22s both page-transition-in;
}
::view-transition-old(site-header),
::view-transition-new(site-header) {
  animation-duration: 0.3s;
}
[data-page-enter] {
  opacity: 1;
  transform: none;
}
.motion-enhanced:not(.is-page-ready) [data-page-enter="home"] {
  opacity: 0;
  transform: translateY(14px);
}
.motion-enhanced:not(.is-page-ready) [data-page-enter="hero"] {
  opacity: 0;
  transform: translateY(10px);
}
.motion-enhanced:not(.is-page-ready) [data-page-enter="content"] {
  opacity: 0;
  transform: translateY(18px);
}
.motion-enhanced.is-page-ready [data-page-enter="home"],
.motion-enhanced.is-page-ready [data-page-enter="hero"] {
  transition:
    opacity 0.5s ease-out,
    transform 0.5s ease-out;
}
.motion-enhanced.is-page-ready [data-page-enter="content"] {
  transition:
    opacity 0.5s ease-out 0.12s,
    transform 0.5s ease-out 0.12s;
}
.article-hero-backdrop {
  opacity: 0.48;
  transition: opacity 0.5s ease-out;
}
.motion-enhanced:not(.is-page-ready) .article-hero-backdrop {
  opacity: 0;
}
@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }
  .site-header,
  .tutorial-cover,
  .article-hero {
    view-transition-name: none !important;
  }
  [data-page-enter],
  .motion-enhanced:not(.is-page-ready) [data-page-enter] {
    opacity: 1;
    transition: none;
    transform: none;
  }
  .article-hero-backdrop,
  .motion-enhanced:not(.is-page-ready) .article-hero-backdrop {
    opacity: 0.48;
    transition: none;
  }
}
