:root {
  --brand: #17a0fd;
  --brand-rgb: 23, 160, 253;
  --brand-dark: #0891fd;
  --cover-ink: #b6bcc7;
    --cover-placeholder-bg: #e4e6ea;

  --bs-primary: var(--brand);
  --bs-primary-rgb: var(--brand-rgb);
  --bs-link-color-rgb: 27, 136, 238;
  --bs-link-hover-color-rgb: 8, 145, 253;
  --bs-body-bg: #f6f7f9;
  --bs-body-color: #212832;
  --bs-body-font-size: 0.9375rem;
  --bs-body-line-height: 1.6;
  --bs-secondary-color: #858c96;
  --bs-tertiary-color: #aab1bb;
  --bs-border-color: #e9ebef;
  --bs-secondary-bg: #f2f3f5;
  --bs-secondary-bg-rgb: 242, 243, 245;
  --bs-tertiary-bg: #fff;
  --bs-tertiary-bg-rgb: 255, 255, 255;
  --bs-warning: #ff8a3d;
  --bs-warning-rgb: 255, 138, 61;
  --bs-warning-text-emphasis: #ff6b35;

    --bs-border-radius: 8px;
  --bs-border-radius-sm: 8px;
  --bs-border-radius-lg: 8px;
  --bs-border-radius-xl: 8px;
  --bs-border-radius-xxl: 8px;
  --bs-box-shadow-sm: 0 1px 2px rgba(13, 20, 30, .03), 0 6px 20px rgba(13, 20, 30, .05);
  --bs-box-shadow: 0 2px 6px rgba(13, 20, 30, .06), 0 14px 36px rgba(13, 20, 30, .10);

  --searchbar-bg: #f2f3f5;
  --searchbar-bg-hover: #e8eaee;
  --searchbar-radius: var(--bs-border-radius);
  --searchbar-height: 36px;
  --searchbar-width: 260px;
  --icon-muted: #666f7a;
  --text-input: #1f2328;
  --border-subtle: #e4e6ea;
  --text-hint: #8a9099;
  --kbd-bg: #fff;
  --focus-ring: rgba(55, 138, 221, .35);
    --side-muted: #6b7280;
    --text-quiet: #5f6672;
    --star-on-glass: #ffb257;
    --scan-veil: rgba(222, 226, 233, .55);
    --rank-hover-bg: #e4e6ea;
}

[data-bs-theme="dark"] {
  --brand: #3ba7ff;
  --brand-rgb: 59, 167, 255;
  --brand-dark: #59b4ff;
  --cover-ink: #5d6675;
  --cover-placeholder-bg: #333c49;

  --bs-body-bg: #101216;
  --bs-body-color: #e7e9ee;
  --bs-body-color-rgb: 231, 233, 238;
  --bs-secondary-color: #9aa2ad;
  --bs-tertiary-color: #6f7783;
  --bs-border-color: #2e3542;
  --bs-secondary-bg: #2a323e;
  --bs-secondary-bg-rgb: 42, 50, 62;
  --bs-tertiary-bg: #15181d;
  --bs-tertiary-bg-rgb: 21, 24, 29;
  --card-surface: #1e242e;
  --bs-heading-color: #f2f4f7;
  --bs-code-color: #8ab4fb;
  --bs-warning-text-emphasis: #ff8a5c;
  --bs-box-shadow-sm: 0 1px 2px rgba(0, 0, 0, .30), 0 6px 20px rgba(0, 0, 0, .22);
  --bs-box-shadow: 0 2px 6px rgba(0, 0, 0, .35), 0 14px 36px rgba(0, 0, 0, .40);

  --searchbar-bg: #2a323e;
  --searchbar-bg-hover: #333c49;
  --icon-muted: #9aa2ad;
  --text-input: #e8eaed;
  --border-subtle: #3a4250;
  --text-hint: #9aa2ad;
  --kbd-bg: #1a1c1f;
  --focus-ring: rgba(120, 175, 235, .45);
  --side-muted: #a3abb6;
  --text-quiet: #a3abb6;
  --scan-veil: rgba(16, 18, 22, .5);
  --rank-hover-bg: var(--bs-secondary-bg);
}

[data-bs-theme="dark"] .card {
  --bs-card-bg: var(--card-surface);
  --bs-card-cap-bg: var(--card-surface);
  --bs-card-border-width: 1px;
  --bs-card-border-color: rgba(255, 255, 255, .06);
}
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select,
[data-bs-theme="dark"] .input-group-text {
  background-color: var(--bs-secondary-bg);
  border-color: rgba(255, 255, 255, .10);
}
[data-bs-theme="dark"] .form-control::placeholder { color: var(--bs-secondary-color); }

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
  background-color: var(--bs-secondary-bg);
  border-color: rgba(255, 255, 255, .10);
}

a,
a:hover,
a:focus,
a:active,
a:visited {
  text-decoration: none !important;
}

a:focus-visible,
.btn:focus-visible,
.nav-link:focus-visible,
.page-link:focus-visible,
.form-check-input:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  box-shadow: none;
}
.form-control:focus-visible,
.form-select:focus-visible {
  outline: none;
}

.container { --bs-gutter-x: 2rem; }

@media (min-width: 1200px) {
  .site-body .container { max-width: 1080px; }
  .site-body main .col-xl-8 { flex: 0 0 auto; width: calc(100% - 334px); }
  .site-body main aside.col-xl-3 { flex: 0 0 auto; width: 334px; }
}

.panel {
  background-color: var(--bs-tertiary-bg);
  padding-top: 1rem !important;
}

.site-body main:has(> .static-fill),
.site-body main:has(> .error-page) {
  display: flex;
  flex-direction: column;
}
.site-body main > .static-fill,
.site-body main > .error-page {
  flex: 1 0 auto;
}
.site-body main > .error-page {
  padding-top: 3rem !important;
}

@media (min-width: 1200px) {
  .col-xl-8 {
    padding-top: 1rem !important;
  }
}

@media (min-width: 1200px) {
  .site-body main:has(.list-pager) {
    display: flex;
    flex-direction: column;
  }
  .site-body main:has(.list-pager) > .panel,
  .site-body main:has(.list-pager) > .panel > .container {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
  }
  .site-body main:has(.list-pager) > .panel > .container > .row {
    flex: 1 0 auto;
  }
  .site-body main:has(.list-pager) > .panel > .container > .row > .col-xl-8 {
    display: flex;
    flex-direction: column;
  }
  .site-body main:has(.list-pager) > .panel > .container > .row > .col-xl-8 > .list-pager {
    margin-top: auto;
    padding-top: 1.5rem;
  }
}

.home-hero {
  background: linear-gradient(180deg, #eef1f5 0%, var(--bs-body-bg) 100%);
}
[data-bs-theme="dark"] .home-hero {
  background: linear-gradient(180deg, #171a20 0%, var(--bs-body-bg) 100%);
}
.home-hero .switcher-pill {
  background: var(--bs-tertiary-bg);
  box-shadow: inset 0 0 0 1px rgba(13, 20, 30, .07);
}
[data-bs-theme="dark"] .home-hero .switcher-pill {
  background: var(--searchbar-bg);
  box-shadow: none;
}

@media (min-width: 768px) {
  .home-hero > .container {
    padding-top: 120px !important;
    padding-bottom: 120px !important;
  }
}

.navbar { min-height: 43px; }
@media (max-width: 767.98px) {
  .navbar { min-height: 60px; }
}

.nav-reveal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  pointer-events: none;
}
.nav-reveal > .site-navbar {
  pointer-events: none;
  transform: translate3d(0, -100%, 0);
  opacity: 0;
  visibility: hidden;
  box-shadow: 0 6px 18px rgba(13, 20, 30, 0);
  transition:
    transform .42s cubic-bezier(.22, .61, .36, 1),
    opacity .3s ease,
    box-shadow .42s ease,
    visibility 0s linear .42s;
  will-change: transform, opacity;
}
.nav-reveal.is-revealed > .site-navbar {
  pointer-events: auto;
  transform: translate3d(0, 0, 0);
  opacity: 1;
  visibility: visible;
  box-shadow: 0 6px 18px rgba(13, 20, 30, .10);
  transition:
    transform .46s cubic-bezier(.22, .61, .36, 1),
    opacity .32s ease .04s,
    box-shadow .46s ease,
    visibility 0s;
}
[data-bs-theme="dark"] .nav-reveal.is-revealed > .site-navbar {
  box-shadow: 0 6px 20px rgba(0, 0, 0, .42);
}
@media (prefers-reduced-motion: reduce) {
  .nav-reveal > .site-navbar,
  .nav-reveal.is-revealed > .site-navbar { transition-duration: .01ms; }
}

.card {
  --bs-card-bg: var(--bs-gray-100);
  --bs-card-border-width: 0;
  --bs-card-cap-bg: var(--bs-tertiary-bg);
  box-shadow: 0 1px 2px #0d141e29, 0 6px 20px #0d141e0d;;
}

.btn { --bs-btn-border-radius: var(--bs-border-radius-pill); }
.btn-primary {
  --bs-btn-bg: var(--brand);
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: var(--brand-dark);
  --bs-btn-hover-border-color: var(--brand-dark);
  --bs-btn-active-bg: var(--brand-dark);
  --bs-btn-active-border-color: var(--brand-dark);
  --bs-btn-focus-shadow-rgb: var(--brand-rgb);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, 0));
}
.btn-outline-primary {
  --bs-btn-color: var(--brand);
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: var(--brand);
  --bs-btn-hover-border-color: var(--brand);
  --bs-btn-active-bg: var(--brand);
  --bs-btn-active-border-color: var(--brand);
  --bs-btn-focus-shadow-rgb: var(--brand-rgb);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--bs-border-color);
  box-shadow: none;
}
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-check-input:focus { box-shadow: none; }
.nav-pills {
  --bs-nav-pills-link-active-bg: var(--brand);
  --bs-nav-pills-border-radius: var(--bs-border-radius-pill);
}
.seg-pills { --bs-nav-pills-border-radius: var(--bs-border-radius); }
.seg-group {
  display: inline-flex;
  align-items: stretch;
  flex: none;
  border: 1px solid rgba(13, 20, 30, .10);
  border-radius: var(--bs-border-radius);
  overflow: hidden;
}
.seg-group > a {
  display: inline-flex;
  align-items: center;
  padding: 3px 12px;
  font-size: .8125rem;
  line-height: 1.5;
  color: var(--text-quiet);
  white-space: nowrap;
  transition: background-color .15s ease, color .15s ease;
}
.seg-group > a + a { border-left: 1px solid rgba(13, 20, 30, .10); }
.seg-group > a:hover { color: var(--bs-body-color); background: var(--bs-tertiary-bg); }
.seg-group > a.is-on { color: #fff; background: var(--brand); font-weight: 600; }
.seg-group > a:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
[data-bs-theme="dark"] .seg-group { border-color: rgba(255, 255, 255, .14); }
[data-bs-theme="dark"] .seg-group > a + a { border-left-color: rgba(255, 255, 255, .14); }
[data-bs-theme="dark"] .seg-group > a:hover { background: rgba(255, 255, 255, .06); }
.navbar-nav .nav-link.active { color: var(--brand); }
.pagination {
  --bs-pagination-color: var(--brand);
  --bs-pagination-hover-color: var(--brand-dark);
  --bs-pagination-active-bg: var(--brand);
  --bs-pagination-active-border-color: var(--brand);
}
.progress {
  --bs-progress-height: 6px;
  --bs-progress-bg: var(--bs-secondary-bg);
  --bs-progress-bar-bg: var(--brand);
  --bs-progress-border-radius: var(--bs-border-radius-pill);
}
.progress .progress-bar { border-radius: var(--bs-border-radius-pill); }

.search-box {
  --search-bg: var(--bs-secondary-bg);
}
.input-group .btn { border-radius: var(--bs-border-radius); }
.search-box .input-group-text {
  background-color: var(--search-bg);
  border: 0;
  padding-inline: .95rem .45rem;
  color: var(--bs-tertiary-color);
}
.search-box .form-control,
.search-box .form-control:focus {
  background-color: var(--search-bg);
  border: 0;
  box-shadow: none;
}
.hero-search { max-width: 560px; }

.hero-search .search-box { --search-bg: var(--bs-tertiary-bg); }

[data-bs-theme="dark"] .hero-search .search-box { --search-bg: var(--bs-secondary-bg); }
[data-bs-theme="dark"] .search-box .input-group-text { color: var(--bs-secondary-color); }

.search-wrap { --go-size: 28px; --go-inset: 4px; position: relative; }

.hero-search .search-wrap,
.page-search .search-wrap { --go-size: 36px; --go-inset: 6px; }

.search-box-icon { font-size: 24px; line-height: 1; }
.search-go .bi { font-size: 20px; line-height: 1; }

.search-box .form-control { padding-right: calc(1.4rem + 24px + .75rem); }

.hero-search .search-box .form-control,
.page-search .search-box .form-control { padding-right: calc(1.4rem + 24px + 1rem); }

.search-box .form-control::placeholder { text-align: center; }

.search-box .form-control::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }

.search-go {
  position: absolute;
  top: 50%;
  right: var(--go-inset);
    z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--go-size);
  height: var(--go-size);
  padding: 0;
  border: 0;
  border-radius: var(--bs-border-radius);
  background-color: var(--bs-primary);
  color: #fff;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-50%) scale(.5);
  transition: opacity .16s ease, transform .16s ease, visibility 0s linear .16s;
}

.search-wrap.is-typed .search-go {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(-50%) scale(1);
  transition: opacity .18s ease, transform .26s cubic-bezier(.34, 1.56, .64, 1), visibility 0s;
}

.search-go:hover { background-color: var(--brand-dark); }

.search-wrap.is-typed .search-go:active { transform: translateY(-50%) scale(.92); }

.search-go:focus-visible { outline: 2px solid rgba(var(--brand-rgb), .5); outline-offset: 1px; }

.hero-ai-cta {
  display: flex;
  justify-content: center;
  margin-top: 1.4rem;
}
.ai-search-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  height: 34px;
  padding: 0 .9rem;
  border: 1px solid rgba(var(--brand-rgb), .32);
  border-radius: var(--bs-border-radius-pill);
  background: var(--bs-tertiary-bg);
  color: var(--brand);
  font-size: .875rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.ai-search-badge .bi { font-size: 14px; line-height: 1; }
.ai-search-badge .bi-arrow-right {
  font-size: 12px;
  opacity: .55;
  transition: transform .15s ease, opacity .15s ease;
}
.ai-search-badge:hover {
  background: rgba(var(--brand-rgb), .07);
  border-color: rgba(var(--brand-rgb), .5);
  color: var(--brand-dark);
}
.ai-search-badge:hover .bi-arrow-right { opacity: 1; transform: translateX(2px); }
.ai-search-badge:focus-visible {
  outline: 2px solid rgba(var(--brand-rgb), .5);
  outline-offset: 2px;
}

@media (max-width: 575px) {
    .hero-ai-cta { margin-top: 1.4rem; }
  .ai-search-badge { height: 30px; padding: 0 .7rem; font-size: .8125rem; gap: .32rem; }
  .ai-search-badge .bi-arrow-right { display: none; }
}

.search-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 1.25rem;
  border-radius: 50%;
  color: var(--brand);
  background: rgba(var(--brand-rgb), .1);
}

[data-bs-theme="dark"] .search-empty-icon { background: rgba(var(--brand-rgb), .14); }

.search-empty-icon .bi { font-size: 30px; line-height: 1; }

.search-empty-section { margin-top: 2.25rem; }

.search-empty-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .875rem;
  margin-bottom: .875rem;
  color: var(--bs-secondary-color);
  font-size: .8125rem;
}

.search-empty-label::before,
.search-empty-label::after {
  content: "";
  width: 3rem;
  height: 1px;
  background: var(--bs-border-color);
}

.trending-shuffle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background-color: var(--bs-secondary-bg);
  color: var(--bs-secondary-color);
  transition: background-color .15s ease, color .15s ease;
}

.trending-shuffle:hover { background-color: var(--bs-border-color); color: var(--bs-body-color); }

.trending-shuffle .bi { font-size: 16px; line-height: 1; transition: transform .25s ease; }

.trending-shuffle:hover .bi,
.trending-shuffle:focus-visible .bi { transform: rotate(90deg); }

.trending-shuffle.is-loading .bi { animation: trending-spin .7s linear infinite; }

.trending-shuffle:focus-visible { outline: 2px solid rgba(var(--brand-rgb), .5); outline-offset: 2px; }

@keyframes trending-spin { to { transform: rotate(360deg); } }

.trending-shuffle-tip {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  z-index: 6;
  padding: .1875rem .5rem;
  border-radius: var(--bs-border-radius);
  background-color: var(--bs-body-color);
  color: var(--bs-body-bg);
  font-size: .75rem;
  line-height: 1.5;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -4px);
  transition: opacity .15s ease, transform .15s ease, visibility 0s linear .15s;
}

.trending-shuffle:hover .trending-shuffle-tip,
.trending-shuffle:focus-visible .trending-shuffle-tip {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  transition: opacity .15s ease, transform .15s ease, visibility 0s;
}

.trending-grid { transition: opacity .18s ease; }

.nav-ai-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  height: var(--searchbar-height);
  padding: 0 .65rem;
  overflow: hidden;
  border: 1px solid rgba(var(--brand-rgb), .38);
  border-radius: var(--bs-border-radius);
  background: linear-gradient(135deg, rgba(var(--brand-rgb), .14), rgba(var(--brand-rgb), .03));
  color: #0a6fc0;
  font-size: .8125rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background-color .18s ease;
}
[data-bs-theme="dark"] .nav-ai-link { color: #8ccbff; }
.nav-ai-link .bi {
  font-size: 14px;
  line-height: 1;
  color: var(--brand);
  animation: nav-ai-twinkle 2.8s ease-in-out infinite;
}
.nav-ai-link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .55) 50%, transparent 65%);
  transform: translateX(-130%);
  animation: nav-ai-shine 5.2s ease-in-out infinite;
  pointer-events: none;
}
[data-bs-theme="dark"] .nav-ai-link::after {
  background: linear-gradient(105deg, transparent 35%, rgba(186, 226, 255, .28) 50%, transparent 65%);
}
.nav-ai-link:hover,
.nav-ai-link:focus-visible {
  border-color: rgba(var(--brand-rgb), .65);
  box-shadow: 0 2px 12px rgba(var(--brand-rgb), .28);
  transform: translateY(-1px);
}
.nav-ai-link:focus-visible { outline: 2px solid rgba(var(--brand-rgb), .5); outline-offset: 2px; }
@keyframes nav-ai-twinkle {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: .85; }
  50% { transform: scale(1.18) rotate(8deg); opacity: 1; }
}
@keyframes nav-ai-shine {
  0%, 55% { transform: translateX(-130%); }
  85%, 100% { transform: translateX(130%); }
}
@media (prefers-reduced-motion: reduce) {
  .nav-ai-link .bi, .nav-ai-link::after { animation: none; }
  .nav-ai-link::after { display: none; }
}
@media (max-width: 991.98px) {
    .nav-ai-link { padding: 0 .45rem; }
  .nav-ai-link span { display: none; }
}

.min-w-0 { min-width: 0; }

.tag-pill {
  --bs-btn-bg: var(--bs-tertiary-bg);
  --bs-btn-border-color: rgba(13, 20, 30, .07);
  --bs-btn-color: var(--bs-secondary-color);
  --bs-btn-hover-bg: var(--bs-secondary-bg);
  --bs-btn-hover-border-color: rgba(13, 20, 30, .10);
  --bs-btn-hover-color: var(--bs-body-color);
  --bs-btn-active-bg: var(--bs-secondary-bg);
  --bs-btn-active-border-color: rgba(13, 20, 30, .10);
  --bs-btn-active-color: var(--bs-body-color);
  --bs-btn-padding-x: .9rem;
  --bs-btn-font-size: .8125rem;
}

[data-bs-theme="dark"] .tag-pill {
  --bs-btn-bg: var(--bs-secondary-bg);
  --bs-btn-border-color: rgba(255, 255, 255, .10);
  --bs-btn-color: #b9c1cd;
  --bs-btn-hover-bg: #333c49;
  --bs-btn-hover-border-color: rgba(255, 255, 255, .20);
  --bs-btn-hover-color: #eef1f6;
  --bs-btn-active-bg: #333c49;
  --bs-btn-active-border-color: rgba(255, 255, 255, .20);
  --bs-btn-active-color: #eef1f6;
}

.hero-tags .tag-pill.is-hid { display: none; }

@media (min-width: 768px) {
  .hero-tags { width: 80%; margin-inline: auto; }
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--bs-border-radius);
  background: linear-gradient(160deg, #2aa8ff, #0b93fd);
  color: #fff;
  font-size: 17px;
  font-weight: 600;
}
.brand-mark-lg { width: 48px; height: 48px; border-radius: var(--bs-border-radius); font-size: 22px; }

.brand-logo { display: block; width: auto; max-width: 100%; height: 40px; object-fit: contain; }
.brand-logo-lg { height: 59px; }
.brand-logo-dark { display: none; }
[data-bs-theme="dark"] .brand-logo-light { display: none; }
[data-bs-theme="dark"] .brand-logo-dark { display: block; }
@media (max-width: 767.98px) {
    .site-navbar > .container { flex-wrap: nowrap; }
  .navbar-brand { min-width: 0; margin-right: .5rem; }

  .navbar .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    min-height: 44px;
  }
  .brand-logo:not(.brand-logo-lg) { height: 35px; }
  .brand-logo-lg { height: 47px; }
    html[lang="en"] .brand-logo-lg { height: 42px; }
    .home-hero { padding-top: 5rem !important; }
  .home-hero > .container { padding-top: 3rem !important; padding-bottom: 3rem !important; }
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-search { width: var(--searchbar-width); }
html[lang="en"] .nav-search { width: calc(var(--searchbar-width) + 18px); }
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
  width: 100%;
  height: var(--searchbar-height);
  padding: 0 8px 0 12px;
  border: none;
  border-radius: var(--searchbar-radius);
  background: var(--searchbar-bg);
  transition: background-color .15s ease, box-shadow .15s ease;
}
.search:hover { background: var(--searchbar-bg-hover); }
.search:focus-within { box-shadow: 0 0 0 2px var(--focus-ring); }
.search-icon { flex: none; color: var(--icon-muted); }
.search input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  line-height: 1;
  color: var(--text-input);
}
.search input::placeholder { color: var(--icon-muted); opacity: 1; }

.search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }

.search-kbd {
  flex: none;
  padding: 3px 6px;
  font-family: inherit;
  font-size: 11px;
  line-height: 1;
  color: var(--text-hint);
  background: var(--kbd-bg);
  border: .5px solid var(--border-subtle);
  border-radius: var(--bs-border-radius);
  white-space: nowrap;
  user-select: none;
  transition: opacity .15s ease;
}
.search:focus-within .search-kbd,
.search input:not(:placeholder-shown) ~ .search-kbd { opacity: 0; }

.switcher-pill {
  display: inline-flex;
  align-items: stretch;
  flex: none;
  height: var(--searchbar-height);
  border-radius: var(--bs-border-radius);
  background: var(--searchbar-bg);
}
.switcher-pill > .lang-toggle:first-child {
  border-radius: var(--bs-border-radius) 0 0 var(--bs-border-radius);
}
.switcher-pill > .theme-toggle:last-child {
  border-radius: 0 var(--bs-border-radius) var(--bs-border-radius) 0;
}

.theme-toggle {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 100%;
  padding: 0;
  border: none;
  border-left: .5px solid var(--border-subtle);
  border-radius: 0;
  background: transparent;
  color: var(--icon-muted);
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.theme-toggle:hover { background: var(--searchbar-bg-hover); color: var(--text-input); }
.theme-toggle:active { filter: brightness(.94); }
.theme-toggle:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.theme-toggle .bi {
  grid-area: 1 / 1;
  width: 16px;
  font-size: 16px;
  line-height: 1;
  text-align: center;
  opacity: 0;
  transition: opacity .15s ease;
}
.theme-toggle .icon-moon { opacity: 1; }
[data-bs-theme="dark"] .theme-toggle .icon-moon { opacity: 0; }
[data-bs-theme="dark"] .theme-toggle .icon-sun { opacity: 1; }

.lang-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  min-width: 34px;
  height: 100%;
  padding: 0 10px;
  border-radius: 0;
  background: transparent;
  color: var(--icon-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  line-height: 1;
  white-space: nowrap;
  transition: background-color .15s ease, color .15s ease;
}
.lang-toggle:hover { background: var(--searchbar-bg-hover); color: var(--text-input); }
.lang-toggle:active { filter: brightness(.94); }
.lang-toggle:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

@media (max-width: 767.98px) {
  .header-tools {
    display: inline-flex;
    align-items: stretch;
    flex: none;
    gap: 0;
    height: var(--searchbar-height);
    margin-left: auto;
    border-radius: var(--bs-border-radius);
    background: var(--searchbar-bg);
  }
  .nav-search { display: none; }
    .header-tools .nav-ai-link {
    justify-content: center;
    width: 34px;
    min-width: 34px;
    height: 100%;
    padding: 0;
    border: none;
    border-right: .5px solid var(--border-subtle);
    border-radius: var(--bs-border-radius) 0 0 var(--bs-border-radius);
    background: linear-gradient(135deg, rgba(var(--brand-rgb), .18), rgba(var(--brand-rgb), .05));
    box-shadow: none;
    transform: none;
  }
  .header-tools .nav-ai-link:hover,
  .header-tools .nav-ai-link:focus-visible {
    background: rgba(var(--brand-rgb), .14);
    box-shadow: none;
    transform: none;
  }
  .header-tools .nav-ai-link:focus-visible { outline-offset: -2px; }
  .header-tools .nav-ai-link::after { display: none; }
  .header-tools .switcher-pill {
    height: 100%;
    border-radius: 0;
    background: transparent;
  }
    .header-tools .switcher-pill .lang-toggle {
    width: 34px;
    min-width: 34px;
    padding: 0;
  }
  .header-tools .switcher-pill > .theme-toggle:last-child { border-radius: 0 var(--bs-border-radius) var(--bs-border-radius) 0; }
  .header-tools .switcher-pill .lang-toggle:focus-visible,
  .header-tools .switcher-pill .theme-toggle:focus-visible { outline-offset: -2px; }
}

.ratio-book {
  --bs-aspect-ratio: 133.3333%;
  border-radius: var(--bs-border-radius);
  overflow: hidden;
  position: relative;
  background-color: var(--bs-secondary-bg);
  box-shadow: 0 0 0 1px rgba(13, 20, 30, .05);
}
[data-bs-theme="dark"] .ratio-book { box-shadow: 0 0 0 1px rgba(255, 255, 255, .06); }

.ratio-book::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 255, 255, .42) 50%,
    transparent 100%);
  background-size: 200% 100%;
  animation: cover-shimmer 1.6s ease-in-out infinite;
  animation-play-state: paused;
}
.ratio-book-skeleton::after { animation-play-state: running; }
.ratio-book:not(.ratio-book-skeleton)::after {
  opacity: 0;
  transition: opacity .3s ease;
}
[data-bs-theme="dark"] .ratio-book::after {
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 255, 255, .10) 50%,
    transparent 100%);
}
@keyframes cover-shimmer {
  0%   { background-position:  200% 0; }
  100% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ratio-book-skeleton::after { animation: none; opacity: 0; }
}
.cover-title {
  font-family: "Songti SC", "SimSun", serif;
  font-size: 34px;
  font-weight: 600;
  color: var(--cover-ink);
}
.cover-sm { width: 84px; }
.cover-lg { width: 160px; }
.cover-xs { width: 56px; }
.cover-md { width: 80px; }
.cover-xxs { width: 60px; }
.cover-xs .cover-title { font-size: 20px; }
.cover-sm .cover-title { font-size: 28px; }
.cover-md .cover-title { font-size: 32px; }
.cover-lg .cover-title { font-size: 52px; }

.clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.book-card { transition: transform .18s ease, box-shadow .18s ease; }
.book-card:hover { transform: translateY(-2px); box-shadow: var(--bs-box-shadow); }

