:root {
  --daisy-green: #3B7A57;
  --daisy-green-hover: #4E9A70;
  --daisy-green-dark: #255239;
  --daisy-green-soft: #F0F7F4;
  --daisy-green-line: #B7E4C7;
  --daisy-bg: #f5f6f8;
  --daisy-card: #ffffff;
  --daisy-text: #181818;
  --daisy-subtext: #4a4a4d;
  --daisy-muted: #78787c;
  --daisy-line: #e9ecef;
  --shadow-sm: 0 4px 12px rgba(24, 32, 36, 0.04);
  --shadow-md: 0 10px 24px rgba(24, 32, 36, 0.08);
  --shadow-lg: 0 16px 36px rgba(24, 32, 36, 0.12);
}

html {
  -webkit-text-size-adjust: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

*, *::before, *::after {
  box-sizing: inherit;
}

body {
  margin: 0;
  font-family: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  background: var(--daisy-bg);
  color: var(--daisy-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  width: 100%;
}

.page-shell {
  max-width: 1200px;
  width: 92%;
  margin: 0 auto;
  padding: 30px 0 80px;
}

/* Top Navigation Header */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: linear-gradient(90deg, #f2fff7 0%, #ffffff 45%, #f4faff 100%);
  border: 1px solid var(--daisy-line);
  border-radius: 20px;
  padding: 12px 22px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  font-size: clamp(1.15rem, 1.8vw, 1.45rem);
  color: var(--daisy-green-dark);
  text-decoration: none;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}

.brand-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #eafaf1;
  border: 1.5px solid #bbf7d0;
  box-shadow: 0 3px 8px rgba(59, 122, 87, 0.14);
  overflow: hidden;
  flex-shrink: 0;
}

.brand-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Embedded Resume Widget inside Topbar (Desktop) */
.topbar-resume-slot {
  display: none;
  align-items: center;
  flex: 1;
  justify-content: center;
  max-width: 580px;
  min-width: 0;
}

.topbar-resume-slot.has-resume {
  display: flex;
}

/* Mobile Dedicated Resume Banner (Hidden on desktop / computer view) */
.mobile-resume-slot {
  display: none !important;
  width: 100%;
}

.topbar-resume-card,
.mobile-resume-card {
  background: linear-gradient(135deg, #1b3829 0%, #234f37 100%);
  color: #ffffff;
  border-radius: 999px;
  padding: 5px 14px 5px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 14px rgba(27, 56, 41, 0.18);
  min-width: 0;
}

.mobile-resume-card {
  border-radius: 14px;
  padding: 9px 14px;
}

.resume-left-group {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  flex: 1;
  min-width: 0;
}

.resume-badge-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.resume-meta-group {
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow: hidden;
  min-width: 0;
}

.resume-title-line {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  white-space: nowrap;
}

.resume-tag {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6ee7b7;
  font-weight: 800;
  flex-shrink: 0;
}

.resume-ch-title {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resume-sub-line {
  font-size: 11px;
  color: #d1fae5;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  white-space: nowrap;
}

.resume-book-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resume-sep {
  opacity: 0.6;
}

.btn-resume-compact {
  background: #10b981;
  color: #ffffff;
  font-weight: 800;
  font-size: 12px;
  padding: 5px 14px;
  border-radius: 20px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-resume-compact:hover {
  background: #059669;
  transform: translateY(-1px);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.btn-studio {
  background: #ffffff;
  color: var(--daisy-subtext);
  border: 1px solid var(--daisy-line);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-studio:hover {
  background: #f8fafc;
  border-color: var(--daisy-green);
  color: var(--daisy-green-dark);
}

/* 📢 Site Announcement / Notification Banner (Configurable via App Config) */
.site-notification-banner {
  display: none;
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1.5px solid #a7f3d0;
  border-radius: 14px;
  padding: 10px 18px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.08);
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  animation: fadeInBanner 0.3s ease-out;
}

.site-notification-banner.has-notification {
  display: flex !important;
}

.notification-content {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  font-weight: 800;
  color: #044d2d;
  line-height: 1.45;
  flex: 1;
  min-width: 0;
}

.notification-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.notification-text {
  flex: 1;
  min-width: 0;
  word-break: break-word;
  font-weight: 800;
  letter-spacing: -0.01em;
}

@keyframes fadeInBanner {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Controls Toolbar: Compact Lexile Filter on Left + Search on Right
   ========================================================================== */
.catalog-toolbar {
  display: flex;
  gap: 14px;
  align-items: stretch;
  margin-bottom: 18px;
}

/* 1. Left Side: Compact Lexile Level Section */
.filter-section {
  flex: 1 1 auto;
  position: relative;
  background: #ffffff;
  border: 1px solid var(--daisy-line);
  border-radius: 16px;
  padding: 10px 14px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}

.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  gap: 8px;
}

.btn-reset-order {
  position: absolute;
  right: 12px;
  bottom: 8px;
  background: #eafaf1;
  border: 1px solid #bbf7d0;
  color: #0b5c39;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  box-shadow: 0 1px 2px rgba(11, 92, 57, 0.08);
  z-index: 2;
}

.btn-reset-order:hover {
  background: #dcfce7;
  border-color: #86efac;
  color: #044d2d;
  box-shadow: 0 2px 5px rgba(11, 92, 57, 0.14);
  transform: translateY(-1px);
}

.filter-label {
  font-size: 0.84rem;
  font-weight: 800;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 5px;
}

.filter-guide-tag {
  font-size: 0.68rem;
  color: #64748b;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: #cbd5e1;
  text-underline-offset: 2px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.filter-guide-tag:hover {
  color: var(--daisy-green);
  text-decoration-color: var(--daisy-green);
}

.filter-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

/* Reduced Compact Filter Pill */
.filter-pill {
  background: #f8fafc;
  color: var(--daisy-subtext);
  border: 1px solid var(--daisy-line);
  padding: 3px 8px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  transition: all 0.2s ease;
  user-select: none;
  text-align: left;
}

.filter-pill .pill-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.filter-pill .pill-title {
  font-size: 0.74rem;
  font-weight: 800;
}

.filter-pill .pill-range {
  font-size: 0.62rem;
  font-weight: 600;
  color: #64748b;
}

.filter-pill .pill-count {
  background: rgba(0, 0, 0, 0.08);
  padding: 0 4px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
}

.filter-pill:hover {
  border-color: var(--daisy-green);
  background: #ffffff;
  transform: translateY(-1px);
}

.filter-pill.active {
  background: var(--daisy-green);
  color: #ffffff;
  border-color: var(--daisy-green);
  box-shadow: 0 3px 10px rgba(59, 122, 87, 0.22);
}

.filter-pill.active .pill-range {
  color: rgba(255, 255, 255, 0.85);
}

.filter-pill.active .pill-count {
  background: rgba(255, 255, 255, 0.28);
  color: #ffffff;
}

/* 2. Right Side: Search Bar Section */
.search-section {
  flex: 0 0 290px;
  max-width: 320px;
  background: #ffffff;
  border: 1px solid var(--daisy-line);
  border-radius: 16px;
  padding: 10px 14px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.search-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.search-label {
  font-size: 0.84rem;
  font-weight: 800;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 0 10px;
  transition: all 0.2s ease;
  min-height: 36px;
}

.search-input-wrap:focus-within {
  border-color: var(--daisy-green);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(3, 199, 90, 0.12);
}

.catalog-search-input {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 0.82rem;
  font-weight: 600;
  color: #1e293b;
  padding: 6px 0;
  outline: none;
}

.catalog-search-input::placeholder {
  color: #94a3b8;
  font-weight: 500;
}

.btn-search-clear {
  background: #e2e8f0;
  border: none;
  cursor: pointer;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #64748b;
  margin-left: 6px;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.btn-search-clear:hover {
  background: #fee2e2;
  color: #ef4444;
}

.filter-label {
  font-size: 0.84rem;
  font-weight: 800;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 5px;
}

.filter-guide-tag {
  font-size: 0.68rem;
  color: #64748b;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: #cbd5e1;
  text-underline-offset: 2px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.filter-guide-tag:hover {
  color: var(--daisy-green);
  text-decoration-color: var(--daisy-green);
}

.filter-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

/* Reduced Compact Filter Pill */
.filter-pill {
  background: #f8fafc;
  color: var(--daisy-subtext);
  border: 1px solid var(--daisy-line);
  padding: 3px 8px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  transition: all 0.2s ease;
  user-select: none;
  text-align: left;
}

.filter-pill .pill-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.filter-pill .pill-title {
  font-size: 0.74rem;
  font-weight: 800;
}

.filter-pill .pill-range {
  font-size: 0.62rem;
  font-weight: 600;
  color: #64748b;
}

.filter-pill .pill-count {
  background: rgba(0, 0, 0, 0.08);
  padding: 0 4px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
}

.filter-pill:hover {
  border-color: var(--daisy-green);
  background: #ffffff;
  transform: translateY(-1px);
}

.filter-pill.active {
  background: var(--daisy-green);
  color: #ffffff;
  border-color: var(--daisy-green);
  box-shadow: 0 3px 10px rgba(59, 122, 87, 0.22);
}

.filter-pill.active .pill-range {
  color: rgba(255, 255, 255, 0.85);
}

.filter-pill.active .pill-count {
  background: rgba(255, 255, 255, 0.28);
  color: #ffffff;
}

/* Responsive adjustment for toolbar */
@media (max-width: 890px) {
  .catalog-toolbar {
    flex-direction: column;
    gap: 10px;
  }
  .search-section {
    flex: 1;
    width: 100%;
  }
  .filter-section {
    flex: 1;
    width: 100%;
  }
}

/* Catalog Container & Book Cards Grid */
.catalog-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 18px;
}

.book-card {
  background: #fafbfd;
  border: 1px solid var(--daisy-line);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.book-card[draggable="true"] {
  user-select: none;
}

.book-card.is-dragging {
  opacity: 0.35;
  transform: scale(0.97);
  border: 2px dashed var(--daisy-green) !important;
  box-shadow: 0 12px 28px rgba(59, 122, 87, 0.22);
}

.book-card.drag-over-before {
  border-left: 5px solid var(--daisy-green) !important;
  transform: translateX(4px);
}

.book-card.drag-over-after {
  border-right: 5px solid var(--daisy-green) !important;
  transform: translateX(-4px);
}

.card-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.card-drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 24px;
  padding: 0 6px;
  color: #94a3b8;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  cursor: grab;
  user-select: none;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.drag-rect-icon {
  display: block;
  pointer-events: none;
}

.card-drag-handle:hover {
  background: #e2e8f0;
  color: var(--daisy-green-dark);
  border-color: #cbd5e1;
}

.card-drag-handle:active {
  cursor: grabbing;
}

.catalog-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(40px);
  background: #1e293b;
  color: #ffffff;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.catalog-toast.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.book-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #a3e6be;
  background: #ffffff;
}

.card-top {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 14px;
  align-items: start;
}

.card-cover-wrap {
  width: 100px;
  height: 135px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  background: linear-gradient(135deg, #8b5cf6, #3b82f6);
  flex-shrink: 0;
  display: block;
  text-decoration: none;
}

.card-cover-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.book-card:hover .card-cover-wrap img {
  transform: scale(1.04);
}

.card-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.badge-pill-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}

.mini-badge {
  font-size: 0.70rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 5px;
}

.badge-lexile {
  background: #eafaf1;
  color: #0b5c39;
  border: 1px solid #bbf7d0;
}

.badge-listen {
  background: #fef08a;
  color: #854d0e;
  border: 1px solid #fde047;
}

.badge-chapters {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.card-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--daisy-text);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.card-title a {
  color: inherit;
  text-decoration: none;
}

.card-title a:hover {
  color: var(--daisy-green-dark);
}

.card-author {
  font-size: 0.80rem;
  color: var(--daisy-muted);
  font-weight: 600;
  margin: 0;
}

.card-desc {
  margin: 4px 0 0 0;
  font-size: 0.82rem;
  color: #335c4e;
  font-weight: 500;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Collapsible Articles Section */
.book-articles-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-toggle-articles {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-size: 0.78rem;
  color: #475569;
  font-weight: 700;
  transition: all 0.2s ease;
  user-select: none;
  width: 100%;
}

.btn-toggle-articles:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.btn-toggle-articles.active {
  background: #e0f2fe;
  border-color: #bae6fd;
  color: #0369a1;
}

.toggle-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.toggle-indicator {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 800;
}

.chapter-preview-list {
  display: none;
  background: #ffffff;
  border: 1px solid var(--daisy-line);
  border-radius: 12px;
  padding: 10px 12px;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
  animation: fadeIn 0.15s ease;
}

/* Expand on mouse hover over book card OR when locked open */
.book-card:hover .chapter-preview-list,
.book-articles-section.expanded .chapter-preview-list,
.chapter-preview-list.show {
  display: flex !important;
}

.book-card:hover .btn-toggle-articles,
.btn-toggle-articles.active {
  background: #e0f2fe;
  border-color: #bae6fd;
  color: #0369a1;
}

.book-card:hover .toggle-indicator,
.btn-toggle-articles.active .toggle-indicator {
  color: #0284c7;
}

.chapter-preview-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.chapter-preview-item a.ch-link {
  color: var(--daisy-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.chapter-preview-item a.ch-link:hover {
  color: var(--daisy-green-dark);
  text-decoration: underline;
}

.ch-tags {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.ch-lexile-badge {
  font-size: 0.70rem;
  font-weight: 800;
  color: #0b5c39;
  background: #eafaf1;
  border: 1px solid #bbf7d0;
  padding: 1px 5px;
  border-radius: 4px;
}

.ch-grade-badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: #1e40af;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 1px 4px;
  border-radius: 4px;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr;
  margin-top: 2px;
}

.btn-read {
  background: var(--daisy-green);
  color: #ffffff;
  text-decoration: none;
  text-align: center;
  font-weight: 800;
  font-size: 0.82rem;
  padding: 8px 14px;
  border-radius: 10px;
  box-shadow: 0 3px 8px rgba(3, 199, 90, 0.18);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
}

.btn-read:hover {
  background: var(--daisy-green-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(3, 199, 90, 0.25);
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--daisy-muted);
  font-size: 0.95rem;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid var(--daisy-line);
}

/* Site Footer */
.site-footer {
  margin-top: 40px;
  padding: 20px 0 10px;
  border-top: 1px solid var(--daisy-line);
  text-align: center;
}

.footer-content {
  font-size: 0.82rem;
  color: #94a3b8;
  font-weight: 500;
  letter-spacing: 0.01em;
}

@media (max-width: 900px) {
  .topbar-resume-slot {
    display: none !important;
  }
  .mobile-resume-slot.has-resume {
    display: block !important;
    margin-bottom: 12px;
  }
}

@media (max-width: 768px) {
  .page-shell {
    width: 100%;
    padding: 12px 14px 60px;
  }
  .topbar {
    padding: 10px 14px;
    border-radius: 16px;
    margin-bottom: 12px;
    gap: 10px;
  }
  .brand {
    font-size: 1.15rem;
    gap: 8px;
  }
  .brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }
  .mobile-resume-card {
    border-radius: 14px;
    padding: 8px 12px;
    gap: 10px;
  }
  .resume-left-group {
    gap: 8px;
    min-width: 0;
  }
  .resume-ch-title {
    font-size: 13px;
    max-width: 160px;
  }
  .btn-resume-compact {
    padding: 5px 12px;
    font-size: 11.5px;
  }
  .catalog-toolbar {
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
  }
  .filter-section {
    width: 100%;
    padding: 8px 10px;
    border-radius: 14px;
    margin-bottom: 0;
  }
  .search-section {
    width: 100%;
    max-width: 100%;
    padding: 8px 10px;
    border-radius: 14px;
  }
  .search-input-wrap {
    min-height: 34px;
  }
  .filter-bar {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 2px 2px 4px 2px;
    gap: 5px;
    scrollbar-width: none;
  }
  .filter-bar::-webkit-scrollbar {
    display: none;
  }
  .filter-pill {
    flex-shrink: 0;
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 0.72rem;
  }
  .books-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .book-card {
    padding: 14px;
    border-radius: 14px;
  }
  .card-top {
    grid-template-columns: 85px 1fr;
    gap: 12px;
  }
  .card-cover-wrap {
    width: 85px;
    height: 115px;
    border-radius: 10px;
  }
  .card-title {
    font-size: 1.0rem;
  }
  .card-desc {
    font-size: 0.80rem;
    line-height: 1.38;
    -webkit-line-clamp: 5;
  }
  .btn-toggle-articles {
    padding: 8px 12px;
    min-height: 36px;
    font-size: 0.76rem;
  }
  .btn-read {
    height: 38px;
    font-size: 0.82rem;
  }
  .chapter-preview-list {
    max-height: 200px;
    padding: 8px 10px;
  }
  .ch-link {
    font-size: 0.80rem;
    word-break: break-word;
  }
}

@media (max-width: 480px) {
  .page-shell {
    padding: 10px 10px 50px;
  }
  .topbar {
    padding: 8px 10px;
    border-radius: 14px;
  }
  .brand {
    font-size: 1.02rem;
    gap: 6px;
  }
  .brand-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
  }
  .mobile-resume-card {
    padding: 6px 10px;
    gap: 8px;
  }
  .resume-badge-icon {
    width: 24px;
    height: 24px;
    font-size: 13px;
  }
  .resume-ch-title {
    font-size: 11.5px;
    max-width: 110px;
  }
  .btn-resume-compact {
    padding: 4px 8px;
    font-size: 11px;
  }
  .card-top {
    grid-template-columns: 78px 1fr;
    gap: 10px;
  }
  .card-cover-wrap {
    width: 78px;
    height: 108px;
  }
  .card-title {
    font-size: 0.94rem;
  }
  .card-desc {
    font-size: 0.78rem;
    -webkit-line-clamp: 5;
  }
  .btn-toggle-articles {
    padding: 6px 10px;
    font-size: 0.72rem;
  }
}

