.book-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 30px;
  margin-top: 30px;
  min-height: 800px;
}

.sidebar-card {
  position: sticky;
  top: 90px;
  overflow-y: auto;
  max-height: calc(100vh - 120px);
  padding: 24px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
}

.filter-section {
  margin-bottom: 30px;
}

.filter-title {
  margin-bottom: 12px;
  padding-left: 5px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.nav-all-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
}

.nav-all-btn:hover {
  background-color: var(--bg-body);
}

.nav-all-btn.active {
  background-color: var(--text-main);
  color: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .15);
}

.nav-group {
  margin-bottom: 4px;
}

.nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-sub);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}

.nav-header:hover {
  background-color: var(--bg-body);
  color: var(--text-main);
}

.nav-header.has-active-child {
  color: var(--primary-color);
}

.nav-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #cbd5e1;
  transition: background .2s;
}

.nav-header:hover .nav-dot,
.nav-header.has-active-child .nav-dot {
  background-color: var(--primary-color);
}

.nav-arrow {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  transition: transform .2s;
}

.nav-header.expanded .nav-arrow {
  transform: rotate(180deg);
}

.nav-children {
  display: none;
  margin-top: 2px;
  margin-left: 19px;
  padding-left: 20px;
  border-left: 1px solid var(--border-color);
}

.nav-children.show {
  display: block;
  animation: slideDown .2s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav-child-item {
  display: block;
  width: 100%;
  margin-bottom: 2px;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all .2s;
}

.nav-child-item:hover {
  background-color: #f8fafc;
  color: var(--text-main);
}

.nav-child-item.active {
  background-color: var(--primary-light, #fff7ed);
  color: var(--primary-color);
  font-weight: 700;
}

.search-header {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  padding: 20px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
}

.search-wrapper {
  position: relative;
  flex: 1;
}

.search-icon {
  position: absolute;
  top: 50%;
  left: 15px;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-input {
  width: 100%;
  height: 48px;
  padding: 0 48px 0 45px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  outline: none;
  color: var(--text-main);
  font-size: 15px;
  transition: all .2s;
}

.search-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(234, 88, 12, .1);
}

.search-clear {
  position: absolute;
  top: 50%;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: #94a3b8;
  background: transparent;
  cursor: pointer;
  transform: translateY(-50%);
  transition: color .15s ease, background .15s ease;
}

.search-clear:hover,
.search-clear:focus-visible {
  color: #475569;
  background: #f1f5f9;
}

.search-clear.hidden {
  display: none;
}

.search-clear svg {
  width: 16px;
  height: 16px;
}

.legacy-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 50;
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .12);
}

.legacy-suggestions.hidden {
  display: none;
}

.legacy-suggestions button {
  display: block;
  width: 100%;
  padding: 11px 14px 11px 44px;
  border: 0;
  background: #fff;
  color: var(--text-main);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.legacy-suggestions button:hover {
  background: #fff7ed;
  color: var(--primary-color);
}

.search-btn {
  padding: 0 32px;
  border: 0;
  border-radius: 10px;
  background: var(--primary-color);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
}

.search-btn:hover {
  background: var(--primary-hover);
}

.control-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  color: var(--text-sub);
  font-size: 13px;
}

.sort-select {
  border: 0;
  background: transparent;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
}

.suggestion-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.suggestion-chip {
  padding: 7px 12px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: #fff;
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 700;
}

.book-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.store-page-more {
  display: flex;
  justify-content: center;
  margin: 22px 0 8px;
}

.book-item {
  position: relative;
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 56px;
  align-items: center;
  column-gap: 20px;
  overflow: hidden;
  min-height: 106px;
  padding: 8px 20px 8px 8px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  cursor: pointer;
  transition: all .2s;
}

.book-item:hover {
  transform: translateY(-2px);
  border-color: #fed7aa;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, .05);
}

.book-item::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  background: var(--primary-color);
  opacity: 0;
  transition: opacity .2s;
}