.book-tile {
  --bs-card-border-radius: var(--bs-border-radius-lg);
  --bs-card-bg: var(--bs-secondary-bg);
    --book-tile-ring: rgba(13, 20, 30, .12);
  box-shadow: none;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
[data-bs-theme="dark"] .book-tile {
  --bs-card-bg: var(--card-surface);
  --book-tile-ring: rgba(255, 255, 255, .10);
}
.book-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid var(--book-tile-ring);
  border-radius: inherit;
  pointer-events: none;
}
.book-tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--bs-box-shadow);
}
.book-tile:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.book-tile-cover { position: relative; }
.book-tile-cover .ratio-book {
  border-radius: 0;
  box-shadow: none;
  background-color: var(--cover-placeholder-bg) !important;
}

.cover-score {
  position: absolute;
  right: 6px;
  bottom: 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px 1px;
  border-radius: var(--bs-border-radius-pill);
  background: rgba(13, 17, 23, .42);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  backdrop-filter: blur(10px) saturate(1.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16), 0 1px 2px rgba(13, 20, 30, .18);
  color: #fff;
  font-size: .6875rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: .01em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 2px rgba(13, 20, 30, .55);
  pointer-events: none;
}
.cover-score-star {
  font-size: .625rem;
  line-height: 1;
  color: var(--star-on-glass);
}
.search-row .cover-score { right: 3px; bottom: 3px; }

.book-tile-body { padding: 8px 12px 12px; }
.book-tile-title {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: .9375rem;
  font-weight: 600;
  line-height: 1.35;
  transition: color .15s ease;
}
.book-tile-author {
  display: block;
  margin-top: 4px;
  font-size: .75rem;
  line-height: 1.4;
  color: var(--text-quiet);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (prefers-reduced-motion: reduce) {
  .book-tile { transition: none; }
  .book-tile:hover { transform: none; }
}

.book-hcard {
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  padding: 6px;
}
.book-hcard-info {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
}
.book-hcard-title {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: .9375rem;
  font-weight: 600;
  line-height: 1.35;
}
.book-hcard-author {
  margin-top: 4px;
  font-size: .75rem;
  line-height: 1.4;
  color: var(--text-quiet);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.book-hcard-press,
.book-hcard-year {
  margin-top: 4px;
  font-size: .75rem;
  line-height: 1.4;
  color: var(--text-quiet);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.book-hcard-year { font-variant-numeric: tabular-nums; }
.book-hcard-score {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 6px;
  font-size: .8125rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--bs-warning-text-emphasis);
  font-variant-numeric: tabular-nums;
}
.book-hcard-star {
  font-size: 1rem;
  line-height: 1;
  transform: translateY(-1px);
}
.book-hcard-quiet {
  margin-top: 6px;
  font-size: .75rem;
  line-height: 1.4;
  color: var(--text-quiet);
}
@media (max-width: 575.98px) {
  .book-hcard { padding: 6px; gap: 8px; }
  .book-hcard .ratio-book { width: 75px; }
  .book-hcard-title { font-size: .875rem; }
  .book-hcard-author,
  .book-hcard-press,
  .book-hcard-year { font-size: .6875rem; }
  .book-hcard-score { font-size: .75rem; }
  .book-hcard-star { transform: none; }
}

.book-rank { padding: 10px }

.book-rank .book-hcard-title { font-size: 1rem; }
.book-rank .book-hcard-author,
.book-rank .book-hcard-press,
.book-rank .book-hcard-year { font-size: .8125rem; }

@media (max-width: 575.98px) {
  .book-rank { padding: 8px; }
  .book-rank .book-hcard-title { font-size: .9375rem; }
  .book-rank .book-hcard-author,
  .book-rank .book-hcard-press,
  .book-rank .book-hcard-year { font-size: .75rem; }
}

.search-row {
  align-items: flex-start;
  gap: 14px;
  padding: 10px;
}
.search-row-cover {
  position: relative;
  width: 100px;
  flex: none;
}
.search-row-info {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
}
.search-row-title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-row-subtitle {
  font-weight: 400;
  color: var(--text-quiet);
}
.search-row-author,
.search-row-press {
  margin-top: 4px;
  font-size: .8125rem;
  line-height: 1.4;
  color: var(--text-quiet);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-row-summary {
  font-size: .8125rem;
  line-height: 1.6;
  color: var(--text-quiet);
}

@media (max-width: 575.98px) {
  .search-row { gap: 10px; }
  .search-row-cover { width: 88px; }
  .search-row-title { font-size: .9375rem; }
  .search-row-author,
  .search-row-press,
  .search-row-summary { font-size: .75rem; }
}

.list-pager { margin-top: 1.5rem; }

.list-pager-card .card-body { padding: .875rem 1rem; }

@media (max-width: 575.98px) {
  .list-pager-card .card-body { padding: .75rem .75rem; }
}

.search-pager .page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 6px;
  font-size: .875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.search-pager .page-item.disabled .page-link { font-weight: 400; }
/* 分页到达页数上限：下一页禁用但仍可悬停显示 title 提示（Bootstrap 默认 pointer-events: none 会吞掉 hover） */
.search-pager .page-item.disabled .page-link.pager-link-limit {
  pointer-events: auto;
  cursor: not-allowed;
}
.pager-icon { font-size: 15px; line-height: 1; }

@media (max-width: 575.98px) {
  .search-pager .page-link {
    min-width: 30px;
    height: 30px;
    padding: 0 4px;
    font-size: .8125rem;
  }
  .search-pager .search-pager-gap { min-width: 22px; }
}

@media (max-width: 359.98px) {
  .search-pager .page-link {
    min-width: 26px;
    height: 26px;
    padding: 0 3px;
  }
  .search-pager .search-pager-gap { min-width: 18px; }
}

.rank-item { transition: background-color .15s ease; }
.rank-item:hover { background-color: var(--bs-secondary-bg); }
.book-rank.rank-item:hover { background-color: var(--rank-hover-bg); }

.card-cap {
  padding: 15px 24px;
  border-bottom: 1px solid var(--bs-border-color);
}

.card-foot {
  display: flex;
  justify-content: flex-start;
  padding: 14px 24px;
  border-top: 1px solid var(--bs-border-color);
}
.card-foot-link {
  font-size: .875rem;
  line-height: 1.4;
  color: var(--text-quiet);
  text-decoration: none;
  transition: color .15s ease;
}
.card-foot-link:hover { color: var(--brand); }
.card-foot-link:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

.breadcrumb-card {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  padding: .8rem .875rem;
  background-color: var(--bs-secondary-bg);
  border-radius: var(--bs-border-radius);
}
[data-bs-theme="dark"] .breadcrumb-card {
  background-color: var(--card-surface);
  border-color: rgba(255, 255, 255, .06);
}
.breadcrumb-card > .breadcrumb-scroll { flex: 1 1 auto; min-width: 0; }
.breadcrumb-card .breadcrumb { margin-bottom: 0; }

.breadcrumb {
  --bs-breadcrumb-divider: '›';
  --bs-breadcrumb-divider-color: var(--bs-tertiary-color);
  --crumb-link: #697280;
  font-size: 1rem;
  flex-wrap: nowrap;
  align-items: center;
  overflow-x: clip;
}
[data-bs-theme="dark"] .breadcrumb { --crumb-link: var(--bs-secondary-color); }

.breadcrumb-item { flex: 0 0 auto; white-space: nowrap; }
.breadcrumb-item.active {
  flex: 0 1 auto;
  min-width: 0;
  flex-shrink: 100;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 2px;
  color: var(--bs-body-color);
  font-weight: 600;
}
.breadcrumb-item > a { color: var(--crumb-link); transition: color .15s ease; }
.breadcrumb-item > a:hover { color: var(--brand); }

.crumb-icon {
  flex: none;
  color: var(--brand);
  font-size: 1rem;
  line-height: 1;
  margin-right: .3rem;
  vertical-align: -.05em;
}
@media (max-width: 767.98px) {

  .breadcrumb-card { padding: .375rem .625rem; }
  .breadcrumb-item > a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding-inline: 4px;
    margin-inline: -4px;
  }

  .breadcrumb-item:not(.active) { display: flex; align-items: center; }
  .breadcrumb-item + .breadcrumb-item::before { float: none; }
}

.cat-hero {
  margin-bottom: 1rem;
  padding: 1rem 1.25rem 1.125rem;
  background-color: var(--bs-secondary-bg);
  border-radius: var(--bs-border-radius);
}
[data-bs-theme="dark"] .cat-hero { background-color: var(--card-surface); }

.cat-hero-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: .5rem 1rem;
}
.cat-hero-lead { min-width: 0; }
.cat-hero-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.01em;
}
.cat-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: .375rem 0 0;
  font-size: .8125rem;
  line-height: 1.4;
  color: var(--text-quiet);
}
.cat-hero-dot { color: var(--bs-tertiary-color); }
.cat-hero-sort {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1px;
}
.cat-hero-sort-label {
  font-size: .8125rem;
  line-height: 1.4;
  color: var(--text-quiet);
  white-space: nowrap;
}

.cat-hero-intro {
  max-width: 46rem;
  margin: .75rem 0 0;
  font-size: .875rem;
  line-height: 1.75;
  color: var(--text-quiet);
}

.cat-hero-subs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem .75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--bs-border-color);
}
.cat-hero-subs-label { font-size: .8125rem; color: var(--text-quiet); }
.cat-hero-pills { display: flex; flex-wrap: wrap; gap: .5rem; min-width: 0; }
.cat-hero-pills .tag-pill {
  --bs-btn-color: var(--text-quiet);
  --bs-btn-bg: transparent;
  --bs-btn-border-color: rgba(13, 20, 30, .10);
  --bs-btn-hover-color: var(--bs-body-color);
  --bs-btn-hover-bg: var(--bs-tertiary-bg);
  --bs-btn-hover-border-color: rgba(13, 20, 30, .14);
  --bs-btn-active-color: var(--bs-body-color);
  --bs-btn-active-bg: var(--bs-tertiary-bg);
}
.cat-hero-pills .tag-pill.is-on,
.cat-index-pills .tag-pill.is-on {
  --bs-btn-color: var(--bs-body-color);
  --bs-btn-bg: var(--bs-tertiary-bg);
  --bs-btn-border-color: rgba(var(--brand-rgb), .5);
  --bs-btn-hover-color: var(--bs-body-color);
  --bs-btn-hover-bg: var(--bs-tertiary-bg);
  --bs-btn-hover-border-color: rgba(var(--brand-rgb), .65);
  --bs-btn-active-color: var(--bs-body-color);
  --bs-btn-active-bg: var(--bs-tertiary-bg);
  --bs-btn-active-border-color: rgba(var(--brand-rgb), .65);
  font-weight: 600;
}
[data-bs-theme="dark"] .cat-hero-pills .tag-pill {
  --bs-btn-border-color: rgba(255, 255, 255, .14);
  --bs-btn-hover-bg: rgba(255, 255, 255, .06);
  --bs-btn-hover-border-color: rgba(255, 255, 255, .20);
  --bs-btn-active-bg: rgba(255, 255, 255, .06);
}
[data-bs-theme="dark"] .cat-hero-pills .tag-pill.is-on,
[data-bs-theme="dark"] .cat-index-pills .tag-pill.is-on {
  --bs-btn-bg: rgba(var(--brand-rgb), .16);
  --bs-btn-hover-bg: rgba(var(--brand-rgb), .26);
  --bs-btn-active-bg: rgba(var(--brand-rgb), .26);
}

@media (max-width: 575.98px) {
  .cat-hero { padding: .875rem 1rem 1rem; }
  .cat-hero-title { font-size: 1.25rem; }
  .cat-hero-intro { font-size: .8125rem; }
}

.cat-index-card {
  position: relative;
  padding: .875rem 1rem 1rem;
  background-color: var(--bs-secondary-bg);
  border: 0 solid transparent;
  border-radius: var(--bs-border-radius);
  box-shadow: 0 1px 2px #0d141e29, 0 6px 20px #0d141e0d;     transition: transform .2s ease, box-shadow .2s ease;
}
[data-bs-theme="dark"] .cat-index-card {
  background-color: var(--card-surface);
  border-width: 1px;
  border-color: rgba(255, 255, 255, .06);
}
.cat-index-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--bs-box-shadow);
  z-index: 3;
}

.cat-index-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -.01em;
}
.cat-index-title a { color: inherit; text-decoration: none; }
.cat-index-icon { color: var(--brand); font-size: 1rem; line-height: 1; margin-right: .4rem; }
.cat-index-title a:hover,
.cat-index-card:hover .cat-index-title a { color: var(--brand); }
.cat-index-title a:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--bs-border-radius);
}
.cat-index-pills { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .625rem; }
.cat-index-pills .tag-pill { position: relative; z-index: 2; }

.cat-index-pills.is-fit { flex-wrap: nowrap; overflow: hidden; }
.cat-index-pills.is-fit .tag-pill { flex: 0 0 auto; }
.cat-index-pills .tag-pill.is-hid { display: none; }
.cat-index-pills.is-open { flex-wrap: wrap; overflow: visible; }
.cat-index-pills.is-open .tag-pill.is-hid { display: inline-block; }
.cat-index-pills .tag-pill.cat-pills-more {
  --bs-btn-bg: rgba(var(--brand-rgb), .10);
  --bs-btn-border-color: rgba(var(--brand-rgb), .35);
  --bs-btn-color: var(--bs-body-color);
  --bs-btn-hover-bg: rgba(var(--brand-rgb), .18);
  --bs-btn-hover-border-color: rgba(var(--brand-rgb), .55);
  --bs-btn-hover-color: var(--bs-body-color);
  --bs-btn-active-bg: rgba(var(--brand-rgb), .18);
  --bs-btn-active-border-color: rgba(var(--brand-rgb), .55);
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .cat-index-card { transition: none; }
  .cat-index-card:hover { transform: none; }
}

.author-hero {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: 1rem;
  padding: 1.25rem;
  background-color: var(--bs-secondary-bg);
  border-radius: var(--bs-border-radius);
}
[data-bs-theme="dark"] .author-hero { background-color: var(--card-surface); }
@media (min-width: 768px) {
  .author-hero { margin-top: 12px; }
}

.author-hero-figure {
  position: relative;
  flex: none;
  width: clamp(104px, 30%, 168px);
  aspect-ratio: 3 / 4;
}
.author-hero-photo {
  width: 100%;
  height: 100%;
  border-radius: var(--bs-border-radius);
  object-fit: cover;
}
.author-hero-photo-img {
  position: absolute;
  inset: 0;
  background-color: var(--bs-tertiary-bg);
}
.author-hero-photo-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.75rem;
  font-weight: 600;
  line-height: 1;
  color: var(--brand-dark);
  background-color: var(--bs-tertiary-bg);
  background-image: linear-gradient(160deg, rgba(var(--brand-rgb), .12), rgba(var(--brand-rgb), .03));
  box-shadow: inset 0 0 0 1px rgba(var(--brand-rgb), .18);
  user-select: none;
}
[data-bs-theme="dark"] .author-hero-photo-fallback {
  color: var(--brand);
  background-image: linear-gradient(160deg, rgba(var(--brand-rgb), .20), rgba(var(--brand-rgb), .04));
  box-shadow: inset 0 0 0 1px rgba(var(--brand-rgb), .22);
}

.author-hero-main { flex: 1 1 auto; min-width: 0; }
.author-hero-name {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.01em;
}
.author-hero-alt {
  margin: .25rem 0 0;
  font-size: .8125rem;
  line-height: 1.5;
  color: var(--text-quiet);
}
.author-hero-facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: baseline;
  column-gap: 1rem;
  row-gap: .5rem;
  margin: .875rem 0 0;
}
.author-hero-facts dt {
  font-size: .8125rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-quiet);
}
.author-hero-facts dd {
  min-width: 0;
  margin: 0;
  font-size: .9375rem;
  line-height: 1.6;
}
.author-hero-years { font-variant-numeric: tabular-nums; }
.author-works-sep { margin: 0 .375rem; color: var(--bs-tertiary-color); }
.author-hero-meta {
  margin: 1rem 0 0;
  padding-top: .875rem;
  border-top: 1px solid rgba(13, 20, 30, .08);
  font-size: .8125rem;
  line-height: 1.5;
  color: var(--text-quiet);
}
[data-bs-theme="dark"] .author-hero-meta { border-top-color: rgba(255, 255, 255, .08); }

.author-bio { line-height: 1.75; }

.author-works-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1rem;
  margin-bottom: .75rem;
}

.press-hero {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: 1rem;
  padding: 1.25rem;
  background-color: var(--bs-secondary-bg);
  border-radius: var(--bs-border-radius);
}
[data-bs-theme="dark"] .press-hero { background-color: var(--card-surface); }
@media (min-width: 768px) {
  .press-hero { margin-top: 12px; }
}

.press-hero-figure {
  position: relative;
  flex: none;
  width: clamp(180px, 46%, 340px);
  aspect-ratio: 16 / 9;
}
.press-hero-media {
  width: 100%;
  height: 100%;
  border-radius: var(--bs-border-radius);
  object-fit: cover;
}
.press-hero-media-img {
  position: absolute;
  inset: 0;
  background-color: var(--bs-tertiary-bg);
}
.press-hero-media-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .75rem 1rem;
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: .03em;
  text-align: center;
  word-break: break-word;
  color: var(--brand-dark);
  background-color: var(--bs-tertiary-bg);
  background-image: linear-gradient(160deg, rgba(var(--brand-rgb), .12), rgba(var(--brand-rgb), .03));
  box-shadow: inset 0 0 0 1px rgba(var(--brand-rgb), .18);
  user-select: none;
}
[data-bs-theme="dark"] .press-hero-media-fallback {
  color: var(--brand);
  background-image: linear-gradient(160deg, rgba(var(--brand-rgb), .20), rgba(var(--brand-rgb), .04));
  box-shadow: inset 0 0 0 1px rgba(var(--brand-rgb), .22);
}

.press-hero-main { flex: 1 1 auto; min-width: 0; }
.press-hero-name {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.01em;
}
.press-hero-alt {
  margin: .25rem 0 0;
  font-size: .8125rem;
  line-height: 1.5;
  color: var(--text-quiet);
}
.press-hero-facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: baseline;
  column-gap: 1rem;
  row-gap: .5rem;
  margin: .875rem 0 0;
}
.press-hero-facts dt {
  font-size: .8125rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-quiet);
}
.press-hero-facts dd {
  min-width: 0;
  margin: 0;
  font-size: .9375rem;
  line-height: 1.6;
}
.press-hero-year { font-variant-numeric: tabular-nums; }
.press-hero-meta {
  margin: 1rem 0 0;
  padding-top: .875rem;
  border-top: 1px solid rgba(13, 20, 30, .08);
  font-size: .8125rem;
  line-height: 1.5;
  color: var(--text-quiet);
}
[data-bs-theme="dark"] .press-hero-meta { border-top-color: rgba(255, 255, 255, .08); }

.press-bio { line-height: 1.75; }

@media (max-width: 575.98px) {
  .press-hero {
    flex-direction: column;
    gap: 1rem;
    padding: .875rem 1rem 1rem;
  }
  .press-hero-figure { width: 100%; }
  .press-hero-media-fallback { font-size: 1.25rem; }
  .press-hero-name { font-size: 1.4rem; }
  .press-hero-facts { column-gap: .75rem; margin-top: .75rem; }
  .press-hero-facts dd { font-size: .875rem; }
}

@media (max-width: 575.98px) {
  .author-hero { gap: 1rem; padding: .875rem 1rem 1rem; }
  .author-hero-figure { width: 92px; }
  .author-hero-photo-fallback { font-size: 2rem; }
  .author-hero-name { font-size: 1.4rem; }
  .author-hero-facts { column-gap: .75rem; margin-top: .75rem; }
  .author-hero-facts dd { font-size: .875rem; }
}

.idx-hero {
  margin-bottom: 1rem;
  padding: 1rem 1.25rem 1.125rem;
  background-color: var(--bs-secondary-bg);
  border-radius: var(--bs-border-radius);
}
[data-bs-theme="dark"] .idx-hero { background-color: var(--card-surface); }
.idx-hero-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.01em;
}
.idx-hero-meta {
  margin: .375rem 0 0;
  font-size: .8125rem;
  line-height: 1.4;
  color: var(--text-quiet);
}
.idx-hero-intro {
  max-width: 46rem;
  margin: .75rem 0 0;
  font-size: .875rem;
  line-height: 1.75;
  color: var(--text-quiet);
}

.chart-hero {
  position: relative;
  margin-bottom: 0;
  padding: .75rem 1rem 0;
  border-radius: var(--bs-border-radius) var(--bs-border-radius) 0 0;
}
.chart-hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background-color: var(--bs-border-color);
}
[data-bs-theme="dark"] .chart-hero { background-color: var(--searchbar-bg); }
.chart-hero + .card { border-radius: 0 0 var(--bs-border-radius) var(--bs-border-radius); }

.chart-bar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}
.chart-tabs {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  justify-content: flex-start;
  gap: .25rem;
  min-width: 0;
  margin: 0;
  overflow-x: auto;
  overflow-y: hidden;
  border-bottom: 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.chart-tabs::-webkit-scrollbar { display: none; }
.chart-tabs .nav-item { flex: 0 0 auto; }
.chart-tabs .chart-tab {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  flex: 0 0 auto;
  margin: 0;
  white-space: nowrap;
  padding: .75rem 1rem;
  font-size: .9375rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text-quiet);
  text-decoration: none;
  background-color: transparent;
  border: 0;
  border-radius: var(--bs-border-radius) var(--bs-border-radius) 0 0;
  transition: color .15s ease, background-color .15s ease;
}
.chart-tabs .chart-tab:hover {
  color: var(--bs-body-color);
  background-color: rgba(13, 20, 30, .04);
}
.chart-tabs .chart-tab:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.chart-tabs .chart-tab.is-on {
  padding: .875rem 1.5rem;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--bs-body-color);
  background-color: var(--bs-white);
    box-shadow: inset 0 -3px 0 var(--brand);
}
[data-bs-theme="dark"] .chart-tabs .chart-tab.is-on { background-color: var(--card-surface); }
.chart-tabs .chart-tab.is-on i { color: var(--brand); }
[data-bs-theme="dark"] .chart-tabs .chart-tab:hover { background-color: rgba(255, 255, 255, .06); }
@media (max-width: 575.98px) {
    .idx-hero.chart-hero { padding: .5rem .5rem 0; }
  .chart-tabs .chart-tab { padding: .75rem .375rem; font-size: .8125rem; }
  .chart-tabs .chart-tab.is-on { padding: .75rem .5rem; font-size: .9375rem; }
  .chart-tabs .chart-tab i { display: none; }
}
@media (max-width: 379.98px) {
    .chart-tabs {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 18px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 18px), transparent);
  }
}

.roster-card {
  display: block;
  color: inherit;
  transition: transform .2s ease;
}
.roster-card:hover { transform: translateY(-2px); }
.roster-card:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--bs-border-radius);
}
@media (prefers-reduced-motion: reduce) {
  .roster-card { transition: none; }
  .roster-card:hover { transform: none; }
}

.roster-media {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: var(--bs-border-radius);
  background-color: var(--bs-tertiary-bg);
  box-shadow: inset 0 0 0 1px rgba(13, 20, 30, .07);
  transition: box-shadow .2s ease;
}
[data-bs-theme="dark"] .roster-media {
  background-color: var(--card-surface);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.roster-card:hover .roster-media { box-shadow: var(--bs-box-shadow-sm); }
.roster-media-author { aspect-ratio: 3 / 4; }
.roster-media-press { aspect-ratio: 16 / 9; }

.roster-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .5rem .625rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  word-break: break-word;
    color: #0a6fbf;
  background-image: linear-gradient(160deg, rgba(var(--brand-rgb), .12), rgba(var(--brand-rgb), .03));
}
[data-bs-theme="dark"] .roster-fallback {
  color: var(--brand-dark);
  background-image: linear-gradient(160deg, rgba(var(--brand-rgb), .20), rgba(var(--brand-rgb), .04));
}
.roster-media-author .roster-fallback { font-size: 1.75rem; }
.roster-media-press .roster-fallback { font-size: .875rem; letter-spacing: .02em; }

.roster-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.roster-media-press .roster-img { object-fit: contain; }

.roster-name {
  display: block;
  margin-top: 8px;
  font-size: .8125rem;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  color: var(--bs-body-color);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.roster-media-unknown {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-quiet);
  background-color: var(--bs-secondary-bg);
  border: 1px dashed rgba(13, 20, 30, .16);
  box-shadow: none;
}
[data-bs-theme="dark"] .roster-media-unknown {
  background-color: rgba(255, 255, 255, .03);
  border-color: rgba(255, 255, 255, .18);
  box-shadow: none;
}

@media (max-width: 575.98px) {
  .idx-hero { padding: .875rem 1rem 1rem; }
  .idx-hero-title { font-size: 1.25rem; }
  .idx-hero-intro { font-size: .8125rem; }
  .roster-media-author .roster-fallback { font-size: 1.25rem; }
  .roster-media-press .roster-fallback { font-size: .75rem; }
  .roster-name { font-size: .75rem; }
}

.breadcrumb-scroll {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.breadcrumb-scroll::-webkit-scrollbar { display: none; }

.breadcrumb-scroll > .breadcrumb { overflow-x: visible; }

.breadcrumb-scroll .breadcrumb-item.active {
  flex: 0 0 auto;
  flex-shrink: 0;
  min-width: auto;
  overflow: visible;
  text-overflow: clip;
  padding-right: 0;
}

.breadcrumb-scroll::before,
.breadcrumb-scroll::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 32px;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity .15s ease;
}
.breadcrumb-scroll::before {
  left: 0;
  background: linear-gradient(to right, var(--bs-tertiary-bg) 0%, rgba(0,0,0,0) 100%);
}
.breadcrumb-scroll::after {
  right: 0;
  background: linear-gradient(to left, var(--bs-tertiary-bg) 0%, rgba(0,0,0,0) 100%);
}
.breadcrumb-scroll.show-left::before { opacity: 1; }
.breadcrumb-scroll.show-right::after { opacity: 1; }
[data-bs-theme="dark"] .breadcrumb-scroll::before {
  background: linear-gradient(to right, var(--card-surface) 0%, rgba(0,0,0,0) 100%);
}
[data-bs-theme="dark"] .breadcrumb-scroll::after {
  background: linear-gradient(to left, var(--card-surface) 0%, rgba(0,0,0,0) 100%);
}

.section-title {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: 1.125rem;
}
.section-title-icon {
  flex: none;
  color: var(--brand);
  font-size: 18px;
  line-height: 1;
}
.section-title[id] { scroll-margin-top: 4.5rem; }

.book-hero {
  display: grid;
    grid-template-columns: clamp(104px, 11vw + 64px, 210px) minmax(0, 1fr);
  column-gap: 1rem;
  padding: 1rem;
  border-radius: var(--bs-border-radius);
  background-color: var(--bs-secondary-bg);
    --fade-bg: var(--bs-secondary-bg);
}
[data-bs-theme="dark"] .book-hero {
  background-color: var(--card-surface);
  --fade-bg: var(--card-surface);
}

