/* ==========================================================================
   MANGA PLATFORM & READER - MODERN DARK STYLESHEET
   Supports EJS Server-Side Rendering, Glassmorphism & SEO-Friendly Layout
   ========================================================================== */

:root {
  --bg-body: #0a0e17;
  --bg-surface: #111827;
  --bg-card: #151d2d;
  --bg-card-hover: #1c263c;
  --bg-nav: rgba(10, 14, 23, 0.88);
  --bg-elevated: #1e293b;
  --bg-input: #0d1320;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.18);
  --border-glow: rgba(244, 63, 94, 0.35);

  --accent-rose: #f43f5e;
  --accent-rose-hover: #e11d48;
  --accent-violet: #8b5cf6;
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-dim: #475569;

  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 24px rgba(244, 63, 94, 0.28);

  --font-sans: 'Prompt', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --max-w: 1380px;
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(244, 63, 94, 0.07) 0%, transparent 42%),
    radial-gradient(circle at 88% 82%, rgba(139, 92, 246, 0.06) 0%, transparent 45%);
  background-attachment: fixed;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-body);
}

::-webkit-scrollbar-thumb {
  background: #273449;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #3b4d6a;
}

/* Screen Reader Only Utility */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ==========================================================================
   NAVBAR
   ========================================================================== */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-nav);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.3s ease;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 70px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.brand-logo {
  background: linear-gradient(135deg, var(--accent-rose), #e11d48);
  color: #fff;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-weight: 900;
  font-size: 1.2rem;
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.4);
}

.brand-text span {
  background: linear-gradient(90deg, #fff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-sub {
  display: block;
  font-size: 0.68rem;
  color: var(--accent-rose);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
}

.nav-link {
  padding: 0.55rem 0.95rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap !important;
  flex-shrink: 0;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.nav-link.active {
  color: var(--accent-rose);
  font-weight: 600;
}

.nav-search {
  position: relative;
  width: 280px;
}

.nav-search input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.5rem 1rem 0.5rem 2.4rem;
  font-size: 0.88rem;
  outline: none;
  transition: all 0.2s ease;
}

.nav-search input:focus {
  border-color: var(--accent-rose);
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.25);
  background: #0f172a;
}

.nav-search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
  pointer-events: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.4rem;
}

/* ==========================================================================
   BUTTONS & BADGES
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.3rem;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.22s ease;
  white-space: nowrap;
  color: #fff;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-rose), #e11d48);
  color: #fff;
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(244, 63, 94, 0.45);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-hover);
  color: #fff;
}

.btn-cyan {
  background: linear-gradient(135deg, #0891b2, #06b6d4);
  color: #fff;
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.3);
}

.btn-cyan:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.4);
}

.btn-success {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.btn-success:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #047857, #059669);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
  color: #ffffff;
}

.btn-warning {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.btn-warning:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45);
  color: #ffffff;
}

.btn-danger {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.45);
  color: #ffffff;
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
  border-radius: var(--radius-xs);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: var(--radius-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-million {
  background: rgba(244, 63, 94, 0.15);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.badge-webtoon {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-gomanga {
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.badge-readrealm {
  background: rgba(56, 189, 248, 0.15);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.badge-darkmanga {
  background: rgba(99, 102, 241, 0.18);
  color: #c7d2fe;
  border: 1px solid rgba(129, 140, 248, 0.38);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.25);
}

.badge-mangary {
  background: rgba(20, 184, 166, 0.18);
  color: #5eead4;
  border: 1px solid rgba(45, 212, 191, 0.38);
  box-shadow: 0 0 10px rgba(20, 184, 166, 0.25);
}

.badge-manghaha {
  background: rgba(245, 158, 11, 0.18);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.38);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.25);
}

.badge-finmanga {
  background: rgba(236, 72, 153, 0.18);
  color: #fbcfe8;
  border: 1px solid rgba(244, 114, 182, 0.38);
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.25);
}

.badge-whytoon {
  background: rgba(168, 85, 247, 0.18);
  color: #e9d5ff;
  border: 1px solid rgba(192, 132, 252, 0.38);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.25);
}

.badge-okdoujin {
  background: rgba(234, 88, 12, 0.18);
  color: #fdba74;
  border: 1px solid rgba(251, 146, 60, 0.38);
  box-shadow: 0 0 10px rgba(234, 88, 12, 0.25);
}

.badge-free {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.badge-locked {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

/* ==========================================================================
   FEATURED HERO (HOME PAGE)
   ========================================================================== */