.book-item:hover::before {
  opacity: 1;
}

.book-cover {
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  width: 120px;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: #f1f5f9;
}

.book-cover-fallback,
.detail-cover {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
  color: var(--text-main);
  font-size: 22px;
  font-weight: 800;
}

.book-cover-image {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-cover-fallback {
  position: relative;
  z-index: 0;
}

.book-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.book-title {
  margin: 0 0 7px;
  color: var(--text-main);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  word-break: break-word;
}

.book-item:hover .book-title {
  color: var(--primary-color);
}

.book-code {
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  background: #f1f5f9;
  color: var(--text-sub);
  font-family: monospace;
  font-size: 14px;
  font-weight: 600;
}

.book-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 0;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}

.tag-specialty {
  display: inline-flex;
  align-items: center;
  max-width: 220px;
  overflow: hidden;
  padding: 2px 8px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #fff;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meta-icon {
  display: flex;
  align-items: center;
  gap: 6px;
}

.book-actions {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding-left: 14px;
  border-left: 1px dashed var(--border-color);
}

.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  background: #fff;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .2s;
}

.book-item:hover .action-btn {
  border-color: var(--primary-color);
  background: var(--primary-light, #fff7ed);
  color: var(--primary-color);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}

.page-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #fff;
  color: var(--text-sub);
  font-size: 14px;
  transition: all .2s;
}

.page-btn:hover {
  border-color: var(--text-main);
  color: var(--text-main);
}

.page-btn.active {
  border-color: var(--text-main);
  background: var(--text-main);
  color: #fff;
}

.page-btn.page-nav {
  width: auto;
  min-width: 64px;
}

.page-btn.disabled {
  pointer-events: none;
  color: #cbd5e1;
  background: #f8fafc;
}

.page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 36px;
  color: var(--text-muted);
  font-weight: 800;
}

.page-total {
  display: inline-flex;
  align-items: center;
  height: 36px;
  margin-left: 6px;
  color: var(--text-muted);
  font-size: 13px;
}

.mobile-sidebar-header,
.mobile-filter-trigger,
.sidebar-overlay {
  display: none;
}

.breadcrumb {
  padding: 20px 0;
  color: var(--text-sub);
  font-size: 13px;
}

.breadcrumb span {
  margin: 0 8px;
  color: #cbd5e0;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 30px;
  margin-bottom: 60px;
}

.card {
  overflow: hidden;
  margin-bottom: 24px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-card);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}

.info-header {
  display: flex;
  gap: 30px;
  padding: 30px;
}

.info-header .book-cover {
  width: 140px;
  height: 105px;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .1);
}

.info-header .book-cover.detail-cover {
  display: grid;
  height: 105px;
  place-items: center;
}

.info-content {
  flex: 1;
  min-width: 0;
}

.std-title {
  margin-bottom: 10px;
  color: var(--text-main);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.3;
}

.std-code {
  display: inline-block;
  margin-bottom: 25px;
  padding: 4px 12px;
  border-radius: 6px;
  background: #f1f5f9;
  color: var(--text-sub);
  font-family: monospace;
  font-size: 18px;
  font-weight: 600;
}

.meta-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 20px;
  padding: 20px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #f8fafc;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-label {
  color: var(--text-light, #94a3b8);
  font-size: 12px;
  font-weight: 700;
}

.meta-value {
  color: var(--text-main);
  font-size: 14px;
  font-weight: 600;
}

.detail-category-tag {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 5px;
  color: #fff;
}

.toc-header {
  display: flex;
  align-items: center;
  padding: 20px 30px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 18px;
  font-weight: 800;
}

.toc-header::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 20px;
  margin-right: 12px;
  border-radius: 2px;
  background: var(--primary-color);
}

.toc-list {
  padding: 0;
}

.toc-item {
  display: flex;
  justify-content: space-between;
  padding: 14px 30px;
  border-bottom: 1px dashed var(--border-color);
  color: var(--text-main);
  font-size: 14px;
  transition: background .2s;
}