.book-hero-head {
  display: flex;
  flex-direction: column;
  gap: .625rem;
  min-width: 0;
}
.book-hero-head-top {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.book-hero-head-top > .book-title-scroll { flex: 1 1 auto; }

.book-title-scroll {
  position: relative;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.book-title-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  line-height: 1.3;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.title-tip {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1030;
  max-width: min(560px, calc(100vw - 24px));
  padding: 10px 14px;
  border-radius: var(--bs-border-radius);
  background: var(--bs-tertiary-bg);
  box-shadow: inset 0 0 0 1px rgba(13, 20, 30, .07), var(--bs-box-shadow);
  font-size: .95rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity .16s ease, transform .18s cubic-bezier(.2, .8, .3, 1), visibility 0s linear .18s;
}
.title-tip.is-on {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .16s ease, transform .18s cubic-bezier(.2, .8, .3, 1), visibility 0s;
}
[data-bs-theme="dark"] .title-tip {
  background: var(--card-surface);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), var(--bs-box-shadow);
}
@media (prefers-reduced-motion: reduce) {
  .title-tip,
  .title-tip.is-on { transition: none; transform: none; }
}

.book-hero-cover {
  align-self: start;
  box-shadow:
    0 0 0 1px rgba(13, 20, 30, .08),
    0 4px 12px rgba(13, 20, 30, .08),
    0 16px 32px rgba(13, 20, 30, .12);
}
.book-hero-cover .cover-title { font-size: clamp(36px, 12vw, 56px); }
.book-hero .ratio-book { background-color: var(--cover-placeholder-bg) !important; }

.cover-lens {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 4px;
  background-color: rgba(255, 255, 255, .22);
    box-shadow: 0 0 0 1px rgba(13, 20, 30, .22), 0 0 0 9999px rgba(13, 20, 30, .08);
  opacity: 0;
  pointer-events: none;
  will-change: transform;
  transition: opacity .12s ease;
}
.cover-lens.is-on { opacity: 1; }

.cover-zoom {
  position: fixed;
  z-index: 1040;
  overflow: hidden;
  border-radius: var(--bs-border-radius);
  background-color: var(--cover-placeholder-bg);
  box-shadow:
    0 0 0 1px rgba(13, 20, 30, .10),
    0 10px 30px rgba(13, 20, 30, .16),
    0 24px 56px rgba(13, 20, 30, .14);
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, 0, 0) scale(.98);
  transition: opacity .14s ease, transform .14s ease, visibility 0s linear .14s;
  pointer-events: none;
}
.cover-zoom.is-on {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .14s ease, transform .14s ease;
}
.cover-zoom-img {
  display: block;
  max-width: none;
  object-fit: cover;
  will-change: transform;
}
[data-bs-theme="dark"] .cover-lens {
  border-color: rgba(255, 255, 255, .82);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .45), 0 0 0 9999px rgba(0, 0, 0, .22);
}
[data-bs-theme="dark"] .cover-zoom {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .10),
    0 10px 30px rgba(0, 0, 0, .45),
    0 24px 56px rgba(0, 0, 0, .40);
}
@media (hover: hover) and (pointer: fine) and (min-width: 992px) {
  .book-hero-cover.is-zoomable { cursor: zoom-in; }
}
@media (prefers-reduced-motion: reduce) {
  .cover-lens,
  .cover-zoom,
  .cover-zoom.is-on { transition: none; }
}

.book-hero-actions {
  position: relative;
  display: flex;
  flex: none;
  align-items: center;
  gap: .375rem;
}
.book-hero-act {
  min-width: 6rem;
  white-space: nowrap;
}
.book-hero-act .bi { margin-right: .3125rem; }

.share-qr-pop {
  position: absolute;
  top: calc(100% + .5rem);
  right: 0;
  z-index: 30;
  width: 200px;
  padding: .625rem;
  border-radius: var(--bs-border-radius);
  background: var(--bs-tertiary-bg);
  box-shadow: inset 0 0 0 1px rgba(13, 20, 30, .07), var(--bs-box-shadow-sm);
  animation: share-qr-in .16s ease-out;
}
.share-qr-pop[hidden] { display: none; }
[data-bs-theme="dark"] .share-qr-pop {
  background: var(--card-surface);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), var(--bs-box-shadow-sm);
}
.share-qr-code {
  padding: 6px;
  border-radius: var(--bs-border-radius);
  background: #fff;
}
.share-qr-code svg { display: block; width: 100%; height: auto; }
.share-qr-tip {
  margin-top: .5rem;
  font-size: .75rem;
  line-height: 1.4;
  text-align: center;
  color: var(--text-quiet);
}
@keyframes share-qr-in {
  from { opacity: 0; transform: translateY(-4px); }
}
@media (prefers-reduced-motion: reduce) {
  .share-qr-pop { animation: none; }
}

.cpop {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1030;
  width: 320px;
  max-width: calc(100vw - 24px);
  padding: 14px 16px 12px;
  border-radius: var(--bs-border-radius);
  background: var(--bs-tertiary-bg);
  box-shadow: inset 0 0 0 1px rgba(13, 20, 30, .07), var(--bs-box-shadow);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity .16s ease, transform .18s cubic-bezier(.2, .8, .3, 1), visibility 0s linear .18s;
}
.cpop.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .16s ease, transform .18s cubic-bezier(.2, .8, .3, 1), visibility 0s;
}
[data-bs-theme="dark"] .cpop {
  background: var(--card-surface);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), var(--bs-box-shadow);
}
@media (prefers-reduced-motion: reduce) {
  .cpop,
  .cpop.is-open { transition: none; transform: none; }
}

.cpop-arrow {
  position: absolute;
  left: var(--arrow-x, 50%);
  width: 8px;
  height: 8px;
  margin-left: -4px;
  background: inherit;
  transform: rotate(45deg);
}
.cpop.is-above .cpop-arrow { bottom: -4px; box-shadow: inset -1.5px -1.5px 0 rgba(13, 20, 30, .07); }
.cpop.is-below .cpop-arrow { top: -4px; box-shadow: inset 1.5px 1.5px 0 rgba(13, 20, 30, .07); }
[data-bs-theme="dark"] .cpop.is-above .cpop-arrow { box-shadow: inset -1.5px -1.5px 0 rgba(255, 255, 255, .08); }
[data-bs-theme="dark"] .cpop.is-below .cpop-arrow { box-shadow: inset 1.5px 1.5px 0 rgba(255, 255, 255, .08); }

.cpop-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cpop-avatar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border-radius: var(--bs-border-radius);
  background-color: var(--bs-secondary-bg);
  color: var(--brand);
  font-size: 1.0625rem;
  font-weight: 600;
}
.cpop-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cpop-avatar.is-press { font-size: 1.125rem; }
.cpop-id { min-width: 0; }
.cpop-name {
  display: block;
  font-size: .9375rem;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.cpop-meta {
  display: block;
  margin-top: 2px;
  font-size: .75rem;
  line-height: 1.4;
  color: var(--text-quiet);
}
.cpop-bio {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 10px 0 0;
  font-size: .8125rem;
  line-height: 1.65;
  color: var(--text-quiet);
}
.book-hero-title {
  margin: 0;
  font-size: 1.375rem;
  line-height: 1.3;
  letter-spacing: -.01em;
    font-family: "Songti SC", "STSong", "SimSun", "Noto Serif CJK SC", "Source Han Serif SC", serif;
  font-weight: 700;
}
@media (min-width: 576px) {
  .book-hero-title { font-size: 1.75rem; }
}

.book-hero-subtitle {
  margin: 0;
  font-size: .9375rem;
  line-height: 1.5;
  color: var(--text-quiet);
  overflow-wrap: anywhere;
}
.book-hero-byline {
  margin: 0;
  font-size: .875rem;
  line-height: 1.5;
  color: var(--text-quiet);
    word-break: keep-all;
  overflow-wrap: anywhere;
}
.book-hero-byline > span:not(:last-of-type)::after {
  content: '\00a0·';
  margin: 0 .5em 0 .25em;
  color: var(--bs-tertiary-color);
}
.book-hero-byline > span.is-sep-hidden::after { visibility: hidden; }
.book-hero-byline .byline-sep { color: var(--bs-tertiary-color); }
.book-hero-byline .byline-country.is-sep-hidden .byline-sep { visibility: hidden; }

.book-meta {
  display: flex;
  flex-wrap: wrap;
  column-gap: 2rem;
  row-gap: .75rem;
  margin: 0;
  padding-top: .875rem;
  border-top: 1px solid var(--bs-border-color);
  min-width: 0;
  max-width: 100%;
}
.book-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  max-width: 100%;
}
.book-meta-item-split {
  align-items: flex-start;
  flex: 0 0 auto;
}
.book-meta dt {
  color: var(--text-quiet);
  font-weight: normal;
  font-size: .75rem;
  line-height: 1.35;
  white-space: nowrap;
}
.book-meta dd {
  color: var(--bs-body-color);
  margin: 0;
  font-size: .875rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.book-hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .625rem 1rem;
  margin-top: auto;
  padding-top: .875rem;
  border-top: 1px solid var(--bs-border-color);
}
.book-hero-cta-group { margin-left: auto; }
.book-hero-cta-group > .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .375rem;
  white-space: nowrap;
}
.book-hero-cta-group .bi { font-size: 1em; line-height: 1; }
.book-hero-report {
  --bs-btn-color: var(--text-quiet);
  --bs-btn-bg: transparent;
  --bs-btn-border-color: rgba(13, 20, 30, .12);
  --bs-btn-hover-color: var(--bs-body-color);
  --bs-btn-hover-bg: var(--bs-tertiary-bg);
  --bs-btn-hover-border-color: rgba(13, 20, 30, .18);
  --bs-btn-active-color: var(--bs-body-color);
  --bs-btn-active-bg: var(--bs-secondary-bg);
  --bs-btn-active-border-color: rgba(13, 20, 30, .18);
}
[data-bs-theme="dark"] .book-hero-report {
  --bs-btn-border-color: rgba(255, 255, 255, .14);
  --bs-btn-hover-bg: var(--bs-secondary-bg);
  --bs-btn-hover-border-color: rgba(255, 255, 255, .24);
  --bs-btn-active-bg: var(--bs-secondary-bg);
  --bs-btn-active-border-color: rgba(255, 255, 255, .24);
}

.book-hero-rating {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .3125rem .5rem;
  min-width: 0;
}
.book-hero-score {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
}
.book-hero-rating-none {
  font-size: .8125rem;
  line-height: 1.4;
  color: var(--text-quiet);
}
.book-hero-stars {
  position: relative;
  display: inline-block;
  flex: none;
  font-size: 1rem;
  line-height: 1;
}
.book-hero-stars-track { color: rgba(13, 20, 30, .13); }
.book-hero-stars-fill {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  overflow: hidden;
  white-space: nowrap;
  width: var(--stars, 0%);
  color: var(--bs-warning-text-emphasis);
}
[data-bs-theme="dark"] .book-hero-stars-track { color: rgba(255, 255, 255, .18); }

.book-tags {
  font-size: .875em;
  color: var(--bs-secondary-color);
}
.book-tags .badge { font-size: inherit; }
@media (min-width: 992px) {
  .book-hero { column-gap: 1.5rem; }
}

@media (max-width: 991.98px) {
  .book-hero .book-hero-actions { display: none !important; }
}
@media (max-width: 575.98px) {
  .book-hero {
    display: block;
    padding: .875rem 1rem 1rem;
  }
  .book-hero-cover {
    float: left;
        width: clamp(104px, 11vw + 64px, 132px);
    margin: 0 1rem .75rem 0;
  }
  .book-hero-head { display: block; }
  .book-hero-head-top,
  .book-hero-subtitle,
  .book-hero-byline,
  .book-hero-rating { margin-bottom: .625rem; }
    .book-hero-byline {
    display: flex;
    flex-direction: column;
    gap: 1px;
  }
  .book-hero-byline > span:not(:last-of-type)::after { content: none; }
  .book-meta,
  .book-hero-cta { clear: both; }
  .book-meta { column-gap: 1.25rem; }
    .book-meta-item-split {
    order: 2;
    flex: 0 0 calc((100% - 2.5rem) / 3);
    min-width: 0;
  }
  .book-hero-cta {
    flex-direction: column;
    align-items: stretch;
  }
  .book-hero-cta-group {
    display: flex;
    width: 100%;
    margin-left: 0;
  }
  .book-hero-cta-group > .btn {
    flex: 1 1 0;
    padding-inline: .5rem;
  }
}
[data-bs-theme="dark"] .book-hero-cover {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .08),
    0 4px 12px rgba(0, 0, 0, .5),
    0 16px 32px rgba(0, 0, 0, .35);
}

.get-entries,
.get-entries * {
  user-select: none;
  -webkit-user-select: none;
}
.get-entries .entry-card,
.get-entries img {
  -webkit-user-drag: none;
}
.entry-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: var(--bs-border-radius-lg);
  background-color: var(--bs-secondary-bg);
  transition: background-color .15s ease, transform .2s ease, box-shadow .2s ease;
}
.entry-card:hover {
  background-color: var(--searchbar-bg-hover);
  transform: translateY(-2px);
  box-shadow: var(--bs-box-shadow);
}
@media (prefers-reduced-motion: reduce) {
  .entry-card { transition: background-color .15s ease; }
  .entry-card:hover { transform: none; box-shadow: none; }
}
.entry-card-placeholder {
  min-height: 58px;
  background-color: var(--bs-tertiary-bg);
  box-shadow: inset 0 0 0 1px var(--bs-border-color);
  pointer-events: none;
}
.entry-card-icon {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: var(--bs-border-radius);
  overflow: hidden;
  background-color: var(--bs-tertiary-bg);
}
.entry-card-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.entry-card-icon-file {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  background-color: rgba(var(--brand-rgb), .1);
}
[data-bs-theme="dark"] .entry-card-icon-file { background-color: rgba(var(--brand-rgb), .14); }
.entry-card-icon-file .bi { font-size: 20px; line-height: 1; }
.entry-card-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
}
.entry-card-name {
  max-width: 100%;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow-wrap: anywhere;
  line-height: 1.4;
}
.entry-card-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  max-width: 100%;
  font-size: .75rem;
  line-height: 1.4;
  color: var(--text-quiet);
  font-variant-numeric: tabular-nums;
}
.entry-card-sub .badge { padding: .2em .5em; }
.entry-card-arrow {
  flex: none;
  margin-right: 4px;
  color: var(--icon-muted);
  font-size: 16px;
  line-height: 1;
  transition: color .15s ease, transform .2s ease;
}
.entry-card:hover .entry-card-arrow { color: var(--brand); transform: translate(1px, -1px); }
.entry-card.is-off {
  background-color: transparent;
  box-shadow: inset 0 0 0 1px var(--bs-border-color);
}
.entry-card.is-off:hover {
  background-color: transparent;
  box-shadow: inset 0 0 0 1px var(--bs-border-color);
  transform: none;
}
.entry-card.is-off .entry-card-icon {
  color: var(--text-hint);
  background-color: var(--bs-tertiary-bg);
}

.get-scan {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 12px;
}
.get-scan-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 11.5rem;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(var(--brand-rgb), .24);
  animation: get-scan-pulse 2.6s ease-in-out infinite;
}
.get-scan-btn:not(:disabled):hover { box-shadow: 0 8px 22px rgba(var(--brand-rgb), .36); }
.get-scan-btn:disabled {
  --bs-btn-disabled-bg: var(--bs-secondary-bg);
  --bs-btn-disabled-border-color: var(--bs-border-color);
  --bs-btn-disabled-color: var(--text-quiet);
  --bs-btn-disabled-opacity: 1;
  box-shadow: none;
}
.get-scan-btn.is-busy,
.get-scan-btn:disabled { animation: none; }
.get-scan-icon { flex: none; font-size: 18px; line-height: 1; }
@keyframes get-scan-pulse {
  0%, 100% { box-shadow: 0 6px 18px rgba(var(--brand-rgb), .20); }
  50% { box-shadow: 0 8px 26px rgba(var(--brand-rgb), .44); }
}
.scan-ring {
  display: none;
  flex: none;
  position: relative;
  z-index: 1;
}
.scan-ring svg { display: block; }
.get-scan-btn.is-busy .scan-ring { display: inline-flex; animation: scan-spin .9s linear infinite; }
.get-scan-btn.is-busy .get-scan-icon { display: none; }
.entry-card.is-locked .entry-card-arrow { display: none; }
.is-scanning .entry-card.is-locked .scan-ring {
  display: inline-flex;
  color: var(--brand);
  animation: scan-spin var(--spin, .9s) linear infinite;
}
@keyframes scan-spin { to { transform: rotate(360deg); } }
.entry-card { position: relative; }
.entry-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--scan-veil);
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
}
.entry-card.is-locked {
  pointer-events: none;
  box-shadow: inset 0 0 0 1px var(--bs-border-color);
}
.entry-card.is-locked::after { opacity: 1; }
.entry-card .entry-card-icon { transition: filter .35s ease, opacity .35s ease; }
.entry-card.is-locked .entry-card-icon { filter: grayscale(1); opacity: .55; }
.entry-card.is-lit { animation: entry-lit .5s ease-out; }
@keyframes entry-lit {
  0% { opacity: .35; box-shadow: 0 0 0 0 rgba(var(--brand-rgb), .28); }
  45% { transform: translateY(-2px) scale(1.02); opacity: 1; box-shadow: 0 8px 22px rgba(var(--brand-rgb), .26); }
  100% { opacity: 1; box-shadow: 0 0 0 0 rgba(var(--brand-rgb), 0); }
}
@media (prefers-reduced-motion: reduce) {
  .get-scan-btn { animation: none; }
  .is-scanning .entry-card.is-locked .scan-ring { animation: none; }
  .entry-card.is-lit { animation: none; }
}

.toc-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .5rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.toc-list.is-expanded { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) {
  .toc-list.is-expanded { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.toc-item { min-width: 0; overflow-wrap: break-word; }

.book-editorial p { margin-bottom: .75rem; }
.book-editorial p:last-child { margin-bottom: 0; }

.book-audience {
  padding: 1rem 1.25rem;
  border-radius: var(--bs-border-radius);
  background-color: var(--bs-secondary-bg);
}
.book-audience-title {
  display: flex;
  align-items: center;
  gap: .375rem;
  margin: 0 0 .625rem;
  font-weight: 600;
}
.book-audience-title .bi { flex: none; font-size: 1rem; line-height: 1; }
.book-audience.is-fit .book-audience-title { color: var(--bs-success-text-emphasis); }
.book-audience.is-unfit .book-audience-title { color: var(--bs-warning-text-emphasis); }
.book-point-list {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--bs-body-color);
}
.book-point-list li { position: relative; padding-left: 1rem; }
.book-point-list li + li { margin-top: .375rem; }
.book-point-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .6875em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--bs-secondary-color);
}

.book-advice-list {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--bs-body-color);
}
.book-advice-list li + li { margin-top: .5rem; }
.book-advice-list li::marker { color: var(--brand); font-weight: 600; }

.book-faq { display: grid; gap: .5rem; }
.book-faq-item {
  padding: .75rem 1rem;
  border-radius: var(--bs-border-radius);
  background-color: var(--bs-secondary-bg);
}
.book-faq-item summary {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
.book-faq-item summary::-webkit-details-marker { display: none; }
.book-faq-item summary::after {
  content: "+";
  flex: none;
  margin-left: auto;
  color: var(--bs-secondary-color);
  font-weight: 400;
  line-height: 1.2;
}
.book-faq-item[open] summary::after { content: "\2212"; }
.book-faq-answer {
  margin-top: .625rem;
  color: var(--text-quiet);
}

.weread-related {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}
@media (max-width: 575.98px) {
  .weread-related { grid-template-columns: minmax(0, 1fr); }
}
.weread-item {
  display: flex;
  gap: .75rem;
  padding: .75rem;
  border-radius: var(--bs-border-radius);
  background-color: var(--bs-secondary-bg);
  color: inherit;
  text-decoration: none;
  transition: background-color .15s ease;
}
.weread-item:hover { background-color: var(--searchbar-bg-hover); color: inherit; }
.weread-item:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.weread-cover {
  flex: none;
  width: 46px;
  height: 64px;
  border-radius: 4px;
  object-fit: cover;
  background-color: var(--cover-placeholder-bg);
}
.weread-cover-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cover-ink);
  font-size: 1.125rem;
}
.weread-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .25rem;
  min-width: 0;
}
.weread-title {
  display: -webkit-box;
  overflow: hidden;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: break-word;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.weread-author {
  overflow: hidden;
  color: var(--side-muted);
  font-size: .8125rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.spark { display: flex; align-items: flex-end; gap: 1px; height: 42px; }
.spark span { flex: 1; min-height: 1px; border-radius: 1px 1px 0 0; background: var(--bs-secondary-color); }
.spark span.hot { background: var(--brand); }

.ad-slot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, var(--ad-w, 300px));
  min-height: var(--ad-h, 250px);
  margin-inline: auto;
  overflow: hidden;
  border-radius: var(--bs-border-radius-sm);
}
.ad-slot > ins { width: 100%; }

.ad-slot-fluid { width: 100%; }
.ad-slot-tag {
  position: absolute;
  top: 4px;
  right: 6px;
  z-index: 1;
  padding: 2px 5px;
  font-size: .625rem;
  line-height: 1;
  color: var(--bs-secondary-color);
  background-color: var(--bs-tertiary-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
}
.ad-slot-skeleton {
  background-color: #f2f3f5;
  color: var(--bs-tertiary-color);
}
[data-bs-theme="dark"] .ad-slot-skeleton {
  background-color: #2a323e;
}
.ad-slot-skeleton.ad-slot-h300 { height: 300px; min-height: 300px; }
.ad-slot-skeleton .ad-slot-fill {
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.sponsor-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 13px 15px;
  border: 1px solid rgba(var(--brand-rgb), .22);
  border-radius: var(--bs-border-radius);
  background: linear-gradient(135deg, rgba(var(--brand-rgb), .09), rgba(var(--brand-rgb), .025) 65%);
}
[data-bs-theme="dark"] .sponsor-card {
  border-color: rgba(var(--brand-rgb), .30);
  background: linear-gradient(135deg, rgba(var(--brand-rgb), .16), rgba(var(--brand-rgb), .05) 65%);
}
.sponsor-card-head {
  display: flex;
  align-items: center;
  gap: 9px;
}
.sponsor-card-icon {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--bs-primary);
  background: rgba(var(--brand-rgb), .12);
  border-radius: 50%;
}
[data-bs-theme="dark"] .sponsor-card-icon {
  background: rgba(var(--brand-rgb), .20);
}
.sponsor-card-icon .bi { font-size: 15px; line-height: 1; }
.sponsor-card-btn .bi { font-size: 14px; line-height: 1; }
.sponsor-card-title {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
  font-size: .9375rem;
  color: var(--bs-heading-color);
}
.sponsor-card-text {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0;
  font-size: .8125rem;
  line-height: 1.6;
  color: var(--bs-secondary-color);
}
.sponsor-card-text strong {
  font-weight: 600;
  color: var(--bs-body-color);
}
.sponsor-card-btn {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 6px;
  min-height: 32px;
  padding: 0 14px;
  font-size: .8125rem;
  font-weight: 600;
  color: #fff;
  background: var(--bs-primary);
  border-radius: var(--bs-border-radius-pill);
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.sponsor-card-btn:hover {
  color: #fff;
  background: var(--brand-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(var(--brand-rgb), .32);
}
.sponsor-card-btn:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .sponsor-card-btn { transition: none; }
  .sponsor-card-btn:hover { transform: none; }
}
.side-rail {
  position: sticky;
  top: 74px;
  display: grid;
  gap: 20px;
  align-content: start;
    align-items: start;
}
@media (max-width: 1199.98px) {
  .side-rail { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .side-lists-card,
  .side-stats-card { grid-column: 1 / -1; }
}
@media (max-width: 767.98px) {
  .side-rail { grid-template-columns: minmax(0, 1fr); }
}

.side-card {
  padding: 0;
  border-radius: var(--bs-border-radius-lg);
  overflow: hidden;
}

.side-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px 8px;
}
.side-head-icon {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  line-height: 1;
  color: var(--brand);
}
.side-title {
  margin: 0;
  font-size: .9375rem;
  font-weight: 600;
  line-height: 1.4;
}
.side-head-meta {
  margin-left: auto;
  font-size: .6875rem;
  line-height: 1.4;
  color: var(--side-muted);
  font-variant-numeric: tabular-nums;
}
.side-head-link {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  margin-left: auto;
  font-size: .75rem;
  line-height: 1.4;
  color: var(--side-muted);
  text-decoration: none;
  transition: color .15s ease;
}
.side-head-link .bi { font-size: .6875rem; }
.side-head-link:hover { color: var(--brand); }
.side-head-link:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

.side-list { padding: 0 8px 6px; }

.side-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 7px;
  border-radius: var(--bs-border-radius-sm);
  color: var(--bs-body-color);
  transition: background-color .15s ease;
}
.side-row:hover {
  background-color: var(--bs-secondary-bg);
  color: var(--bs-body-color);
}
.side-row:hover .side-row-title { color: var(--brand); }
.side-row-main { flex: 1 1 auto; min-width: 0; }
.side-row-title {
  display: block;
  font-size: .875rem;
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .15s ease;
}
.side-row-author,
.side-row-sub {
  display: block;
  margin-top: 2px;
  line-height: 1.35;
  color: var(--side-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.side-row-author { font-size: .75rem; }
.side-row-sub { font-size: .6875rem; }
.side-row-score {
  flex: none;
  align-self: flex-start;
  margin-top: 1px;
  display: inline-flex;
  align-items: center;
  gap: 1px;
  font-size: .8125rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--bs-warning-text-emphasis);
  font-variant-numeric: tabular-nums;
}
.side-row-star { font-size: .6875rem; line-height: 1; }

.side-list-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 8px;
  border-radius: var(--bs-border-radius-sm);
  color: var(--bs-body-color);
  transition: background-color .15s ease;
}
.side-list-item + .side-list-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 8px;
  right: 8px;
  height: 1px;
  background-color: var(--bs-border-color);
}
.side-list-item:hover {
  background-color: var(--bs-secondary-bg);
  color: var(--bs-body-color);
}
.side-list-item:hover .side-list-name { color: var(--brand); }
.side-list-item:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }

.side-list-stack {
  display: flex;
  flex: none;
  align-items: center;
  padding: 3px 4px 3px 3px;
}
.side-list-sheet {
  flex: none;
  width: 34px;
  height: 60px;
  overflow: hidden;
  border-radius: 5px;
  background-color: var(--cover-placeholder-bg);
  box-shadow: 0 0 0 1px var(--bs-tertiary-bg), 0 1px 3px rgba(13, 20, 30, .12);
  transform: rotate(var(--rot, 0deg));
  transition: transform .3s cubic-bezier(.2, .8, .3, 1);
}
.side-list-sheet + .side-list-sheet { margin-left: -19px; }
.side-list-sheet:nth-child(1) { --rot: -7deg; }
.side-list-sheet:nth-child(2) { --rot: -1.5deg; z-index: 1; }
.side-list-sheet:nth-child(3) { --rot: 6deg; z-index: 2; }
.side-list-sheet img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.side-list-sheet.is-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Songti SC", "SimSun", serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--cover-ink);
}
[data-bs-theme="dark"] .side-list-sheet { box-shadow: 0 0 0 1px var(--card-surface), 0 1px 3px rgba(0, 0, 0, .35); }
.side-list-item:hover .side-list-sheet:nth-child(1) { transform: translateX(-2px) rotate(-10deg); }
.side-list-item:hover .side-list-sheet:nth-child(2) { transform: translateY(-2px) rotate(-2deg); }
.side-list-item:hover .side-list-sheet:nth-child(3) { transform: translateX(2px) rotate(9deg); }
@media (prefers-reduced-motion: reduce) {
  .side-list-sheet { transition: none; }
  .side-list-item:hover .side-list-sheet { transform: rotate(var(--rot, 0deg)); }
}

.side-list-main { flex: 1 1 auto; min-width: 0; }
.side-list-name,
.side-list-blurb { max-width: 36rem; }
.side-list-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
  transition: color .15s ease;
}
.side-list-blurb {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 4px;
  font-size: .75rem;
  line-height: 1.55;
  color: var(--side-muted);
}
.side-empty {
  margin: 0 8px;
  padding: 13px 12px;
  border: 1px dashed var(--bs-border-color);
  border-radius: var(--bs-border-radius-sm);
  font-size: .75rem;
  line-height: 1.6;
  text-align: center;
  color: var(--side-muted);
}