.hero-spotlight {
  position: relative;
  background: linear-gradient(135deg, #131a29 0%, #0d121c 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin: 2rem 0 2.5rem 0;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-spotlight::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(244, 63, 94, 0.16) 0%, transparent 70%);
  pointer-events: none;
}

.hero-cover-wrap {
  width: 200px;
  aspect-ratio: 3/4.4;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
  flex-shrink: 0;
  position: relative;
}

.hero-cover-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.hero-spotlight:hover .hero-cover-wrap img {
  transform: scale(1.04);
}

.hero-details {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.hero-tag-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.hero-title {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.25;
  color: #fff;
  letter-spacing: -0.02em;
}

.hero-author {
  font-size: 1rem;
  color: var(--text-secondary);
}

.hero-synopsis {
  font-size: 0.94rem;
  color: var(--text-secondary);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-actions {
  display: flex;
  gap: 0.8rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   FILTER TOOLBAR
   ========================================================================== */
.toolbar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  margin-bottom: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.input-select,
.input-text {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.9rem;
  font-size: 0.88rem;
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s ease;
}

.input-select:focus,
.input-text:focus {
  border-color: var(--accent-rose);
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.2);
}

.pill-tabs {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(15, 23, 42, 0.65);
  padding: 0.28rem 0.35rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  max-width: 100%;
  overflow-x: auto;
  white-space: nowrap;
  flex-wrap: nowrap !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.pill-tabs::-webkit-scrollbar {
  display: none;
}

.pill-tab {
  padding: 0.42rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-xs);
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  background: transparent;
  white-space: nowrap !important;
  word-break: keep-all !important;
  flex-shrink: 0 !important;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pill-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.pill-tab.active {
  background: var(--accent-rose);
  color: #fff;
  box-shadow: 0 2px 8px rgba(244, 63, 94, 0.35);
}

/* Quick Filter & Search Toolbar */
.toolbar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1.8rem;
}

.catalog-filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  width: 100%;
  align-items: center;
  justify-content: space-between;
}

.catalog-search-box {
  flex: 1 1 260px;
  min-width: 200px;
  position: relative;
}

.catalog-search-box input {
  width: 100%;
  padding: 0.55rem 1rem 0.55rem 2.3rem;
}

.catalog-search-icon {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 0.88rem;
}

.catalog-sort-box {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  flex-wrap: nowrap;
}

.catalog-sort-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ==========================================================================
   MANGA CATALOG GRID
   ========================================================================== */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 1.6rem;
  margin-bottom: 3rem;
}

.manga-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.manga-card:hover {
  transform: translateY(-6px);
  border-color: rgba(244, 63, 94, 0.45);
  box-shadow: var(--shadow-glow);
}

.manga-card-thumb {
  position: relative;
  aspect-ratio: 3/4.3;
  width: 100%;
  background: #192233;
  overflow: hidden;
}

.manga-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.manga-card:hover .manga-card-thumb img {
  transform: scale(1.06);
}

.manga-card-overlay-badge {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  z-index: 2;
}

.manga-card-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.manga-card-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.35rem;
}

.manga-card-author {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.75rem;
}

.manga-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-secondary);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 0.65rem;
}

/* ==========================================================================
   MANGA DETAIL PAGE
   ========================================================================== */
.detail-backdrop {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  margin: 2rem 0;
  background: var(--bg-surface);
}

.detail-bg-blur {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(48px) brightness(0.22);
  transform: scale(1.15);
  pointer-events: none;
}

.detail-hero-content {
  position: relative;
  z-index: 2;
  padding: 2.5rem;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2.5rem;
}

.detail-cover-box {
  width: 100%;
  aspect-ratio: 3/4.4;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.detail-cover-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-info {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.detail-title {
  font-size: 2.3rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
}

.detail-meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.detail-meta-item strong {
  color: var(--text-primary);
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.detail-tag {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.detail-synopsis {
  font-size: 0.95rem;
  color: #cbd5e1;
  line-height: 1.7;
  background: rgba(0, 0, 0, 0.28);
  padding: 1.2rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent-rose);
}

.detail-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 0.6rem;
}

/* Chapter List */
.chapter-section {
  margin: 2.5rem 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.4rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.8rem;
}

.section-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.section-head h2 {
  font-size: 1.35rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  color: #fff;
  word-break: keep-all;
}

.section-count {
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--text-muted);
  white-space: nowrap;
}

.chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.9rem;
}

.chapter-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  gap: 1rem;
}

.chapter-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-rose);
  transform: translateX(4px);
}

.chapter-card.locked {
  opacity: 0.65;
  cursor: not-allowed;
}

.ch-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  overflow: hidden;
  min-width: 0;
  flex: 1;
}

.ch-num {
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
}

.ch-name {
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ch-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  flex-shrink: 0;
}

/* ==========================================================================
   MANGA READER PAGE
   ========================================================================== */
.reader-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.reader-navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 12, 20, 0.88);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  padding: 0 1.25rem;
  height: 56px;
  min-height: 56px;
  max-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  box-sizing: border-box;
}

.reader-nav-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.reader-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border-radius: 9px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1;
}

.reader-back-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(244, 63, 94, 0.4);
  color: #fff;
  transform: translateY(-1px);
}

.reader-back-icon {
  font-size: 0.75rem;
  line-height: 1;
}

.reader-back-text {
  display: inline;
}