.toc-item:last-child {
  border-bottom: 0;
}

.toc-item:hover {
  background-color: #fff7ed;
  color: var(--primary-color);
}

.toc-footer {
  padding: 20px;
  border-top: 1px solid var(--border-color);
  background: #f8fafc;
  color: var(--text-sub);
  font-size: 13px;
  text-align: center;
}

.book-preview-panel {
  position: relative;
  display: grid;
  justify-items: center;
  overflow: visible;
  padding: 20px;
  background: #f8fafc;
}

.book-preview-panel::after {
  content: none;
}

.book-preview-image {
  display: block;
  width: min(100%, 560px);
  height: auto;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
}

.book-preview-fallback {
  display: none;
  width: 100%;
  padding: 32px 20px;
  border: 1px dashed var(--border-color);
  border-radius: 8px;
  background: #fff;
  color: var(--text-sub);
  text-align: center;
}

.book-preview-panel.preview-failed .book-preview-image {
  display: none;
}

.book-preview-panel.preview-failed .book-preview-fallback {
  display: block;
}

.book-preview-panel.preview-failed::after {
  content: none;
}

.book-preview-empty {
  display: grid;
  gap: 10px;
  margin: 20px;
  padding: 30px 20px;
  border: 1px dashed var(--border-color);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--text-sub);
  text-align: center;
}

.book-preview-empty strong {
  color: var(--text-main);
  font-size: 16px;
}

.book-preview-empty span {
  font-size: 13px;
  line-height: 1.6;
}

.app-card {
  position: sticky;
  top: 90px;
  z-index: 1;
  padding: 30px;
  background: linear-gradient(145deg, #1e293b, #0f172a);
  color: #fff;
  text-align: center;
}

.lock-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  font-size: 24px;
}

.app-title {
  margin-bottom: 10px;
  font-size: 18px;
  font-weight: 700;
}

.app-desc {
  margin-bottom: 25px;
  color: #cbd5e0;
  font-size: 13px;
  line-height: 1.6;
}

.qr-box {
  display: grid;
  place-items: center;
  width: 140px;
  height: 140px;
  margin: 0 auto 20px;
  padding: 8px;
  border-radius: 8px;
  background: #fff;
}

.legacy-client-qr {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 6px;
  object-fit: contain;
}

.qr-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border: 1px dashed #cbd5e1;
  border-radius: 6px;
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
}

.download-btn {
  display: block;
  width: 100%;
  margin-bottom: 15px;
  padding: 12px;
  border: 0;
  border-radius: 8px;
  background: var(--primary-color);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
}

.download-btn:hover {
  background: var(--primary-hover);
}

.platform-icons {
  display: flex;
  justify-content: center;
  gap: 15px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.tips-card {
  margin-top: 20px;
  padding: 20px;
}

.tips-title {
  margin-bottom: 12px;
  color: var(--text-main);
  font-size: 14px;
  font-weight: 700;
}

.tips-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tips-list li {
  position: relative;
  margin-bottom: 10px;
  padding-left: 20px;
  color: var(--text-sub);
  font-size: 12px;
}

.tips-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #10b981;
  font-weight: 700;
}

.legacy-related-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
}

.legacy-related-list .book-card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: center;
  column-gap: 18px;
  min-height: 106px;
  margin-bottom: 0;
  padding: 8px 16px 8px 8px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #fff;
}

.legacy-related-list .book-card .book-cover {
  width: 120px;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
  color: var(--text-main);
  font-size: 18px;
  font-weight: 800;
}