.side-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  border-radius: 0;
  background-color: var(--bs-border-color);
}
.side-stat {
  padding: 9px 12px 10px;
  background-color: var(--bs-card-bg);
}
.side-stat dt {
  font-size: .6875rem;
  font-weight: normal;
  line-height: 1.4;
  color: var(--side-muted);
}
.side-stat dd {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 2px 0 0;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}
.side-dot {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--bs-success);
  animation: side-dot-pulse 2.4s ease-out infinite;
}
@keyframes side-dot-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(25, 135, 84, .45); }
  70%  { box-shadow: 0 0 0 5px rgba(25, 135, 84, 0); }
  100% { box-shadow: 0 0 0 0 rgba(25, 135, 84, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .side-dot { animation: none; }
}
@media (max-width: 1199.98px) {
  .side-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .side-stat {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
  }
  .side-stat dd { margin-top: 0; }
}
@media (max-width: 575.98px) {
    .side-stat { display: block; padding: 8px 6px 9px; text-align: center; }
  .side-stat dd { justify-content: center; margin-top: 2px; font-size: 1rem; }
}

.artalk, .atk-layer-wrap { --at-color-main: var(--brand) !important; }

.artalk,
.atk-main-editor,
.atk-main-editor > .atk-textarea-wrap > .atk-textarea,
.atk-main-editor > .atk-textarea-wrap > .atk-comment-closed,
.atk-list-read-more-inner,
.atk-loading {
  --bs-bg-opacity: 1;
  background-color: rgba(var(--bs-secondary-bg-rgb), var(--bs-bg-opacity)) !important;
}

.atk-main-editor { border: 0 !important; }
.atk-main-editor > .atk-textarea-wrap > .atk-textarea { min-height: 72px !important; }
.artalk button,
.atk-layer-wrap button,
.atk-send-btn,
.atk-btn,
.atk-close-btn,
.atk-common-action-btn,
.atk-ignore-btn,
.atk-plug-btn,
.atk-show-btn,
.atk-state-btn,
.atk-state-btn .atk-cancel,
.atk-height-limit-btn { border-radius: var(--bs-border-radius-sm) !important; }
.atk-copyright { display: none !important; }
.artalk .atk-list-no-comment { display: none !important; }
.artalk > .atk-list > .atk-list-body { min-height: 0 !important; }

.artalk .atk-avatar img, .artalk .badge, .artalk .atk-ua, .artalk .atk-pinned-badge,
.artalk .atk-content.atk-type-collapsed, .artalk .atk-collapsed, .artalk .atk-height-limit-btn,
.artalk .atk-dropdown, .artalk .atk-list-read-more-inner,
.artalk .atk-pagination .atk-btn, .artalk .atk-pagination .atk-input,
.artalk .atk-main-editor, .artalk .atk-main-editor input, .artalk .atk-main-editor .atk-textarea,
.artalk .atk-plug-btn, .artalk .atk-state-btn, .artalk .atk-send-btn,
.artalk .atk-version-check-notice, .artalk .atk-notify,
.artalk .atk-editor-plug-emoticons .atk-item, .artalk code,
.atk-layer-wrap .atk-dropdown, .atk-layer-wrap .atk-err-alert, .atk-layer-wrap .atk-notify,
.atk-layer-wrap .atk-layer-dialog input, .atk-layer-wrap .atk-layer-dialog button,
.atk-layer-wrap code { border-radius: var(--bs-border-radius) !important; }

@media (max-width: 575.98px) {
  .cover-xs { width: clamp(60px, 17vw, 72px); }
  .cat-pick-tile { width: 48px; height: 48px; }
  .cat-pick-icon { font-size: 22px; }
  .cover-sm { width: clamp(88px, 25vw, 104px); }
  .cover-md { width: clamp(88px, 24vw, 112px); }
  .cover-lg { width: clamp(96px, 27vw, 116px); }
  .cover-lg .cover-title { font-size: 40px; }
    .hero-search { width: 85%; max-width: 476px; }
  .hero-search .search-wrap,
  .page-search .search-wrap { --go-size: 32px; --go-inset: 5px; }
    .hero-search .search-box .input-group-text,
  .page-search .search-box .input-group-text { padding-inline: .7rem .35rem; }
  .hero-search .search-box .form-control,
  .page-search .search-box .form-control { padding-right: calc(1.05rem + 24px + 1rem); }
  .hero-search .input-group-lg > .form-control,
  .hero-search .input-group-lg > .input-group-text,
  .page-search .input-group-lg > .form-control,
  .page-search .input-group-lg > .input-group-text {
    font-size: 1.0625rem;
    padding-top: .425rem;
    padding-bottom: .425rem;
  }
}

.booklist-hero {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}
.booklist-cover { width: 132px; flex: 0 0 auto; }
.booklist-hero-main { display: flex; flex-direction: column; }
.booklist-title {
  font-size: 1.5rem;
  line-height: 1.35;
  margin-bottom: 0;
}
.booklist-blurb {
  margin: 8px 0 0;
  font-size: .9375rem;
  line-height: 1.7;
  color: var(--bs-secondary-color);
}
.booklist-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: .8125rem;
  color: var(--text-quiet);
}
.booklist-meta-dot { color: var(--bs-tertiary-color); }

.md-article {
  font-size: 1rem;
  line-height: 1.85;
  word-wrap: break-word;
}
.md-article > :first-child { margin-top: 0; }
.md-article p { margin: 0 0 1.15em; }
.md-article h2,
.md-article h3,
.md-article h4 {
  font-weight: 600;
  line-height: 1.45;
  margin: 1.8em 0 .7em;
}
.md-article h2 { font-size: 1.25rem; }
.md-article h3 { font-size: 1.0625rem; }
.md-article h4 { font-size: 1rem; }
.md-article ul,
.md-article ol { margin: 0 0 1.15em; padding-left: 1.4em; }
.md-article li { margin: .35em 0; }
.md-article a { color: var(--brand); text-underline-offset: 3px; }
.md-article blockquote {
  margin: 1.4em 0;
  padding: 4px 0 4px 16px;
  border-left: 3px solid var(--brand);
  color: var(--bs-secondary-color);
}
.md-article img {
  max-width: 100%;
  height: auto;
  border-radius: var(--bs-border-radius);
}
.md-article code {
  padding: .15em .4em;
  font-size: .875em;
  border-radius: var(--bs-border-radius);
  background-color: var(--bs-secondary-bg);
}
.md-article pre {
  margin: 0 0 1.15em;
  padding: 16px;
  overflow: auto;
  border-radius: var(--bs-border-radius);
  background-color: var(--bs-secondary-bg);
}
.md-article pre code { padding: 0; background: none; }
.md-article table {
  width: 100%;
  margin: 0 0 1.15em;
  font-size: .9375rem;
  border-collapse: collapse;
}
.md-article th,
.md-article td {
  padding: 8px 12px;
  text-align: left;
  border: 1px solid var(--bs-border-color);
}
.md-article th { background-color: var(--bs-secondary-bg); font-weight: 600; }
.md-article hr { margin: 2em 0; border-color: var(--bs-border-color); opacity: 1; }

/* 书单正文：导语首字下沉（drop cap），固定占据正文 2 行高，按英文杂志的 drop cap 规范：
   1. 浮动盒高度由 line-height 决定，恰好 = 正文 2 行（桌面 3.7em / 移动 3.6em），第三行起全宽；
   2. 字号让字形高度 = 1 个行距 + 1 个字高：汉字约 3em；拉丁大写按 cap height 约 3.86em；
   3. 首字顶边对齐首行文字顶部，底部落在第二行基线，右侧留 .1em 字间距；
   4. 英文用衬线展示体，避免 "I" 之类的大写字母放大后变成一根色条；
   5. 负底边距抵消中文字体 ascent/descent 撑出的行盒溢出，否则浮动盒会吃到第三行，
      出现「首字只有两行高、却把正文挤成三行」的问题。 */
.booklist-article > p:first-of-type::first-letter {
  float: left;
  margin: 0 .1em -0.1em 0;
  font-size: 3em; /* 字面高度 = 1 个行距 + 1 个字高，正好两行文字 */
  line-height: 1.2333; /* 3em × 1.2333 = 3.7em = 正文两行，浮动盒恰好两行高 */
  font-weight: 600;
  color: inherit;
}
html[lang="en"] .booklist-article > p:first-of-type::first-letter {
  /* 英文杂志的 drop cap 用衬线展示体：大写字母有衬线，避免 "I" 放大成一根色条 */
  font-family: Georgia, "Times New Roman", "DejaVu Serif", "Songti SC", serif;
  font-size: 3.86em; /* cap 顶对齐首行、基线落在第二行基线 */
  line-height: .9585; /* 3.86em × .9585 = 3.7em = 正文两行 */
  font-weight: 600;
}
@media (max-width: 575.98px) {
  .booklist-article > p:first-of-type::first-letter { font-size: 3em; line-height: 1.2; } /* 移动端行高 1.8 → 两行 = 3.6em */
  html[lang="en"] .booklist-article > p:first-of-type::first-letter { font-size: 3.86em; line-height: .933; }
}

.md-article .md-book-card { margin: 1.4em 0; }
.md-article .md-book-card .card { transition: transform .18s ease, box-shadow .18s ease; }
.md-article .md-book-card .card:hover {
  transform: translateY(-2px);
  box-shadow: var(--bs-box-shadow);
  z-index: 1;
}
/* 从书单卡片点封面跳进来时，目标书籍卡留出固定导航的高度并短暂高亮 */
.booklist-article .md-book-card { scroll-margin-top: 5.5rem; }
.booklist-article .md-book-card:target .card {
  box-shadow: 0 0 0 2px rgba(var(--brand-rgb), .5), var(--bs-box-shadow);
}
@media (prefers-reduced-motion: reduce) {
  .md-article .md-book-card .card { transition: none; }
  .md-article .md-book-card .card:hover { transform: none; }
}
@media (min-width: 768px) {
  .md-article .md-book-card { width: 80%; margin-left: auto; margin-right: auto; }
}
.md-book-missing {
  margin: 1.4em 0;
  padding: 12px 16px;
  font-size: .875rem;
  color: var(--bs-secondary-color);
  border: 1px dashed var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  background-color: var(--bs-secondary-bg);
}

.cat-pick-body { padding: 10px; }
.cat-pick-thumb { background-color: rgba(var(--brand-rgb), .1); }
.cat-pick-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--bs-border-radius);
  background-color: rgba(var(--brand-rgb), .1);
}
[data-bs-theme="dark"] .cat-pick-tile { background-color: rgba(var(--brand-rgb), .14); }
.cat-pick-icon { font-size: 26px; line-height: 1; color: var(--brand); }

@media (max-width: 575.98px) {
  .cat-pick-tile { width: 48px; height: 48px; }
  .cat-pick-icon { font-size: 22px; }
}
.cat-pick-monogram {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  color: var(--brand);
}

.booklist-card-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 16px;
}
/* 卡片本体不做悬停浮动，浮动动画只保留在内部封面堆叠上 */
.bls-main {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 18px;
}
.bls-body {
  flex: 1 1 50%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 2px 0;
}
.bls-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.bls-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bls-blurb-wrap {
  flex: 1 1 auto;
  min-height: 0;
  display: block;
  overflow: hidden;
}
.bls-blurb {
  font-size: .8125rem;
  line-height: 1.65;
  color: var(--text-quiet);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bls-meta {
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: .75rem;
  font-weight: 500;
  line-height: 1.6;
  color: var(--text-quiet);
  background-color: var(--bs-tertiary-bg);
  border-radius: 999px;
  padding: 2px 8px;
}
.bls-stack {
  position: relative;
  z-index: 2;
  flex: 1 1 50%;
  min-width: 0;
  /* 容器≈封面视觉高度；静态上移占用标题行右侧空白，节省整卡高度 */
  align-self: flex-start;
  height: 122px;
  margin-top: -6px;
}
/* 悬停动画只作用于封面本身（is-hot），容器不再做两段位移 */
.bls-sheet {
  position: absolute;
  top: 50%;
  left: 0;
  width: 88px;
  aspect-ratio: 3 / 4;
    z-index: var(--bls-z, 1);
  transform: translate(var(--bls-x, 0px), -50%) rotate(var(--r, 0deg));
  transition: transform .45s cubic-bezier(.3, .8, .4, 1);
  will-change: transform;
}
.bls-sheet img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 6px;
  object-fit: cover;
  background-color: var(--cover-placeholder-bg);
  box-shadow:
    0 0 0 1px var(--bs-tertiary-bg),
    0 2px 6px rgba(13, 20, 30, .10),
    0 8px 18px rgba(13, 20, 30, .10);
}
[data-bs-theme="dark"] .bls-sheet img {
  box-shadow:
    0 0 0 1px var(--card-surface),
    0 2px 6px rgba(0, 0, 0, .35),
    0 8px 18px rgba(0, 0, 0, .38);
}
.bls-sheet-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: var(--cover-ink);
  background-color: var(--cover-placeholder-bg);
  box-shadow: 0 0 0 1px var(--bs-tertiary-bg);
}
[data-bs-theme="dark"] .bls-sheet-ph { box-shadow: 0 0 0 1px var(--card-surface); }
.bls-ph-initial { font-family: "Songti SC", "SimSun", serif; font-size: 1.75rem; font-weight: 600; }
.bls-sheet.is-hot {
  z-index: 20;
  transform: translate(var(--bls-x, 0px), calc(-50% - 10px)) scale(1.2) rotate(var(--r, 0deg));
}
.bls-sheet.is-hot img,
.bls-sheet.is-hot.bls-sheet-ph {
  box-shadow:
    0 0 0 1px var(--bs-tertiary-bg),
    0 6px 14px rgba(13, 20, 30, .18),
    0 16px 30px rgba(13, 20, 30, .16);
}
[data-bs-theme="dark"] .bls-sheet.is-hot img,
[data-bs-theme="dark"] .bls-sheet.is-hot.bls-sheet-ph {
  box-shadow:
    0 0 0 1px var(--card-surface),
    0 6px 14px rgba(0, 0, 0, .45),
    0 16px 30px rgba(0, 0, 0, .40);
}
@media (prefers-reduced-motion: reduce) {
  .bls-sheet { transition: none; }
}

@media (max-width: 575.98px) {
  .booklist-card-stack { gap: 6px; padding: 12px; }
  .bls-main { gap: 12px; }
  .bls-title { font-size: 1.0625rem; }
  .bls-meta { font-size: .6875rem; padding: 1px 6px; }
  .bls-blurb {
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }
  .bls-stack { height: 86px; margin-top: -1px; }
  .bls-sheet { width: 62px; }
}

.admin-md {
  min-height: 320px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: .8125rem;
  line-height: 1.7;
  white-space: pre-wrap;
}
.admin-book-results {
  max-height: 220px;
  overflow-y: auto;
  margin-bottom: 8px;
}
.admin-cover-thumb {
  width: 32px;
  height: 42px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: var(--bs-border-radius);
  box-shadow: 0 0 0 1px rgba(13, 20, 30, .06);
}
.admin-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  margin-top: 4px;
  background-color: var(--bs-tertiary-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  box-shadow: var(--bs-box-shadow-sm);
}
.admin-note-cell { max-width: 34rem; }
.admin-note-cell a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 575.98px) {
  .booklist-hero { gap: 14px; }
  .booklist-cover { width: 96px; }
  .booklist-title { font-size: 1.25rem; }
  .md-article { font-size: .9375rem; line-height: 1.8; }
}

.doc-hero {
  max-width: 40rem;
  margin: 0 auto 2.25rem;
  padding-top: .75rem;
  text-align: center;
}
.doc-hero .lead { margin-bottom: 0; }
.doc-hero-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 1.25rem;
  border-radius: 50%;
  color: var(--brand);
  background: rgba(var(--brand-rgb), .1);
}
[data-bs-theme="dark"] .doc-hero-icon { background: rgba(var(--brand-rgb), .14); }
.doc-hero-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
  margin-top: 1.25rem;
}
.doc-icon {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--bs-primary);
  background: rgba(var(--brand-rgb), .12);
}
[data-bs-theme="dark"] .doc-icon { background: rgba(var(--brand-rgb), .20); }

.doc-facts {
  display: grid;
  border-top: 1px solid var(--bs-border-color);
  border-left: 1px solid var(--bs-border-color);
}
.doc-fact {
  padding: 16px 18px;
  border-right: 1px solid var(--bs-border-color);
  border-bottom: 1px solid var(--bs-border-color);
}
.doc-fact-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 5px;
}
.doc-fact-title { font-size: .9375rem; font-weight: 600; color: var(--bs-heading-color); }
.doc-fact-text { margin: 0; font-size: .8125rem; line-height: 1.55; color: var(--text-quiet); }

.doc-sections { display: grid; gap: 12px; margin-top: 2rem; }
.doc-section { padding: 18px 20px; }
.doc-section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.doc-section-title { margin: 0; font-size: 1rem; font-weight: 600; color: var(--bs-heading-color); }
.doc-section-body { font-size: .9375rem; line-height: 1.75; }
.doc-section-body p { margin-bottom: .75rem; }
.doc-section-body > :last-child,
.doc-section-body > :last-child > :last-child { margin-bottom: 0; }
.doc-section-body strong { font-weight: 600; }
.doc-subtitle { margin: .875rem 0 .375rem; font-size: .9375rem; font-weight: 600; color: var(--bs-heading-color); }

.doc-checklist {
  display: grid;
  gap: 8px;
  margin: 0 0 .75rem;
  padding: 0;
  list-style: none;
}
.doc-checklist li { display: flex; align-items: flex-start; gap: 9px; }
.doc-checklist .bi { flex: none; margin-top: 2px; color: var(--brand); }

.doc-steps { display: grid; gap: 14px; }
.doc-step { display: flex; align-items: flex-start; gap: 10px; }
.doc-step-num {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-top: 1px;
  border-radius: 50%;
  color: #fff;
  font-size: .75rem;
  font-weight: 600;
  background: var(--brand);
}
.doc-step-main { display: grid; gap: 2px; min-width: 0; }
.doc-step-title { margin: 0; font-size: .9375rem; font-weight: 600; color: var(--bs-heading-color); }
.doc-step-text { margin: 0; font-size: .8125rem; line-height: 1.6; color: var(--text-quiet); }
.doc-step-text strong { font-weight: 600; color: var(--bs-body-color); }

.doc-items { display: grid; gap: 16px 20px; }
.doc-item { display: grid; gap: 7px; align-content: start; }
.doc-item-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
}
.doc-item-title { font-size: .9375rem; font-weight: 600; color: var(--bs-heading-color); }
.doc-item-text { margin: 0; font-size: .8125rem; line-height: 1.6; color: var(--text-quiet); }

.doc-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}
.doc-cta-note { margin: 0; font-size: .8125rem; line-height: 1.55; color: var(--text-quiet); }
.doc-contact { margin: 14px 0 0; font-size: .875rem; }

.doc-sponsor {
  gap: 10px;
  padding: 18px 20px;
}
.doc-sponsor .sponsor-card-head { gap: 10px; }
.doc-sponsor .sponsor-card-title { font-size: 1rem; }
.doc-sponsor .sponsor-card-text {
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
  font-size: .9375rem;
  line-height: 1.75;
  color: var(--bs-body-color);
}
.doc-sponsor .sponsor-card-btn { font-size: .875rem; }

@media (min-width: 576px) {
  .doc-facts { grid-template-columns: repeat(2, 1fr); }
  .doc-items { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
  .doc-steps { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 575.98px) {
  .doc-hero { margin-bottom: 1.5rem; }
  .doc-fact { padding: 13px 15px; }
  .doc-section { padding: 14px 16px; }
  .doc-sponsor { padding: 14px 16px; }
  .doc-sections { margin-top: 1.5rem; }
  .doc-cta-note { flex-basis: 100%; }
}

@media (max-width: 991.98px) {
  .admin-navbar > .container { flex-wrap: wrap; }
  .admin-navbar .navbar-collapse {
    flex-basis: 100%;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--bs-border-color);
  }
  .admin-navbar .navbar-nav { gap: 0 !important; }
  .admin-navbar .navbar-nav .nav-item + .nav-item { border-top: 1px solid var(--bs-border-color); }
  .admin-navbar .navbar-nav .nav-link {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: .5rem .6rem;
    font-size: .9375rem;
    border-radius: var(--bs-border-radius);
  }
  .admin-navbar .navbar-nav .nav-link.active { background: rgba(var(--brand-rgb), .09); font-weight: 600; }
  [data-bs-theme="dark"] .admin-navbar .navbar-nav .nav-link.active { background: rgba(var(--brand-rgb), .16); }
  .admin-navbar .admin-nav-alt { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--bs-border-color); }
  .admin-navbar .navbar-toggler { min-width: 44px; min-height: 44px; }
}

.admin-page-head { display: flex; align-items: center; gap: 12px; }
.admin-page-icon {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--bs-border-radius);
  color: var(--brand);
  background: rgba(var(--brand-rgb), .1);
}
.admin-page-icon .bi { font-size: 22px; line-height: 1; }
.admin-page-title { margin: 0; font-size: 1.25rem; font-weight: 600; }
.admin-page-lead { margin: 3px 0 0; font-size: .875rem; line-height: 1.5; color: var(--text-quiet); }
.admin-page-text { min-width: 0; }

.mp-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 10px 14px;
  background: var(--bs-tertiary-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
}
.mp-status-dots { display: flex; flex-wrap: wrap; gap: 14px; }
.mp-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .8125rem;
  color: var(--text-quiet);
}
.mp-dot .bi { font-size: .5rem; }
.mp-dot.ok { color: #059669; }
.mp-dot.bad { color: #dc2626; }
.mp-status-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.mp-updated { font-size: .75rem; color: var(--text-quiet); }
.mp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.mp-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: .8125rem;
  color: var(--text-quiet);
  border: 1px solid var(--bs-border-color);
  text-decoration: none;
}
.mp-chip:hover { text-decoration: none; filter: brightness(.97); }
.mp-chip.warn {
  color: #b45309;
  border-color: rgba(180, 83, 9, .35);
  background: rgba(245, 158, 11, .1);
}

.mp-card .card-body { padding: 14px 16px; }
.mp-metric-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .8125rem;
  color: var(--text-quiet);
}
.mp-metric-icon {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(var(--brand-rgb), .12);
  color: var(--brand);
  font-size: 14px;
}
.mp-metric-value { margin-top: 8px; font-size: 1.5rem; font-weight: 600; line-height: 1.2; }
.mp-metric-value--sm { font-size: 1.125rem; }
.mp-metric-sub { margin-top: 2px; font-size: .75rem; color: var(--text-quiet); }

.mp-card-title { display: flex; align-items: center; gap: 6px; font-size: .9375rem; font-weight: 600; }
.mp-card-title .bi { color: var(--brand); }

.mp-spark-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.mp-spark-label { flex: 0 0 auto; width: 40px; font-size: .75rem; color: var(--text-quiet); }
.mp-spark-row .spark { flex: 1 1 auto; height: 64px; }
.spark.sp-page span.hot { background: var(--brand); }
.spark.sp-search span.hot { background: #10b981; }
.spark.sp-ai span.hot { background: #8b5cf6; }
.spark.sp-lookup span.hot { background: #f59e0b; }

@media (min-width: 1200px) {
  .row-cols-xl-7 > * { flex: 0 0 auto; width: 14.285714%; }
}

.mp-compare th { font-weight: 600; }
.mp-compare td,
.mp-compare th { font-size: .8125rem; vertical-align: middle; }

.mp-log { overflow: hidden; }
.mp-log-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  font-size: .9375rem;
  font-weight: 600;
  cursor: pointer;
}
.mp-log-summary .bi { color: var(--brand); }
.mp-log[open] .mp-log-summary { border-bottom: 1px solid var(--bs-border-color); }

.setting-card { overflow: hidden; }
.setting-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--bs-border-color);
}
.setting-card-icon {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--bs-border-radius);
  background: linear-gradient(160deg, #2aa8ff, #0b93fd);
  color: #fff;
}
.setting-card-icon .bi { font-size: 19px; line-height: 1; }
.setting-card-title { flex: 1 1 auto; min-width: 0; }

.cat-icon-preview {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--bs-border-radius);
  color: var(--brand);
  background: rgba(var(--brand-rgb), .1);
  font-size: 18px;
}
.setting-card-title h2 { margin: 0; font-size: 1rem; font-weight: 600; }
.setting-card-title p { margin: 2px 0 0; font-size: .8125rem; line-height: 1.5; color: var(--text-quiet); }

.setting-badge {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--bs-border-radius-pill);
  font-size: .75rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text-quiet);
  background: var(--bs-secondary-bg);
  border: 1px solid var(--border-subtle);
}
.setting-badge.is-on { color: #0769b3; background: rgba(var(--brand-rgb), .12); border-color: rgba(var(--brand-rgb), .22); }
.setting-badge.is-on::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }

.setting-item { padding: 16px 20px 18px; }
.setting-item + .setting-item { border-top: 1px solid var(--bs-border-color); }
.setting-item-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.setting-item-label { font-size: .875rem; font-weight: 600; color: var(--bs-heading-color); }
.setting-item-tip { flex: none; font-size: .75rem; line-height: 1.5; color: var(--text-quiet); }

.setting-key-row { display: flex; align-items: stretch; gap: 8px; }
.setting-key-row .form-control { flex: 1 1 auto; min-width: 0; }
.setting-reveal {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  color: var(--text-quiet);
}
.setting-reveal:hover { color: var(--bs-body-color); }
.setting-reveal .bi { font-size: 17px; line-height: 1; }
.setting-reveal [data-icon="off"],
.setting-reveal.is-on [data-icon="on"] { display: none; }
.setting-reveal.is-on [data-icon="off"] { display: inline; }
.setting-key-row.is-off { opacity: .55; }
.setting-card .form-control:disabled { background: var(--bs-secondary-bg); color: var(--text-quiet); }

.setting-card .form-control,
.setting-card .form-select {
  padding-top: .5rem;
  padding-bottom: .5rem;
  font-size: .9375rem;
  color: var(--text-input);
}
.setting-card .form-control:focus,
.setting-card .form-select:focus {
  border-color: rgba(var(--brand-rgb), .55);
  box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .15);
}
.setting-card .btn { padding-top: .5rem; padding-bottom: .5rem; }
.setting-card .form-text { margin-top: 8px; font-size: .8125rem; color: var(--text-quiet); }

.setting-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 11px 14px;
  min-height: 44px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--bs-border-radius);
  font-size: .8125rem;
  line-height: 1.5;
  color: var(--text-quiet);
  cursor: pointer;
  user-select: none;
  transition: background-color .15s ease, border-color .15s ease;
}
.setting-check:hover { background: var(--bs-secondary-bg); }
.setting-check input { flex: none; width: 17px; height: 17px; margin: 0; cursor: pointer; }

.setting-model-row { display: flex; align-items: stretch; gap: 8px; }
.setting-model-row .form-select { flex: 1 1 auto; min-width: 0; }
.setting-model-row .btn { flex: none; white-space: nowrap; }
.setting-status { margin-top: 8px; font-size: .8125rem; line-height: 1.55; color: var(--text-quiet); }
.setting-status.is-ok { color: #1a7f37; }
.setting-status.is-err { color: #b02a37; }
[data-bs-theme="dark"] .setting-status.is-ok { color: #7bd88f; }
[data-bs-theme="dark"] .setting-status.is-err { color: #ff9d9d; }
[data-bs-theme="dark"] .setting-badge.is-on { color: #9dd4ff; }

.setting-card-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--bs-secondary-bg);
  border-top: 1px solid var(--bs-border-color);
}
.setting-save { flex: none; padding-right: 1.5rem; padding-left: 1.5rem; font-weight: 500; }
.setting-foot-note { font-size: .8125rem; line-height: 1.5; color: var(--text-quiet); }

@media (max-width: 767.98px) {
  .admin-page-icon { width: 40px; height: 40px; }
  .admin-page-icon .bi { font-size: 20px; }
  .admin-page-title { font-size: 1.125rem; }
  .admin-page-lead { font-size: .8125rem; }

  .setting-card-head { padding: 14px 16px; gap: 10px; }
  .setting-card-icon { width: 34px; height: 34px; }
  .setting-card-icon .bi { font-size: 17px; }
  .setting-card-title h2 { font-size: .9375rem; }
  .setting-card-title p { font-size: .75rem; }
  .setting-badge { align-self: flex-start; }

  .setting-item { padding: 14px 16px 16px; }
  .setting-item-head { margin-bottom: 7px; }
    .setting-card .form-control,
  .setting-card .form-select,
  .setting-card .btn { min-height: 48px; font-size: 1rem; }
  .setting-card .form-control,
  .setting-card .form-select { padding: .6rem .75rem; }
  .setting-key-row .form-control { font-size: 1rem; }
  .setting-reveal { width: 52px; }
  .setting-check { min-height: 48px; padding: 10px 12px; }
  .setting-check input { width: 20px; height: 20px; }
  .setting-model-row { flex-direction: column; }
  .setting-model-row .btn { width: 100%; }

  .setting-card-foot { flex-direction: column; align-items: stretch; gap: 8px; padding: 14px 16px; }
  .setting-save { width: 100%; min-height: 48px; font-size: 1rem; }
  .setting-foot-note { text-align: center; }
}
.creator-rail-wrap {
  position: relative;
}

.creator-rail {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 16px 48px;
  margin: -16px -16px -48px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  scroll-padding-left: 16px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.creator-rail::-webkit-scrollbar { display: none; }
.creator-rail.is-dragging,
.creator-rail.is-dragging * { cursor: grabbing; }
.creator-rail.is-dragging { scroll-snap-type: none; }
.creator-rail.is-dragging .creator-caption { opacity: 0; }

.creator-rail-wrap::before,
.creator-rail-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 48px;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity .15s ease;
}
.creator-rail-wrap::before {
  left: -16px;
  background: linear-gradient(to right, var(--bs-tertiary-bg) 0%, rgba(0, 0, 0, 0) 100%);
}
.creator-rail-wrap::after {
  right: -16px;
  background: linear-gradient(to left, var(--bs-tertiary-bg) 0%, rgba(0, 0, 0, 0) 100%);
}
.creator-rail-wrap.show-left::before { opacity: 1; }
.creator-rail-wrap.show-right::after { opacity: 1; }

.creator-card {
  position: relative;
  flex: 0 0 auto;
  width: 180px;
  color: inherit;
  text-decoration: none;
  scroll-snap-align: start;
}
.creator-card:hover,
.creator-card:focus-visible { z-index: 3; }
.creator-card:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: var(--bs-border-radius);
}

.creator-media {
    --creator-ring: rgba(13, 20, 30, .07);
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--bs-border-radius);
  background-color: var(--bs-tertiary-bg);
  box-shadow: inset 0 0 0 1px var(--creator-ring);
  transition: box-shadow .3s ease;
}
[data-bs-theme="dark"] .creator-media {
  --creator-ring: rgba(255, 255, 255, .08);
  background-color: var(--card-surface);
}
.creator-card:hover .creator-media,
.creator-card:focus-visible .creator-media {
  box-shadow: inset 0 0 0 1px var(--creator-ring), var(--bs-box-shadow-sm);
}

.creator-img {
  display: block;
  width: 100%;
  height: auto;
}

.creator-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.75rem;
  line-height: 1.2;
  color: #0a6fbf;
  background-image: linear-gradient(160deg, rgba(var(--brand-rgb), .12), rgba(var(--brand-rgb), .03));
}
[data-bs-theme="dark"] .creator-fallback {
  color: var(--brand-dark);
  background-image: linear-gradient(160deg, rgba(var(--brand-rgb), .20), rgba(var(--brand-rgb), .04));
}
.creator-media:has(.creator-img) .creator-fallback { display: none; }
.creator-media:not(:has(.creator-img)) .creator-fallback {
  position: relative;
  inset: auto;
  aspect-ratio: 16 / 9;
}