.reader-title-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.reader-manga-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
  line-height: 1.25;
  transition: color 0.15s;
}

a.reader-manga-title:hover {
  color: #fda4af;
}

.reader-chapter-title {
  font-size: 0.76rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.reader-controls {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: nowrap !important;
  flex-shrink: 0;
}

.reader-select-wrapper,
.reader-chapter-picker-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.reader-chapter-picker-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f1f5f9;
  padding: 0.42rem 0.85rem;
  border-radius: 9px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  max-width: 175px;
  line-height: 1;
}

.reader-chapter-picker-btn:hover,
.reader-chapter-picker-btn[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(244, 63, 94, 0.5);
  color: #fff;
  box-shadow: 0 0 14px rgba(244, 63, 94, 0.25);
  transform: translateY(-1px);
}

.chapter-picker-icon {
  font-size: 0.85rem;
  line-height: 1;
}

.chapter-picker-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chapter-picker-arrow {
  font-size: 0.65rem;
  color: #94a3b8;
  transition: transform 0.2s ease;
  line-height: 1;
}

.reader-chapter-picker-btn[aria-expanded="true"] .chapter-picker-arrow {
  transform: rotate(180deg);
  color: #f43f5e;
}

/* Chapter Popover / Floating Dropdown */
.reader-chapter-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 320px;
  max-width: calc(100vw - 1.5rem);
  max-height: 480px;
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(244, 63, 94, 0.18);
  z-index: 250;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: popoverFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popoverFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.chapter-popover-header {
  padding: 0.9rem 1rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(11, 17, 33, 0.75);
}

.chapter-popover-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.chapter-popover-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.chapter-popover-count {
  font-size: 0.72rem;
  padding: 0.18rem 0.55rem;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  color: #94a3b8;
  font-weight: 600;
}

.chapter-popover-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  line-height: 1;
  border-radius: 6px;
  transition: all 0.15s;
}

.chapter-popover-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.chapter-popover-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.chapter-search-icon {
  position: absolute;
  left: 0.75rem;
  font-size: 0.8rem;
  color: #64748b;
  pointer-events: none;
}

.chapter-search-input {
  width: 100%;
  padding: 0.45rem 1.8rem 0.45rem 2.1rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  color: #fff;
  font-size: 0.82rem;
  font-family: inherit;
  outline: none;
  transition: all 0.2s;
  box-sizing: border-box;
}

.chapter-search-input:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(244, 63, 94, 0.5);
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.2);
}

.chapter-search-input::placeholder {
  color: #64748b;
}

.chapter-search-clear {
  position: absolute;
  right: 0.6rem;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.2rem;
  line-height: 1;
}

.chapter-popover-list {
  padding: 0.5rem;
  overflow-y: auto;
  max-height: 320px;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.chapter-popover-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.8rem;
  border-radius: 9px;
  text-decoration: none;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.84rem;
}

.chapter-popover-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
  transform: translateX(2px);
}

.chapter-popover-item.is-current {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.2) 0%, rgba(225, 29, 72, 0.12) 100%);
  border-color: rgba(244, 63, 94, 0.45);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(244, 63, 94, 0.2);
}

.chapter-item-left {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  overflow: hidden;
  text-align: left;
}

.chapter-item-num {
  font-weight: 600;
  color: #f1f5f9;
  line-height: 1.2;
}

.chapter-item-title {
  font-size: 0.74rem;
  color: #94a3b8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chapter-item-current-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.18rem 0.5rem;
  border-radius: 20px;
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  color: #fff;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(244, 63, 94, 0.4);
}

.chapter-item-arrow {
  font-size: 0.7rem;
  color: #64748b;
  opacity: 0.6;
  transition: all 0.15s;
}

.chapter-popover-item:hover .chapter-item-arrow {
  opacity: 1;
  color: #f43f5e;
  transform: translateX(2px);
}

.chapter-empty-msg {
  padding: 1.5rem;
  text-align: center;
  color: #94a3b8;
  font-size: 0.85rem;
}

/* Fallback & Completion Select Options (Prevents white-on-white bug) */
.reader-chapter-select {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  padding: 0.42rem 1.7rem 0.42rem 0.75rem;
  border-radius: 9px;
  font-size: 0.82rem;
  font-weight: 500;
  font-family: inherit;
  max-width: 175px;
  cursor: pointer;
  outline: none;
  transition: all 0.2s;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.reader-chapter-select:hover,
.reader-chapter-select:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(244, 63, 94, 0.4);
  color: #fff;
}

.reader-select-arrow {
  position: absolute;
  right: 0.6rem;
  font-size: 0.65rem;
  color: #94a3b8;
  pointer-events: none;
}

.reader-chapter-select option,
.finish-jump-select option {
  background-color: #0f172a !important;
  color: #f8fafc !important;
  padding: 8px 12px;
}

.reader-chapter-select option:checked,
.finish-jump-select option:checked {
  background-color: #1e293b !important;
  color: #f43f5e !important;
  font-weight: 700;
}