.legacy-related-list .book-card .book-body {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.legacy-related-list .book-card h3 {
  overflow: hidden;
  margin: 0;
  color: var(--text-main);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legacy-related-list .book-card .book-category-tag {
  justify-self: start;
  max-width: 100%;
  overflow: hidden;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legacy-related-list .book-card .muted,
.legacy-related-list .book-card .book-desc {
  overflow: hidden;
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .main {
    padding-bottom: 18px;
  }

  .book-layout,
  .detail-layout {
    grid-template-columns: 1fr;
    margin-top: 20px;
  }

  .sidebar-card {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 2000;
    display: block;
    overflow-y: auto;
    width: 280px;
    max-height: 100vh;
    border-right: 1px solid var(--border-color);
    border-radius: 0;
    box-shadow: none;
    transform: translateX(-100%);
    transition: transform .3s cubic-bezier(.4, 0, .2, 1);
    visibility: hidden;
  }

  .sidebar-card.open {
    transform: translateX(0);
    visibility: visible;
    box-shadow: 10px 0 30px rgba(0, 0, 0, .1);
  }

  .sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 1999;
    display: block;
    background: rgba(0, 0, 0, .5);
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(2px);
    transition: opacity .3s;
  }

  .sidebar-overlay.show {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
  }

  .mobile-sidebar-title {
    color: var(--text-main);
    font-size: 16px;
    font-weight: 800;
  }

  .mobile-sidebar-close {
    padding: 4px;
    border: 0;
    background: transparent;
    color: var(--text-muted);
  }

  .mobile-filter-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-bottom: 20px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: #fff;
    color: var(--text-main);
    font-weight: 700;
  }

  .book-actions {
    display: none;
  }

  .book-item {
    grid-template-columns: 84px minmax(0, 1fr);
    column-gap: 14px;
    min-height: 112px;
    padding: 10px;
  }

  .book-cover {
    width: 84px;
    aspect-ratio: 4 / 3;
  }

  .book-meta {
    flex-wrap: wrap;
    gap: 10px;
  }

  .search-header {
    padding: 12px;
  }

  .search-btn {
    padding: 0 20px;
  }

  .info-header {
    padding: 10px;
  }

  .info-header .book-cover {
    display: none;
  }

  .std-title {
    font-size: 20px;
  }

  .meta-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px;
  }
}