.creator-caption {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding-top: 8px;
  color: var(--bs-body-color);
  font-size: .8125rem;
  line-height: 1.35;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity .22s ease, transform .3s cubic-bezier(.2, .7, .3, 1);
}
.creator-card:hover .creator-caption,
.creator-card:focus-visible .creator-caption {
  opacity: 1;
  transform: none;
}

.creator-name {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 600;
}
.creator-meta {
  flex: none;
  font-size: .75rem;
  color: var(--text-quiet);
}
.creator-meta::before {
  content: '·';
  margin-right: 6px;
  opacity: .6;
}

@media (max-width: 575.98px) {
  .creator-rail { gap: 12px; }
  .creator-fallback { font-size: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .creator-media { transition: none; }
  .creator-caption { transition: none; }
}

.site-note {
  position: relative;   padding: 5.5rem 0;
  background: var(--bs-tertiary-bg);
  border-top: 1px solid var(--bs-border-color);
  }
.site-note.is-linked { cursor: pointer; }
.site-note-refresh {
  position: absolute;
  top: 1.25rem;
  right: clamp(1rem, 3vw, 1.75rem);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background-color: transparent;
  color: var(--bs-secondary-color);
  opacity: .35;
  transition: opacity .15s ease, color .15s ease, background-color .15s ease;
}
.site-note-refresh:hover,
.site-note-refresh:focus-visible {
  opacity: 1;
  color: var(--bs-body-color);
  background-color: var(--bs-secondary-bg);
}
.site-note-refresh .bi { font-size: 16px; line-height: 1; }
.site-note-refresh.is-loading .bi { animation: trending-spin .7s linear infinite; }
.site-note-refresh:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.site-note-link {
  display: block;
  color: inherit;
  text-decoration: none;
  border-radius: 10px;
}
.site-note-link:hover { color: inherit; }
.site-note-inner {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  max-width: 46rem;
  margin: 0 auto;
}

.site-note-cover {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(84px, 15vw, 112px);
  padding: .5rem;
  perspective: 1000px;
  z-index: 1;
}
.site-note-book {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 5px;
    background: linear-gradient(150deg, #2f6f6b 0%, #14403d 55%, #0d2f2d 100%);
  transform: rotate(-8deg) rotateY(-18deg);
  transform-origin: center center;
  transform-style: preserve-3d;
  overflow: hidden;
  box-shadow:
    0 18px 30px -14px rgba(13, 20, 30, .42),
    0 6px 14px rgba(13, 20, 30, .16),
    0 0 0 1px rgba(13, 20, 30, .06);
  transition: transform .4s cubic-bezier(.2, .8, .3, 1), box-shadow .4s ease;
  will-change: transform;
}
[data-bs-theme="dark"] .site-note-book {
  box-shadow:
    0 20px 34px -14px rgba(0, 0, 0, .6),
    0 6px 14px rgba(0, 0, 0, .4),
    0 0 0 1px rgba(255, 255, 255, .05);
}
.site-note-book img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 5px;
  object-fit: cover;
}
.site-note-book::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 5px;
  pointer-events: none;
  background: linear-gradient(90deg,
    rgba(0, 0, 0, .34) 0,
    rgba(255, 255, 255, .16) 5%,
    rgba(255, 255, 255, 0) 14%,
    rgba(0, 0, 0, 0) 82%,
    rgba(0, 0, 0, .22) 100%);
}
.site-note:hover .site-note-book,
.site-note-link:focus-visible .site-note-book {
  transform: rotate(-4deg) rotateY(-8deg) translateY(-10px) scale(1.35);
  box-shadow:
    0 30px 50px -18px rgba(13, 20, 30, .55),
    0 14px 26px rgba(13, 20, 30, .24),
    0 0 0 1px rgba(13, 20, 30, .07);
}
[data-bs-theme="dark"] .site-note:hover .site-note-book,
[data-bs-theme="dark"] .site-note-link:focus-visible .site-note-book {
  box-shadow:
    0 32px 54px -18px rgba(0, 0, 0, .75),
    0 14px 26px rgba(0, 0, 0, .5),
    0 0 0 1px rgba(255, 255, 255, .06);
}
.site-note-link:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.site-note-body { flex: 1 1 auto; min-width: 0; }
.site-note-quote {
  margin: 0;
  color: var(--bs-body-color);
    font-family: Georgia, "Times New Roman", "Songti SC", "SimSun", serif;
  font-size: clamp(1.25rem, .5vw + 1.1rem, 1.75rem);
  font-weight: 700;
  line-height: 1.7;
}
.site-note-source {
  margin: .75rem 0 0;
  font-size: .9375rem;
  color: var(--text-quiet);
}
.site-note-title { color: var(--bs-body-color); font-weight: 600; }
.site-note-author::before { content: " · "; color: var(--bs-tertiary-color); }

@media (max-width: 767.98px) {
  .site-note { padding: 4.25rem 0; }
  .site-note-inner { gap: 1rem; }
  .site-note-cover { width: 88px; padding: .25rem; }
  .site-note-quote { font-size: 1.25rem; }
  .site-note-source { font-size: .875rem; }
}

@media (prefers-reduced-motion: reduce) {
  .site-note-book { transition: none; }
}

.site-footer {
  padding: 1.25rem 0 1.5rem;
  border-top: 1px solid var(--bs-border-color-translucent);
  background: var(--bs-tertiary-bg);
  color: var(--text-quiet);
  font-size: .8125rem;
}
.site-footer-inner {
  display: grid;
  gap: 1rem;
  text-align: center;
}
.site-footer-brand {
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
.site-footer-name {
  color: var(--bs-body-color);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: .01em;
  line-height: 1.4;
}
.site-footer-desc {
  color: var(--text-quiet);
  font-size: .75rem;
  line-height: 1.55;
}
.site-footer-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .45rem;
}
.site-footer-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .15rem .5rem;
}
.account-delete-form {
  display: grid;
  gap: .75rem;
  max-width: 26rem;
}
.account-delete-field {
  display: grid;
  gap: .35rem;
  font-size: .875rem;
}
.account-delete-field input {
  width: 100%;
  padding: .5rem .7rem;
  border: 1px solid var(--bs-border-color);
  border-radius: .5rem;
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
}
.account-delete-msg { margin: 0; font-size: .875rem; color: var(--text-quiet); }
.ai-account-agree {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  font-size: .8125rem;
  line-height: 1.5;
  color: var(--text-quiet);
}
.ai-account-agree input { flex: none; margin-top: .15rem; }
.ai-account-agree a { color: var(--bs-link-color); text-decoration: underline; }
.site-footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 .25rem;
  color: var(--text-quiet);
  transition: color .15s ease;
}
.site-footer-nav a:hover { color: var(--bs-body-color); }
.site-footer-nav a:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.site-footer-status { gap: .35rem; }
.site-footer-status .bi { font-size: .9em; opacity: .8; transition: opacity .15s ease; }
.site-footer-status:hover .bi { opacity: 1; }
@media (min-width: 768px) {
  .site-footer-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: .75rem 2rem;
    text-align: left;
  }
  .site-footer-nav { align-items: flex-end; gap: .25rem; }
  .site-footer-group { justify-content: flex-end; gap: .1rem .5rem; }
  .site-footer-group > a:last-child { padding-right: 0; }
}
@media (max-width: 767.98px) {
  .site-footer { padding: 1.25rem 0 1.5rem; }
  .site-footer-group { font-size: .78rem; }
  .site-footer-nav { gap: .3rem; }
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .625rem .75rem;
  margin: 0;
  padding: 0;
}

.tag-cloud-more {
  margin-top: 1.25rem;
  text-align: center;
}

.tag-cloud-more .btn {
  min-width: 12rem;
}

.tag-cloud-item {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 32px;
  padding: .375rem .875rem;
  border: 1px solid rgba(13, 20, 30, .10);
  border-radius: 8px;
  background: var(--bs-tertiary-bg);
  color: var(--bs-body-color);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
.tag-cloud-item:hover {
  color: var(--brand);
  border-color: rgba(var(--brand-rgb), .55);
}
.tag-cloud-item:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.tag-cloud-item[data-size="1"] { font-size: .8125rem; color: var(--text-quiet); }
.tag-cloud-item[data-size="2"] { font-size: .9375rem; }
.tag-cloud-item[data-size="3"] { font-size: 1rem; }
.tag-cloud-item[data-size="4"] { font-size: 1.125rem; font-weight: 600; }
.tag-cloud-item[data-size="5"] {
  font-size: 1.3125rem;
  font-weight: 600;
  letter-spacing: -.01em;
  border-color: rgba(var(--brand-rgb), .35);
  background: linear-gradient(180deg, rgba(var(--brand-rgb), .08), rgba(var(--brand-rgb), .02));
}

[data-bs-theme="dark"] .tag-cloud-item {
  border-color: rgba(255, 255, 255, .10);
  background: var(--searchbar-bg);
}
[data-bs-theme="dark"] .tag-cloud-item:hover {
  background: var(--searchbar-bg-hover);
  border-color: rgba(255, 255, 255, .22);
}
[data-bs-theme="dark"] .tag-cloud-item[data-size="5"] {
  border-color: rgba(var(--brand-rgb), .40);
  background: linear-gradient(180deg, rgba(var(--brand-rgb), .14), rgba(var(--brand-rgb), .03));
}

@media (max-width: 575.98px) {
  .tag-cloud { gap: .5rem .625rem; }
  .tag-cloud-item { padding: .3125rem .75rem; min-height: 30px; }
  .tag-cloud-item[data-size="1"] { font-size: .75rem; }
  .tag-cloud-item[data-size="2"] { font-size: .875rem; }
  .tag-cloud-item[data-size="3"] { font-size: .9375rem; }
  .tag-cloud-item[data-size="4"] { font-size: 1rem; }
  .tag-cloud-item[data-size="5"] { font-size: 1.125rem; }
}

.tag-cloud[data-max-rows] .tag-cloud-item.is-hid { display: none; }

.home-hero-logo { margin: 0; font-size: inherit; font-weight: inherit; line-height: 1; }

.search { position: relative; }
.search-suggest {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 8px;
  padding: 6px;
  display: none;
  text-align: left;
  background: var(--bs-tertiary-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--bs-border-radius);
  box-shadow: var(--bs-box-shadow);
  z-index: 1065;
  max-height: min(424px, 72vh);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.search-suggest.is-open { display: block; }
[data-bs-theme="dark"] .search-suggest {
  background: var(--card-surface);
  border-color: var(--bs-border-color);
}
.suggest-label {
  padding: 6px 10px 4px;
  font-size: .75rem;
  color: var(--text-quiet);
}
.suggest-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--bs-border-radius-sm);
  color: var(--bs-body-color);
  text-decoration: none;
  cursor: pointer;
}
.suggest-item:hover,
.suggest-item.is-active {
  background: rgba(var(--brand-rgb), .08);
}
.suggest-cover {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 43px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--cover-placeholder-bg);
}
.suggest-cover img { width: 100%; height: 100%; object-fit: cover; }
.suggest-mono { font-size: .9375rem; font-weight: 600; color: var(--cover-ink); }
.suggest-main { flex: 1 1 auto; min-width: 0; }
.suggest-title {
  display: block;
  font-size: .875rem;
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.suggest-meta {
  display: block;
  margin-top: 1px;
  font-size: .75rem;
  color: var(--text-quiet);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.suggest-rating { flex: none; font-size: .8125rem; font-weight: 600; color: var(--bs-warning-text-emphasis); }
.suggest-word .bi { flex: none; font-size: .8125rem; color: var(--icon-muted); }
.suggest-word-text {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: .875rem;
}
.suggest-all {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 8px 10px 6px;
  border: 0;
  border-top: 1px solid var(--bs-border-color);
  border-radius: 0 0 var(--bs-border-radius-sm) var(--bs-border-radius-sm);
  background: none;
  text-align: left;
  font-size: .8125rem;
  color: var(--text-quiet);
  cursor: pointer;
}
.suggest-all:hover { color: var(--brand); }

.get-scan-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 20px;
  height: 20px;
}
.get-scan-btn.is-verifying .get-scan-icon { display: none; }
.get-scan-btn.is-verifying .scan-ring {
  display: inline-flex;
  animation: scan-spin .9s linear infinite;
}
.get-scan-btn .scan-ring svg { width: 20px; height: 20px; }
.get-scan-cap { display: none; }
@media (prefers-reduced-motion: reduce) {
  .get-scan-btn.is-verifying .scan-ring { animation: none; }
}

.ai-search-fill {
  position: relative;
  overflow: hidden;
  padding-top: 2rem !important;
    transition: padding-top .5s cubic-bezier(.22, 1, .36, 1);
    min-height: calc(100vh - 43px);
  min-height: calc(100dvh - 43px);
    display: flex;
  flex-direction: column;
  isolation: isolate;
}
.ai-search-fill::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 460px;
  background:
    radial-gradient(58% 62% at 20% 0%, rgba(var(--brand-rgb), .10), transparent 70%),
    radial-gradient(44% 54% at 88% 10%, rgba(255, 190, 120, .07), transparent 72%);
  pointer-events: none;
}
[data-bs-theme="dark"] .ai-search-fill::before {
  background:
    radial-gradient(58% 62% at 20% 0%, rgba(var(--brand-rgb), .15), transparent 70%),
    radial-gradient(44% 54% at 88% 10%, rgba(255, 190, 120, .05), transparent 72%);
}
.ai-search-fill .container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
@media (max-width: 767.98px) {
  .ai-search-fill {
    min-height: calc(100vh - 60px);
    min-height: calc(100dvh - 60px);
  }
}
.ai-search-single {
  position: relative;
  max-width: 820px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  width: 100%;
    flex-grow: 1;
}

.ai-librarian-hero,
.ai-search-hero,
.ai-search-composer,
.ai-search-trending {
    opacity: 1;
  transform: none;
  animation: aiSearchRise .6s cubic-bezier(.22, 1, .36, 1) backwards;
}
.ai-search-hero { animation-delay: .05s; }
.ai-search-composer { animation-delay: .08s; }
.ai-search-trending { animation-delay: .16s; }
@keyframes aiSearchRise {
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ai-librarian-hero,
  .ai-search-hero,
  .ai-search-composer,
  .ai-search-trending { animation: none; opacity: 1; transform: none; }
}

.ai-librarian-hero {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  margin-bottom: 2rem;
}
.ai-librarian-orb {
  --orb-size: 4.1rem;
  --orb-ring: color-mix(in srgb, var(--brand) 62%, transparent);
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: var(--orb-size);
  height: var(--orb-size);
  isolation: isolate;
}

.ai-librarian-ring {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.ai-librarian-ring--outer {
  inset: -9px;
  border: 1px dashed rgba(var(--brand-rgb), .3);
  animation: aiLibrarianOrbit 28s linear infinite;
}
.ai-librarian-ring--inner {
  inset: -4px;
  border: 1px solid rgba(var(--brand-rgb), .18);
  border-top-color: rgba(var(--brand-rgb), .55);
  border-right-color: rgba(var(--brand-rgb), .12);
  animation: aiLibrarianOrbit 9s linear infinite reverse;
}

.ai-librarian-shell {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  color: var(--brand);
  border: 1px solid rgba(var(--brand-rgb), .32);
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, .95), rgba(255, 255, 255, .35) 26%, transparent 52%),
    radial-gradient(circle at 58% 62%, rgba(var(--brand-rgb), .22), rgba(var(--brand-rgb), .05) 62%, transparent 78%),
    linear-gradient(160deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 55%);
  box-shadow:
    0 14px 34px -18px rgba(var(--brand-rgb), .7),
    0 0 0 5px rgba(var(--brand-rgb), .05),
    inset 0 1px 0 rgba(255, 255, 255, .85),
    inset 0 -10px 22px -14px rgba(var(--brand-rgb), .45);
  animation: aiLibrarianGlow 4.8s ease-in-out infinite;
}
[data-bs-theme="dark"] .ai-librarian-shell {
  border-color: rgba(var(--brand-rgb), .38);
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, .2), rgba(255, 255, 255, .05) 30%, transparent 56%),
    radial-gradient(circle at 58% 62%, rgba(var(--brand-rgb), .32), rgba(var(--brand-rgb), .1) 64%, transparent 80%),
    linear-gradient(160deg, rgba(255, 255, 255, .08), rgba(0, 0, 0, .2) 60%);
  box-shadow:
    0 16px 38px -16px rgba(var(--brand-rgb), .85),
    0 0 0 5px rgba(var(--brand-rgb), .08),
    inset 0 1px 0 rgba(255, 255, 255, .14),
    inset 0 -12px 26px -14px rgba(var(--brand-rgb), .55);
}

.ai-librarian-sheen {
  position: absolute;
  inset: -30%;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, .55) 48%, transparent 58%);
  opacity: .55;
  animation: aiLibrarianSheen 7s ease-in-out infinite;
}
[data-bs-theme="dark"] .ai-librarian-sheen {
  background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, .16) 48%, transparent 58%);
}

.ai-librarian-scan {
  position: absolute;
  left: -12%;
  right: -12%;
  top: 0;
  height: 42%;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, rgba(var(--brand-rgb), .28), transparent);
  opacity: 0;
  animation: aiLibrarianScan 5.6s cubic-bezier(.5, 0, .5, 1) infinite;
}