.reader-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.42rem 0.8rem;
  border-radius: 9px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  line-height: 1;
  flex-shrink: 0;
}

.reader-nav-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: translateY(-1px);
}

.reader-nav-btn-primary {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 2px 10px rgba(244, 63, 94, 0.3);
}

.reader-nav-btn-primary:hover {
  background: linear-gradient(135deg, #fb7185 0%, #f43f5e 100%);
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.45);
  color: #fff;
}

.reader-controls-divider {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 0.15rem;
  flex-shrink: 0;
}

.reader-icon-btn,
#btn-open-settings,
#btn-fullscreen {
  width: 36px;
  height: 36px;
  padding: 0 !important;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem !important;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.reader-icon-btn:hover,
#btn-open-settings:hover,
#btn-fullscreen:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(244, 63, 94, 0.4);
  color: #fff;
  transform: translateY(-1px);
}

/* Reader Background Color Palette & Active State */
.reader-bg-palette {
  display: flex;
  gap: 0.65rem;
  align-items: center;
}

.reader-bg-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  position: relative;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.reader-bg-btn:hover {
  transform: scale(1.1);
  border-color: rgba(255, 255, 255, 0.5);
}

.reader-bg-btn.active {
  border-color: var(--accent-rose, #f43f5e) !important;
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.6);
  transform: scale(1.12);
}

.reader-bg-btn.active::after {
  content: '✓';
  font-size: 0.9rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  line-height: 1;
}

.reader-bg-btn[data-theme="light"],
.reader-bg-btn[data-bg-id="light-gray"],
.reader-bg-btn[data-bg-id="white"],
.reader-bg-btn[data-bg="#ffffff"] {
  border-color: rgba(255, 255, 255, 0.4);
}

.reader-bg-btn[data-theme="light"].active::after,
.reader-bg-btn[data-bg-id="light-gray"].active::after,
.reader-bg-btn[data-bg-id="white"].active::after,
.reader-bg-btn[data-bg="#ffffff"].active::after {
  color: #0f172a;
  text-shadow: none;
}

/* Reader Mode: Webtoon Continuous Scroll */
.reader-stage-scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #06090f;
  min-height: 80vh;
  padding: 0 0 0 0;
  gap: 0;
}

/* ==========================================================================
   READER END-OF-CHAPTER COMPLETION CARD (FULL WIDTH & COMPACT BOTTOM)
   ========================================================================== */
.reader-end-card {
  margin: 0;
  width: 100%;
  max-width: 100%;
  padding: 0;
  box-sizing: border-box;
}

.reader-finish-container {
  position: relative;
  width: 100%;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92) 0%, rgba(10, 14, 23, 0.98) 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: none;
  border-left: none;
  border-right: none;
  border-radius: 24px 24px 0 0;
  padding: 2.2rem 1.25rem 4rem 1.4rem;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  overflow: hidden;
  text-align: center;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
}

.reader-finish-container:hover {
  border-top-color: rgba(244, 63, 94, 0.35);
}

.reader-finish-glow {
  position: absolute;
  top: -90px;
  left: 50%;
  transform: translateX(-50%);
  width: 480px;
  height: 180px;
  background: radial-gradient(circle, rgba(244, 63, 94, 0.26) 0%, rgba(168, 85, 247, 0.12) 45%, transparent 75%);
  filter: blur(45px);
  pointer-events: none;
  z-index: 0;
}

.reader-finish-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
  padding: 0 1rem;
  box-sizing: border-box;
}

.reader-finish-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 1rem;
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.28);
  border-radius: 9999px;
  color: #fda4af;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 0.85rem;
  box-shadow: 0 2px 14px rgba(244, 63, 94, 0.12);
}

.badge-sparkle {
  font-size: 1rem;
  line-height: 1;
}

.reader-finish-manga {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 0.3rem;
  line-height: 1.3;
  max-width: 90%;
}

.reader-finish-chapter {
  font-size: 0.98rem;
  font-weight: 600;
  color: #cbd5e1;
  margin: 0 0 0.85rem;
}

.reader-finish-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
}

.finish-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
  color: #94a3b8;
  font-weight: 500;
}

.finish-stat-chip-success {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}

.reader-finish-divider {
  width: 100%;
  max-width: 440px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  margin-bottom: 1.2rem;
}

.reader-finish-hero-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  width: 100%;
}

.finish-next-hint {
  font-size: 0.8rem;
  color: #fda4af;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.btn-hero-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.85rem 2.8rem;
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  border-radius: 14px;
  text-decoration: none;
  box-shadow: 0 8px 26px rgba(244, 63, 94, 0.42), 0 0 0 1px rgba(255, 255, 255, 0.2) inset;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-hero-next:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 14px 34px rgba(244, 63, 94, 0.58), 0 0 0 1px rgba(255, 255, 255, 0.35) inset;
  color: #fff;
}

.hero-arrow {
  font-size: 0.85rem;
  transition: transform 0.2s ease;
}