@media (max-width: 560px) {
  .book-layout,
  .detail-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    margin-top: 8px;
    min-height: 0;
  }

  .book-layout > .content,
  .detail-layout > .content,
  .detail-layout > main,
  .detail-layout > aside {
    min-width: 0;
    max-width: 100%;
  }

  .book-layout > main,
  .search-header,
  .search-wrapper {
    min-width: 0;
    max-width: 100%;
  }

  .search-header {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr 68px;
    gap: 8px;
    margin-bottom: 7px;
    padding: 6px;
    border-radius: 10px;
  }

  .search-input {
    height: 38px;
    padding: 0 38px 0 36px;
    border-radius: 8px;
    font-size: 13px;
  }

  .search-icon {
    left: 12px;
    width: 16px;
    height: 16px;
  }

  .search-clear {
    right: 8px;
    width: 26px;
    height: 26px;
  }

  .search-btn {
    width: 68px;
    min-width: 0;
    height: 38px;
    padding: 0;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 13px;
  }

  .mobile-filter-trigger {
    min-height: 36px;
    margin-bottom: 7px;
    padding: 7px 10px;
    border-radius: 10px;
    font-size: 13px;
  }

  .control-bar {
    align-items: flex-start;
    gap: 5px;
    margin-bottom: 7px;
    padding: 0 2px;
    font-size: 12px;
  }

  .suggestion-row {
    overflow: visible;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
    max-width: calc(100vw - 20px);
    margin-bottom: 6px;
    padding-bottom: 0;
    scrollbar-width: none;
  }

  .suggestion-row::-webkit-scrollbar {
    display: none;
  }

  .suggestion-chip {
    flex: 0 0 auto;
    padding: 6px 10px;
    font-size: 12px;
    white-space: nowrap;
  }

  .suggestion-chip:nth-child(n+5) {
    display: none;
  }

  .book-list {
    gap: 10px;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .book-item {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    align-items: start;
    min-height: 118px;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    column-gap: 12px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, .04);
  }

  .book-item:last-child {
    border-bottom: 1px solid var(--border-color);
  }

  .book-item:hover {
    transform: none;
    box-shadow: none;
  }

  .book-item::before {
    display: none;
  }

  .book-cover {
    width: 88px;
    align-self: start;
    margin-top: 1px;
    border-radius: 8px;
  }

  .book-cover-image {
    object-fit: cover;
  }

  .book-cover-fallback {
    font-size: 18px;
  }

  .book-title {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 5px;
    font-size: 15px;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .book-code {
    margin-bottom: 6px;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 11px;
  }

  .book-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px 8px;
    font-size: 11px;
    line-height: 1.3;
  }

  .tag-specialty {
    grid-column: 1 / -1;
    width: fit-content;
    max-width: 100%;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 11px;
  }

  .meta-icon {
    gap: 4px;
    min-width: 0;
  }

  .meta-icon svg {
    display: none;
  }

  .doc-type-icon {
    display: none;
  }

  .pagination {
    gap: 6px;
    margin-top: 14px;
  }

  .page-btn {
    min-width: 34px;
    height: 34px;
    border-radius: 7px;
    font-size: 13px;
  }

  .page-btn.page-nav {
    min-width: 58px;
  }

  .detail-layout {
    width: 100%;
  }

  .breadcrumb {
    display: flex;
    align-items: center;
    overflow: hidden;
    gap: 6px;
    min-height: 38px;
    padding: 10px 0 8px;
    font-size: 12px;
    line-height: 1.35;
    white-space: nowrap;
  }

  .breadcrumb span {
    flex: 0 0 auto;
    margin: 0;
  }

  .breadcrumb span:last-child {
    overflow: hidden;
    flex: 1 1 auto;
    min-width: 0;
    color: var(--text-main) !important;
    font-weight: 600;
    text-overflow: ellipsis;
  }

  .detail-layout > aside {
    display: grid;
    min-width: 0;
    gap: 10px;
  }

  .detail-layout .card {
    overflow: hidden;
    margin-bottom: 14px;
    border-radius: 12px;
  }

  .info-header {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    align-items: center;
    gap: 9px 11px;
    padding: 11px;
  }

  .info-header .book-cover,
  .info-header .book-cover.detail-cover,
  .detail-cover {
    justify-self: start;
    width: 92px;
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .info-content {
    display: contents;
  }

  .std-title,
  .detail-title {
    margin-bottom: 4px;
    font-size: 17px;
    line-height: 1.28;
    text-align: left;
  }

  .std-code,
  .detail-code {
    margin-bottom: 0;
    padding: 3px 8px;
    font-size: 12px;
    text-align: left;
  }

  .detail-actions {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .detail-actions .btn {
    min-height: 38px;
    font-size: 13px;
  }

  .meta-grid {
    grid-column: 1 / -1;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 7px;
  }

  .meta-item {
    min-height: 46px;
    padding: 7px 8px;
    border-radius: 10px;
  }

  .meta-label {
    font-size: 11px;
  }

  .meta-value {
    font-size: 13px;
  }

  .meta-grid .meta-item:first-child {
    grid-column: 1 / -1;
    min-height: 40px;
  }

  .detail-category-tag {
    max-width: 100%;
    padding: 3px 8px;
    line-height: 1.35;
    text-align: center;
    white-space: normal;
  }

  .book-preview-panel {
    position: relative;
    overflow: visible;
    padding: 6px;
    background: #f8fafc;
  }

  .book-preview-panel::after {
    content: none;
  }

  .toc-header {
    padding: 15px 18px;
    font-size: 16px;
  }

  .toc-header::before {
    height: 18px;
    margin-right: 10px;
  }

  .book-preview-panel.preview-failed::after {
    content: none;
  }

  .book-preview-image {
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  .legacy-related-list {
    gap: 10px;
    overflow: visible;
    padding: 10px;
    border: 0;
    border-radius: 0;
    background: #f8fafc;
  }

  .legacy-related-list .book-card {
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: start;
    min-height: 96px;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, .04);
    column-gap: 10px;
  }

  .legacy-related-list .book-card:last-child {
    border-bottom: 1px solid var(--border-color);
  }

  .legacy-related-list .book-card .book-cover {
    width: 72px;
    border-radius: 7px;
  }

  .legacy-related-list .book-card .book-body {
    gap: 5px;
  }

  .legacy-related-list .book-card h3 {
    display: -webkit-box;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.35;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .legacy-related-list .book-card .book-category-tag {
    max-width: 100%;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 10.5px;
    white-space: normal;
  }

  .legacy-related-list .book-card .muted,
  .legacy-related-list .book-card .book-desc {
    font-size: 11px;
    line-height: 1.35;
    white-space: normal;
  }

  .legacy-related-list .book-card .book-desc {
    display: none;
  }

  .app-card,
  .tips-card {
    padding: 14px;
    border-radius: 12px;
  }

  .app-desc br {
    display: none;
  }

  .book-preview-panel {
    padding: 6px;
  }

  .book-preview-panel::after {
    content: none;
  }

  .legacy-related-list .book-card {
    min-height: 90px;
    padding: 9px;
    column-gap: 9px;
  }

  .legacy-related-list .book-card .book-cover {
    width: 66px;
  }

  .legacy-related-list .book-card h3 {
    font-size: 13.5px;
    line-height: 1.32;
  }

  .app-card {
    display: grid;
    gap: 8px;
    padding: 14px 13px;
  }

  .lock-icon {
    width: 44px;
    height: 44px;
    margin-bottom: 4px;
    font-size: 19px;
  }

  .app-title {
    margin-bottom: 2px;
    font-size: 16px;
  }

  .app-desc {
    margin-bottom: 4px;
    font-size: 12px;
    line-height: 1.45;
  }

  .download-btn {
    min-height: 38px;
    margin-bottom: 4px;
    padding: 9px 10px;
  }

  .platform-icons {
    gap: 10px;
    font-size: 10.5px;
  }

  .tips-card {
    padding: 13px;
  }

  .tips-title {
    margin-bottom: 8px;
    font-size: 13px;
  }

  .tips-list li {
    margin-bottom: 7px;
    font-size: 11.5px;
  }
}

@media (max-width: 560px) {
  .breadcrumb {
    display: none;
  }

  .card {
    border-radius: 12px;
  }

  .info-header {
    gap: 10px;
    padding: 12px;
  }

  .detail-cover {
    width: 76px;
    min-width: 76px;
  }

  .info-content {
    min-width: 0;
  }

  .info-content .std-title,
  #stdName {
    font-size: 17px;
    line-height: 1.32;
  }

  .meta-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    margin-top: 8px;
  }

  .meta-item {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    align-items: start;
    gap: 8px;
    min-height: 0;
    padding: 7px 8px;
  }

  .meta-value {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .toc-header {
    padding: 12px 14px;
  }

  .book-preview-empty,
  .toc-footer {
    padding: 12px 14px;
    font-size: 12px;
    line-height: 1.45;
  }

  .related-card {
    margin-top: 10px;
  }

  .app-card {
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
  }

  .lock-icon {
    grid-row: span 2;
    margin: 0;
  }

  .app-title,
  .app-desc {
    margin: 0;
    text-align: left;
  }

  .download-btn,
  .platform-icons {
    grid-column: 1 / -1;
  }

  .pagination {
    justify-content: center;
    gap: 6px;
    margin: 10px 0 4px;
  }

  .page-btn {
    min-width: 34px;
    height: 34px;
    padding: 0 9px;
    border-radius: 9px;
    font-size: 12px;
  }

  .page-btn.page-nav {
    min-width: 72px;
  }
}