.ai-librarian-core {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 62%;
  height: 62%;
}
.ai-librarian-core-halo {
  position: absolute;
  inset: -18%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--brand-rgb), .32), transparent 66%);
  filter: blur(2px);
  animation: aiLibrarianCorePulse 3.2s ease-in-out infinite;
}
.ai-librarian-core-ring {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  background:
    conic-gradient(from 0deg, transparent 0deg, var(--brand) 70deg, transparent 150deg, transparent 360deg);
  -webkit-mask: radial-gradient(circle, transparent 0 52%, #000 53% 100%);
  mask: radial-gradient(circle, transparent 0 52%, #000 53% 100%);
}
.ai-librarian-core-ring--a {
  inset: 0;
  opacity: .95;
  animation: aiLibrarianCoreSpin 3.6s linear infinite;
}
.ai-librarian-core-ring--b {
  inset: 18%;
  opacity: .8;
  background:
    conic-gradient(from 40deg, transparent 0deg, #e9a93f 50deg, transparent 130deg, transparent 360deg);
  animation: aiLibrarianCoreSpin 5.2s linear infinite reverse;
}
.ai-librarian-core-ring--c {
  inset: 34%;
  opacity: .75;
  background:
    conic-gradient(from 200deg, transparent 0deg, rgba(var(--brand-rgb), .9) 60deg, transparent 150deg, transparent 360deg);
  animation: aiLibrarianCoreSpin 2.8s linear infinite;
}
.ai-librarian-core-node {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  background: var(--brand);
  box-shadow: 0 0 8px 2px rgba(var(--brand-rgb), .75);
}
.ai-librarian-core-node--a {
  width: 5px;
  height: 5px;
  top: 50%;
  left: 50%;
  margin: -2.5px 0 0 -2.5px;
  animation: aiLibrarianCoreOrbit 3.6s linear infinite;
}
.ai-librarian-core-node--b {
  width: 4px;
  height: 4px;
  top: 50%;
  left: 50%;
  margin: -2px 0 0 -2px;
  background: #e9a93f;
  box-shadow: 0 0 8px 2px rgba(233, 169, 63, .8);
  animation: aiLibrarianCoreOrbit 5.2s linear infinite reverse;
}
.ai-librarian-core-node--c {
  width: 3px;
  height: 3px;
  top: 50%;
  left: 50%;
  margin: -1.5px 0 0 -1.5px;
  opacity: .85;
  animation: aiLibrarianCoreOrbit 2.8s linear infinite;
}
.ai-librarian-core-node--b { --core-orbit: 1.5rem; }
.ai-librarian-core-node--c { --core-orbit: 1.05rem; }
.ai-librarian-core-pulse {
  position: absolute;
  inset: 40%;
  border-radius: 50%;
  background: radial-gradient(circle, #fff, rgba(var(--brand-rgb), .55) 55%, transparent 72%);
  box-shadow: 0 0 12px 3px rgba(var(--brand-rgb), .45);
  animation: aiLibrarianCoreBreath 2.4s ease-in-out infinite;
}
[data-bs-theme="dark"] .ai-librarian-core-pulse {
  background: radial-gradient(circle, #fff, rgba(var(--brand-rgb), .75) 52%, transparent 74%);
  box-shadow: 0 0 14px 4px rgba(var(--brand-rgb), .6);
}

.ai-librarian-satellite {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  background: var(--brand);
}
.ai-librarian-satellite--a {
  width: 5px;
  height: 5px;
  top: 50%;
  left: 50%;
  margin: -2.5px 0 0 -2.5px;
  box-shadow: 0 0 8px 1px rgba(var(--brand-rgb), .8);
  animation: aiLibrarianSatellite 6.4s linear infinite;
}
.ai-librarian-satellite--b {
  width: 4px;
  height: 4px;
  top: 50%;
  left: 50%;
  margin: -2px 0 0 -2px;
  background: #e9a93f;
  box-shadow: 0 0 8px 1px rgba(233, 169, 63, .8);
  animation: aiLibrarianSatellite 9.2s linear infinite reverse;
}

.ai-librarian-star {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  color: #e9a93f;
  filter: drop-shadow(0 0 7px rgba(255, 184, 77, .55));
}
.ai-librarian-star i { display: block; }
.ai-librarian-star--a {
  top: -.2rem;
  right: -.34rem;
  font-size: .82rem;
  animation: aiLibrarianTwinkle 3.4s ease-in-out infinite;
}
.ai-librarian-star--b {
  bottom: -.24rem;
  left: -.4rem;
  font-size: .56rem;
  animation: aiLibrarianTwinkle 3.4s ease-in-out 1.2s infinite;
}
.ai-librarian-star--c {
  top: .18rem;
  left: -.62rem;
  font-size: .42rem;
  opacity: .8;
  animation: aiLibrarianTwinkle 3.4s ease-in-out 2.1s infinite;
}
[data-bs-theme="dark"] .ai-librarian-star { color: #ffd27a; }

.ai-librarian-copy {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  min-width: 0;
  text-align: left;
}
.ai-librarian-name {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: .02em;
  line-height: 1.2;
  color: var(--bs-body-color);
}
.ai-librarian-line {
  font-size: .92rem;
  line-height: 1.55;
  color: var(--side-muted);
}

@keyframes aiLibrarianOrbit { to { transform: rotate(360deg); } }
@keyframes aiLibrarianGlow {
  0%, 100% {
    box-shadow:
      0 14px 34px -20px rgba(var(--brand-rgb), .62),
      0 0 0 5px rgba(var(--brand-rgb), .05),
      inset 0 1px 0 rgba(255, 255, 255, .85),
      inset 0 -10px 22px -14px rgba(var(--brand-rgb), .45);
  }
  50% {
    box-shadow:
      0 18px 42px -16px rgba(var(--brand-rgb), .8),
      0 0 0 7px rgba(var(--brand-rgb), .08),
      inset 0 1px 0 rgba(255, 255, 255, .9),
      inset 0 -10px 22px -14px rgba(var(--brand-rgb), .55);
  }
}
@keyframes aiLibrarianSheen {
  0%, 100% { transform: translateX(-38%); opacity: 0; }
  35% { opacity: .6; }
  70% { transform: translateX(38%); opacity: 0; }
}
@keyframes aiLibrarianScan {
  0% { transform: translateY(-60%); opacity: 0; }
  18% { opacity: .85; }
  62% { opacity: .5; }
  100% { transform: translateY(220%); opacity: 0; }
}
@keyframes aiLibrarianSatellite {
  from { transform: rotate(0deg) translateX(var(--orbit-r, 2.3rem)) rotate(0deg); }
  to { transform: rotate(360deg) translateX(var(--orbit-r, 2.3rem)) rotate(-360deg); }
}
.ai-librarian-satellite--b { --orbit-r: 2.05rem; }
@keyframes aiLibrarianCoreSpin { to { transform: rotate(360deg); } }
@keyframes aiLibrarianCoreOrbit {
  from { transform: rotate(0deg) translateX(var(--core-orbit, 1.95rem)) rotate(0deg); }
  to { transform: rotate(360deg) translateX(var(--core-orbit, 1.95rem)) rotate(-360deg); }
}
@keyframes aiLibrarianCorePulse {
  0%, 100% { opacity: .45; transform: scale(.9); }
  50% { opacity: .95; transform: scale(1.12); }
}
@keyframes aiLibrarianCoreBreath {
  0%, 100% { opacity: .7; transform: scale(.86); }
  50% { opacity: 1; transform: scale(1.08); }
}
@keyframes aiLibrarianTwinkle {
  0%, 100% { opacity: .3; transform: scale(.72) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.1) rotate(18deg); }
}
@media (max-width: 575.98px) {
  .ai-librarian-hero { gap: .9rem; margin-bottom: 2rem; }
  .ai-librarian-orb { --orb-size: 3.4rem; }
  .ai-librarian-name { font-size: 1.2rem; }
  .ai-librarian-line { font-size: .84rem; }
  .ai-librarian-star--c { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ai-librarian-orb,
  .ai-librarian-orb *,
  .ai-librarian-dot { animation: none !important; }
  .ai-librarian-scan,
  .ai-librarian-sheen { display: none; }
}

.ai-search-hero {
  text-align: left;
  margin-bottom: 2rem;
  max-height: 24rem;
  overflow: hidden;
  transition: max-height .5s cubic-bezier(.22, 1, .36, 1), opacity .3s ease,
              margin-bottom .5s cubic-bezier(.22, 1, .36, 1),
              transform .5s cubic-bezier(.22, 1, .36, 1),
              visibility 0s linear;
}
.ai-search-fill.is-searching { padding-top: 1.35rem !important; }
.ai-search-single.is-searching .ai-librarian-hero { margin-bottom: 2rem;margin-top: 1rem; }
.ai-search-single.is-searching .ai-search-hero {
  animation: none !important;
  max-height: 0;
  margin-bottom: 0;
  opacity: 0;
  transform: translateY(-10px);
  visibility: hidden;
  pointer-events: none;
  transition: max-height .5s cubic-bezier(.22, 1, .36, 1), opacity .24s ease,
              margin-bottom .5s cubic-bezier(.22, 1, .36, 1),
              transform .5s cubic-bezier(.22, 1, .36, 1),
              visibility 0s linear .3s;
}
.ai-search-title {
  margin: 0;
  font-family: "Songti SC", "STSong", "SimSun", "Noto Serif CJK SC", "Source Han Serif SC", Georgia, serif;
  font-size: clamp(1.9rem, 4.6vw, 2.7rem);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: .01em;
  color: var(--bs-body-color);
    text-wrap: wrap;
}
.ai-search-flip {
  display: block;
  height: 2.6em;
  overflow: hidden;
}
.ai-search-flip-track {
  display: block;
  padding-left: 20px;
  will-change: transform;
}
.ai-search-flip-item {
  display: block;
  min-height: 1.28em;
  line-height: 1.28;
  white-space: normal;
  overflow-wrap: break-word;
  text-wrap: wrap;
  text-align: left;
}

.ai-search-composer {
  display: flex;
  flex-direction: column;
  width: 100%;
}
.ai-search-box {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 42%),
    var(--bs-tertiary-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 22px;
  padding: 1.15rem 1.2rem .95rem;
  box-shadow:
    0 1px 0 rgba(13, 20, 30, .02),
    0 22px 48px -34px rgba(13, 20, 30, .5);
  transition: border-color .25s ease, box-shadow .35s ease, transform .18s ease,
              height .55s cubic-bezier(.22, 1, .36, 1), background-color .35s ease;
}
[data-bs-theme="dark"] .ai-search-box {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .035), transparent 42%),
    var(--bs-tertiary-bg);
  box-shadow: 0 22px 48px -30px rgba(0, 0, 0, .8);
}
.ai-search-box::after {
  content: "";
  position: absolute;
  left: 1.4rem;
  right: 1.4rem;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(var(--brand-rgb), .8), transparent);
  opacity: 0;
  transform: scaleX(.25);
  transform-origin: center;
  transition: opacity .3s ease, transform .5s cubic-bezier(.22, .68, .16, 1);
  pointer-events: none;
}
.ai-search-box.is-focus::after { opacity: 1; transform: scaleX(1); }
.ai-search-box:not(.is-query) .ai-steps { display: none; }
.ai-search-box.is-focus {
  border-color: rgba(var(--brand-rgb), .55);
  box-shadow:
    0 0 0 4px rgba(var(--brand-rgb), .1),
    0 26px 54px -34px rgba(var(--brand-rgb), .55);
}
.ai-search-input {
  display: block;
  width: 100%;
  min-height: 148px;
  border: 0;
  outline: none;
  resize: none;
  background: transparent;
  color: var(--bs-body-color);
  font-size: 1.06rem;
  line-height: 1.75;
  caret-color: var(--brand);
  padding: .25rem .3rem;
}
.ai-search-input::placeholder { color: var(--bs-secondary-color); }
.ai-search-input::-webkit-scrollbar { width: 6px; }
.ai-search-input::-webkit-scrollbar-thumb { background: var(--bs-border-color); border-radius: 999px; }

.ai-search-query {
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: .7rem;
}
.ai-search-box.is-query {
  padding: 1.05rem 1.15rem;
  background:
    linear-gradient(180deg, rgba(var(--brand-rgb), .08), rgba(var(--brand-rgb), 0) 68%),
    var(--bs-tertiary-bg);
  border-color: rgba(var(--brand-rgb), .32);
}
.ai-search-box.is-query .ai-search-input,
.ai-search-box.is-query .ai-search-count,
.ai-search-box.is-query .ai-search-footer { display: none; }
.ai-search-box.is-query .ai-search-query {
  display: flex;
  animation: aiQueryIn .45s cubic-bezier(.22, 1, .36, 1) .1s both;
}
@keyframes aiQueryIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.ai-search-query-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
.ai-search-query-text {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: -.01em;
  color: var(--bs-body-color);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.ai-search-query-reset {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .7rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 999px;
  background: var(--bs-body-bg);
  color: var(--bs-secondary-color);
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
.ai-search-query-reset:hover:not(:disabled) {
  color: var(--brand);
  border-color: rgba(var(--brand-rgb), .45);
  background: rgba(var(--brand-rgb), .04);
}
.ai-search-query-reset:disabled { opacity: .5; cursor: default; }
.ai-search-query-reset .bi { font-size: 13px; }

.ai-search-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .85rem 1.2rem 0;
  margin: .4rem -1.2rem 0;
  border-top: 1px solid var(--bs-border-color);
}
.ai-search-footer-meta {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-width: 0;
  flex: 1 1 auto;
}
.ai-search-quota {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 26px;
  padding: .22rem .62rem;
  border-radius: 999px;
  background: rgba(var(--brand-rgb), .06);
  color: var(--bs-secondary-color);
  font-size: .76rem;
  line-height: 1;
}
[data-bs-theme="dark"] .ai-search-quota { background: rgba(var(--brand-rgb), .12); }
.ai-search-quota > .bi { color: var(--brand); font-size: 12px; }
.ai-search-quota-num {
  font-weight: 700;
  color: var(--bs-body-color);
  font-variant-numeric: tabular-nums;
}

.ai-search-count {
  display: flex;
  justify-content: flex-end;
  margin-left: auto;
  line-height: 1;
}
.ai-search-count span {
  font-size: .72rem;
  font-variant-numeric: tabular-nums;
  color: var(--bs-tertiary-color);
  transition: color .15s ease;
}
.ai-search-count span.is-over { color: #e5484d; font-weight: 600; }

.ai-search-send {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: .38rem;
  min-height: 38px;
  padding: .4rem 1.1rem;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  font-size: .86rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 22px -12px rgba(var(--brand-rgb), .9);
  transition: transform .18s ease, box-shadow .2s ease, background-color .2s ease, opacity .2s ease;
}
.ai-search-send .bi { font-size: 14px; line-height: 1; }
.ai-search-send:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px -12px rgba(var(--brand-rgb), 1);
}
.ai-search-send:active:not(:disabled) { transform: translateY(0) scale(.98); }
.ai-search-send:focus-visible { outline: 3px solid rgba(var(--brand-rgb), .4); outline-offset: 2px; }
.ai-search-send:disabled {
  background: var(--bs-secondary-bg);
  color: var(--bs-tertiary-color);
  box-shadow: none;
  cursor: not-allowed;
}

.ai-search-hint {
  margin: .75rem 0 0 .2rem;
  font-size: .875rem;
  color: var(--bs-warning-text-emphasis);
  text-align: left;
}
.ai-search-hint.is-loading { color: var(--bs-secondary-color); }

.ai-search-queue {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: .75rem 0 0;
  padding: .75rem .95rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 14px;
  background: var(--bs-tertiary-bg);
}
.ai-search-queue-main {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  min-width: 0;
}
.ai-search-queue-title {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .9rem;
  font-weight: 600;
}
.ai-search-queue-detail {
  font-size: .85rem;
  color: var(--bs-body-color);
}
.ai-search-queue-note {
  font-size: .78rem;
  color: var(--bs-secondary-color);
}
.ai-search-queue-cancel {
  flex-shrink: 0;
  padding: .35rem .85rem;
  font-size: .85rem;
  color: var(--bs-body-color);
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}
.ai-search-queue-cancel:hover:not(:disabled) {
  border-color: var(--bs-danger);
  color: var(--bs-danger);
}
.ai-search-queue-cancel:disabled { opacity: .55; cursor: not-allowed; }
@media (max-width: 576px) {
  .ai-search-queue { flex-direction: column; align-items: flex-start; }
  .ai-search-queue-cancel { align-self: flex-end; }
}

.site-cap-host {
  position: fixed;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  pointer-events: none;
}
.ai-list-section { display: flex; flex-direction: column; gap: 1.1rem; }
.ai-list-title {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}
.ai-list-meta {
  margin: .35rem 0 0;
  font-size: .82rem;
  color: var(--bs-secondary-color);
}
.ai-list-meta-sep { margin: 0 .35rem; opacity: .6; }
.ai-list-intro {
  margin: .6rem 0 0;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--bs-body-color);
}
.ai-list-group { display: flex; flex-direction: column; gap: .7rem; }
.ai-list-group-title {
  margin: 0;
  padding-left: .6rem;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -.01em;
  color: var(--bs-body-color);
  border-left: 4px solid rgba(var(--brand-rgb), .8);
}
.ai-list-items { display: flex; flex-direction: column; gap: 1.15rem; }
.ai-list-item {
  position: relative;
  display: flex;
  align-items: flex-start;
}
.ai-list-no {
  position: absolute;
  top: .5rem;
  right: .45rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.8rem;
  height: 1.8rem;
  padding: 0 .4rem;
  font-size: .9rem;
  font-weight: 800;
  line-height: 1;
  color: rgba(var(--brand-rgb), .82);
  background: rgba(var(--brand-rgb), .1);
  border-radius: 8px;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.ai-list-body { flex: 1; min-width: 0; }
.ai-list-local { position: relative; }
.ai-list-item .ai-result-titleline { padding-right: 2.35rem; }
.ai-list-ext-card { position: relative; }
.ai-list-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin-top: .45rem;
}
.ai-list-ext-card > .ai-list-actions {
  position: absolute;
  right: .75rem;
  bottom: .6rem;
  z-index: 2;
  justify-content: flex-end;
  max-width: calc(100% - 1.5rem);
  margin: 0;
}
.ai-list-ext-card > .ai-list-actions .ai-index-request {
  padding: .32rem .7rem;
  border-radius: 8px;
  font-size: .78rem;
}
.ai-list-ext-card > .ai-list-actions .ai-index-request .bi { font-size: 13px; }
.ai-list-ext-card > .ai-list-actions .ai-index-request-hint { font-size: .75rem; }
.ai-list-short,
.ai-list-safety,
.ai-list-degraded {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin: 0;
  padding: .55rem .8rem;
  font-size: .82rem;
  color: var(--bs-secondary-color);
  background: var(--bs-tertiary-bg);
  border-radius: 10px;
}
.ai-list-safety { color: var(--bs-warning-text-emphasis); }

.ai-search-chips {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.ai-search-chip {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  align-items: flex-start;
  width: 100%;
  padding: .6rem 1rem;
  text-align: left;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--bs-border-color);
  border-radius: 0;
  cursor: pointer;
  transition: transform .15s ease, background-color .15s ease;
}
.ai-search-chip-title {
  max-width: 100%;
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--bs-body-color);
}
.ai-search-chip-main {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  max-width: 100%;
  font-size: .8rem;
  line-height: 1.5;
  color: var(--bs-secondary-color);
  overflow-wrap: anywhere;
}
.ai-search-chip-sub {
  display: block;
  font-size: .8rem;
  line-height: 1.5;
  color: var(--bs-secondary-color);
}
.ai-search-chip-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  margin-top: .1rem;
}
.ai-search-chip-tag {
  display: inline-block;
  padding: .1rem .5rem;
  border-radius: 999px;
  background: rgba(var(--brand-rgb), .06);
  border: 1px solid rgba(var(--brand-rgb), .38);
  color: #0a6aa8;
  font-size: .7rem;
  line-height: 1.4;
  font-weight: 600;
}
[data-bs-theme="dark"] .ai-search-chip-tag {
  background: rgba(var(--brand-rgb), .16);
  border-color: rgba(var(--brand-rgb), .55);
  color: #9bd3ff;
}
.ai-search-chip:hover,
.ai-search-chip:focus-visible {
  background: rgba(var(--brand-rgb), .04);
}
.ai-search-chip:hover {
  transform: translateY(-3px);
}
.ai-search-chip:focus-visible { outline: 2px solid rgba(var(--brand-rgb), .5); outline-offset: -2px; }
.ai-search-chip [aria-hidden] { pointer-events: none; }

.ai-search-trending { margin-top: 3.25rem; }
.ai-search-trending-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: .5rem;
  margin-bottom: .9rem;
  min-height: 1.75rem;
}
.ai-search-trending-head .bi { color: var(--brand); font-size: 15px; }
.ai-search-trending-title {
  margin: 0;
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .05em;
  color: var(--bs-body-color);
}
.ai-search-trending-refresh {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .28rem .65rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 999px;
  background: var(--bs-body-bg);
  color: var(--bs-secondary-color);
  font-size: .75rem;
  line-height: 1.5;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.ai-search-trending-refresh:hover {
  color: var(--brand);
  border-color: rgba(var(--brand-rgb), .45);
  background: rgba(var(--brand-rgb), .05);
}
.ai-search-trending-refresh:focus-visible {
  outline: 2px solid rgba(var(--brand-rgb), .5);
  outline-offset: 2px;
}
.ai-search-trending-refresh .bi { color: currentColor; font-size: 13px; }
.ai-search-trending-refresh.is-loading .bi { animation: aiSearchSpin .8s linear infinite; }
.ai-search-trending-refresh:disabled { cursor: default; opacity: .7; }
@keyframes aiSearchSpin { to { transform: rotate(360deg); } }
.ai-search-trending-body {
  background: color-mix(in srgb, var(--bs-tertiary-bg) 60%, transparent);
  padding: 0;
}

.ai-search-help-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-left: auto;
  padding: .38rem .85rem;
  border: 1px solid rgba(var(--brand-rgb), .38);
  border-radius: 999px;
  background: rgba(var(--brand-rgb), .06);
  color: #0a6aa8;
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.ai-search-help-btn:hover {
  background: rgba(var(--brand-rgb), .12);
  border-color: rgba(var(--brand-rgb), .55);
}
.ai-search-help-btn:focus-visible { outline: 2px solid rgba(var(--brand-rgb), .5); outline-offset: 2px; }
[data-bs-theme="dark"] .ai-search-help-btn { color: #9bd3ff; }

body.ai-help-open .modal-backdrop {
  background-color: rgba(15, 23, 42, .55);
  opacity: 1;
  -webkit-backdrop-filter: blur(10px) saturate(115%);
  backdrop-filter: blur(10px) saturate(115%);
}
[data-bs-theme="dark"] body.ai-help-open .modal-backdrop {
  background-color: rgba(0, 0, 0, .62);
}

.ai-help-modal .modal-content {
  border: 1px solid var(--bs-border-color);
  border-radius: 18px;
}
.ai-help-modal .modal-body { padding: 1.25rem 1.4rem; }
.ai-help-modal .modal-footer .btn {
  font-size: .98rem;
  padding: .5rem 1.15rem;
}
.ai-help-modal .modal-title {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: 1.22rem;
  font-weight: 700;
}
.ai-help-modal .modal-title .bi { color: var(--brand); }
.ai-help-lead {
  margin-bottom: 1.1rem;
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--bs-body-color);
}
.ai-help-steps {
  display: flex;
  flex-direction: column;
  gap: .9rem;
  margin-bottom: 1.1rem;
}
.ai-help-step { display: flex; gap: .75rem; }
.ai-help-step-no {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 50%;
  background: rgba(var(--brand-rgb), .12);
  color: #0a6aa8;
  font-size: .92rem;
  font-weight: 700;
}
[data-bs-theme="dark"] .ai-help-step-no { color: #9bd3ff; }
.ai-help-step h3,
.ai-help-card h3 {
  margin: 0 0 .25rem;
  font-size: 1.02rem;
  font-weight: 700;
}
.ai-help-step p,
.ai-help-card p {
  margin: 0;
  font-size: .94rem;
  line-height: 1.65;
  color: var(--bs-secondary-color);
}
.ai-help-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
  margin-bottom: 1.1rem;
}
.ai-help-card {
  padding: .85rem .9rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 14px;
  background: var(--bs-tertiary-bg);
}
.ai-help-card h3 {
  display: flex;
  align-items: center;
  gap: .35rem;
}
.ai-help-card h3 .bi { color: var(--brand); }
.ai-help-tips {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}
.ai-help-tips li {
  display: flex;
  gap: .55rem;
  font-size: .94rem;
  line-height: 1.65;
  color: var(--bs-body-color);
}
.ai-help-tips li .bi { color: var(--brand); margin-top: .15rem; }
.ai-help-note {
  display: flex;
  gap: .45rem;
  margin: 0;
  font-size: .9rem;
  line-height: 1.6;
  color: var(--bs-secondary-color);
}
.ai-help-note .bi { color: var(--bs-warning-text-emphasis); margin-top: .12rem; }

.ai-search-trending-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: start;
}
.ai-search-trending-col {
  min-width: 0;
  padding: 1rem 1rem 0rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 16px;
  background: color-mix(in srgb, var(--bs-tertiary-bg) 55%, transparent);
}
.ai-search-trending-col-head {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-bottom: .75rem;
}
.ai-search-trending-col-head .bi { color: var(--brand); font-size: 15px; }
.ai-search-trending-col-title {
  margin: 0;
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .03em;
  color: var(--bs-body-color);
}
.ai-search-trending-col-note {
  margin-left: auto;
  overflow: hidden;
  font-size: .72rem;
  color: var(--bs-secondary-color);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.ai-search-trending-col .ai-search-chips {
  gap: 0;
    margin: 0 -1rem;
}
.ai-search-chips-empty {
  margin: 0;
  padding: 1.1rem .5rem;
  text-align: center;
  font-size: .8rem;
  color: var(--bs-secondary-color);
}

.ai-search-disclaimers {
  margin: 0 auto;
  margin-top: auto;
  max-width: 820px;
  width: 100%;
  padding-top: 3.25rem;
  display: flex;
  flex-direction: column;
  gap: .8rem;
}
.ai-search-disclaimer-banner {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  margin: 0;
  padding: .8rem 1rem;
  border: 1px solid rgba(var(--brand-rgb), .26);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(var(--brand-rgb), .1), rgba(var(--brand-rgb), .035));
  font-size: .8125rem;
  line-height: 1.65;
  color: var(--bs-secondary-color);
}
.ai-search-disclaimer-banner .bi {
  flex: none;
  margin-top: .12rem;
  font-size: .95rem;
  color: var(--brand);
}
.ai-search-disclaimer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .7rem;
  align-items: stretch;
}
.ai-search-disclaimer-card {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  min-width: 0;
  padding: .9rem 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 14px;
  background: color-mix(in srgb, var(--bs-tertiary-bg) 55%, transparent);
  transition: border-color .18s ease, background-color .18s ease;
}
.ai-search-disclaimer-card:hover {
  border-color: rgba(var(--brand-rgb), .32);
  background: color-mix(in srgb, var(--bs-tertiary-bg) 80%, transparent);
}
.ai-search-disclaimer-card--wide { grid-column: span 2; }
.ai-search-disclaimer-icon {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 8px;
  background: rgba(var(--brand-rgb), .12);
  color: var(--brand);
  font-size: .8rem;
}
.ai-search-disclaimers p.ai-search-disclaimer-title {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 0;
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--bs-body-color);
}
.ai-search-disclaimers .ai-search-disclaimer-text {
  margin: 0;
  font-size: .8125rem;
  line-height: 1.65;
  color: var(--bs-secondary-color);
}
.ai-search-disclaimer-kv {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .3rem .9rem;
  margin: 0;
  font-size: .8125rem;
}
.ai-search-disclaimer-kv-item {
  display: inline-flex;
  align-items: baseline;
  gap: .35rem;
  color: var(--bs-secondary-color);
}
.ai-search-disclaimers .ai-search-disclaimer-kv-item code {
  padding: .06rem .38rem;
  border-radius: 6px;
  background: rgba(var(--brand-rgb), .1);
  color: var(--bs-body-color);
  font-size: .75rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: nowrap;
}
/* 服务稳定性提示：仅官方有进行中事故时展示，用警示色区分普通卡片 */
.ai-search-status-card {
  border-color: rgba(220, 53, 69, .4);
  background: color-mix(in srgb, rgba(220, 53, 69, .08), transparent);
}
.ai-search-status-card .ai-search-disclaimer-icon {
  background: rgba(220, 53, 69, .14);
  color: #dc3545;
}
.ai-search-status-card .ai-search-disclaimer-text {
  overflow-wrap: anywhere;
  white-space: pre-line;
}
.ai-search-status-card a {
  color: var(--bs-secondary-color);
  text-decoration: underline;
}
/* 官方 API 状态徽标：标题右侧常驻，悬停显示 tooltip */
.ai-search-api-status {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .32rem;
  margin-left: auto;
  padding: .1rem .5rem .1rem .45rem;
  border: 1px solid rgba(var(--brand-rgb), .22);
  border-radius: 999px;
  background: rgba(var(--brand-rgb), .08);
  color: var(--bs-secondary-color);
  font-size: .7rem;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  text-decoration: none;
  transition: border-color .18s ease, background-color .18s ease, color .18s ease;
}
.ai-search-api-status:hover,
.ai-search-api-status:focus-visible {
  border-color: rgba(var(--brand-rgb), .45);
  color: var(--bs-body-color);
  text-decoration: none;
}
.ai-search-api-status-dot {
  flex: none;
  width: .4rem;
  height: .4rem;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 .16rem color-mix(in srgb, currentColor 16%, transparent);
}
.ai-search-api-status[data-state="loading"] .ai-search-api-status-dot {
  animation: ai-api-status-pulse 1.3s ease-in-out infinite;
}
.ai-search-api-status[data-state="operational"] {
  color: #157347;
  background: rgba(25, 135, 84, .1);
  border-color: rgba(25, 135, 84, .3);
}
.ai-search-api-status[data-state="maintenance"],
.ai-search-api-status[data-state="degraded"] {
  color: #a15c00;
  background: rgba(255, 153, 0, .12);
  border-color: rgba(255, 153, 0, .34);
}
.ai-search-api-status[data-state="partial_outage"],
.ai-search-api-status[data-state="full_outage"] {
  color: #b02a37;
  background: rgba(220, 53, 69, .12);
  border-color: rgba(220, 53, 69, .34);
}
.ai-search-api-status[data-state="unknown"] {
  color: var(--bs-secondary-color);
  background: rgba(108, 117, 125, .1);
  border-color: rgba(108, 117, 125, .28);
}
[data-bs-theme="dark"] .ai-search-api-status[data-state="operational"] { color: #6ee7a8; }
[data-bs-theme="dark"] .ai-search-api-status[data-state="maintenance"],
[data-bs-theme="dark"] .ai-search-api-status[data-state="degraded"] { color: #fbbf5c; }
[data-bs-theme="dark"] .ai-search-api-status[data-state="partial_outage"],
[data-bs-theme="dark"] .ai-search-api-status[data-state="full_outage"] { color: #ff8f9a; }
.ai-search-api-status-tip {
  position: absolute;
  right: -.25rem;
  bottom: calc(100% + .5rem);
  z-index: 30;
  width: max-content;
  max-width: min(17rem, 70vw);
  padding: .5rem .65rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 10px;
  background: var(--bs-body-bg);
  box-shadow: 0 .45rem 1.1rem rgba(0, 0, 0, .14);
  color: var(--bs-body-color);
  font-size: .72rem;
  font-weight: 400;
  line-height: 1.55;
  text-align: left;
  white-space: pre-line;
  opacity: 0;
  visibility: hidden;
  transform: translateY(.15rem);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
  pointer-events: none;
}
.ai-search-api-status-tip:empty { display: none; }
.ai-search-api-status-tip::after {
  content: "";
  position: absolute;
  top: 100%;
  right: .8rem;
  border: 5px solid transparent;
  border-top-color: var(--bs-body-bg);
  filter: drop-shadow(0 1px 0 var(--bs-border-color));
}
.ai-search-api-status:hover .ai-search-api-status-tip,
.ai-search-api-status:focus-visible .ai-search-api-status-tip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
@keyframes ai-api-status-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

@media (max-width: 767.98px) {
  .ai-search-hero { margin-bottom: 1.6rem; max-height: 28rem; }
  .ai-search-fill.is-searching { padding-top: 1rem !important; }
  .ai-search-trending-cols { grid-template-columns: 1fr; gap: .9rem; }
  .ai-search-trending-col-note { display: none; }
    .ai-search-trending .ai-search-chips .ai-search-chip:nth-child(n + 3) { display: none; }
  .ai-help-grid { grid-template-columns: 1fr; }
  .ai-search-disclaimers { padding-top: 2.5rem; }
}
@media (max-width: 575.98px) {
  .ai-librarian-hero { gap: .75rem; }
  .ai-search-box { padding: .95rem; border-radius: 18px; }
  .ai-search-footer { padding: .8rem .95rem 0; margin: .4rem -.95rem 0; }
  .ai-search-input { min-height: 132px; }
  .ai-search-box.is-query { padding: .85rem .9rem; }
  .ai-search-query { gap: .6rem; }
  .ai-search-query-reset { padding: .4rem .55rem; }
  .ai-search-send { min-height: 34px; padding: .3rem .85rem; }
  .ai-search-chip { padding: .55rem 1rem; }
  .ai-search-trending { margin-top: 2.5rem; }
  .ai-search-trending-refresh { padding: .3rem .45rem; }
  .ai-search-trending-refresh span { display: none; }
  .ai-search-help-btn {
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }
  .ai-search-help-btn span { display: none; }
  .ai-search-help-btn .bi { font-size: 1rem; }
  .ai-search-disclaimers { margin-top: auto; padding-top: 2.25rem; }
  .ai-search-disclaimer-grid { grid-template-columns: 1fr; }
  .ai-search-disclaimer-card--wide { grid-column: auto; }
  .ai-search-disclaimer-banner { padding: .7rem .85rem; }
}

.ai-search-results { margin-top: 2rem; width: 100%; }
.ai-search-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: 2.25rem 0;
  color: var(--bs-secondary-color);
  font-size: .95rem;
}
.ai-search-loading .spinner-border { width: 1.1rem; height: 1.1rem; color: var(--brand); }
.ai-search-loading .spinner-border + span { color: var(--bs-secondary-color); }

.ai-results-section { margin-top: 2.25rem; }
.ai-results-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: .55rem;
  margin-bottom: 1.4rem;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -.01em;
  text-align: left;
  color: var(--bs-body-color);
}
.ai-results-head .bi { color: var(--brand); font-size: 19px; }
.ai-results-head.ip-ext-head {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: .55rem;
  row-gap: .35rem;
  text-align: left;
  margin-top: 1.2rem;
}
.ai-results-head.ip-ext-head .ai-results-head-tag { grid-column: 1 / -1; }
.ai-results-head-title { margin: 0; font-size: 1.2rem; font-weight: 800; }
.ai-results-head-tag {
  font-size: .78rem;
  font-weight: 400;
  color: var(--bs-tertiary-color);
}
.ai-results-books { display: flex; flex-direction: column; gap: .9rem;  margin-inline: auto; }
.ai-result-book { width: 100%; }
.ai-result-card {
  display: block;
  padding: 10px;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
  text-decoration: none;
  transition: background-color .15s ease;
}
.ai-result-card:hover {
  background: var(--bs-secondary-bg);
}
.ai-result-main { display: flex; align-items: flex-start; gap: 14px; }
.ai-result-card .search-row-cover { width: 100px; flex: none; }
.ai-result-card .search-row-cover .ratio-book {
  height: auto;
  aspect-ratio: 3 / 4;
}
.ai-result-card .search-row-cover .ratio-book::before { display: none; }
.ai-result-card .search-row-info { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.ai-result-card .cover-score { right: 3px; bottom: 3px; }
.ai-result-titleline {
  display: flex;
  align-items: center;
  gap: .5rem;
  min-width: 0;
}
.ai-result-titleline .search-row-title { flex: 1 1 auto; min-width: 0; }
.ai-result-card-intro {
  margin: .55rem 0 0;
  font-size: .9rem;
  line-height: 1.75;
  color: var(--bs-secondary-color);
  overflow-wrap: anywhere;
}
.ai-result-book > .ai-result-card-intro,
.ai-list-local > .ai-result-card-intro,
.ai-list-ext > .ai-result-card-intro {
  padding: .65rem .8rem;
  background: var(--bs-tertiary-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 10px;
}
.ai-list-local > .ai-result-card-intro,
.ai-list-ext > .ai-result-card-intro {
  margin: 0 var(--bs-border-radius);
  border-top: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}
.ai-feature-section { max-width: 860px; margin-inline: auto; }
.ai-feature-head { margin-bottom: 1.1rem; }
.ai-feature-lead {
  margin: 0 0 1.25rem;
  font-size: 1.02rem;
  line-height: 1.95;
  color: var(--bs-body-color);
  white-space: pre-line;
}
.ai-feature-body {
  margin: 1.15rem 0 0;
  font-size: .94rem;
  line-height: 1.95;
  color: var(--bs-body-color);
  white-space: pre-line;
}
.ai-feature-card {
  position: relative;
  overflow: hidden;
  margin: 1.6rem 0 1.5rem;
  padding: 0.8rem;
  border-radius: 14px;
  border: 1px solid var(--bs-border-color);
  background: var(--bs-tertiary-bg);
  box-shadow: 0 2px 6px rgba(13, 20, 30, .04), 0 16px 36px -30px rgba(13, 20, 30, .5);
  transition: border-color .2s ease, box-shadow .25s ease;
}
.ai-feature-card:hover {
  border-color: rgba(var(--brand-rgb), .32);
  box-shadow: 0 2px 6px rgba(13, 20, 30, .05), 0 18px 40px -28px rgba(var(--brand-rgb), .45);
}
.ai-feature-card .ai-result-card {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.ai-feature-card .ai-result-card:hover {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.ai-feature-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: .9rem;
  margin-top: 1.4rem;
}
.ai-feature-block {
  padding: .85rem 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 12px;
  background: color-mix(in srgb, var(--bs-tertiary-bg) 55%, transparent);
}
.ai-feature-block-title {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin: 0 0 .5rem;
  font-size: .86rem;
  font-weight: 700;
  color: var(--bs-body-color);
}
.ai-feature-block-title .bi { color: var(--brand); font-size: 14px; }
.ai-feature-block ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: .85rem;
  line-height: 1.75;
  color: var(--bs-secondary-color);
}
.ai-feature-block li + li { margin-top: .25rem; }
.ai-feature-more-head { margin-top: 2rem; }
@media (max-width: 575.98px) {
  .ai-result-card { padding: 10px; }
  .ai-result-main { gap: 10px; }
  .ai-result-card .search-row-cover { width: 88px; }
  .ai-result-card-intro { font-size: .95rem; }
  .ai-result-book > .ai-result-card-intro,
  .ai-list-local > .ai-result-card-intro,
  .ai-list-ext > .ai-result-card-intro { padding: .7rem .85rem; }
  .ai-list-no { min-width: 1.6rem; height: 1.6rem; font-size: .82rem; }
  .ai-list-group-title { font-size: 1.05rem; }
  .ai-list-ext-card > .ai-list-actions { right: .6rem; bottom: .55rem; }
  .ai-feature-card { padding: .8rem .85rem; }
  .ai-feature-lead { font-size: .96rem; }
  .ai-feature-body { font-size: .9rem; }
  .ai-feature-details { grid-template-columns: 1fr; }
}
.ai-match-score {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  align-self: center;
  flex: none;
  margin: 0;
  padding: .12rem .5rem;
  border-radius: 999px;
  background: rgba(var(--brand-rgb), .08);
  border: 1px solid rgba(var(--brand-rgb), .3);
  color: var(--brand);
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.45;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.ai-match-score .bi { font-size: 10px; }
.ai-match-score.ai-via-web {
  background: var(--bs-tertiary-bg);
  border-color: var(--bs-border-color);
  color: var(--bs-secondary-color);
}
.ai-results-subhead { margin-top: .2rem; font-size: 1rem; }
.ai-results-subhead .bi { font-size: 16px; }
.ai-result-card-ext { border-style: solid; }
.ai-result-card-intro-sub { margin-top: .35rem; font-size: .85rem; }

.ai-results-exts { display: flex; flex-direction: column; gap: .7rem;  margin-inline: auto; }
.ai-result-ext {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  padding: .85rem 1rem;
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 12px;
  text-decoration: none;
  color: var(--bs-body-color);
  transition: border-color .15s ease, background-color .15s ease;
}
.ai-result-ext:hover {
  border-color: rgba(var(--brand-rgb), .4);
  background: rgba(var(--brand-rgb), .02);
}
.ai-result-ext-head {
  display: flex;
  align-items: center;
  gap: .5rem;
  min-width: 0;
}
.ai-result-ext-icon {
  flex: none;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--bs-tertiary-bg);
  color: var(--bs-secondary-color);
}
.ai-result-ext-title {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 600;
  font-size: .92rem;
  color: var(--bs-body-color);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ai-result-ext-site {
  flex: none;
  max-width: 42%;
  padding: .05rem .5rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 999px;
  background: var(--bs-tertiary-bg);
  color: var(--bs-secondary-color);
  font-size: .72rem;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ai-result-ext:hover .ai-result-ext-site {
  border-color: rgba(var(--brand-rgb), .35);
  color: var(--brand);
}
.ai-result-ext-snippet {
  width: 100%;
  font-size: .85rem;
  line-height: 1.6;
  color: var(--bs-secondary-color);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ai-result-ext-domain { font-size: .75rem; color: var(--bs-secondary-color); }
.ai-results-empty { text-align: center; color: var(--bs-secondary-color); font-size: .95rem; padding: 1.5rem 0; }

.ai-missing-target {
  margin: 0 auto 1.5rem;
  padding: 1.2rem 1.3rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 12px;
  background: var(--bs-body-bg);
  text-align: left;
}
.ai-missing-content {
  display: flex;
  align-items: flex-start;
  gap: .9rem;
}
.ai-missing-cover {
  flex: 0 0 96px;
  width: 96px;
  margin: 0;
}
.ai-missing-body { flex: 1 1 auto; min-width: 0; }
.ai-weread-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-top: .7rem;
  padding: .4rem .85rem;
  border-radius: 999px;
  border: 1px solid var(--bs-border-color);
  background: var(--bs-tertiary-bg);
  color: var(--bs-body-color);
  font-size: .82rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color .15s ease, background-color .15s ease;
}
.ai-weread-link:hover { color: var(--bs-body-color); border-color: rgba(var(--brand-rgb), .4); }
.ai-weread-link .bi { font-size: 14px; }
.ai-missing-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem;
  margin-top: .7rem;
}
.ai-index-request {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem .85rem;
  border-radius: 999px;
  border: 1px solid rgba(var(--brand-rgb), .38);
  background: rgba(var(--brand-rgb), .06);
  color: var(--brand);
  font-size: .82rem;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.ai-index-request:hover {
  border-color: rgba(var(--brand-rgb), .6);
  background: rgba(var(--brand-rgb), .12);
}
.ai-index-request:focus-visible {
  outline: 2px solid rgba(var(--brand-rgb), .5);
  outline-offset: 2px;
}
.ai-index-request .bi { font-size: 14px; }
.ai-index-request.is-loading { opacity: .6; }
.ai-index-request.is-done {
  border-color: var(--bs-border-color);
  background: var(--bs-tertiary-bg);
  color: var(--bs-secondary-color);
  cursor: default;
}
.ai-index-request-hint {
  font-size: .8rem;
  color: var(--bs-secondary-color);
}

.ai-feedback-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin: 1.4rem 0 .2rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--bs-border-color);
}
.ai-feedback-action {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .38rem .9rem;
  border-radius: 999px;
  border: 1px solid var(--bs-border-color);
  background: transparent;
  color: var(--bs-secondary-color);
  font-size: .82rem;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background-color .15s ease,
    transform .15s ease;
}
.ai-feedback-action:hover,
.ai-feedback-action:focus-visible {
  color: var(--brand);
  border-color: rgba(var(--brand-rgb), .5);
  background: rgba(var(--brand-rgb), .06);
}
.ai-feedback-action:focus-visible {
  outline: 2px solid rgba(var(--brand-rgb), .5);
  outline-offset: 2px;
}
.ai-feedback-action .bi { font-size: 15px; }
.ai-feedback-action:disabled { cursor: default; opacity: 1; }
.ai-feedback-action.is-liked {
  color: #d6336c;
  border-color: rgba(214, 51, 108, .35);
  background: rgba(214, 51, 108, .07);
}
.ai-feedback-action.is-pop .bi {
  animation: ai-heart-pop .55s cubic-bezier(.2, .9, .3, 1.4);
}
@keyframes ai-heart-pop {
  0% { transform: scale(1); }
  35% { transform: scale(1.55); }
  60% { transform: scale(.92); }
  100% { transform: scale(1); }
}

.ai-feedback-pop { position: fixed; inset: 0; z-index: 1080; }
.ai-feedback-pop[hidden] { display: none; }
.ai-feedback-pop-mask { display: none; }
.ai-feedback-pop-panel {
  position: fixed;
  width: 320px;
  max-width: calc(100vw - 2rem);
  padding: 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 14px;
  background: var(--bs-body-bg);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .2);
  animation: ai-feedback-pop-in .16s ease-out;
}
@keyframes ai-feedback-pop-in {
  from { opacity: 0; transform: translateY(6px) scale(.98); }
  to { opacity: 1; transform: none; }
}
.ai-feedback-pop-close {
  position: absolute;
  top: .5rem;
  right: .5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--bs-secondary-color);
  cursor: pointer;
}
.ai-feedback-pop-close:hover { background: var(--bs-tertiary-bg); color: var(--bs-body-color); }
.ai-feedback-step[hidden] { display: none; }
.ai-feedback-pop-title {
  margin: 0 0 .75rem;
  padding-right: 1.6rem;
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--bs-body-color);
}
.ai-feedback-choice {
  display: flex;
  gap: .7rem;
  width: 100%;
  margin-bottom: .55rem;
  padding: .7rem .8rem;
  text-align: left;
  border: 1px solid var(--bs-border-color);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.ai-feedback-choice:last-child { margin-bottom: 0; }
.ai-feedback-choice:hover,
.ai-feedback-choice:focus-visible {
  border-color: rgba(var(--brand-rgb), .5);
  background: rgba(var(--brand-rgb), .05);
}
.ai-feedback-choice:focus-visible { outline: 2px solid rgba(var(--brand-rgb), .45); outline-offset: 1px; }
.ai-feedback-choice > .bi { margin-top: .1rem; font-size: 18px; color: var(--brand); }
.ai-feedback-choice-copy { display: flex; flex-direction: column; gap: .15rem; }
.ai-feedback-choice-copy strong { font-size: .9rem; color: var(--bs-body-color); }
.ai-feedback-choice-copy small { font-size: .78rem; line-height: 1.5; color: var(--bs-secondary-color); }
.ai-feedback-input {
  width: 100%;
  min-height: 96px;
  padding: .6rem .7rem;
  resize: vertical;
  border: 1px solid var(--bs-border-color);
  border-radius: 10px;
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
  font-size: .86rem;
  line-height: 1.6;
}
.ai-feedback-input:focus {
  outline: 2px solid rgba(var(--brand-rgb), .35);
  border-color: rgba(var(--brand-rgb), .5);
}
.ai-feedback-pop-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  margin-top: .7rem;
}
.ai-feedback-hint { min-height: 1em; font-size: .78rem; color: var(--bs-secondary-color); }
.ai-feedback-hint.is-error { color: var(--bs-danger); }
.ai-feedback-submit {
  padding: .42rem 1.1rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: .84rem;
  font-weight: 600;
  cursor: pointer;
}
.ai-feedback-submit:disabled,
.ai-feedback-submit.is-loading { opacity: .6; cursor: default; }