.btn-hero-next:hover .hero-arrow {
  transform: translateX(3px);
}

.reader-latest-notice {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.3rem;
  background: rgba(245, 158, 11, 0.07);
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 14px;
  text-align: left;
  margin-bottom: 1.25rem;
  max-width: 520px;
  width: 100%;
  box-sizing: border-box;
}

.latest-badge-icon {
  font-size: 1.9rem;
  line-height: 1;
  flex-shrink: 0;
}

.latest-badge-content strong {
  display: block;
  color: #fcd34d;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.latest-badge-content span {
  display: block;
  color: #cbd5e1;
  font-size: 0.82rem;
  line-height: 1.45;
}

.reader-finish-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  width: 100%;
  margin-bottom: 0;
}

.btn-finish-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.btn-finish-nav:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
  transform: translateY(-1px);
}

.btn-finish-overview {
  background: rgba(244, 63, 94, 0.09);
  border-color: rgba(244, 63, 94, 0.28);
  color: #fda4af;
}

.btn-finish-overview:hover {
  background: rgba(244, 63, 94, 0.18);
  border-color: rgba(244, 63, 94, 0.5);
  color: #fff;
}

.finish-jump-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.finish-jump-select {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  padding: 0.65rem 2.1rem 0.65rem 1rem;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  max-width: 220px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.finish-jump-select:hover,
.finish-jump-select:focus {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(244, 63, 94, 0.4);
  color: #fff;
}

.finish-jump-arrow {
  position: absolute;
  right: 0.75rem;
  font-size: 0.7rem;
  color: #94a3b8;
  pointer-events: none;
}

.reader-page-img-wrap {
  width: 100%;
  max-width: 880px;
  position: relative;
  background: transparent;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  display: block;
  line-height: 0;
  font-size: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.reader-page-img-wrap.is-loaded {
  min-height: 0 !important;
  height: auto !important;
  aspect-ratio: auto !important;
  padding: 0 !important;
  margin: 0 !important;
}

.page-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: radial-gradient(circle at center, #0f172a 0%, #080c14 100%);
  z-index: 1;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  pointer-events: none;
}

.reader-page-img-wrap.is-loaded .page-loader {
  opacity: 0;
  visibility: hidden;
  display: none;
}

.page-loader-spinner {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(244, 63, 94, 0.15);
  border-top-color: var(--accent-rose, #f43f5e);
  border-radius: 50%;
  animation: pageSpin 0.75s linear infinite;
}

.page-loader-text {
  font-size: 0.82rem;
  color: #94a3b8;
  font-weight: 500;
  letter-spacing: 0.02em;
}

@keyframes pageSpin {
  to {
    transform: rotate(360deg);
  }
}

.reader-page-img {
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
  position: relative;
  z-index: 2;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  vertical-align: top;
  line-height: 0;
  transition: opacity 0.25s ease;
}

.reader-page-img.is-lazy {
  opacity: 0;
}

.reader-page-img.is-loaded {
  opacity: 1;
}

/* Reader Mode: Single Page Slider */
.reader-stage-slide {
  overflow-x: clip;
  touch-action: pan-y pinch-zoom;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 140px);
  position: relative;
  background: #06090f;
  padding: 1rem;
}

.reader-slide-box {
  position: relative;
  max-width: 900px;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reader-slide-img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7);
  user-select: none;
}

.reader-nav-zone {
  border: 0;
  padding: 0;
  background: transparent;
  appearance: none;
  touch-action: pan-y pinch-zoom;
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  cursor: pointer;
  z-index: 10;
}

.reader-nav-zone.prev {
  left: 0;
}

.reader-nav-zone:focus-visible {
  outline: 2px solid var(--accent-rose, #f43f5e);
  outline-offset: -4px;
}

.reader-nav-zone.next {
  right: 0;
}

.reader-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: rgba(8, 12, 20, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.6rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
}

.reader-slider-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  max-width: 600px;
}

.reader-slider {
  flex: 1;
  accent-color: var(--accent-rose);
  height: 6px;
  cursor: pointer;
}

/* ==========================================================================
   API DOCS CARDS (SWAGGER STYLE)
   ========================================================================== */
.api-endpoint-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 1.2rem;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.api-endpoint-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.endpoint-header {
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  background: rgba(255, 255, 255, 0.02);
}

.endpoint-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: monospace;
}