.ai-search-chip { position: relative; padding-right: 4.2rem; }
.ai-search-chip-likes {
  position: absolute;
  top: .55rem;
  right: .9rem;
  display: inline-flex;
  align-items: center;
  gap: .16rem;
  font-size: .72rem;
  line-height: 1;
  color: var(--bs-secondary-color);
  opacity: .85;
}
.ai-search-chip-likes .bi { font-size: 12px; }
.ai-search-chip-likes-num { font-variant-numeric: tabular-nums; }

@media (max-width: 575.98px) {
  .ai-feedback-bar { margin-top: 1.1rem; }
  .ai-feedback-pop { background: rgba(0, 0, 0, .32); }
  .ai-feedback-pop-mask { display: block; position: absolute; inset: 0; }
  .ai-feedback-pop-panel {
    left: 0 !important;
    right: 0;
    top: auto !important;
    bottom: 0;
    width: 100%;
    max-width: none;
    border-radius: 18px 18px 0 0;
    padding: 1.1rem 1rem calc(1.1rem + env(safe-area-inset-bottom));
    animation: ai-feedback-sheet-in .2s ease-out;
  }
  @keyframes ai-feedback-sheet-in {
    from { transform: translateY(18px); opacity: .6; }
    to { transform: none; opacity: 1; }
  }
  .ai-search-chip { padding-right: 3.6rem; }
  .ai-search-chip-likes { top: .5rem; right: .8rem; }
}
@media (max-width: 575.98px) {
  .ai-missing-content { gap: .7rem; }
  .ai-missing-cover { flex-basis: 80px; width: 80px; }
}
.ai-missing-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin: 0 0 .5rem;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--bs-body-color);
  text-transform: none;
}
.ai-missing-eyebrow .bi { font-size: 17px; color: var(--brand); }
.ai-missing-title {
  margin: 0 0 .3rem;
  font-size: clamp(1.1rem, 2.2vw, 1.35rem);
  font-weight: 700;
  line-height: 1.4;
  color: var(--bs-body-color);
  overflow-wrap: anywhere;
}
.ai-missing-meta {
  margin: 0 0 .45rem;
  font-size: .875rem;
  color: var(--bs-secondary-color);
}
.ai-missing-intro {
  margin: .55rem 0 .7rem;
  font-size: .875rem;
  line-height: 1.75;
  color: var(--bs-body-color);
  text-align: left;
}
.ai-missing-corrections,
.ai-missing-highlights {
  margin: .6rem 0;
  padding: .65rem .8rem;
  border: 1px solid var(--bs-border-color);
  border-radius: .6rem;
  background: var(--bs-tertiary-bg);
}
.ai-missing-highlights {
  border-color: var(--bs-border-color);
  background: var(--bs-tertiary-bg);
}
.ai-missing-callout-label {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-bottom: .3rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--bs-secondary-color);
}
.ai-missing-corrections ul,
.ai-missing-highlights ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: .85rem;
  line-height: 1.65;
}
.ai-missing-highlights .ai-missing-callout-label { color: var(--bs-secondary-color); }
.ai-missing-note {
  margin: 0;
  font-size: .85rem;
  line-height: 1.6;
  color: var(--bs-tertiary-color);
}

.ai-results :is(.ai-result-book, .ai-result-ext) { opacity: 0; }
.ai-result-in { animation: aiResultIn .55s cubic-bezier(.22, 1, .36, 1) forwards; }
@keyframes aiResultIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.ai-thread-answer { margin-top: 0; }
.ai-thread-answer .ai-results-section { margin-top: 0; }

.ai-search-box.is-query .ai-steps {
  margin: .95rem 0 -1.05rem;
  border: 0;
  border-top: 1px solid var(--bs-border-color);
  border-radius: 0;
  background: transparent;
  animation: aiStepsIn .45s cubic-bezier(.22, 1, .36, 1) both;
}
.ai-search-box.is-query .ai-steps-head {
  padding: .58rem 0;
  font-size: .78rem;
  font-weight: 500;
}
.ai-search-box.is-query .ai-steps-list { padding: .05rem 0 .7rem; max-height: 1000px; }
.ai-search-box.is-query .ai-steps-foot { padding: .5rem 0 .6rem; }
@keyframes aiStepsIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}
.ai-steps.is-leaving { animation: aiStepsOut .18s ease forwards; pointer-events: none; }
@keyframes aiStepsOut {
  to { opacity: 0; transform: translateY(-4px); }
}
@media (max-width: 575.98px) {
  .ai-search-box.is-query .ai-steps { margin: .8rem 0 -.85rem; }
  .ai-search-box.is-query .ai-steps-head { padding: .5rem 0; }
}

.ai-steps {
  border: 1px solid var(--bs-border-color);
  border-radius: 14px;
  background: var(--bs-tertiary-bg);
  overflow: hidden;
}
.ai-steps-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .72rem .9rem;
  border: 0;
  background: transparent;
  color: var(--bs-secondary-color);
  font-size: .85rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.ai-steps-head:hover { color: var(--bs-body-color); }
.ai-steps-icon {
  flex: none;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(var(--brand-rgb), .10);
  color: var(--brand);
  font-size: 11px;
}
.ai-steps.is-live .ai-steps-icon { animation: aiThinkPulse 1.4s ease-in-out infinite; }
@keyframes aiThinkPulse {
  0%, 100% { transform: scale(1); opacity: .7; }
  50% { transform: scale(1.12); opacity: 1; }
}
.ai-steps-title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ai-steps.is-live .ai-steps-title { color: var(--brand); }
.ai-steps-elapsed {
  display: none;
  flex: none;
  font-size: .75rem;
  font-variant-numeric: tabular-nums;
  color: var(--bs-tertiary-color);
  white-space: nowrap;
}
.ai-steps-summary {
  display: none;
  flex: none;
  font-size: .75rem;
  font-variant-numeric: tabular-nums;
  color: var(--bs-tertiary-color);
  white-space: nowrap;
}
.ai-steps.is-collapsed .ai-steps-summary { display: inline; animation: aiSummaryIn .28s ease both; }
@keyframes aiSummaryIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.ai-steps-meta {
  flex: none;
  font-size: .75rem;
  font-variant-numeric: tabular-nums;
  color: var(--bs-tertiary-color);
}
.ai-steps-chevron {
  flex: none;
  font-size: 12px;
  color: var(--bs-tertiary-color);
  transition: transform .3s ease;
}
.ai-steps.is-collapsed .ai-steps-chevron { transform: rotate(-90deg); }
.ai-steps-list {
  margin: 0;
  padding: .1rem .95rem .8rem;
  list-style: none;
  max-height: 1000px;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  transition: max-height .35s cubic-bezier(.22, 1, .36, 1), opacity .25s ease,
              padding .35s cubic-bezier(.22, 1, .36, 1);
}
.ai-steps-list::-webkit-scrollbar { display: none; }
.ai-steps.is-collapsed .ai-steps-list {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  overflow: hidden;
}
.ai-step {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  padding: .3rem 0;
  font-size: .84rem;
  line-height: 1.55;
  color: var(--bs-secondary-color);
}
.ai-step-dot {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: .04rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bs-secondary-bg);
  color: var(--bs-tertiary-color);
  font-size: 10px;
}
.ai-step-dot .spinner-border { width: 11px; height: 11px; border-width: 1.5px; }
.ai-step.is-active .ai-step-dot { background: rgba(var(--brand-rgb), .12); color: var(--brand); }
.ai-step.is-done .ai-step-dot { background: rgba(var(--brand-rgb), .12); color: var(--brand); }
.ai-step.is-failed .ai-step-dot { background: rgba(229, 72, 77, .12); color: #c42b30; }
.ai-step-label { flex: 1 1 auto; min-width: 0; color: var(--bs-body-color); }
.ai-step.is-active .ai-step-label { color: var(--brand); font-weight: 600; }
.ai-step-detail {
  flex: none;
  max-width: 48%;
  font-size: .74rem;
  color: var(--bs-tertiary-color);
  text-align: right;
}
.ai-step.is-active .ai-step-detail { display: none; }
.ai-step.is-failed .ai-step-detail { color: #c42b30; }
.ai-steps-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .55rem .95rem .65rem;
  border-top: 1px solid var(--bs-border-color);
  font-size: .74rem;
  color: var(--bs-tertiary-color);
  font-variant-numeric: tabular-nums;
}
.ai-steps-foot[hidden] { display: none; }
.ai-steps.is-collapsed .ai-steps-foot { display: none; }

.ai-usage-short { display: none; }
.ai-usage-long { white-space: pre; }
.ai-usage-value { font-variant-numeric: tabular-nums; }
.ai-usage-icon { margin-right: .28rem; font-size: .95em; vertical-align: -1px; }
.ai-steps-summary .ai-usage-icon { margin: 0 .18rem 0 .22rem; }
.ai-usage-sep { opacity: .6; }
@media (max-width: 575.98px) {
  .ai-steps-foot { gap: .5rem; font-size: .7rem; }
  .ai-steps-web .ai-usage-icon { margin-right: .22rem; }
    .ai-steps.is-timed.is-collapsed .ai-steps-title { display: none; }
  .ai-steps.is-timed.is-collapsed .ai-steps-elapsed { display: inline; flex: 1 1 auto; }
}

.ai-thread-error {
  margin: 0;
  padding: .85rem 1rem;
  border-radius: 12px;
  background: rgba(229, 72, 77, .07);
  border: 1px solid rgba(229, 72, 77, .22);
  color: #c42b30;
  font-size: .9rem;
}
[data-bs-theme="dark"] .ai-thread-error { color: #ff9a9c; }

@media (prefers-reduced-motion: reduce) {
  .ai-search-box { transition: none; }
  .ai-search-fill, .ai-search-hero { transition: none; }
  .ai-search-box.is-query .ai-search-query,
  .ai-search-box.is-query .ai-steps,
  .ai-steps.is-collapsed .ai-steps-summary { animation: none; }
  .ai-steps.is-live .ai-steps-icon { animation: none; }
  .ai-steps-list, .ai-steps-chevron { transition: none; }
  .ai-results :is(.ai-result-book, .ai-result-ext) { opacity: 1; }
  .ai-result-in { animation: none; }
  .ai-search-trending-refresh.is-loading .bi { animation: none; }
}

.nav-account { display: flex; align-items: center; }
.nav-account-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-width: 36px;
  height: 36px;
  padding: 0 6px 0 3px;
  border: 1px solid var(--bs-border-color);
  border-radius: 8px;
  background: var(--bs-tertiary-bg);
  color: var(--bs-body-color);
  font-size: .8125rem;
  line-height: 1;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.nav-account-label {
  max-width: 10rem;
  overflow: hidden;
  font-size: .8125rem;
  font-weight: 600;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-account.is-logged-in .nav-account-btn {
  width: 36px;
  padding: 0;
  gap: 0;
}
.nav-account.is-logged-in .nav-account-label { display: none; }
@media (max-width: 767.98px) {
  .nav-account-btn { width: 36px; padding: 0; gap: 0; }
  .nav-account-label { display: none; }
}
.nav-account-btn:hover,
.nav-account-btn:focus-visible {
  background: var(--searchbar-bg-hover);
  border-color: var(--bs-border-color);
  outline: none;
}
.nav-account-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(var(--brand-rgb), .12);
  color: var(--brand-dark);
  font-size: .78rem;
  font-weight: 700;
}
.nav-account.is-logged-in .nav-account-avatar {
  background: var(--brand);
  color: #fff;
}

body.ai-account-open { overflow: hidden; }

.ai-account-modal {
  position: fixed;
  inset: 0;
  z-index: 1080;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.ai-account-modal[hidden] { display: none; }
.ai-account-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 14, 20, .52);
  backdrop-filter: blur(3px);
}
.ai-account-dialog {
  position: relative;
  z-index: 1;
  width: min(460px, 100%);
  max-height: min(86vh, 760px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1.35rem 1.35rem 1.15rem;
  border: 1px solid var(--bs-border-color);
  border-radius: calc(var(--bs-border-radius) + 6px);
  background: var(--bs-body-bg);
  box-shadow: 0 24px 70px rgba(8, 15, 25, .28);
  animation: ai-account-in .18s ease-out;
}
@keyframes ai-account-in {
  from { opacity: 0; transform: translateY(8px) scale(.985); }
  to { opacity: 1; transform: none; }
}
.ai-account-close {
  position: absolute;
  top: .7rem;
  right: .7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-quiet);
  cursor: pointer;
}
.ai-account-close:hover,
.ai-account-close:focus-visible {
  background: var(--searchbar-bg-hover);
  color: var(--bs-body-color);
  outline: none;
}
.ai-account-msg {
  margin: 0 2.2rem .8rem 0;
  padding: .55rem .7rem;
  border-radius: var(--bs-border-radius);
  background: rgba(var(--bs-warning-rgb), .12);
  color: var(--bs-warning-text-emphasis);
  font-size: .8125rem;
  line-height: 1.45;
}
.ai-account-view { display: block; }
.ai-account-view[hidden] { display: none; }
.ai-account-head { margin-bottom: 1rem; }
.ai-account-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-bottom: .55rem;
  border-radius: 12px;
  background: rgba(var(--brand-rgb), .12);
  color: var(--brand-dark);
  font-size: 1.05rem;
}
.ai-account-title {
  margin: 0 0 .3rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--bs-heading-color, var(--bs-body-color));
}
.ai-account-lead {
  margin: 0;
  color: var(--text-quiet);
  font-size: .8125rem;
  line-height: 1.5;
  word-break: break-all;
}
.ai-account-form { display: grid; gap: .75rem; }
.ai-account-field { display: grid; gap: .3rem; }
.ai-account-field > span {
  color: var(--text-quiet);
  font-size: .78rem;
}
.ai-account-field input {
  width: 100%;
  height: 40px;
  padding: 0 .7rem;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  background: var(--bs-tertiary-bg);
  color: var(--text-input);
  font-size: .875rem;
  outline: none;
}
.ai-account-field input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--focus-ring);
}
.ai-account-code-row { display: flex; gap: .45rem; }
.ai-account-code-row input { flex: 1 1 auto; min-width: 0; }
.ai-account-code-btn {
  flex: 0 0 auto;
  height: 40px;
  padding: 0 .75rem;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  background: var(--bs-secondary-bg);
  color: var(--bs-body-color);
  font-size: .78rem;
  cursor: pointer;
  white-space: nowrap;
}
.ai-account-code-btn:hover:not(:disabled) { background: var(--searchbar-bg-hover); }
.ai-account-code-btn:disabled { opacity: .6; cursor: default; }
.ai-account-cap { display: none; }
.ai-account-cap-host {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}
.ai-account-cap-inline {
  margin: -.2rem 0 0;
  color: var(--text-hint);
  font-size: .75rem;
}
/* 两步登录：验证码步骤的说明文案 */
.ai-account-login-tip {
  margin: 0 0 .6rem;
  color: var(--bs-body-color);
  font-size: .8125rem;
  line-height: 1.6;
  word-break: break-all;
}
.ai-account-login-hint {
  margin: .35rem 0 .6rem;
  color: var(--text-hint);
  font-size: .75rem;
  line-height: 1.6;
}
.ai-account-submit {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  height: 42px;
  margin-top: .2rem;
  border: 0;
  border-radius: var(--bs-border-radius);
  background: var(--brand);
  color: #fff;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter .15s ease;
}
.ai-account-submit:hover:not(:disabled) { filter: brightness(1.04); }
.ai-account-submit:disabled { opacity: .65; cursor: default; }
.ai-account-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, .4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ai-account-spin .7s linear infinite;
}
.ai-account-submit.is-loading .ai-account-spinner { display: inline-block; }
@keyframes ai-account-spin { to { transform: rotate(360deg); } }
.ai-account-switch {
  margin: .9rem 0 0;
  color: var(--text-quiet);
  font-size: .8125rem;
  text-align: center;
}
.ai-account-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--brand-dark);
  font-size: inherit;
  cursor: pointer;
}
.ai-account-link:hover { text-decoration: underline; }