.method-get {
  background: rgba(6, 182, 212, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(6, 182, 212, 0.4);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
}

.endpoint-path {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}

.endpoint-desc {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.endpoint-body {
  padding: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  display: none;
  background: rgba(0, 0, 0, 0.2);
}

.endpoint-body.open {
  display: block;
}

.try-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
  margin: 1rem 0;
}

.try-form input,
.try-form select {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.8rem;
  font-size: 0.88rem;
  color: var(--text-primary);
}

.response-box {
  background: #05080f;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1rem;
  font-family: monospace;
  font-size: 0.85rem;
  color: #a7f3d0;
  max-height: 380px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ==========================================================================
   PLATFORM ARCHITECTURE & SPECIFICATIONS (ENTERPRISE THEME)
   ========================================================================== */
.platform-spec-section {
  background: #0d131f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 2.5rem;
  margin: 3.5rem 0 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.spec-header {
  margin-bottom: 2rem;
}

.spec-label {
  font-family: var(--font-mono, monospace, sans-serif);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #64748b;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.spec-label::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 2px;
  background: #f43f5e;
}

.spec-title {
  font-size: 1.55rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.4;
  margin-bottom: 0.9rem;
  letter-spacing: -0.01em;
}

.spec-desc {
  color: #94a3b8;
  font-size: 0.92rem;
  line-height: 1.75;
  max-width: 1100px;
  margin: 0;
}

.spec-desc strong {
  color: #f1f5f9;
  font-weight: 600;
}

/* Specs Bar */
.spec-metrics-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 1rem 1.5rem;
  margin-bottom: 1.75rem;
  gap: 1.5rem;
}

.metric-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.metric-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  font-family: var(--font-mono, monospace, sans-serif);
}

.metric-val {
  font-size: 0.95rem;
  font-weight: 600;
  color: #e2e8f0;
}

/* 4 Technical Feature Cards */
.spec-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
}

.spec-card {
  background: #111726;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}

.spec-card:hover {
  background: #141c2e;
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.spec-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.1rem;
}

.spec-icon {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  transition: all 0.2s ease;
}

.spec-card:hover .spec-icon {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.spec-tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  font-family: var(--font-mono, monospace, sans-serif);
}

.spec-card h3 {
  font-size: 0.98rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.spec-card p {
  font-size: 0.86rem;
  color: #8b9cb5;
  line-height: 1.65;
  margin: 0;
  flex: 1;
}

@media (max-width: 992px) {
  .spec-metrics-bar {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .platform-spec-section {
    padding: 1.5rem 1.2rem;
  }
  .spec-title {
    font-size: 1.3rem;
  }
  .spec-metrics-bar {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem;
  }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer.site-footer {
  margin-top: auto;
  background: #070a10;
  border-top: 1px solid var(--border-subtle);
  padding: 3.5rem 0 2rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-brand h3 {
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.6rem;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.6;
  max-width: 320px;
}

.footer-col h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links a {
  font-size: 0.88rem;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--accent-rose);
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 960px) {
  .hero-spotlight {
    grid-template-columns: 1fr;
    padding: 1.8rem;
    gap: 1.5rem;
  }

  .hero-cover-wrap {
    width: 160px;
    margin: 0 auto;
  }

  .detail-hero-content {
    grid-template-columns: 1fr;
    padding: 1.5rem;
  }

  .detail-cover-box {
    max-width: 220px;
    margin: 0 auto;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 1300px) {
  .navbar {
    gap: 0.85rem;
  }
  .nav-search {
    width: 200px;
  }
  .nav-links {
    gap: 0.25rem;
  }
  .nav-link {
    padding: 0.45rem 0.65rem;
    font-size: 0.85rem;
    gap: 0.3rem;
  }
  .nav-actions .btn {
    padding: 0.45rem 0.8rem;
    font-size: 0.82rem;
  }
}

@media (max-width: 1080px) {
  .site-header .container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 1rem !important;
  }

  .navbar {
    height: 60px;
    gap: 0.75rem;
    position: relative;
    width: 100% !important;
  }

  .brand-link {
    flex-shrink: 0;
  }

  .brand-sub {
    display: none;
  }

  .nav-search {
    flex: 1 1 auto !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
  }

  .nav-search input {
    width: 100% !important;
  }

  .nav-links {
    display: none;
  }

  .nav-links.mobile-open {
    display: flex !important;
    flex-direction: column !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    background: rgba(10, 14, 23, 0.98) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7) !important;
    padding: 1rem 1.25rem 1.5rem !important;
    gap: 0.45rem !important;
    z-index: 999 !important;
    animation: mobileNavSlide 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  }

  @keyframes mobileNavSlide {
    from {
      opacity: 0;
      transform: translateY(-8px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .nav-links.mobile-open li {
    width: 100%;
  }

  .nav-links.mobile-open .nav-link {
    width: 100%;
    padding: 0.7rem 1rem;
    font-size: 0.92rem;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.04);
  }

  .nav-links.mobile-open .nav-link:hover,
  .nav-links.mobile-open .nav-link.active {
    background: rgba(244, 63, 94, 0.15);
    border-left: 3px solid var(--accent-rose);
    color: #fff;
  }

  .mobile-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .nav-actions .btn {
    display: none;
  }
}

.mobile-only-link {
  display: none;
}

.nav-links.mobile-open .mobile-only-link {
  display: block;
}

@media (max-width: 680px) {
  .site-header .container {
    padding: 0 0.75rem !important;
  }

  .container {
    padding: 0 0.75rem !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .navbar {
    height: 56px;
    gap: 0.5rem;
  }

  .hero-spotlight {
    padding: 1.4rem 1rem;
    margin: 1rem 0 1.5rem;
    width: 100%;
    border-radius: 16px;
  }

  .mobile-toggle {
    display: inline-flex !important;
  }

  /* Section Head & Tabs on Mobile */
  .section-head {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .section-title-wrap {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
  }

  .section-head h2 {
    font-size: 1.15rem;
    word-break: keep-all;
  }

  .section-head .pill-tabs {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .catalog-filter-form {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .catalog-search-box {
    width: 100%;
    flex: none;
  }

  .catalog-sort-box {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .catalog-sort-box select {
    flex: 1;
    min-width: 0;
  }
}

@media (max-width: 560px) {
  .navbar {
    height: 54px;
    padding: 0;
    gap: 0.45rem;
  }
  .brand-text {
    display: none;
  }
  .nav-search {
    flex: 1 1 auto !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
  }
  .nav-search input {
    font-size: 0.78rem;
    padding: 0.4rem 0.75rem 0.4rem 1.9rem;
  }
  .nav-search-icon {
    left: 0.6rem;
    font-size: 0.78rem;
  }

  .catalog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .hero-title {
    font-size: 1.6rem;
  }

  .detail-title {
    font-size: 1.7rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  /* Reader Mobile Optimization */
  .reader-navbar {
    padding: 0 0.75rem;
    gap: 0.4rem;
    height: 52px;
    min-height: 52px;
    max-height: 52px;
  }

  .reader-nav-left {
    gap: 0.45rem;
    min-width: 0;
    flex: 1;
  }

  .reader-back-btn {
    padding: 0.38rem 0.55rem;
    gap: 0.2rem;
  }

  .reader-back-text {
    display: none;
  }

  .reader-back-icon {
    display: inline;
    font-size: 0.8rem;
  }

  .reader-desktop-only {
    display: none !important;
  }

  .reader-title-info {
    min-width: 0;
    flex: 1;
  }

  .reader-manga-title {
    font-size: 0.8rem;
  }

  .reader-chapter-title {
    font-size: 0.7rem;
  }

  .reader-controls {
    gap: 0.3rem;
    flex-shrink: 0;
  }

  .reader-chapter-select,
  #reader-chapter-select {
    max-width: 110px !important;
    font-size: 0.75rem !important;
    padding: 0.35rem 1.3rem 0.35rem 0.5rem !important;
  }

  .reader-chapter-picker-btn {
    max-width: 115px;
    font-size: 0.75rem;
    padding: 0.35rem 0.55rem;
    gap: 0.25rem;
  }

  .chapter-picker-icon {
    font-size: 0.75rem;
  }

  .reader-chapter-popover {
    position: fixed !important;
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: 75vh !important;
    border-radius: 20px 20px 0 0 !important;
    border-bottom: none !important;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(244, 63, 94, 0.2) !important;
    animation: drawerSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }

  @keyframes drawerSlideUp {
    from {
      transform: translateY(100%);
    }
    to {
      transform: translateY(0);
    }
  }

  .reader-controls-divider {
    display: none;
  }

  .reader-icon-btn,
  #btn-open-settings,
  #btn-fullscreen {
    width: 32px;
    height: 32px;
    padding: 0 !important;
    font-size: 0.95rem !important;
  }

  /* Reader End-of-Chapter Card Mobile */
  .reader-end-card {
    margin: 1.5rem 0 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
  }

  .reader-finish-container {
    padding: 1.8rem 1rem 1.2rem;
    border-radius: 18px 18px 0 0;
  }

  .reader-finish-manga {
    font-size: 1.15rem;
    max-width: 100%;
  }

  .reader-finish-chapter {
    font-size: 0.9rem;
  }

  .btn-hero-next {
    width: 100%;
    box-sizing: border-box;
    padding: 0.8rem 1.5rem;
    font-size: 0.95rem;
  }

  .reader-latest-notice {
    padding: 0.85rem 1rem;
    margin-bottom: 1.1rem;
  }

  .reader-finish-actions {
    flex-direction: column;
    width: 100%;
    gap: 0.6rem;
  }

  .btn-finish-nav {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
    padding: 0.65rem 1rem;
  }

  .finish-jump-wrap {
    width: 100%;
  }

  .finish-jump-select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.65rem 1rem;
    text-align: center;
  }

  /* Reader Stage Mobile */
  .reader-stage-scroll {
    padding: 0 0 1rem;
  }

  .reader-page-img-wrap {
    max-width: 100% !important;
    min-height: 260px;
  }

  /* Reader Bottom Bar Mobile */
  .reader-bottom-bar {
    padding: 0.4rem 0.75rem;
    gap: 0.4rem;
  }

  .reader-boundary-label {
    display: none;
  }

  .reader-slider-wrap {
    gap: 0.4rem;
  }

  #btn-slide-prev,
  #btn-slide-next {
    padding: 0.3rem 0.55rem !important;
    font-size: 0.72rem !important;
    white-space: nowrap;
  }

  #reader-page-label {
    font-size: 0.78rem !important;
    min-width: 45px !important;
  }

  .reader-page-counter-box {
    gap: 0.35rem !important;
  }

  /* Settings Modal on Mobile */
  #reader-settings-modal {
    top: auto !important;
    bottom: 58px !important;
    right: 0.75rem !important;
    left: 0.75rem !important;
    width: auto !important;
    max-width: calc(100vw - 1.5rem) !important;
  }
}

/* ==========================================================================
   TOP 10 RANKINGS & CAROUSEL
   ========================================================================== */
.top10-slider {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0.25rem 0 1rem;
  margin-bottom: 1rem;
}

.top10-card {
  flex: 0 0 260px;
  scroll-snap-align: start;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.8rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
  overflow: hidden;
  transition: all 0.22s ease;
}

.top10-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-rose);
  box-shadow: 0 8px 24px rgba(244, 63, 94, 0.2);
}

.top10-rank-badge {
  position: absolute;
  top: 0;
  left: 0;
  background: #374151;
  color: #fff;
  font-weight: 900;
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-bottom-right-radius: var(--radius-sm);
  z-index: 2;
}

.top10-rank-badge.rank-1 {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.top10-rank-badge.rank-2 {
  background: linear-gradient(135deg, #94a3b8, #64748b);
}

.top10-rank-badge.rank-3 {
  background: linear-gradient(135deg, #b45309, #78350f);
}

.top10-thumb {
  width: 60px;
  height: 82px;
  border-radius: var(--radius-xs);
  overflow: hidden;
  flex-shrink: 0;
  background: #111827;
}

.top10-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.top10-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.top10-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.2rem;
}

/* Auto-hide Reader Navbar */
.reader-navbar {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.reader-navbar.nav-hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.reader-bottom-bar.bar-hidden {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}
/* Visible selection for the reader settings text buttons. */
#reader-settings-modal .opt-width-btn.active,
#reader-settings-modal .opt-bg-btn.active {
  border-color: #f43f5e;
  box-shadow: 0 0 0 2px #f43f5e;
}

/* Reader-facing home and accessible feedback. */
.nav-search { flex: 1; max-width: 340px; min-width: 120px; }
.brand-link { flex-shrink: 0; }
.hero-details, .section-title-wrap, .manga-card { min-width: 0; }
.hero-title { overflow-wrap: anywhere; }
.hero-synopsis { max-width: 75ch; line-height: 1.85; }
.section-title-wrap { flex-wrap: wrap; }
.section-count { white-space: nowrap; }
.reading-guide { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1.75rem; margin-bottom: 3rem; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--bg-surface); }
.reading-guide h2 { font-size: 1.15rem; margin-bottom: .35rem; }
.reading-guide p { color: var(--text-secondary); font-size: .9rem; }
.reading-guide .btn { flex-shrink: 0; }
.app-toast { position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%); z-index: 1200; max-width: calc(100% - 2rem); width: max-content; padding: .85rem 1.25rem; border: 1px solid var(--border-hover); border-radius: var(--radius-md); background: var(--bg-elevated); box-shadow: var(--shadow-lg); }
:where(a, button, input, select):focus-visible { outline: 2px solid var(--accent-rose); outline-offset: 4px; }
[data-bookmark][aria-pressed="true"] { color: #6ee7b7; border-color: #367969; }
@media (max-width: 680px) {
  .reading-guide { flex-direction: column; align-items: stretch; padding: 1.25rem; }
  .hero-actions .btn { flex: 1 1 150px; }
  .catalog-sort-box { flex-wrap: wrap; }
  .top10-card { flex-basis: 250px; }
  .toolbar-card { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.account-card { max-width: 520px; margin: 3rem auto; padding: 2rem; background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); }
.account-card h1 { font-size: 1.8rem; margin: .5rem 0; overflow-wrap: anywhere; }
.account-card h2 { font-size: 1.15rem; }
.account-eyebrow, .account-links a { color: var(--accent-rose); }
.account-description { color: var(--text-secondary); margin: .75rem 0 1.5rem; }
.account-form { display: grid; gap: .6rem; margin-top: 1.5rem; }
.account-form input { width: 100%; min-width: 0; }
.account-form label { margin-top: .5rem; }
.account-form small { color: var(--text-secondary); }
.account-form .btn { margin-top: 1rem; }
.account-links, .account-logout { margin-top: 1.5rem; }
.account-error { padding: .85rem; background: #492030; color: #fecdd3; border-radius: 8px; margin-top: 1rem; }
.account-card hr { border: 0; border-top: 1px solid var(--border-subtle); margin: 1.5rem 0; }
.users-table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; text-align: left; }
.users-table th, .users-table td { padding: 1rem; border-bottom: 1px solid var(--border-subtle); }
@media (max-width: 560px) { .account-card { padding: 1.25rem; margin: 1.5rem auto; } }