.ai-account-quota-card {
  padding: .85rem .9rem;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  background: var(--bs-secondary-bg);
}
.ai-account-quota-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .5rem;
  font-size: .85rem;
}
.ai-account-quota-title {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  min-width: 0;
}
.ai-account-tip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-hint);
  font-size: .82rem;
  line-height: 1;
  cursor: pointer;
}
.ai-account-tip-btn:hover,
.ai-account-tip-btn:focus-visible {
  color: var(--brand);
  outline: none;
}
.ai-account-tip-pop {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 3;
  width: max-content;
  max-width: 240px;
  padding: .45rem .6rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 8px;
  background: var(--bs-body-bg);
  box-shadow: 0 10px 30px rgba(8, 15, 25, .2);
  color: var(--text-quiet);
  font-size: .72rem;
  line-height: 1.5;
  white-space: normal;
}
.ai-account-tip-pop[hidden] { display: none; }
.ai-account-tip-countdown {
  display: block;
  margin-top: .15rem;
  color: var(--bs-body-color);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.ai-account-quota-total { color: var(--brand-dark); font-weight: 700; }
.ai-account-quota-bar {
  display: flex;
  gap: 0;
  height: 10px;
  margin: .1rem 0 .45rem;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bs-tertiary-bg);
}
.ai-account-quota-seg {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  background: rgba(128, 138, 152, .18);
}
.ai-account-quota-seg-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  background: currentColor;
  transition: width .3s ease;
}
.ai-account-quota-seg.is-visit { color: var(--brand); background: rgba(var(--brand-rgb), .18); }
.ai-account-quota-seg.is-login { color: #d89426; background: rgba(216, 148, 38, .18); }
.ai-account-quota-seg.is-signin { color: #17a88f; background: rgba(23, 168, 143, .18); }
.ai-account-quota-seg.is-locked { opacity: .72; }
.ai-account-quota-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem .9rem;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--text-quiet);
  font-size: .72rem;
  line-height: 1.4;
}
.ai-account-quota-legend-item {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
}
.ai-account-quota-legend-item.is-locked { opacity: .72; }
.ai-account-quota-legend-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: rgba(128, 138, 152, .6);
}
.ai-account-quota-legend-item.is-visit .ai-account-quota-legend-dot { background: var(--brand); }
.ai-account-quota-legend-item.is-login .ai-account-quota-legend-dot { background: #d89426; }
.ai-account-quota-legend-item.is-signin .ai-account-quota-legend-dot { background: #17a88f; }
.ai-account-quota-legend-value {
  color: var(--bs-body-color);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.ai-account-signin-wrap { position: relative; }
.ai-account-signin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  width: 100%;
  height: 40px;
  margin-top: .7rem;
  border: 1px dashed rgba(var(--brand-rgb), .45);
  border-radius: var(--bs-border-radius);
  background: rgba(var(--brand-rgb), .06);
  color: var(--brand-dark);
  font-size: .83rem;
  font-weight: 600;
  cursor: pointer;
}
.ai-account-signin:hover:not(:disabled) { background: rgba(var(--brand-rgb), .12); }
.ai-account-signin:disabled,
.ai-account-signin.is-done {
  border-style: solid;
  border-color: var(--bs-border-color);
  background: var(--bs-secondary-bg);
  color: var(--text-quiet);
  cursor: help;
}
.ai-account-signin-tip {
  top: auto;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  max-width: 280px;
  text-align: center;
}
.ai-account-history { margin-top: 1rem; }
.ai-account-history[hidden] { display: none; }
.ai-account-history-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .45rem;
  font-size: .82rem;
}
.ai-account-history-head span { color: var(--text-hint); font-size: .7rem; }
.ai-account-history-list {
  display: grid;
  gap: .35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ai-account-history-item {
  display: grid;
  gap: .15rem;
  width: 100%;
  padding: .5rem .6rem;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--bs-secondary-bg);
  color: var(--bs-body-color);
  text-align: left;
  cursor: pointer;
}
.ai-account-history-item:hover,
.ai-account-history-item:focus-visible {
  border-color: rgba(var(--brand-rgb), .35);
  background: var(--searchbar-bg-hover);
  outline: none;
}
.ai-account-history-item.is-loading { opacity: .6; }
.ai-account-history-query {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: .8rem;
  line-height: 1.4;
}
.ai-account-history-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem;
  min-width: 0;
}
.ai-account-history-meta {
  min-width: 0;
  overflow: hidden;
  color: var(--text-hint);
  font-size: .68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ai-account-history-cost {
  flex: 0 0 auto;
  color: var(--text-hint);
  font-size: .68rem;
  font-variant-numeric: tabular-nums;
}
.ai-account-history-empty {
  padding: .8rem .6rem;
  color: var(--text-hint);
  font-size: .78rem;
  text-align: center;
}
.ai-account-actions {
  display: flex;
  gap: .5rem;
  margin-top: 1rem;
}
.ai-account-secondary {
  flex: 1 1 0;
  height: 38px;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  background: var(--bs-tertiary-bg);
  color: var(--bs-body-color);
  font-size: .8rem;
  cursor: pointer;
}
.ai-account-secondary:hover:not(:disabled) { background: var(--searchbar-bg-hover); }
.ai-account-empty {
  padding: 1.4rem 1rem;
  border: 1px dashed var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  color: var(--text-quiet);
  font-size: .82rem;
  text-align: center;
}
.ai-account-empty .bi { display: block; margin-bottom: .4rem; font-size: 1.3rem; }
.ai-account-empty p { margin: 0; }

@media (max-width: 575.98px) {
  .ai-account-modal { padding: .6rem; align-items: flex-end; }
  .ai-account-dialog {
    width: 100%;
    max-height: 90vh;
    border-radius: 16px 16px 10px 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ai-account-dialog { animation: none; }
  .ai-account-spinner { animation: none; }
}

.ai-search-quota-wrap { position: relative; display: inline-flex; align-items: center; }
button.ai-search-quota {
  border: 0;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s ease;
}
button.ai-search-quota:hover { background: rgba(var(--brand-rgb), .1); }
button.ai-search-quota:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}
button.ai-search-quota[aria-expanded="true"] { background: rgba(var(--brand-rgb), .14); }
.ai-search-quota-info { color: var(--text-hint); font-size: 11px; }
.ai-search-quota-pop {
  position: fixed;
  z-index: 45;
  width: min(280px, calc(100vw - 24px));
  padding: .85rem .95rem;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  background: var(--bs-tertiary-bg);
  color: var(--bs-body-color);
  box-shadow: 0 14px 40px rgba(8, 15, 25, .18);
  font-size: .8rem;
  line-height: 1.5;
}
[data-bs-theme="dark"] .ai-search-quota-pop {
  box-shadow: 0 18px 46px rgba(0, 0, 0, .55);
}
.ai-search-quota-pop[hidden] { display: none; }
.ai-search-quota-pop-title {
  margin: 0 0 .45rem;
  font-size: .82rem;
  font-weight: 700;
  color: var(--bs-body-color);
}
.ai-search-quota-pop ul {
  display: grid;
  gap: .2rem;
  margin: 0;
  padding-left: 1.1rem;
  color: var(--text-quiet);
}
.ai-search-quota-pop-note {
  margin: .5rem 0 0;
  color: var(--text-hint);
  font-size: .72rem;
}
.ai-search-quota-pop-login {
  width: 100%;
  height: 34px;
  margin-top: .65rem;
  border: 0;
  border-radius: var(--bs-border-radius);
  background: var(--brand);
  color: #fff;
  font-family: inherit;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
}
.ai-search-quota-pop-login:hover { filter: brightness(1.04); }

.ai-account-credits-card {
  --ticket-notch: 14px;     --ticket-pad-y: .8rem;    position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .9rem;
  margin-top: .7rem;
  padding: .8rem .95rem;
  border: 1px solid rgba(205, 160, 51, .55);
  border-radius: 13px;
  background:
    radial-gradient(120% 150% at 0% 0%, rgba(255, 255, 255, .92), transparent 62%),
    linear-gradient(118deg, #fffdf7 0%, #fff8e8 52%, #fbecc9 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95);
    overflow: visible;
}
.ai-account-credits-info {
  min-width: 0;
  font-size: .85rem;
}
.ai-account-credits-info strong {
  display: block;
  color: #7c5a12;
  font-size: .8rem;
  letter-spacing: .04em;
}
.ai-account-credits-card .ai-account-credits-balance {
  flex: 0 0 auto;
  align-self: stretch;
  margin: 0;
  padding-left: 1rem;
  border-left: 1px dashed rgba(180, 140, 40, .55);
}
.ai-account-credits-card p {
  margin: .35rem 0 0;
  color: #96805a;
  font-size: .75rem;
  line-height: 1.45;
}
.ai-account-credits-balance::before,
.ai-account-credits-balance::after {
  content: "";
  position: absolute;
  left: calc(var(--ticket-notch) / -2);
  width: var(--ticket-notch);
  height: var(--ticket-notch);
  border-radius: 50%;
  background: var(--bs-body-bg);
  box-shadow: inset 0 0 0 1px rgba(205, 160, 51, .55);
  -webkit-clip-path: inset(calc(var(--ticket-notch) / 2 - .5px) 0 0 0);
  clip-path: inset(calc(var(--ticket-notch) / 2 - .5px) 0 0 0);
}
.ai-account-credits-balance::before {
  top: calc(-1 * (var(--ticket-pad-y) + .5px + var(--ticket-notch) / 2));
}
.ai-account-credits-balance::after {
  bottom: calc(-1 * (var(--ticket-pad-y) + .5px + var(--ticket-notch) / 2));
  -webkit-clip-path: inset(0 0 calc(var(--ticket-notch) / 2 - .5px) 0);
  clip-path: inset(0 0 calc(var(--ticket-notch) / 2 - .5px) 0);
}
[data-bs-theme="dark"] .ai-account-credits-card {
  border-color: rgba(214, 177, 84, .38);
  background:
    radial-gradient(120% 150% at 0% 0%, rgba(255, 255, 255, .05), transparent 62%),
    linear-gradient(118deg, #23262c 0%, #27231a 55%, #2f2817 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}
[data-bs-theme="dark"] .ai-account-credits-info strong { color: #e9cd8c; }
[data-bs-theme="dark"] .ai-account-credits-card p { color: #b8a782; }
[data-bs-theme="dark"] .ai-account-credits-card .ai-account-credits-balance { border-left-color: rgba(214, 177, 84, .4); }
[data-bs-theme="dark"] .ai-account-credits-balance::before,
[data-bs-theme="dark"] .ai-account-credits-balance::after {
  box-shadow: inset 0 0 0 1px rgba(214, 177, 84, .45);
}
.ai-account-plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .5rem;
  margin-top: .2rem;
}
.ai-account-plan {
  position: relative;
  display: grid;
  gap: .2rem;
  padding: .8rem .45rem;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  background: var(--bs-tertiary-bg);
  color: var(--bs-body-color);
  font-family: inherit;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.ai-account-plan:hover:not(:disabled),
.ai-account-plan:focus-visible:not(:disabled) {
  border-color: rgba(var(--brand-rgb), .55);
  background: rgba(var(--brand-rgb), .07);
  outline: none;
}
.ai-account-plan strong { font-size: 1rem; }
.ai-account-plan span { color: var(--brand-dark); font-size: .8rem; font-weight: 600; }
.ai-account-plan small { color: var(--text-hint); font-size: .68rem; }
.ai-account-plan:disabled { opacity: .55; cursor: not-allowed; }
.ai-account-plan.is-loading { opacity: .6; }
.ai-account-plan-badge {
  position: absolute;
  top: .28rem;
  right: .28rem;
  padding: .06rem .3rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffcc4d, #f08c1e 62%, #e0631a);
  color: #fff;
  font-size: .64rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: .02em;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .55),
    0 6px 14px -8px rgba(190, 100, 10, .95);
  text-shadow: 0 1px 1px rgba(140, 70, 0, .35);
}
.ai-account-credit-hint {
  margin: .55rem 0 0;
  color: var(--text-hint);
  font-size: .72rem;
  line-height: 1.5;
}
.ai-account-pay {
  display: grid;
  gap: .6rem;
  justify-items: center;
  margin-top: .2rem;
  text-align: center;
}
.ai-account-pay[hidden] { display: none; }
.ai-account-pay-head { display: grid; gap: .15rem; }
.ai-account-pay-head strong { font-size: .95rem; }
.ai-account-pay-head span { color: var(--text-hint); font-size: .74rem; }
.ai-account-qr {
  display: grid;
  place-items: center;
  width: 204px;
  height: 204px;
  padding: .5rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 12px;
  background: #fff;
  box-sizing: border-box;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.ai-account-qr.is-paid {
  border-color: #22a06b;
  box-shadow: 0 0 0 3px rgba(34, 160, 107, .18);
}
.ai-account-qr-img { display: block; width: 100%; height: 100%; }
.ai-account-qr-loading { color: var(--text-hint); font-size: .76rem; }
.ai-account-pay-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .3rem 1.2rem;
  margin: 0;
  color: var(--text-hint);
  font-size: .76rem;
}
.ai-account-pay-meta b { color: var(--brand-dark); }
.ai-account-pay-state {
  margin: 0;
  color: var(--bs-body-color);
  font-size: .8rem;
  font-weight: 600;
}
.ai-account-pay-state.is-error { color: #d9534f; }
.ai-account-pay-tip { margin: 0; color: var(--text-hint); font-size: .7rem; }
.ai-account-pay-back { width: auto; }
.ai-search-quota-credits {
  margin-top: .55rem;
  padding-top: .55rem;
  border-top: 1px dashed var(--bs-border-color);
}
.ai-search-quota-credits[hidden] { display: none; }
.ai-search-quota-credit-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem;
  font-size: .8rem;
}
.ai-search-quota-credit-row strong { color: var(--brand-dark); }
.ai-search-quota-credit-note {
  margin: .3rem 0 0;
  color: var(--text-quiet);
  font-size: .72rem;
  line-height: 1.45;
}
@media (max-width: 420px) {
  .ai-account-plans { grid-template-columns: 1fr; }
}

.ai-account-profile-head {
  display: flex;
  align-items: center;
  min-height: 32px;
  margin: -.65rem 2.4rem .85rem 0;
}
.ai-account-profile-email {
  margin: 0;
  color: var(--bs-body-color);
  font-size: .92rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
  word-break: break-all;
}

.ai-account-quota-bar {
  height: 20px;
  margin: 0rem;
  border-radius: 6px;
}
.ai-account-quota-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.ai-account-quota-seg-label {
  position: relative;
  z-index: 1;
  max-width: calc(100% - 8px);
  padding: .1rem .42rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .82);
  color: var(--bs-body-color);
  font-size: .66rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}
[data-bs-theme="dark"] .ai-account-quota-seg-label {
  background: rgba(16, 18, 22, .68);
  color: #f2f4f7;
}
@media (max-width: 420px) {
  .ai-account-quota-bar { height: 20px; }
  .ai-account-quota-seg-label { font-size: .6rem; padding: .08rem .32rem; }
}

.ai-account-history { --ai-history-row: 72px; }
.ai-account-history-list {
  max-height: none;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.ai-account-history-list.is-scroll {
  height: calc(var(--ai-history-row) * 2.5 + .7rem);
  overflow-y: auto;
  overflow-x: hidden;
}
.ai-account-history-list::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.ai-account-history-item {
  box-sizing: border-box;
  height: var(--ai-history-row);
  min-height: var(--ai-history-row);
  align-content: center;
  overflow: hidden;
}
.ai-account-history-empty {
  box-sizing: border-box;
  min-height: var(--ai-history-row);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-account-quota-seg-label {
  background: none;
  padding: 0 .15rem;
  color: #fff;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .55), 0 0 2px rgba(0, 0, 0, .35);
}
[data-bs-theme="dark"] .ai-account-quota-seg-label {
  background: none;
  color: #fff;
}
.ai-account-quota-seg.is-used-up .ai-account-quota-seg-label {
  color: #111;
  text-shadow: 0 0 3px rgba(255, 255, 255, .95), 0 1px 0 rgba(255, 255, 255, .85);
}
[data-bs-theme="dark"] .ai-account-quota-seg.is-used-up .ai-account-quota-seg-label {
  color: #0b0d10;
  text-shadow: 0 0 4px rgba(255, 255, 255, .9), 0 1px 0 rgba(255, 255, 255, .8);
}
.ai-account-quota-seg { background: rgba(105, 115, 130, .45); }
.ai-account-quota-seg.is-visit { background: rgba(var(--brand-rgb), .42); }
.ai-account-quota-seg.is-login { background: rgba(216, 148, 38, .42); }
.ai-account-quota-seg.is-signin { background: rgba(23, 168, 143, .42); }
.ai-account-quota-seg.is-used-up { background: rgba(205, 211, 220, .55); }
[data-bs-theme="dark"] .ai-account-quota-seg.is-used-up { background: rgba(205, 211, 220, .28); }

[data-bs-theme="dark"] .ai-account-quota-seg.is-used-up {
  background: rgba(220, 225, 232, .72);
}
.ai-account-quota-seg.is-used-up { opacity: 1; }

.ai-account-quota-bar.is-all-empty .ai-account-quota-seg + .ai-account-quota-seg {
  border-left: 1px dashed rgba(88, 99, 115, .6);
}
[data-bs-theme="dark"] .ai-account-quota-bar.is-all-empty .ai-account-quota-seg + .ai-account-quota-seg {
  border-left-color: rgba(28, 34, 44, .55);
}

.ai-account-quota-seg.is-used .ai-account-quota-seg-label {
  color: #111;
  text-shadow: 0 0 3px rgba(255, 255, 255, .95), 0 1px 0 rgba(255, 255, 255, .85);
}
[data-bs-theme="dark"] .ai-account-quota-seg.is-used .ai-account-quota-seg-label {
  color: #0b0d10;
  text-shadow: 0 0 4px rgba(255, 255, 255, .9), 0 1px 0 rgba(255, 255, 255, .8);
}

.ai-account-profile-head {
  gap: .45rem;
}
.ai-account-profile-email {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ai-account-profile-signin {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}
.ai-account-profile-signin .ai-account-signin {
  width: auto;
  height: 28px;
  margin: 0;
  padding: 0 .55rem;
  border-style: solid;
  border-radius: 999px;
  font-size: .72rem;
  gap: .3rem;
  white-space: nowrap;
}
.ai-account-profile-signin .ai-account-signin i { font-size: .8rem; }
.ai-account-profile-signin .ai-account-signin-tip {
  top: calc(100% + 6px);
  bottom: auto;
  left: auto;
  right: 0;
  transform: none;
  max-width: 240px;
  text-align: left;
}

.ai-account-credits-balance {
  position: relative;
  display: flex;
  align-items: center;
  gap: .8rem;
}
.ai-account-credit-stub {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .16rem;
  min-width: 0;
}
.ai-account-credit-stub-label {
  color: #9a7c46;
  font-size: .64rem;
  font-weight: 600;
  letter-spacing: .05em;
  white-space: nowrap;
}
.ai-account-credits-points {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.7rem;
  padding: .08rem .45rem .12rem;
  border: 1px solid rgba(198, 150, 34, .7);
  border-radius: 9px;
  background: linear-gradient(180deg, #fff4cc 0%, #f9dd92 100%);
  color: #8a5a00;
  font-size: 1.16rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .7);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .8),
    0 2px 6px -3px rgba(140, 100, 10, .5);
}
.ai-account-credits-requests {
  min-width: 2.7rem;
  padding: .08rem .2rem;
  color: #7c5a12;
  font-size: 1.16rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
[data-bs-theme="dark"] .ai-account-credit-stub-label { color: #b8a782; }
[data-bs-theme="dark"] .ai-account-credits-points {
  border-color: rgba(230, 193, 100, .55);
  background: linear-gradient(180deg, rgba(122, 92, 20, .55) 0%, rgba(92, 68, 14, .45) 100%);
  color: #f6d67f;
  text-shadow: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .08),
    0 2px 8px -4px rgba(0, 0, 0, .8);
}
[data-bs-theme="dark"] .ai-account-credits-requests { color: #e9cd8c; }
@media (max-width: 420px) {
  .ai-account-credits-card { --ticket-pad-y: .7rem; gap: .6rem; padding: .7rem .8rem; }
  .ai-account-credits-card .ai-account-credits-balance { padding-left: .75rem; }
  .ai-account-credits-balance { gap: .6rem; }
  .ai-account-credits-points,
  .ai-account-credits-requests { font-size: 1.02rem; min-width: 2.35rem; }
}

[data-facet="content"] {
  --facet-fg: #1d4ed8; --facet-bg: #eff6ff; --facet-bd: #bfdbfe; --facet-dot: #2563eb;
}
[data-facet="character"] {
  --facet-fg: #6d28d9; --facet-bg: #f5f3ff; --facet-bd: #ddd6fe; --facet-dot: #7c3aed;
}
[data-facet="idea"] {
  --facet-fg: #be185d; --facet-bg: #fdf2f8; --facet-bd: #fbcfe8; --facet-dot: #db2777;
}
[data-facet="style"] {
  --facet-fg: #b45309; --facet-bg: #fffbeb; --facet-bd: #fde68a; --facet-dot: #d97706;
}
[data-facet="context"] {
  --facet-fg: #0f766e; --facet-bg: #f0fdfa; --facet-bd: #99f6e4; --facet-dot: #0d9488;
}
[data-facet="audience"] {
  --facet-fg: #15803d; --facet-bg: #f0fdf4; --facet-bd: #bbf7d0; --facet-dot: #16a34a;
}
[data-facet="default"] {
  --facet-fg: #475569; --facet-bg: #f8fafc; --facet-bd: #e2e8f0; --facet-dot: #94a3b8;
}

[data-bs-theme="dark"] [data-facet="content"] {
  --facet-fg: #93c5fd; --facet-bg: rgba(37, 99, 235, .18); --facet-bd: rgba(96, 165, 250, .38); --facet-dot: #60a5fa;
}
[data-bs-theme="dark"] [data-facet="character"] {
  --facet-fg: #c4b5fd; --facet-bg: rgba(124, 58, 237, .20); --facet-bd: rgba(167, 139, 250, .38); --facet-dot: #a78bfa;
}
[data-bs-theme="dark"] [data-facet="idea"] {
  --facet-fg: #f9a8d4; --facet-bg: rgba(219, 39, 119, .18); --facet-bd: rgba(244, 114, 182, .38); --facet-dot: #f472b6;
}
[data-bs-theme="dark"] [data-facet="style"] {
  --facet-fg: #fcd34d; --facet-bg: rgba(217, 119, 6, .18); --facet-bd: rgba(251, 191, 36, .38); --facet-dot: #fbbf24;
}
[data-bs-theme="dark"] [data-facet="context"] {
  --facet-fg: #5eead4; --facet-bg: rgba(13, 148, 136, .18); --facet-bd: rgba(45, 212, 191, .38); --facet-dot: #2dd4bf;
}
[data-bs-theme="dark"] [data-facet="audience"] {
  --facet-fg: #86efac; --facet-bg: rgba(22, 163, 74, .18); --facet-bd: rgba(74, 222, 128, .38); --facet-dot: #4ade80;
}
[data-bs-theme="dark"] [data-facet="default"] {
  --facet-fg: #cbd5e1; --facet-bg: rgba(100, 116, 139, .18); --facet-bd: rgba(148, 163, 184, .35); --facet-dot: #94a3b8;
}

.book-tag {
  border: 1px solid var(--facet-bd, var(--bs-border-color));
  background: var(--facet-bg, var(--bs-tertiary-bg));
  color: var(--facet-fg, var(--bs-secondary-color));
  transition: border-color .15s ease, filter .15s ease;
}
.book-tag:hover,
.book-tag:focus-visible {
  color: var(--facet-fg, var(--bs-body-color));
  border-color: var(--facet-dot, var(--brand));
  filter: brightness(.985);
}

.tag-cloud-item[data-facet] {
  position: relative;
  padding-left: 1.4rem;
}
.tag-cloud-item[data-facet]::before {
  content: "";
  position: absolute;
  left: .62rem;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--facet-dot, var(--bs-tertiary-color));
  transform: translateY(-50%);
}
.tag-cloud-item[data-facet]:hover,
.tag-cloud-item[data-facet]:focus-visible {
  color: var(--facet-fg, var(--brand));
  border-color: var(--facet-bd, rgba(var(--brand-rgb), .55));
}
[data-bs-theme="dark"] .tag-cloud-item[data-facet]:hover,
[data-bs-theme="dark"] .tag-cloud-item[data-facet]:focus-visible {
  color: var(--facet-fg, #eef1f6);
  border-color: var(--facet-bd, rgba(255, 255, 255, .22));
}

.tag-pill[data-facet]:not(.is-on) {
  --bs-btn-bg: var(--facet-bg);
  --bs-btn-border-color: var(--facet-bd);
  --bs-btn-color: var(--facet-fg);
  --bs-btn-hover-bg: var(--facet-bg);
  --bs-btn-hover-border-color: var(--facet-dot);
  --bs-btn-hover-color: var(--facet-fg);
  --bs-btn-active-bg: var(--facet-bg);
  --bs-btn-active-border-color: var(--facet-dot);
  --bs-btn-active-color: var(--facet-fg);
}

.tag-facet-nav {
  margin-top: 1rem;
  padding-top: .85rem;
  border-top: 1px solid var(--bs-border-color);
}
.tag-facet-nav-label {
  display: block;
  margin-bottom: .45rem;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--text-quiet);
}
.tag-facet-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .32rem .4rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: .75rem;
  color: var(--text-quiet);
}
.tag-facet-legend li {
  display: inline-flex;
}
.tag-facet-legend a {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  min-height: 24px;
  padding: .2rem .5rem;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: var(--bs-tertiary-bg);
  color: var(--text-quiet);
  line-height: 1.25;
  white-space: nowrap;
  text-decoration: none;
  transition: color .15s ease, border-color .15s ease, background-color .15s ease, transform .15s ease;
}
.tag-facet-legend a:hover {
  color: var(--facet-fg, var(--brand));
  border-color: var(--facet-bd, rgba(var(--brand-rgb), .45));
  background: var(--facet-bg, var(--bs-tertiary-bg));
  transform: translateY(-1px);
}
.tag-facet-legend a:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}
.tag-facet-legend a.is-on {
  color: var(--facet-fg, var(--brand));
  border-color: var(--facet-bd, rgba(var(--brand-rgb), .55));
  background: var(--facet-bg, rgba(var(--brand-rgb), .10));
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(13, 20, 30, .06);
}
.tag-facet-legend a.is-all {
  --facet-fg: var(--brand);
  --facet-bg: rgba(var(--brand-rgb), .10);
  --facet-bd: rgba(var(--brand-rgb), .45);
}
.tag-facet-legend .facet-dot {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--facet-dot, var(--bs-tertiary-color));
}
[data-bs-theme="dark"] .tag-facet-legend a {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .14);
}
[data-bs-theme="dark"] .tag-facet-legend a:hover {
  color: var(--facet-fg, #eef1f6);
  border-color: var(--facet-bd, rgba(255, 255, 255, .22));
  background: var(--facet-bg, rgba(255, 255, 255, .06));
}
[data-bs-theme="dark"] .tag-facet-legend a.is-on {
  color: var(--facet-fg, #eef1f6);
  border-color: var(--facet-bd, rgba(255, 255, 255, .20));
  background: var(--facet-bg, rgba(255, 255, 255, .08));
}
[data-bs-theme="dark"] .tag-facet-legend a.is-all {
  --facet-fg: #9bd3ff;
  --facet-bg: rgba(var(--brand-rgb), .18);
  --facet-bd: rgba(var(--brand-rgb), .50);
}

@media (max-width: 575.98px) {
  .tag-facet-legend { gap: .3rem; }
  .tag-facet-legend a { padding: .2rem .45rem; }
}

@media (max-width: 575.98px) {
  .tag-cloud-item[data-facet] { padding-left: 1.25rem; }
  .tag-cloud-item[data-facet]::before { left: .5rem; width: 5px; height: 5px; }
}

/* ---------------- 后台 AI 生成书单（/sj/booklists/generate） ---------------- */
.blgen-stages {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}
.blgen-stage {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .875rem;
  color: var(--bs-secondary-color);
}
.blgen-stage .bi { flex: 0 0 auto; font-size: 14px; }
.blgen-stage.is-start { color: var(--bs-body-color); font-weight: 600; }
.blgen-stage.is-start .bi { color: var(--bs-primary); animation: blgen-spin 1.3s linear infinite; }
.blgen-stage.is-done { color: var(--bs-body-color); }
.blgen-stage.is-done .bi { color: var(--bs-success); }
.blgen-stage-detail {
  margin-left: auto;
  padding-left: .75rem;
  font-size: .78rem;
  font-weight: 400;
  color: var(--bs-secondary-color);
  text-align: right;
}
@keyframes blgen-spin { to { transform: rotate(360deg); } }

.blgen-preview { min-width: 0; }
.blgen-item {
  display: flex;
  gap: .65rem;
  align-items: flex-start;
  padding: .45rem .5rem;
  border: 1px solid transparent;
  border-radius: 12px;
  transition: background .15s ease, border-color .15s ease, opacity .15s ease;
}
.blgen-item:hover { background: var(--bs-tertiary-bg); }
.blgen-item:not(:has(input:checked)) { opacity: .5; }
.blgen-item-ext { background: var(--bs-tertiary-bg); }
.blgen-pick {
  flex: 0 0 auto;
  padding-top: .7rem;
  cursor: pointer;
}
.blgen-pick .form-check-input { cursor: pointer; }
.blgen-pick-off {
  padding-top: .75rem;
  color: var(--bs-secondary-color);
  cursor: default;
}
.blgen-item-body { flex: 1; min-width: 0; }
.blgen-item-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin-top: .35rem;
  font-size: .78rem;
  color: var(--bs-secondary-color);
}
.blgen-item-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 .3rem;
  font-size: .72rem;
  font-weight: 800;
  color: rgba(var(--brand-rgb), .85);
  background: rgba(var(--brand-rgb), .1);
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
}
.blgen-adopt-card { position: sticky; top: 1rem; }
@media (max-width: 1199.98px) {
  .blgen-adopt-card { position: static; }
}
