@import url('scrollbar-premium.css');

/* WebTruyen — etruyen.net inspired clean light theme */
:root {
  --font: 'Be Vietnam Pro', system-ui, -apple-system, sans-serif;
  --bg: #ffffff;
  --bg-alt: #f3f5f8;
  --bg-elevated: #ffffff;
  --text: #161b26;
  --text-muted: #5c6370;
  --text-faint: #8b939e;
  --border: #e8eaee;
  --border-hover: #d1d5db;
  --accent: #06b6d4;
  --accent-dark: #0891b2;
  --accent-soft: rgba(6, 182, 212, 0.1);
  --accent-hover: #0e7490;
  --accent-grad: linear-gradient(135deg, #22d3ee 0%, #0891b2 100%);
  --ring: rgba(6, 182, 212, 0.32);
  --status-ongoing: #06b6d4;
  --status-ongoing-bg: rgba(6, 182, 212, 0.1);
  --status-done: #6b7280;
  --status-done-bg: #f3f4f6;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.05);
  --shadow-md: 0 6px 16px -4px rgba(16, 24, 40, 0.12), 0 4px 8px -4px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 18px 40px -12px rgba(16, 24, 40, 0.22), 0 8px 16px -8px rgba(16, 24, 40, 0.1);
  --radius: 12px;
  --radius-sm: 9px;
  --header-h: 56px;
  --container: 1200px;
  --transition: 0.18s ease;
  --transition-smooth: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --reader-sidebar-w: min(34vw, 400px);
}

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

html { scroll-behavior: smooth; }

body.site-body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  width: min(var(--container), 100% - 2rem);
  margin-inline: auto;
}

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: var(--header-h);
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.site-logo__mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.875rem;
}

.site-logo__text {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.site-logo--footer .site-logo__text { color: var(--text); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.site-nav__link {
  padding: 0.4rem 0.65rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

.site-nav__link:hover,
.site-nav__link.is-active { color: var(--accent); }

.site-nav__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.65rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
}

.site-nav__trigger:hover,
.site-nav__dropdown.is-open .site-nav__trigger { color: var(--accent); background: var(--accent-soft); }

.site-nav__dropdown { position: relative; }

.site-mega-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: min(640px, 90vw);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 0.75rem;
  z-index: 300;
}

.site-mega-menu__special {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding-bottom: 0.65rem;
  margin-bottom: 0.65rem;
  border-bottom: 1px solid var(--border);
}

.site-mega-menu__special-link {
  padding: 0.3rem 0.65rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  transition: background var(--transition);
}

.site-mega-menu__special-link:hover { background: rgba(6, 182, 212, 0.18); }

.site-mega-menu__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.15rem 0.5rem;
  max-height: 280px;
  overflow-y: auto;
}

.site-mega-menu__link {
  padding: 0.3rem 0.4rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

.site-mega-menu__link:hover { color: var(--accent); background: var(--bg-alt); }

.site-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 180px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 0.35rem;
  z-index: 300;
}

.site-dropdown-menu--right { left: auto; right: 0; }

.site-dropdown-menu a,
.site-dropdown-menu button {
  display: block;
  width: 100%;
  padding: 0.45rem 0.65rem;
  font-family: inherit;
  font-size: 0.8125rem;
  color: var(--text-muted);
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  text-align: left;
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
}

.site-dropdown-menu a:hover,
.site-dropdown-menu button:hover { color: var(--accent); background: var(--bg-alt); }

.site-search {
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 280px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-alt);
  transition: border-color var(--transition);
}

.site-search:focus-within { border-color: var(--accent); }

.site-search__input {
  flex: 1;
  min-width: 0;
  padding: 0.45rem 0.65rem;
  font-family: inherit;
  font-size: 0.8125rem;
  border: none;
  background: transparent;
  color: var(--text);
  outline: none;
}

.site-search__btn {
  display: grid;
  place-items: center;
  padding: 0.45rem 0.65rem;
  background: none;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  transition: color var(--transition);
}

.site-search__btn:hover { color: var(--accent); }

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.site-auth { display: flex; align-items: center; }

.site-auth__guest { display: flex; align-items: center; gap: 0.4rem; }

.site-auth__toggle { white-space: nowrap; }

.site-auth__avatar {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
}

.site-auth__name {
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
}

.site-menu-toggle { display: none; }

.site-mobile-nav {
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
  padding: 0.75rem 1rem 1rem;
}

.site-mobile-nav__link {
  display: block;
  padding: 0.55rem 0;
  font-size: 0.875rem;
  color: var(--text);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
}

.site-mobile-nav__details summary {
  padding: 0.55rem 0;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}

.site-mobile-nav__details summary::-webkit-details-marker { display: none; }

.site-mobile-nav__sub {
  display: flex;
  flex-direction: column;
  padding-left: 0.75rem;
  gap: 0.15rem;
}

.site-mobile-nav__sub a {
  padding: 0.35rem 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.site-search--mobile { max-width: none; margin-bottom: 0.5rem; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
  white-space: nowrap;
}

.btn--sm { padding: 0.35rem 0.75rem; font-size: 0.8125rem; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.btn-outline {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}

.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-secondary {
  background: var(--bg-alt);
  color: var(--text-muted);
  border-color: var(--border);
}

.btn-load-more {
  min-width: 180px;
  background: var(--bg-elevated);
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn-load-more:hover { background: var(--accent-soft); }

.btn-load-more.is-loading { opacity: 0.7; pointer-events: none; }

/* ── Homepage sections ── */
.home-main { flex: 1; }

.home-section {
  padding: 1.25rem 0 1.5rem;
  content-visibility: auto;
  contain-intrinsic-size: auto 420px;
}

.home-section--alt { background: var(--bg-alt); }

.section-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent);
}

.section-bar__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
}

.section-bar__more {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent);
  white-space: nowrap;
}

.section-bar__more:hover { text-decoration: underline; }

.genre-chips {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.65rem;
  margin-bottom: 0.65rem;
  scrollbar-width: none;
}

.genre-chips::-webkit-scrollbar { display: none; }

.genre-chip {
  flex-shrink: 0;
  padding: 0.3rem 0.75rem;
  font-family: inherit;
  font-size: 0.8125rem;
  color: var(--text-muted);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: all var(--transition);
}

.genre-chip:hover { border-color: var(--accent); color: var(--accent); }

.genre-chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.hot-scroll {
  display: flex;
  gap: 0.85rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  scrollbar-width: thin;
  cursor: grab;
}

.hot-scroll:active { cursor: grabbing; }

.hot-card {
  flex: 0 0 110px;
  transition: transform var(--transition-smooth), opacity var(--transition);
}

.hot-card:hover {
  transform: translateY(-2px);
}

.hot-card.is-hidden { display: none; }

.hot-card__cover {
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-alt);
}

.hot-card__cover img {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.hot-card:hover .hot-card__cover img { transform: scale(1.03); }

.hot-card__title {
  margin: 0.4rem 0 0.2rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hot-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
}

.hot-card__views {
  font-size: 0.6875rem;
  color: var(--text-faint);
}

/* ── Comic cards grid ── */
.comic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.85rem 0.65rem;
}

.comic-card__link { display: block; }

.comic-card__cover {
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-smooth), border-color var(--transition-smooth);
}

.comic-card:hover .comic-card__cover {
  box-shadow: var(--shadow-md);
  border-color: rgba(6, 182, 212, 0.25);
}

.comic-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.comic-card:hover .comic-card__img { transform: scale(1.03); }

.comic-card__body { padding-top: 0.4rem; }

.comic-card__title {
  margin: 0 0 0.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.comic-card__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
  margin-bottom: 0.15rem;
}

.comic-card__chapter {
  font-size: 0.6875rem;
  color: var(--accent);
  font-weight: 500;
}

.comic-card__chapters {
  font-size: 0.6875rem;
  color: var(--text-faint);
}

.comic-card__meta {
  font-size: 0.6875rem;
  color: var(--text-faint);
}

.comic-card__read-status {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  font-size: 0.625rem;
  font-weight: 600;
  border-radius: 999px;
  line-height: 1.4;
}

.comic-card__read-status--reading {
  color: var(--accent);
  background: var(--accent-soft);
}

.comic-card__read-status--done {
  color: var(--status-done, #16a34a);
  background: var(--status-done-bg, rgba(22, 163, 74, 0.12));
}

.status-pill {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  font-size: 0.625rem;
  font-weight: 600;
  border-radius: 999px;
  line-height: 1.4;
}

.status-pill--ongoing {
  color: var(--status-ongoing);
  background: var(--status-ongoing-bg);
}

.status-pill--done {
  color: var(--status-done);
  background: var(--status-done-bg);
}

/* ── Page layout ── */
.page-head {
  padding: 1rem 0 0.75rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}

.page-head--compact { padding: 0.75rem 0 0.5rem; }

.page-head__title {
  margin: 0.35rem 0 0.25rem;
  font-size: 1.375rem;
  font-weight: 700;
}

.page-head__desc {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.page-head--404 {
  padding: 2rem 0 1.5rem;
  text-align: center;
}

.page-head--404 .page-head__title {
  font-size: 1.75rem;
}

.page-head__eyebrow {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--primary);
}

.page-head__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1rem;
}

.search-form--404 {
  max-width: 520px;
  margin: 1.25rem auto 0;
}

.page-section--muted {
  background: var(--bg-alt);
}

.page-head__desc code {
  font-size: 0.8125rem;
  background: var(--bg);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.page-section { padding: 1.25rem 0 2rem; flex: 1; }

.layout-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 1.5rem;
  align-items: start;
}

.main-col { min-width: 0; }

.sidebar { position: sticky; top: calc(var(--header-h) + 1rem); }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.8125rem;
  color: var(--text-faint);
}

.breadcrumb li:not(:last-child)::after {
  content: '/';
  margin-left: 0.35rem;
  color: var(--border-hover);
}

.breadcrumb a:hover { color: var(--accent); }

.breadcrumb .is-active { color: var(--text-muted); }

/* ── Filters ── */
.filter-panel { margin-bottom: 1rem; }

.filter-panel__title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 700;
}

.filter-panel__status,
.filter-panel__sort {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
}

.filter-panel__sort-label {
  margin: 0 0 0.4rem;
  font-size: 0.8125rem;
  color: var(--text-faint);
}

.filter-chip,
.sort-chip {
  padding: 0.3rem 0.7rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: all var(--transition);
}

.filter-chip:hover,
.sort-chip:hover { border-color: var(--accent); color: var(--accent); }

.filter-chip.is-active,
.sort-chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.filter-panel__select {
  display: none;
  width: 100%;
  padding: 0.5rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.category-tags-section { padding: 0.75rem 0; border-bottom: 1px solid var(--border); }

.category-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.category-tag {
  padding: 0.3rem 0.7rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.category-tag:hover { border-color: var(--accent); color: var(--accent); }

/* ── Comic detail ── */
.comic-detail__hero {
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 1rem;
  align-items: start;
  margin-bottom: 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  background:
    radial-gradient(520px 120px at 0% -30%, var(--accent-soft), transparent 55%),
    linear-gradient(135deg, var(--bg-alt) 0%, var(--bg) 100%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.comic-detail__cover {
  border-radius: calc(var(--radius) - 2px);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 3 / 4;
  max-width: 148px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.comic-detail__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.comic-detail__title {
  margin: 0 0 0.4rem;
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.comic-detail__meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.comic-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.comic-meta-chip__icon {
  flex-shrink: 0;
  opacity: 0.65;
}

.comic-meta-chip--muted {
  padding-left: 0;
  padding-right: 0;
  color: var(--text-faint);
  background: transparent;
  border-color: transparent;
  font-size: 0.7rem;
}

.comic-meta-chip--tag {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: transparent;
  text-decoration: none;
  transition: background var(--transition);
}

.comic-meta-chip--tag:hover { background: rgba(6, 182, 212, 0.18); }

.comic-detail__meta-row .status-pill {
  padding: 0.12rem 0.45rem;
  font-size: 0.625rem;
}

.comic-detail__stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 0.65rem;
  margin: 0 0 0.45rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.comic-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}

.comic-stat__icon {
  flex-shrink: 0;
  opacity: 0.55;
}

.comic-stat b {
  color: var(--text);
  font-weight: 700;
}

.comic-detail__stats .comic-stat:not(:last-child) {
  padding-right: 0.65rem;
  border-right: 1px solid var(--border);
}

.comic-detail__other-name {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  color: var(--text-faint);
  line-height: 1.4;
}

.comic-detail__other-name span {
  color: var(--text-muted);
  font-weight: 600;
}

.comic-detail__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
  margin-top: 0.1rem;
}

.comic-detail__meta {
  list-style: none;
  margin: 0 0 0.85rem;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.comic-detail__meta li {
  display: flex;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.comic-detail__meta-label {
  min-width: 80px;
  color: var(--text-faint);
  font-size: 0.8125rem;
}

.comic-detail__actions {
  margin: 0;
  flex-shrink: 0;
}

.comic-detail__cta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  flex: 1 1 auto;
  margin: 0;
}

.comic-detail__cta-bar .btn {
  padding: 0.42rem 0.85rem;
  font-size: 0.8125rem;
  border-radius: 999px;
}

.comic-detail__cta-bar .btn-primary {
  flex: 0 1 auto;
  min-width: 0;
}

.comic-detail__actions .action-bar {
  gap: 0.35rem;
}

.comic-detail__actions .action-bar__btn {
  padding: 0.4rem;
  min-width: 34px;
  justify-content: center;
  font-size: 0.8125rem;
}

.comic-detail__actions .action-bar__btn svg {
  width: 16px;
  height: 16px;
}

.comic-detail__actions .action-bar__btn > span:not(.action-bar__follow-icon) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.comic-detail__synopsis {
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.comic-detail__synopsis h2 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 700;
}

.comic-detail__synopsis-body {
  max-height: 4.5em;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.comic-detail__synopsis-body.is-expanded,
.comic-detail__synopsis.is-expanded .comic-detail__synopsis-body { max-height: none; }

.comic-detail__synopsis-rich p { margin: 0 0 0.65em; }
.comic-detail__synopsis-rich p:last-child { margin-bottom: 0; }
.comic-detail__synopsis-rich ul,
.comic-detail__synopsis-rich ol { margin: 0.35em 0 0.65em; padding-left: 1.25rem; }
.comic-detail__synopsis-rich h2,
.comic-detail__synopsis-rich h3 { margin: 0.75em 0 0.35em; font-size: 0.9375rem; font-weight: 700; color: var(--text); }
.comic-detail__synopsis-rich blockquote {
  margin: 0.5em 0;
  padding-left: 0.75rem;
  border-left: 3px solid var(--border);
  color: var(--text-muted);
}
.comic-detail__synopsis-rich a { color: var(--accent); }

.comic-detail__synopsis-toggle {
  margin-top: 0.35rem;
  padding: 0;
  font-family: inherit;
  font-size: 0.8125rem;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
}

/* ── Chapter list ── */
.chapter-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.chapter-section__head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.chapter-section__tools {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.8125rem;
  color: var(--text-faint);
}

.chapter-section__sort {
  font-family: inherit;
  font-size: 0.8125rem;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
}

.chapter-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.chapter-list__item {
  border-bottom: 1px solid var(--border);
}

.chapter-list__item:last-child { border-bottom: none; }

.chapter-list__item--latest { background: var(--accent-soft); }

.chapter-list__item--current:not(.chapter-list__item--latest) {
  background: rgba(34, 197, 94, 0.06);
}

.chapter-list__link {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.875rem;
  transition: color var(--transition);
}

.chapter-list__link:hover { color: var(--accent); }

.chapter-list__item--read .chapter-list__link {
  color: var(--text-muted);
}

.chapter-list__item--read .chapter-list__link:hover {
  color: var(--accent);
}

.chapter-list__read-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  margin-left: auto;
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  line-height: 1;
}

.chapter-list__read-badge svg {
  width: 0.55rem;
  height: 0.55rem;
}

.chapter-section__read-count {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 500;
}

.chapter-list__new-badge {
  display: inline-block;
  margin-right: 0.35rem;
  padding: 0.05rem 0.35rem;
  font-size: 0.625rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
  vertical-align: middle;
}

.chapter-list__empty {
  padding: 1rem 0.75rem;
  color: var(--text-faint);
  font-size: 0.875rem;
}

/* ── Ranking ── */
.ranking-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.ranking-card__head {
  padding: 0.85rem 0.85rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

.ranking-card__head h3 {
  margin: 0 0 0.65rem;
  font-size: 0.9375rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text);
}

.ranking-tabs {
  position: relative;
  display: flex;
  gap: 0.2rem;
  padding: 0.2rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.ranking-tabs--page {
  max-width: 360px;
}

.ranking-tab {
  position: relative;
  z-index: 1;
  flex: 1;
  padding: 0.45rem 0.65rem;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: color var(--transition), background var(--transition), box-shadow var(--transition);
}

.ranking-tab:hover:not(.is-active) {
  color: var(--text);
  background: rgba(255, 255, 255, 0.65);
}

.ranking-tab.is-active {
  background: var(--bg-elevated);
  color: var(--accent);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(6, 182, 212, 0.12);
}

.ranking-page-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.ranking-page-card__head {
  padding: 1rem 1.1rem 0.85rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg-elevated) 100%);
}

.ranking-page-card__body {
  padding: 0;
}

.ranking-list {
  list-style: none;
  margin: 0;
  padding: 0.5rem;
}

.ranking-item {
  display: grid;
  grid-template-columns: 24px 40px 1fr;
  gap: 0.5rem;
  align-items: center;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
}

.ranking-item:last-child { border-bottom: none; }

.ranking-item__rank {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-faint);
  text-align: center;
}

.ranking-item__thumb {
  aspect-ratio: 3 / 4;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.ranking-item__thumb img { width: 100%; height: 100%; object-fit: cover; }

.ranking-item__title {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.15rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ranking-item__title:hover { color: var(--accent); }

.ranking-item__chapter {
  display: block;
  font-size: 0.6875rem;
  color: var(--accent);
  margin-bottom: 0.1rem;
}

.ranking-item__views {
  font-size: 0.6875rem;
  color: var(--text-faint);
}

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

.ranking-page-list:not([hidden]) {
  animation: rankingFadeIn 0.22s ease;
}

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

.ranking-page-item {
  display: grid;
  grid-template-columns: 40px 60px 1fr;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.ranking-page-item:hover {
  background: rgba(6, 182, 212, 0.04);
}

.ranking-page-item:last-child { border-bottom: none; }

.ranking-page-item__rank {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--accent);
  text-align: center;
}

.ranking-page-item__cover {
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}

.ranking-page-item__cover img { width: 100%; height: 100%; object-fit: cover; }

.ranking-page-item__title {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.ranking-page-item__title:hover { color: var(--accent); }

.ranking-page-item__chapter {
  display: block;
  font-size: 0.8125rem;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.ranking-page-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-faint);
}

.ranking-streak {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  padding: 0.13rem 0.42rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.ranking-streak::before {
  content: '';
  width: var(--streak-w, 16px);
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.92;
}

.ranking-streak::after {
  content: attr(data-level);
  margin-left: 0.18rem;
  font-weight: 600;
  opacity: 0.92;
}

.ranking-streak__value {
  font-variant-numeric: tabular-nums;
}

.ranking-streak--up {
  color: #16a34a;
  background: rgba(22, 163, 74, 0.1);
  border-color: rgba(22, 163, 74, 0.24);
}

.ranking-streak--down {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.1);
  border-color: rgba(220, 38, 38, 0.24);
}

.ranking-streak--flat {
  color: var(--text-faint);
  background: rgba(148, 163, 184, 0.13);
  border-color: rgba(148, 163, 184, 0.24);
}

.ranking-live {
  margin-bottom: 0.85rem;
  padding: 0.86rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius-sm) + 4px);
  background: linear-gradient(155deg, color-mix(in srgb, var(--accent) 10%, var(--bg-elevated)) 0%, var(--bg-elevated) 82%);
  box-shadow: var(--shadow-sm);
}

.ranking-live__head {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.ranking-live__kicker {
  margin: 0;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
}

.ranking-live__title {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.32;
}

.ranking-live__desc {
  margin: 0;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.ranking-live__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.52rem;
}

.ranking-live__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.24rem;
  padding: 0.18rem 0.48rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border));
  background: color-mix(in srgb, var(--bg-alt) 86%, transparent);
  font-size: 0.66rem;
  color: var(--text-faint);
}

.ranking-live__chip strong {
  color: var(--text);
}

.ranking-live__meter {
  margin-top: 0.56rem;
}

.ranking-live__meter-track {
  height: 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-alt) 78%, var(--border) 22%);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--border) 86%, transparent);
}

.ranking-live__meter-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e 0%, #f59e0b 58%, #ef4444 100%);
  transition: width 0.28s ease;
}

.ranking-live__meter-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.35rem;
  font-size: 0.66rem;
  color: var(--text-faint);
}

.ranking-live__meter-meta strong {
  color: var(--text);
  font-size: 0.72rem;
}

.ranking-side-panel {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.ranking-side-panel__card {
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-sm);
}

.ranking-side-panel__card h3 {
  margin: 0 0 0.55rem;
  font-size: 0.86rem;
}

.ranking-side-panel__actions {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.ranking-side-panel__actions .btn {
  width: 100%;
  justify-content: center;
}

.ranking-side-panel__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.ranking-side-panel__tag {
  display: inline-flex;
  align-items: center;
  padding: 0.24rem 0.52rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text-muted);
  font-size: 0.7rem;
  text-decoration: none;
}

.ranking-side-panel__tag:hover {
  border-color: color-mix(in srgb, var(--accent) 48%, transparent);
  color: var(--accent);
}

body:has(#rankWeek:not([hidden])) .ranking-page-card {
  border-color: color-mix(in srgb, #8b5cf6 38%, var(--border));
}

body:has(#rankWeek:not([hidden])) .ranking-page-card__head {
  background: linear-gradient(180deg, color-mix(in srgb, #8b5cf6 10%, var(--bg-alt)) 0%, var(--bg-elevated) 100%);
}

body:has(#rankDay:not([hidden])) .ranking-page-card {
  border-color: color-mix(in srgb, #f59e0b 38%, var(--border));
}

body:has(#rankDay:not([hidden])) .ranking-page-card__head {
  background: linear-gradient(180deg, color-mix(in srgb, #f59e0b 11%, var(--bg-alt)) 0%, var(--bg-elevated) 100%);
}

/* ── Reader player ── */
.reader-body {
  --reader-bg: #060608;
  --reader-surface: #0c0c0f;
  --reader-nav-bg: rgba(12, 12, 15, 0.82);
  --reader-glass-border: rgba(255, 255, 255, 0.07);
  --reader-text: #f4f4f5;
  --reader-muted: #9ca3af;
  --reader-chrome-h: 76px;
  --reader-mini-h: 48px;
  --reader-bottom-h: 72px;
  --reader-ease: cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--reader-bg);
  color: var(--reader-text);
  padding-bottom: calc(var(--reader-bottom-h) + env(safe-area-inset-bottom));
}

.reader-body .skip-link:focus {
  top: max(0.75rem, env(safe-area-inset-top));
}

html:has(body.reader-body) {
  background: var(--reader-bg, #060608);
}

.reader-player {
  position: relative;
  z-index: 200;
}

.reader-progress-track {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  z-index: 519;
  background: rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.reader-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent) 0%, #22c9a0 55%, #5eead4 100%);
  box-shadow: 0 0 14px rgba(6, 182, 212, 0.55);
  transition: width 0.12s linear, opacity 0.25s ease;
  border-radius: 0 2px 2px 0;
}

.reader-progress-pill {
  position: fixed;
  top: calc(env(safe-area-inset-top) + 0.5rem);
  right: max(0.75rem, env(safe-area-inset-right));
  z-index: 518;
  padding: 0.2rem 0.55rem;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  background: rgba(12, 12, 15, 0.82);
  border: 1px solid rgba(6, 182, 212, 0.28);
  border-radius: 999px;
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.28s ease, transform 0.28s var(--reader-ease);
}

.reader-body.reader-player--chrome-hidden .reader-progress-pill,
.reader-body:not(.reader-player--chrome-hidden) .reader-progress-pill.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reader-player__top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 510;
  background: var(--reader-nav-bg);
  border-bottom: 1px solid var(--reader-glass-border);
  backdrop-filter: blur(24px) saturate(1.35);
  -webkit-backdrop-filter: blur(24px) saturate(1.35);
  box-shadow: none;
  transform: translateY(0);
  opacity: 1;
  transition: transform 0.36s var(--reader-ease), opacity 0.36s ease;
  will-change: transform, opacity;
}

.reader-player__mini-bar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 505;
  background: var(--reader-nav-bg);
  border-bottom: 1px solid var(--reader-glass-border);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.42);
  opacity: 0;
  visibility: hidden;
  transform: translateY(calc(-100% - env(safe-area-inset-top)));
  transition: transform 0.32s var(--reader-ease), opacity 0.32s ease, visibility 0.32s;
  pointer-events: none;
  will-change: transform, opacity;
}

.reader-body:not(.reader-player--chrome-hidden) .reader-player__mini-bar {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.reader-player__mini-bar-accent {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent) 35%, var(--accent) 65%, transparent);
  opacity: 0.55;
}

.reader-player__mini-bar-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.45rem 0.5rem;
  min-height: 48px;
  padding: env(safe-area-inset-top) max(0.75rem, env(safe-area-inset-right)) 0.35rem max(0.75rem, env(safe-area-inset-left));
}

.reader-player__mini-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.reader-player__btn--mini {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  flex-shrink: 0;
}

.reader-player__mini-title-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.1rem;
  min-width: 0;
  padding: 0 0.15rem;
}

.reader-player__mini-line {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem;
  min-width: 0;
  width: 100%;
  overflow: hidden;
}

.reader-player__mini-meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.3rem;
  min-width: 0;
  width: 100%;
  overflow: hidden;
}

.reader-player__mini-meta-item {
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--reader-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 55%;
}

.reader-player__mini-meta-item--accent {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  max-width: none;
}

.reader-player__mini-comic {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--reader-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1 1 auto;
  max-width: 42%;
  transition: color var(--transition);
}

.reader-player__mini-chapter {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--reader-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1 1 auto;
  max-width: 52%;
}

.reader-player__mini-comic:hover {
  color: var(--accent);
}

.reader-player__mini-sep {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(6, 182, 212, 0.65);
}

.reader-body.reader-player--chrome-hidden .reader-player__mini-bar {
  display: block;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
  box-shadow: none;
}

.reader-body.reader-player--chrome-hidden .reader-player__mini-bar-inner {
  position: relative;
}

.reader-body.reader-player--chrome-hidden .reader-player__mini-title-block {
  align-items: center;
}

.reader-body.reader-player--chrome-hidden .reader-player__mini-comic,
.reader-body.reader-player--chrome-hidden .reader-player__mini-sep,
.reader-body.reader-player--chrome-hidden .reader-player__mini-meta {
  display: none;
}

.reader-body.reader-player--chrome-hidden .reader-player__mini-chapter {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: min(70vw, 760px);
  max-width: calc(100vw - 9rem);
  text-align: center;
  pointer-events: none;
}

.reader-player__top-accent {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 5%, rgba(6, 182, 212, 0.55) 50%, transparent 95%);
  pointer-events: none;
}

.reader-player__top-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.625rem;
  min-height: 76px;
  padding: env(safe-area-inset-top) max(0.875rem, env(safe-area-inset-right)) 0.5rem max(0.875rem, env(safe-area-inset-left));
}

.reader-player__comments-strip {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  min-width: 0;
  margin-top: -0.1rem;
  padding: 0 0.15rem 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reader-player__comments-title {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--reader-text);
  letter-spacing: 0.01em;
}

.reader-player__comments-subtitle {
  min-width: 0;
  font-size: 0.7rem;
  color: var(--reader-muted);
  overflow: hidden;
  text-overflow: ellipsis;
}

.reader-player__btn {
  display: grid;
  place-items: center;
  min-width: 40px;
  min-height: 40px;
  width: 40px;
  height: 40px;
  color: var(--reader-muted);
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  transition: color var(--transition), background var(--transition), border-color var(--transition), transform 0.15s ease;
}

.reader-player__btn:hover,
.reader-player__btn.is-active {
  color: var(--accent);
  background: rgba(6, 182, 212, 0.14);
  border-color: rgba(6, 182, 212, 0.22);
}

.reader-player__btn:active {
  transform: scale(0.94);
}

.reader-player__title-block {
  min-width: 0;
  text-align: center;
  padding: 0 0.35rem;
}

.reader-player__title-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-width: 0;
}

.reader-player__title-copy {
  min-width: 0;
}

.reader-player__cover-link {
  display: inline-flex;
  flex-shrink: 0;
  text-decoration: none;
}

.reader-player__cover-img {
  width: 34px;
  height: 46px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--reader-glass-border);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}

.reader-player__comic-label {
  display: block;
  margin: 0;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--reader-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
  text-decoration: none;
  transition: color var(--transition);
}

.reader-player__comic-label:hover {
  color: var(--accent);
}

.reader-player__chapter-label {
  margin: 0.125rem 0 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--reader-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.reader-player__meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.3rem 0.5rem;
  margin-top: 0.3rem;
  padding-top: 0.3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.reader-player__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-width: 0;
  font-size: 0.625rem;
  line-height: 1.3;
}

.reader-player__meta-label {
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(156, 163, 175, 0.75);
  flex-shrink: 0;
}

.reader-player__meta-value {
  font-weight: 600;
  color: var(--reader-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 9rem;
}

.reader-player__meta-item--tags {
  gap: 0.25rem;
}

.reader-player__tag {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(94, 234, 212, 0.9);
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.28);
  border-radius: 999px;
  white-space: nowrap;
  text-decoration: none;
  transition: color var(--transition), background var(--transition), border-color var(--transition);
}

.reader-player__tag:hover {
  color: #fff;
  background: rgba(6, 182, 212, 0.28);
  border-color: rgba(6, 182, 212, 0.5);
}

.reader-player__status {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-radius: 999px;
  line-height: 1.35;
}

.reader-player__status--ongoing {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.28);
}

.reader-player__status--done {
  color: #5eead4;
  background: rgba(6, 182, 212, 0.14);
  border: 1px solid rgba(6, 182, 212, 0.32);
}

.reader-player__meta-item--progress .reader-player__meta-value {
  color: var(--accent);
  font-weight: 700;
  max-width: none;
}

.reader-player__meta-link {
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
}

.reader-player__meta-link:hover {
  color: #fff;
  background: rgba(6, 182, 212, 0.18);
}

.reader-player__meta-item--rating {
  gap: 0.2rem;
}

.reader-player__rating-stars {
  display: inline-flex;
  gap: 0;
  font-size: 0.5625rem;
  color: #f59e0b;
  letter-spacing: -0.05em;
}

.reader-player__rating-value {
  font-weight: 700;
  color: #fbbf24;
  font-size: 0.625rem;
}

.reader-player__read-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.1rem 0.45rem;
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #5eead4;
  background: rgba(6, 182, 212, 0.14);
  border: 1px solid rgba(6, 182, 212, 0.32);
  border-radius: 999px;
  animation: readerReadBadgeIn 0.4s var(--reader-ease);
}

@keyframes readerReadBadgeIn {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

.reader-player__top-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.reader-player__chapter-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 36px;
  padding: 0 0.65rem 0 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--reader-glass-border);
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.reader-player__chapter-picker:hover {
  border-color: rgba(6, 182, 212, 0.4);
  background: rgba(6, 182, 212, 0.1);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.08);
}

.reader-player__chapter-picker-text {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--reader-muted);
  pointer-events: none;
}

.reader-player__select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.8125rem;
}

.reader-player__chapter-picker-icon {
  color: var(--reader-muted);
  pointer-events: none;
  flex-shrink: 0;
}

.reader-player__page-info {
  position: fixed;
  top: calc(var(--reader-chrome-h) + env(safe-area-inset-top) + 0.5rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 505;
  padding: 0.35rem 0.9rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--reader-text);
  background: var(--reader-nav-bg);
  border: 1px solid var(--reader-glass-border);
  border-radius: 999px;
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.32s ease, transform 0.32s var(--reader-ease), visibility 0.32s;
  white-space: nowrap;
}

.reader-body.reader-player--chrome-hidden .reader-player__page-info {
  top: calc(var(--reader-mini-h) + env(safe-area-inset-top) + 0.35rem);
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%);
}

.reader-player__bottom {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 510;
  padding: 0 max(0.875rem, env(safe-area-inset-right)) calc(0.75rem + env(safe-area-inset-bottom)) max(0.875rem, env(safe-area-inset-left));
  background: linear-gradient(to top, rgba(6, 6, 8, 0.55) 0%, transparent 100%);
  border: 0;
  box-shadow: none;
  transform: translateY(0);
  opacity: 1;
  transition: transform 0.36s var(--reader-ease), opacity 0.36s ease;
  pointer-events: none;
  will-change: transform, opacity;
}

.reader-player__bottom-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  max-width: 420px;
  margin-inline: auto;
  pointer-events: auto;
}

.reader-player__nav-pill {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  padding: 0.35rem;
  background: var(--reader-nav-bg);
  border: 1px solid var(--reader-glass-border);
  border-radius: 999px;
  backdrop-filter: blur(24px) saturate(1.35);
  -webkit-backdrop-filter: blur(24px) saturate(1.35);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.reader-player__nav-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex: 1;
  min-width: 0;
  min-height: 42px;
  padding: 0.4rem 0.55rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--reader-muted);
  border-radius: 999px;
  transition: color var(--transition), background var(--transition);
}

.reader-player__nav-item:hover:not(.is-disabled) {
  color: var(--reader-text);
  background: rgba(255, 255, 255, 0.07);
}

.reader-player__nav-item--next {
  color: var(--accent);
}

.reader-player__nav-item--next:hover {
  color: #22c9a0;
  background: rgba(6, 182, 212, 0.14);
}

.reader-player__nav-item--comments {
  border: none;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
}

.reader-player__nav-item--comments:hover,
.reader-player__nav-item--comments.is-active {
  color: var(--accent);
  background: rgba(6, 182, 212, 0.12);
}

.reader-player__nav-item.is-disabled {
  opacity: 0.5;
  color: var(--reader-muted);
  pointer-events: none;
}

.reader-player__nav-item--next.is-disabled {
  color: var(--reader-muted);
}

.reader-player__nav-divider {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.reader-player__fab-btn {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  color: var(--reader-muted);
  background: var(--reader-nav-bg);
  border: 1px solid var(--reader-glass-border);
  border-radius: 50%;
  backdrop-filter: blur(24px) saturate(1.35);
  -webkit-backdrop-filter: blur(24px) saturate(1.35);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: color var(--transition), background var(--transition), border-color var(--transition), transform 0.15s ease;
}

.reader-player__fab-btn:hover,
.reader-player__fab-btn.is-active {
  color: var(--accent);
  background: rgba(6, 182, 212, 0.14);
  border-color: rgba(6, 182, 212, 0.3);
}

.reader-player__fab-btn:active {
  transform: scale(0.94);
}

.reader-body.reader-player--chrome-hidden .reader-player__top {
  transform: translateY(calc(-100% - env(safe-area-inset-top)));
  opacity: 0;
  pointer-events: none;
}

.reader-body.reader-player--chrome-hidden .reader-player__bottom {
  transform: translateY(calc(100% + env(safe-area-inset-bottom) + 1.25rem));
  opacity: 0;
  pointer-events: none;
}

.reader-body.reader-player--chrome-hidden {
  padding-bottom: env(safe-area-inset-bottom);
}

.reader-body.reader-player--chrome-hidden .reader-content {
  padding-top: calc(var(--reader-mini-h) + env(safe-area-inset-top) + 0.5rem);
  padding-bottom: env(safe-area-inset-bottom);
  scroll-margin-top: calc(var(--reader-mini-h) + env(safe-area-inset-top));
}

.reader-body.reader-player--chrome-hidden.reader-fit-height .reader-page {
  min-height: calc(100vh - var(--reader-mini-h) - env(safe-area-inset-top) - env(safe-area-inset-bottom));
}

.reader-body.reader-player--overlay-open {
  overflow: hidden;
}

.reader-fullscreen-icon--exit { display: none; }

.reader-body.reader-is-fullscreen .reader-fullscreen-icon--enter { display: none; }
.reader-body.reader-is-fullscreen .reader-fullscreen-icon--exit { display: block; }

.reader-body.reader-is-fullscreen {
  padding-bottom: env(safe-area-inset-bottom);
}

.reader-body.reader-is-fullscreen .reader-content {
  padding-top: env(safe-area-inset-top);
}

.reader-tap-zones { display: none; }

.reader-settings__backdrop {
  position: fixed;
  inset: 0;
  z-index: 550;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.32s ease;
}

.reader-settings__backdrop.is-visible {
  opacity: 1;
}

.reader-settings__backdrop[hidden],
.reader-settings[hidden],
.reader-shortcuts[hidden] {
  display: none !important;
}

.reader-settings:not([hidden]) {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 560;
  width: min(340px, 92vw);
  background: rgba(14, 14, 18, 0.94);
  border-left: 1px solid var(--reader-glass-border);
  backdrop-filter: blur(28px) saturate(1.4);
  -webkit-backdrop-filter: blur(28px) saturate(1.4);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: -12px 0 48px rgba(0, 0, 0, 0.4);
  transform: translateX(0);
  animation: readerDrawerIn 0.34s var(--reader-ease);
}

@keyframes readerDrawerIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.reader-settings__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(0.875rem + env(safe-area-inset-top)) 0.875rem 0.875rem 1.125rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(6, 182, 212, 0.06) 0%, transparent 100%);
}

.reader-settings__title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--reader-text);
}

.reader-settings__body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.reader-settings__section--card {
  padding: 0.875rem;
  border-radius: 12px;
  border: 1px solid var(--reader-glass-border);
  background: rgba(255, 255, 255, 0.025);
}

.reader-settings__label {
  margin: 0 0 0.625rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--reader-muted);
}

.reader-settings__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.reader-settings__chip {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 38px;
  padding: 0.4rem 0.85rem;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  border: 1px solid var(--reader-glass-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--reader-text);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), color var(--transition), box-shadow var(--transition);
}

.reader-settings__chip:hover { border-color: rgba(6, 182, 212, 0.45); }

.reader-settings__chip.is-active {
  color: var(--accent);
  border-color: rgba(6, 182, 212, 0.55);
  background: rgba(6, 182, 212, 0.14);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.reader-settings__hint {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--reader-muted);
}

.reader-settings__switch {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.reader-settings__switch-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.reader-settings__switch-track {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--reader-glass-border);
  transition: background var(--transition), border-color var(--transition);
}

.reader-settings__switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: transform 0.22s var(--reader-ease);
}

.reader-settings__switch-input:checked + .reader-settings__switch-track {
  background: var(--accent);
  border-color: rgba(6, 182, 212, 0.6);
}

.reader-settings__switch-input:checked + .reader-settings__switch-track .reader-settings__switch-thumb {
  transform: translateX(18px);
}

.reader-settings__switch-input:focus-visible + .reader-settings__switch-track {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.reader-settings__switch-text {
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--reader-text);
}

.reader-settings__link-btn {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  min-height: 48px;
  padding: 0.625rem 0.875rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: left;
  border: 1px solid var(--reader-glass-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--reader-text);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}

.reader-settings__link-btn svg {
  flex-shrink: 0;
  color: var(--reader-muted);
  transition: color var(--transition);
}

.reader-settings__link-btn span {
  flex: 1;
}

.reader-settings__kbd {
  display: inline-grid;
  place-items: center;
  min-width: 1.625rem;
  min-height: 1.625rem;
  padding: 0 0.35rem;
  font-family: inherit;
  font-size: 0.6875rem;
  font-weight: 700;
  border: 1px solid var(--reader-glass-border);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--reader-muted);
}

.reader-settings__link-btn:hover {
  border-color: rgba(6, 182, 212, 0.45);
  background: rgba(6, 182, 212, 0.08);
  color: var(--accent);
}

.reader-settings__link-btn:hover svg {
  color: var(--accent);
}

.reader-shortcuts:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 550;
  display: grid;
  place-items: center;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: readerFadeIn 0.28s ease;
}

@keyframes readerFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.reader-shortcuts__panel {
  width: min(400px, 100%);
  background: rgba(14, 14, 18, 0.96);
  border: 1px solid var(--reader-glass-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  animation: readerModalIn 0.32s var(--reader-ease);
}

@keyframes readerModalIn {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.reader-shortcuts__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1rem 1rem 1.125rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(6, 182, 212, 0.06) 0%, transparent 100%);
}

.reader-shortcuts__header h2 {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.reader-shortcuts__body {
  padding: 0.75rem 0;
}

.reader-shortcuts__group {
  padding: 0 1.125rem;
}

.reader-shortcuts__group + .reader-shortcuts__group {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.reader-shortcuts__group-title {
  margin: 0 0 0.35rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--reader-muted);
}

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

.reader-shortcuts__list li {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0;
  font-size: 0.875rem;
}

.reader-shortcuts__list kbd {
  display: inline-grid;
  place-items: center;
  min-width: 1.875rem;
  min-height: 1.875rem;
  padding: 0 0.4rem;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid var(--reader-glass-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.2);
  color: var(--reader-text);
}

.reader-shortcuts__list span {
  color: var(--reader-muted);
  flex: 1;
}

/* Legacy nav aliases (unused in player template) */
.reader-nav__btn--premium.is-active { color: #f5c842; }

.reader-body.reader-theme-premium .reader-nav__btn--premium.is-active {
  color: #f5c842;
  border-color: rgba(245, 200, 66, 0.45);
}

/* Reader themes */
.reader-body.reader-theme-light {
  --reader-bg: #f4f4f5;
  --reader-surface: #ffffff;
  --reader-nav-bg: rgba(255, 255, 255, 0.92);
  --reader-glass-border: rgba(0, 0, 0, 0.08);
  --reader-text: #18181b;
  --reader-muted: #71717a;
}

.reader-body.reader-theme-oled {
  --reader-bg: #000000;
  --reader-surface: #000000;
  --reader-nav-bg: rgba(0, 0, 0, 0.95);
  --reader-glass-border: rgba(255, 255, 255, 0.04);
}

/* Reader themes — shared panel / below surfaces use reader tokens, not site :root light vars */
.reader-body .reader-comments-panel:not([hidden]),
.reader-body.reader-sidebar-desktop .reader-comments-panel {
  background: var(--reader-surface);
  color: var(--reader-text);
  border-color: var(--reader-glass-border);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.18);
}

.reader-body .reader-comments-panel__title {
  color: var(--reader-text);
}

.reader-body .reader-comments-panel__subtitle {
  color: var(--reader-muted);
}

.reader-body .reader-comments-panel__header {
  border-bottom-color: var(--reader-glass-border);
  background: var(--reader-surface);
}

.reader-body .reader-comments-panel__close {
  color: var(--reader-muted);
}

.reader-body .reader-comments-panel__handle {
  background: rgba(255, 255, 255, 0.18);
}

.reader-body.reader-theme-light .reader-comments-panel__handle {
  background: rgba(0, 0, 0, 0.12);
}

.reader-body .reader-below {
  --bg: var(--reader-bg);
  --bg-alt: var(--reader-surface);
  --bg-elevated: var(--reader-surface);
  --text: var(--reader-text);
  --text-muted: var(--reader-muted);
  --text-faint: var(--reader-muted);
  --border: var(--reader-glass-border);
  background: var(--reader-bg);
  border-top-color: var(--reader-glass-border);
  color: var(--reader-text);
}

.reader-body .reader-below .home-section,
.reader-body .reader-below .home-section--alt {
  background: var(--reader-bg);
}

.reader-body .reader-below .section-bar__title,
.reader-body .reader-below .breadcrumb a {
  color: var(--reader-text);
}

.reader-body .reader-below .breadcrumb {
  color: var(--reader-muted);
}

.reader-body .reader-below .breadcrumb .is-active {
  color: var(--reader-muted);
}

.reader-body.reader-theme-light .reader-settings:not([hidden]) {
  background: rgba(255, 255, 255, 0.98);
  border-left-color: var(--reader-glass-border);
  box-shadow: -12px 0 48px rgba(0, 0, 0, 0.08);
}

.reader-body.reader-theme-light .reader-settings__header {
  border-bottom-color: var(--reader-glass-border);
  background: linear-gradient(180deg, rgba(6, 182, 212, 0.08) 0%, transparent 100%);
}

.reader-body.reader-theme-light .reader-settings__section--card {
  background: rgba(0, 0, 0, 0.02);
}

.reader-body.reader-theme-light .reader-settings__chip {
  background: rgba(0, 0, 0, 0.03);
}

.reader-body.reader-theme-light .reader-progress-pill {
  color: var(--accent-dark);
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(6, 182, 212, 0.22);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.reader-body.reader-theme-light .reader-progress-track {
  background: rgba(0, 0, 0, 0.06);
}

.reader-body.reader-theme-light .reader-player__nav-divider {
  background: rgba(0, 0, 0, 0.1);
}

.reader-body.reader-theme-light .reader-end-card__inner {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.reader-body.reader-theme-light .reader-player__bottom {
  background: linear-gradient(to top, rgba(244, 244, 245, 0.92) 0%, transparent 100%);
}

.reader-body.reader-theme-light .reader-player__meta-label {
  color: #71717a;
}

.reader-body.reader-theme-light .reader-player__meta-value {
  color: #52525b;
}

.reader-body.reader-theme-light .reader-settings__select {
  background: rgba(0, 0, 0, 0.03);
}

.reader-body.reader-theme-light .reader-comments-panel .comments-section__empty,
.reader-body.reader-theme-light .reader-comments-panel .comments-section__placeholder {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(6, 182, 212, 0.18);
}

.reader-body.reader-theme-oled .reader-stage {
  background: var(--reader-bg);
}

@media (min-width: 1024px) {
  .reader-body.reader-sidebar-desktop .reader-player__top,
  .reader-body.reader-sidebar-desktop .reader-player__mini-bar {
    right: var(--reader-sidebar-w);
  }

  .reader-body.reader-sidebar-desktop .reader-player__bottom {
    right: var(--reader-sidebar-w);
  }

  .reader-body.reader-sidebar-desktop .reader-progress-track {
    right: var(--reader-sidebar-w);
  }
}

.reader-body .reader-content {
  filter: brightness(var(--reader-brightness, 100%)) contrast(var(--reader-contrast, 100%));
}

.reader-body .reader-content iframe {
  display: block;
  background: var(--reader-bg);
}

.reader-body .reader-page {
  margin-bottom: var(--reader-page-gap, 0);
}

.reader-body.reader-mode-paged .reader-page {
  display: none;
}

.reader-body.reader-mode-paged .reader-page.reader-page--active {
  display: block;
  min-height: calc(100vh - var(--reader-chrome-h) - var(--reader-bottom-h) - 2rem);
}

.reader-progress-track {
  cursor: pointer;
  pointer-events: auto;
}

.reader-progress-track:hover .reader-progress {
  height: 6px;
  margin-top: -1px;
}

/* Chapter picker */
.reader-chapter-picker {
  position: relative;
}

.reader-chapter-picker__btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.8125rem;
  color: var(--reader-text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--reader-glass-border);
  border-radius: 8px;
  cursor: pointer;
  max-width: 200px;
}

.reader-chapter-picker__current {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 120px;
}

.reader-chapter-picker__panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 600;
  width: min(280px, 90vw);
  max-height: 320px;
  background: var(--reader-surface);
  border: 1px solid var(--reader-glass-border);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.reader-chapter-picker__panel[hidden] {
  display: none !important;
}

.reader-chapter-picker__search {
  padding: 0.65rem 0.75rem;
  border: none;
  border-bottom: 1px solid var(--reader-glass-border);
  background: transparent;
  color: var(--reader-text);
  font-size: 0.875rem;
}

.reader-chapter-picker__list {
  overflow-y: auto;
  padding: 0.35rem;
}

.reader-chapter-picker__item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.65rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--reader-text);
  font-size: 0.8125rem;
  cursor: pointer;
}

.reader-chapter-picker__item:hover,
.reader-chapter-picker__item.is-active {
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent);
}

.reader-player__btn--follow[aria-pressed="true"] svg {
  fill: #ef4444;
  stroke: #ef4444;
}

/* Settings extras */
.reader-settings__range {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.65rem;
  font-size: 0.8125rem;
  color: var(--reader-muted);
}

.reader-settings__range input[type="range"] {
  flex: 1;
  accent-color: var(--accent);
}

.reader-settings__select-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: var(--reader-text);
}

.reader-settings__select-wrap > span {
  color: var(--reader-muted);
  flex: 1;
  min-width: 0;
}

.reader-settings__select {
  flex-shrink: 0;
  max-width: 52%;
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--reader-glass-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--reader-text);
}

/* End card extras */
.reader-end-card__auto-next {
  font-size: 0.8125rem;
  color: var(--reader-muted);
  margin: 0.35rem 0 0;
}

.reader-end-card__auto-next-cancel {
  margin-left: 0.5rem;
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
  border: 1px solid var(--reader-glass-border);
  border-radius: 6px;
  background: transparent;
  color: var(--reader-text);
  cursor: pointer;
}

.reader-end-card__quick-rate {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--reader-glass-border);
}

.reader-end-card__quick-rate-label {
  font-size: 0.75rem;
  color: var(--reader-muted);
  margin-bottom: 0.35rem;
}

.reader-end-card__related {
  margin-top: 0.75rem;
}

.reader-end-card__related-label {
  font-size: 0.75rem;
  color: var(--reader-muted);
  margin-bottom: 0.5rem;
}

.reader-end-card__related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.reader-end-card__related-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--reader-text);
  text-decoration: none;
}

.reader-end-card__related-item img {
  width: 36px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
}

.reader-end-card__follow,
.reader-end-card__recap {
  margin-top: 0.65rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.8125rem;
  border-radius: 8px;
  border: 1px solid var(--reader-glass-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--reader-text);
  cursor: pointer;
}

.reader-end-card__streak {
  font-size: 0.8125rem;
  color: #f59e0b;
  margin-top: 0.35rem;
}

/* Thumbnail scrubber */
.reader-thumb-strip {
  display: none;
  position: fixed;
  left: 0;
  top: var(--reader-chrome-h);
  bottom: var(--reader-bottom-h);
  width: 56px;
  z-index: 100;
  overflow-y: auto;
  padding: 0.35rem 0.25rem;
  background: var(--reader-nav-bg);
  border-right: 1px solid var(--reader-glass-border);
}

@media (min-width: 1024px) {
  .reader-thumb-strip:not([hidden]) {
    display: block;
  }
  .reader-body:has(.reader-thumb-strip:not([hidden])) .reader-layout__main {
    margin-left: 56px;
  }
}

.reader-thumb__item {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  aspect-ratio: 2/3;
  margin-bottom: 0.25rem;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--reader-glass-border);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--reader-muted);
  font-size: 0.625rem;
  cursor: pointer;
}

.reader-thumb__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  pointer-events: none;
}

.reader-thumb__num {
  position: relative;
  z-index: 1;
  margin-bottom: 0.15rem;
  padding: 0.05rem 0.25rem;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 0.5625rem;
  font-weight: 600;
  line-height: 1.2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.reader-thumb__item.has-image .reader-thumb__num {
  background: rgba(0, 0, 0, 0.5);
}

.reader-thumb__item.is-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  animation: reader-shimmer 1.2s infinite;
  pointer-events: none;
}

.reader-thumb__item.is-error {
  background: rgba(255, 255, 255, 0.06);
}

.reader-thumb__item.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
  color: var(--accent);
}

.reader-thumb__item.is-active .reader-thumb__num {
  background: var(--accent);
  color: #fff;
}

.reader-thumb-sheet__grid .reader-thumb__item {
  aspect-ratio: 2/3;
  min-height: 0;
}

.reader-thumb-toggle {
  position: fixed;
  bottom: calc(var(--reader-bottom-h) + 1rem + env(safe-area-inset-bottom));
  left: 1rem;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--reader-glass-border);
  background: var(--reader-nav-bg);
  color: var(--reader-text);
  cursor: pointer;
  backdrop-filter: blur(12px);
}

@media (min-width: 1024px) {
  .reader-thumb-toggle { display: none; }
}

.reader-thumb-sheet {
  position: fixed;
  inset: 0;
  z-index: 600;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: flex-end;
}

.reader-thumb-sheet[hidden] { display: none; }

.reader-thumb-sheet__panel {
  width: 100%;
  max-height: 70vh;
  background: var(--reader-surface);
  border-radius: 16px 16px 0 0;
  padding: 1rem;
  overflow-y: auto;
}

.reader-thumb-sheet__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.reader-thumb-sheet__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.35rem;
}

/* Hot comments overlay */
.reader-hot-comments {
  position: sticky;
  top: calc(var(--reader-chrome-h) + 0.5rem);
  z-index: 50;
  margin: 0 auto 0.75rem;
  max-width: 900px;
  padding: 0 0.75rem;
}

.reader-hot-comment {
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.35rem;
  font-size: 0.8125rem;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-radius: 8px;
  color: var(--reader-text);
}

/* Comment spoiler & reactions */
.comment-item__body--spoiler {
  cursor: pointer;
}

.comment-spoiler__label {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border-radius: 6px;
  font-size: 0.8125rem;
}

.comment-item__like-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.15rem 0.45rem;
  border: 1px solid var(--border, rgba(0,0,0,0.1));
  border-radius: 999px;
  background: transparent;
  font-size: 0.8125rem;
  cursor: pointer;
}

.comment-item__like-btn.is-active {
  background: rgba(6, 182, 212, 0.12);
  border-color: rgba(6, 182, 212, 0.35);
}

.comment-item__page {
  font-size: 0.75rem;
  color: var(--text-faint, #888);
}

.comments-form__spoiler {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  margin-right: auto;
}

.comments-form__footer {
  flex-wrap: wrap;
  gap: 0.5rem;
}

.share-embed__options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.share-embed__option {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.8125rem;
}

.share-embed__option select,
.share-embed__option input {
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.premium-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.15rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0f5132;
  background: linear-gradient(135deg, #d4f5e9, #a8e6cf);
  border: 1px solid rgba(6, 182, 212, 0.35);
  border-radius: 999px;
  vertical-align: middle;
}

.premium-badge--sm {
  padding: 0.1rem 0.35rem;
  font-size: 0.625rem;
  line-height: 1;
}

.pwa-install-hint {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(56px + env(safe-area-inset-bottom));
  z-index: 450;
  padding: 0 0.75rem;
  pointer-events: none;
}

.reader-body .pwa-install-hint {
  bottom: calc(0.75rem + env(safe-area-inset-bottom));
}

.pwa-install-hint__inner {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  max-width: 520px;
  margin: 0 auto;
  padding: 0.75rem 0.85rem;
  background: #0f172a;
  color: #f8fafc;
  border: 1px solid rgba(6, 182, 212, 0.45);
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}

.pwa-install-hint__icon { font-size: 1.25rem; flex-shrink: 0; }

.pwa-install-hint__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  font-size: 0.75rem;
  color: #cbd5e1;
}

.pwa-install-hint__text strong {
  font-size: 0.8125rem;
  color: #fff;
}

.pwa-install-hint__close {
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 1.25rem;
  line-height: 1;
  padding: 0.15rem;
  cursor: pointer;
}

@media (min-width: 769px) {
  .pwa-install-hint { bottom: 1rem; }
}

@media (max-width: 767px) {
  .reader-chapter-picker__panel {
    position: fixed;
    top: calc(var(--reader-chrome-h) + env(safe-area-inset-top) + 4px);
    left: max(0.625rem, env(safe-area-inset-left));
    right: max(0.625rem, env(safe-area-inset-right));
    width: auto;
    max-height: min(58vh, 400px);
    z-index: 520;
  }

  .reader-chapter-picker__btn {
    max-width: min(148px, 40vw);
  }

  .reader-chapter-picker__current {
    max-width: 5.5rem;
  }

  .reader-player__top-inner {
    gap: 0.35rem;
    padding-left: max(0.5rem, env(safe-area-inset-left));
    padding-right: max(0.5rem, env(safe-area-inset-right));
  }

  .reader-player__cover-img {
    width: 28px;
    height: 38px;
    border-radius: 7px;
  }

  .reader-player__title-main {
    gap: 0.45rem;
    justify-content: center;
  }

  .reader-player__meta-row {
    flex-wrap: nowrap;
    overflow: hidden;
    max-height: 1.35rem;
  }

  .reader-player__meta-item--tags,
  .reader-player__meta-item--rating,
  .reader-player__meta-item--progress {
    display: none;
  }

  .reader-player__nav-pill {
    background: rgba(12, 12, 15, 0.94);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
  }

  .reader-body.reader-theme-light .reader-player__nav-pill {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
  }

  .reader-player__fab-btn {
    background: rgba(12, 12, 15, 0.94);
  }

  .reader-body.reader-theme-light .reader-player__fab-btn {
    background: rgba(255, 255, 255, 0.98);
  }

  .reader-settings__row .reader-settings__chip {
    flex: 1 1 calc(33.333% - 0.25rem);
    padding-left: 0.35rem;
    padding-right: 0.35rem;
    font-size: 0.6875rem;
  }

  .reader-settings__body {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .ranking-live {
    padding: 0.72rem 0.78rem;
  }

  .ranking-live__chips {
    gap: 0.3rem;
  }

  .ranking-live__meter-track {
    height: 5px;
  }

  .ranking-streak {
    gap: 0.14rem;
    padding-right: 0.34rem;
  }

  .ranking-streak .ranking-streak__value {
    display: none;
  }

  .ranking-streak::before {
    width: 10px;
  }

  .ranking-streak::after {
    margin-left: 0.1rem;
  }
}

.reader-stage {
  position: relative;
  background:
    radial-gradient(ellipse 90% 40% at 50% 0%, rgba(6, 182, 212, 0.05) 0%, transparent 70%),
    radial-gradient(ellipse 60% 30% at 50% 100%, rgba(6, 182, 212, 0.03) 0%, transparent 60%),
    var(--reader-bg);
}
.reader-layout {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.reader-layout__main {
  flex: 1 1 auto;
  min-width: 0;
}

@media (min-width: 1024px) {
  .reader-layout {
    flex-direction: row;
    align-items: stretch;
  }

  .reader-layout__main {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .reader-body.reader-sidebar-desktop .reader-layout__main {
    flex: 1 1 calc(100% - var(--reader-sidebar-w));
    max-width: calc(100% - var(--reader-sidebar-w));
  }

  .reader-body.reader-sidebar-desktop {
    padding-bottom: calc(var(--reader-bottom-h) + env(safe-area-inset-bottom));
  }

  .reader-body.reader-sidebar-desktop .reader-progress-pill {
    right: calc(var(--reader-sidebar-w) + max(0.75rem, env(safe-area-inset-right)));
  }

  .reader-body.reader-sidebar-desktop .reader-extras > .comments-section,
  .reader-body.reader-sidebar-desktop .reader-extras > [data-comments],
  .reader-body .reader-extras > .comments-section,
  .reader-body .reader-extras > [data-comments] {
    display: none;
  }

  .reader-body.reader-sidebar-desktop .reader-comments__backdrop {
    display: none !important;
  }

  .reader-body.reader-sidebar-desktop .reader-comments-panel {
    display: flex !important;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    align-self: auto;
    flex: 0 0 auto;
    width: var(--reader-sidebar-w);
    max-width: var(--reader-sidebar-w);
    height: auto;
    max-height: 100vh;
    overflow: hidden;
    padding-top: 0;
    box-sizing: border-box;
    border-left: 1px solid var(--reader-glass-border);
    background: var(--reader-surface);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.18);
    animation: none;
    transform: none;
    border-radius: 0;
    z-index: 100;
    color: var(--reader-text);
  }

  .reader-body.reader-sidebar-desktop .reader-comments-panel__handle,
  .reader-body.reader-sidebar-desktop .reader-comments-panel__close {
    display: none;
  }

  .reader-body.reader-sidebar-desktop .reader-player__btn--sidebar {
    display: none !important;
  }

  .reader-body.reader-sidebar-desktop .reader-end-card__comments-btn {
    display: none;
  }

  .reader-body.reader-sidebar-desktop.reader-comments-open {
    overflow: auto;
  }

  .reader-body.reader-sidebar-desktop.reader-player--chrome-hidden .reader-comments-panel {
    padding-top: 0;
  }

  .reader-body.reader-sidebar-desktop .reader-comments-panel__header {
    height: calc(var(--reader-chrome-h) + env(safe-area-inset-top));
    box-sizing: border-box;
    padding: calc(env(safe-area-inset-top) + 0.35rem) 0.95rem 0.35rem 1.05rem;
    align-items: center;
  }

  .reader-body.reader-sidebar-desktop.reader-player--chrome-hidden .reader-comments-panel__header {
    height: calc(var(--reader-mini-h) + env(safe-area-inset-top));
    padding-top: calc(env(safe-area-inset-top) + 0.15rem);
    padding-bottom: 0.15rem;
  }

  .reader-body.reader-sidebar-desktop .reader-settings:not([hidden]) {
    right: var(--reader-sidebar-w);
    width: min(340px, calc(100vw - var(--reader-sidebar-w) - 1rem));
  }

  .reader-body.reader-sidebar-desktop.reader-player--chrome-hidden .reader-progress-pill {
    top: calc(var(--reader-mini-h) + env(safe-area-inset-top) + 0.5rem);
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .reader-player__btn--sidebar {
    display: grid !important;
  }

  .reader-comments-panel:not([hidden]) {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: min(380px, 88vw);
    max-height: none;
    overflow: hidden;
    z-index: 540;
    border-left: 1px solid var(--reader-glass-border);
    border-radius: 0;
    transform: translateX(100%);
    animation: none;
    transition: transform 0.32s var(--reader-ease);
  }

  .reader-body.reader-comments-open .reader-comments-panel:not([hidden]) {
    transform: translateX(0);
  }

  .reader-comments-panel__handle {
    display: none;
  }
}

.reader-player__btn--sidebar.is-active {
  color: var(--accent);
  background: rgba(6, 182, 212, 0.14);
  border-color: rgba(6, 182, 212, 0.35);
}

.reader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  background: transparent;
  min-height: 60vh;
  user-select: none;
  -webkit-user-select: none;
  padding-top: calc(var(--reader-chrome-h) + env(safe-area-inset-top) + 0.75rem);
  padding-bottom: 0.5rem;
  scroll-margin-top: calc(var(--reader-chrome-h) + env(safe-area-inset-top));
}

.reader-body.reader-fit-height .reader-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - var(--reader-chrome-h) - var(--reader-bottom-h) - env(safe-area-inset-top) - env(safe-area-inset-bottom));
}

.reader-body.reader-fit-height .reader-page__canvas {
  margin: 0.5rem auto;
}

.reader-page {
  width: 100%;
  max-width: var(--reader-page-max, 900px);
  line-height: 0;
  position: relative;
  min-height: min(80vh, calc(900px * 1.5));
}

.reader-page + .reader-page {
  margin-top: 1px;
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.025);
}

.reader-page__canvas {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}

.reader-page__canvas[hidden] {
  display: none !important;
}

.reader-page.is-loaded .reader-page__canvas {
  display: block;
}

.reader-page__skeleton {
  width: 100%;
  aspect-ratio: 2 / 3;
  max-height: 80vh;
  min-height: min(80vh, calc(900px * 1.5));
  background: rgba(255, 255, 255, 0.03);
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}

.reader-page.is-loaded .reader-page__skeleton {
  display: none;
}

.reader-page.is-loading .reader-page__skeleton-shimmer {
  animation: reader-shimmer 1.4s ease-in-out infinite;
}

.reader-page__skeleton-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(6, 182, 212, 0.06) 45%,
    rgba(255, 255, 255, 0.05) 55%,
    transparent 100%
  );
  transform: translateX(-100%);
}

@keyframes reader-shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.reader-page.is-error .reader-page__skeleton {
  display: grid;
  place-items: center;
  color: var(--reader-muted);
  font-size: 0.875rem;
}

.reader-page.is-error .reader-page__skeleton::after {
  content: 'Không tải được trang';
}

.reader-empty {
  padding: 4rem 1.5rem;
  text-align: center;
  color: var(--reader-muted);
}

.reader-empty svg {
  margin-bottom: 1rem;
  opacity: 0.45;
  color: var(--accent);
}

.reader-empty p {
  margin: 0 0 1.25rem;
  font-size: 0.9375rem;
}

.reader-next-cta {
  position: fixed;
  right: 1rem;
  bottom: calc(var(--reader-bottom-h) + env(safe-area-inset-bottom) + 0.75rem);
  z-index: 480;
  opacity: 0;
  transform: translateY(12px) scale(0.95);
  transition: opacity 0.28s ease, transform 0.28s ease;
  pointer-events: none;
}

.reader-next-cta.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.reader-next-cta.is-suppressed {
  opacity: 0 !important;
  transform: translateY(12px) scale(0.95) !important;
  pointer-events: none !important;
}

.reader-next-cta__fab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.55rem 1rem 0.55rem 1.1rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border-radius: 999px;
  box-shadow: 0 6px 24px rgba(6, 182, 212, 0.45);
  transition: transform var(--transition), box-shadow var(--transition);
}

.reader-next-cta__fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(6, 182, 212, 0.55);
}

.reader-next-cta__fab-text { white-space: nowrap; }

/* End-of-chapter recap card */
.reader-end-card[hidden] {
  display: none !important;
}

.reader-end-card {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1rem;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(24px);
  transition:
    opacity 0.5s var(--reader-ease),
    transform 0.5s var(--reader-ease),
    max-height 0.5s var(--reader-ease),
    padding 0.5s var(--reader-ease),
    visibility 0s linear 0.5s;
}

.reader-end-card.is-visible {
  max-height: 1200px;
  padding: 2rem 1rem 2.5rem;
  overflow: visible;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition:
    opacity 0.5s var(--reader-ease),
    transform 0.5s var(--reader-ease),
    max-height 0.5s var(--reader-ease),
    padding 0.5s var(--reader-ease),
    visibility 0s linear 0s;
}

.reader-end-card__inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem 1.25rem;
  padding: 1.25rem;
  background: rgba(14, 14, 18, 0.88);
  border: 1px solid var(--reader-glass-border);
  border-radius: 16px;
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.reader-end-card__cover {
  grid-row: span 2;
  flex-shrink: 0;
  width: 72px;
  min-height: 96px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04) url('/images/placeholder.svg') center / cover no-repeat;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.reader-end-card__cover img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.reader-end-card__label {
  margin: 0;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.reader-end-card__comic {
  margin: 0.2rem 0 0;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--reader-text);
  line-height: 1.3;
}

.reader-end-card__chapter {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  color: var(--reader-muted);
}

.reader-end-card__author {
  margin: 0.2rem 0 0;
  font-size: 0.75rem;
  color: var(--reader-muted);
}

.reader-end-card__rating {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--reader-muted);
}

.reader-end-card__rating .star-display { font-size: 0.75rem; }

.reader-end-card__actions {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.reader-end-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.65rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(6, 182, 212, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.reader-end-card__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(6, 182, 212, 0.5);
}

.reader-end-card__cta--secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--reader-glass-border);
  box-shadow: none;
  color: var(--reader-text);
}

.reader-end-card__next-title {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--reader-muted);
  text-align: center;
}

.reader-end-card__done {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: center;
  color: var(--reader-text);
}

.reader-end-card__comments-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 40px;
  padding: 0.5rem 1rem;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--reader-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--reader-glass-border);
  border-radius: 10px;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.reader-end-card__comments-btn:hover {
  color: var(--accent);
  border-color: rgba(6, 182, 212, 0.4);
  background: rgba(6, 182, 212, 0.08);
}

/* Share popover — reader modal */
.reader-share-popover:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 545;
  display: grid;
  place-items: center;
  padding: max(0.75rem, env(safe-area-inset-top)) max(0.75rem, env(safe-area-inset-right)) max(0.75rem, env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left));
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  animation: readerFadeIn 0.2s ease;
}

.reader-share-popover__panel {
  width: min(300px, 100%);
  background: rgba(14, 14, 18, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(6, 182, 212, 0.06);
  animation: readerModalIn 0.26s var(--reader-ease);
}

.reader-share-popover__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.reader-share-popover__header h2 {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.reader-share-popover__body { padding: 0.75rem; }

/* Comments panel — mobile slide-up, tablet overlay, desktop sidebar */
.reader-comments__backdrop {
  position: fixed;
  inset: 0;
  z-index: 535;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.32s ease;
}

.reader-comments__backdrop.is-visible { opacity: 1; }

.reader-comments__backdrop[hidden],
.reader-comments-panel[hidden],
.reader-share-popover[hidden] {
  display: none !important;
}

.reader-comments-panel:not([hidden]) {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 540;
  max-height: min(78vh, 640px);
  display: flex;
  flex-direction: column;
  color: var(--reader-text);
  background: var(--reader-surface);
  border-top: 1px solid var(--reader-glass-border);
  border-radius: 20px 20px 0 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.28);
  padding-bottom: env(safe-area-inset-bottom);
  animation: readerSheetIn 0.36s var(--reader-ease);
}

@keyframes readerSheetIn {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.reader-comments-panel__handle {
  width: 36px;
  height: 4px;
  margin: 0.5rem auto 0;
  background: rgba(0, 0, 0, 0.12);
  border-radius: 999px;
  flex-shrink: 0;
}

.reader-comments-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.875rem 0.55rem 1.125rem;
  border-bottom: 1px solid var(--reader-glass-border);
  flex-shrink: 0;
}

.reader-comments-panel__heading {
  min-width: 0;
  flex: 1;
}

.reader-comments-panel__title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--reader-text);
}

.reader-comments-panel__subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--reader-muted);
}

.reader-comments-panel__close {
  flex-shrink: 0;
  color: var(--reader-muted);
}

.reader-comments-panel__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 1rem 1rem;
  -webkit-overflow-scrolling: touch;
  --sb-size: 7px;
  --sb-track: transparent;
  --sb-thumb: rgba(6, 182, 212, 0.38);
  --sb-thumb-hover: rgba(6, 182, 212, 0.62);
}

.reader-body.reader-theme-light .reader-comments-panel__body {
  --sb-thumb: rgba(6, 182, 212, 0.3);
  --sb-thumb-hover: rgba(6, 182, 212, 0.52);
}

.reader-comments-panel .comments-section {
  margin-top: 0;
  padding-top: 0.75rem;
  border-top: none;
}

.reader-comments-panel .comments-section__head h2 {
  font-size: 0.9375rem;
}

.reader-comments-panel .comments-form__input {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--reader-glass-border);
  color: var(--reader-text);
}

.reader-comments-panel .comments-form__input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2);
}

.reader-comments-panel .comment-item {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--reader-glass-border);
  transition: background var(--transition-smooth), border-color var(--transition-smooth);
}

.reader-comments-panel .comment-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(6, 182, 212, 0.22);
}

.reader-comments-panel .comment-reply {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--reader-glass-border);
}

.reader-comments-panel .comment-item__body {
  color: var(--reader-muted);
}

.reader-comments-panel .comments-section {
  border-top-color: var(--reader-glass-border);
}

.reader-comments-panel .comments-section__placeholder,
.reader-comments-panel .comments-section__empty,
.reader-comments-panel .comments-section__error {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(6, 182, 212, 0.22);
}

.reader-comments-panel .comments-section__empty {
  border-style: dashed;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.reader-comments-panel .comments-section__placeholder-title,
.reader-comments-panel .comments-section__empty-title {
  color: var(--reader-text);
}

.reader-comments-panel .comments-section__placeholder-text,
.reader-comments-panel .comments-section__empty-text,
.reader-comments-panel .comments-section__error-text,
.reader-comments-panel .comments-section__loading {
  color: var(--reader-muted);
}

.reader-comments-panel .comments-section__placeholder-icon,
.reader-comments-panel .comments-section__empty-icon {
  color: var(--accent);
  filter: none;
}

.reader-comments-panel .comments-section__error {
  background: rgba(220, 53, 69, 0.06);
  border-color: rgba(220, 53, 69, 0.18);
}

.reader-comments-panel .comments-section__login-prompt {
  background: var(--bg-alt);
  border-color: var(--border);
  color: var(--text-muted);
}

.reader-body.reader-comments-open:not(.reader-sidebar-desktop) {
  overflow: hidden;
}

.reader-body.reader-comments-open:not(.reader-sidebar-desktop) .reader-player__bottom {
  transform: translateY(calc(100% + env(safe-area-inset-bottom) + 1.25rem));
  opacity: 0;
  pointer-events: none;
}

.reader-body.reader-player--chrome-hidden .reader-next-cta {
  bottom: calc(0.75rem + env(safe-area-inset-bottom));
}

.reader-extras {
  padding: 1.5rem 0 0.75rem;
}

.reader-extras .action-bar {
  margin-bottom: 0;
}

.reader-below {
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.reader-body .reader-below .section-bar__more {
  color: var(--accent);
}

.reader-footer {
  padding: 1rem 0 2rem;
  background: transparent;
  border-top: none;
}

.reader-footer__nav {
  display: none;
}

.reader-footer .breadcrumb {
  justify-content: center;
  flex-wrap: wrap;
}

.reader-body.is-immersive .reader-extras,
.reader-body.is-immersive .reader-footer,
.reader-body.is-immersive .recommendations-section,
.reader-body.is-immersive .reader-extras ~ .home-section { display: none; }

.reader-body.is-immersive .reader-next-cta {
  bottom: calc(0.75rem + env(safe-area-inset-bottom));
}

@media (max-width: 480px) {
  .reader-end-card__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .reader-end-card__cover {
    grid-row: auto;
    margin: 0 auto;
  }

  .reader-end-card__rating {
    justify-content: center;
  }

  .reader-player__nav-item span {
    display: none;
  }

  .reader-player__nav-item {
    min-width: 42px;
    padding: 0.4rem;
  }

  .reader-player__nav-item--comments span {
    display: none;
  }
}

/* ── Search ── */
.search-form {
  display: flex;
  gap: 0.5rem;
  max-width: 480px;
  margin-top: 0.75rem;
}

.search-form__input {
  flex: 1;
  padding: 0.55rem 0.75rem;
  font-family: inherit;
  font-size: 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
}

.search-form__input:focus { border-color: var(--accent); }

.search-results__meta {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ── Load more / empty ── */
.load-more-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1.25rem;
}

.load-more-wrap__hint {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-faint);
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
}

.empty-state h3 { margin: 0 0 0.35rem; color: var(--text); }

/* ── Footer ── */
.site-footer {
  margin-top: auto;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr) 1.2fr;
  gap: 1.5rem;
  padding: 2rem 0 1.5rem;
}

.site-footer__tagline {
  margin: 0.65rem 0 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 280px;
}

.site-footer__heading {
  margin: 0 0 0.65rem;
  font-size: 0.875rem;
  font-weight: 700;
}

.site-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.site-footer__links a {
  font-size: 0.8125rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.site-footer__links a:hover { color: var(--accent); }

.site-footer__bottom {
  border-top: 1px solid var(--border);
  padding: 0.85rem 0;
}

.site-footer__bottom-inner p {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-faint);
}

/* ── Mobile bottom nav ── */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 150;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding: 0.35rem 0 calc(0.35rem + env(safe-area-inset-bottom));
}

.mobile-bottom-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.25rem;
  font-size: 0.625rem;
  color: var(--text-faint);
}

.mobile-bottom-nav__item.is-active { color: var(--accent); }

/* ── Auth ── */
.site-body--auth .site-footer,
.site-body--auth .mobile-bottom-nav { display: none; }

.site-body--auth { padding-bottom: 0; }

.auth-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.auth-page {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100dvh - var(--header-h));
  padding: 2rem 1rem;
  background-color: var(--bg-alt);
  background-image:
    radial-gradient(ellipse 70% 45% at 50% -10%, rgba(6, 182, 212, 0.1), transparent 70%),
    radial-gradient(circle at 1px 1px, rgba(6, 182, 212, 0.05) 1px, transparent 0);
  background-size: 100% 100%, 22px 22px;
}

.auth-page__inner {
  width: 100%;
  max-width: 420px;
  margin-inline: auto;
}

.auth-card {
  width: 100%;
  padding: 2rem 2rem 1.75rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(255, 255, 255, 0.6) inset;
}

.auth-card__header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.auth-card__logo {
  justify-content: center;
  margin-bottom: 1.25rem;
  transition: opacity var(--transition);
}

.auth-card__logo:hover { opacity: 0.85; }

.auth-card__logo .site-logo__mark {
  width: 36px;
  height: 36px;
  font-size: 1rem;
}

.auth-card__title {
  margin: 0 0 0.35rem;
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.auth-card__sub {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.auth-form__field { margin-bottom: 1rem; }

.auth-form__field:last-of-type { margin-bottom: 0.25rem; }

.auth-form__field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.auth-form__field input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.auth-form__field input::placeholder { color: var(--text-faint); }

.auth-form__field input:hover { border-color: var(--border-hover); }

.auth-form__field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.auth-form__error {
  margin: 0.85rem 0 0;
  padding: 0.6rem 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #b91c1c;
  background: rgba(220, 38, 38, 0.07);
  border: 1px solid rgba(220, 38, 38, 0.18);
  border-radius: var(--radius-sm);
}

.auth-form__field-error {
  margin: 0.25rem 0 0;
  padding: 0;
  font-size: 0.75rem;
  line-height: 1.35;
  color: #b91c1c;
  background: none;
  border: none;
  border-radius: 0;
}

.auth-form__submit {
  width: 100%;
  margin-top: 1.25rem;
  padding: 0.7rem 1rem;
  font-size: 0.9375rem;
  box-shadow: 0 2px 8px rgba(6, 182, 212, 0.25);
}

.auth-form__submit:hover {
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.32);
}

.auth-card__footer {
  margin: 1.35rem 0 0;
  padding-top: 1.25rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

.auth-card__footer a {
  color: var(--accent);
  font-weight: 600;
  transition: color var(--transition);
}

.auth-card__footer a:hover { color: var(--accent-hover); }

.auth-social {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.auth-social__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.72rem 1rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), background var(--transition);
}

.auth-social__btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.auth-social__btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.auth-social__btn--google {
  color: #3c4043;
  background: #fff;
  border-color: #dadce0;
}

.auth-social__btn--google:hover {
  border-color: #c6c9cc;
  background: #fafafa;
}

.auth-social__btn--facebook {
  color: #fff;
  background: #1877f2;
  border-color: #1877f2;
}

.auth-social__btn--facebook:hover {
  background: #166fe0;
  border-color: #166fe0;
}

.auth-social__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.auth-social__btn.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
  box-shadow: var(--shadow-sm);
}

.auth-social__notice {
  margin: -0.5rem 0 1rem;
  font-size: 0.75rem;
  color: var(--text-faint);
  text-align: center;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.25rem;
  color: var(--text-faint);
  font-size: 0.8125rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-divider span {
  white-space: nowrap;
}

@media (max-width: 480px) {
  .auth-page { padding: 1.25rem 1rem; }

  .auth-card {
    padding: 1.5rem 1.25rem 1.35rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
  }

  .auth-card__title { font-size: 1.25rem; }
}

/* ── Auth modal ── */
.site-body.auth-modal-open { overflow: hidden; }

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
}

.auth-modal[hidden] { display: none !important; }

.auth-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.auth-modal.is-open .auth-modal__backdrop { opacity: 1; }

.auth-modal__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 392px;
  max-height: 90vh;
  max-height: 90dvh;
  overflow: hidden;
  padding: 1rem 1.15rem 0.95rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.16),
    0 4px 12px rgba(0, 0, 0, 0.06),
    0 0 0 1px rgba(255, 255, 255, 0.55) inset;
  transform: translateY(10px) scale(0.985);
  opacity: 0;
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.auth-modal.is-open .auth-modal__dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.auth-modal__close {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
}

.auth-modal__close:hover {
  color: var(--text);
  background: var(--bg-alt);
}

.auth-modal__tabs {
  display: flex;
  gap: 0.25rem;
  margin: 0 1.75rem 0.75rem 0;
  padding: 0.2rem;
  background: var(--bg-alt);
  border-radius: 10px;
}

.auth-modal__tab {
  flex: 1;
  padding: 0.42rem 0.65rem;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: color var(--transition), background var(--transition), box-shadow var(--transition);
}

.auth-modal__tab.is-active {
  color: var(--accent);
  background: var(--bg-elevated);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.auth-modal__title {
  margin: 0 0 0.65rem;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  text-align: center;
  line-height: 1.25;
}

.auth-modal__panel[hidden] { display: none !important; }

.auth-modal__switch {
  margin: 0.65rem 0 0;
  padding-top: 0.65rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

.auth-modal__switch-link {
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: 600;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--transition);
}

.auth-modal__switch-link:hover { color: var(--accent-hover); }

.auth-modal__forgot {
  margin: 0.2rem 0 0.75rem;
  text-align: right;
  font-size: 0.8125rem;
}

.auth-modal__hint {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.auth-form__success {
  margin: 0 0 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: 8px;
  font-size: 0.875rem;
  color: #059669;
  background: rgb(16 185 129 / 0.1);
  border: 1px solid rgb(16 185 129 / 0.25);
}

/* Compact modal form + social overrides */
.auth-modal .auth-social {
  flex-direction: row;
  gap: 0.45rem;
  margin-bottom: 0.6rem;
}

.auth-modal .auth-social__btn {
  flex: 1;
  min-width: 0;
  padding: 0.42rem 0.45rem;
  font-size: 0.75rem;
  gap: 0.35rem;
  border-radius: 8px;
  box-shadow: none;
}

.auth-modal .auth-social__btn:hover {
  transform: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.auth-modal .auth-social__icon {
  width: 15px;
  height: 15px;
}

.auth-modal .auth-social__notice {
  margin: -0.15rem 0 0.45rem;
  font-size: 0.6875rem;
  line-height: 1.35;
  color: var(--text-faint);
  text-align: center;
}

.auth-modal .auth-social__notice--inline {
  margin: 0.35rem 0 0;
  padding: 0;
  background: none;
  border: none;
}

.auth-modal .auth-divider {
  gap: 0.45rem;
  margin: 0 0 0.65rem;
  font-size: 0.6875rem;
}

.auth-modal .auth-form__field {
  margin-bottom: 0.5rem;
}

.auth-modal .auth-form__field:last-of-type {
  margin-bottom: 0;
}

.auth-modal .auth-form__field label {
  margin-bottom: 0.2rem;
  font-size: 0.75rem;
}

.auth-modal .auth-form__field input {
  padding: 0.48rem 0.65rem;
  font-size: 0.875rem;
  border-radius: 8px;
}

.auth-modal .auth-form__field input[aria-invalid="true"] {
  border-color: rgba(220, 38, 38, 0.55);
}

.auth-modal .auth-form__field input[aria-invalid="true"]:focus {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.auth-modal .auth-form__error {
  margin: 0 0 0.45rem;
  padding: 0.4rem 0.55rem;
  font-size: 0.75rem;
  line-height: 1.35;
}

.auth-modal .auth-form__field-error {
  margin: 0.15rem 0 0;
  font-size: 0.6875rem;
}

.auth-modal .auth-form__submit {
  margin-top: 0.6rem;
  padding: 0.52rem 1rem;
  font-size: 0.875rem;
  border-radius: 8px;
}

.auth-modal .auth-form__submit:hover {
  box-shadow: 0 3px 12px rgba(6, 182, 212, 0.28);
}

.auth-form__submit.is-loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.auth-form__submit.is-loading .auth-form__submit-spinner {
  display: block;
  position: absolute;
  inset: 0;
  margin: auto;
  width: 1.15rem;
  height: 1.15rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: auth-spin 0.65s linear infinite;
}

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

.site-mobile-nav__auth-btn {
  width: 100%;
  text-align: left;
  font-family: inherit;
  font-size: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

.site-body--oauth-done {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
}

.oauth-done {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

@media (max-width: 640px) {
  .auth-modal {
    align-items: flex-end;
    padding: 0;
  }

  .auth-modal__dialog {
    max-width: none;
    max-height: 92vh;
    max-height: 92dvh;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 1rem 1rem 1.1rem;
    border-radius: 14px 14px 0 0;
    transform: translateY(100%);
  }

  .auth-modal__dialog::-webkit-scrollbar {
    display: none;
  }

  .auth-modal.is-open .auth-modal__dialog {
    transform: translateY(0);
  }

  .auth-modal .auth-social {
    flex-direction: row;
  }
}

/* ── Action bar (follow + share) ── */
.action-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
  padding: 0.55rem 0.65rem 0.55rem 0.55rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

.action-bar__follow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.48rem 1.05rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  color: var(--text);
  background: linear-gradient(180deg, #fff 0%, var(--bg-alt) 100%);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition), transform var(--transition);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.action-bar__follow:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 2px 10px rgba(6, 182, 212, 0.12);
}

.action-bar__follow:active {
  transform: scale(0.98);
}

.action-bar__follow[aria-pressed='true'] {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 2px 10px rgba(6, 182, 212, 0.16);
}

.action-bar__follow-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.action-bar__heart {
  width: 18px;
  height: 18px;
  display: block;
}

.action-bar__heart--filled {
  display: none;
  color: #e11d48;
}

.action-bar__follow[aria-pressed='true'] .action-bar__heart--outline {
  display: none;
}

.action-bar__follow[aria-pressed='true'] .action-bar__heart--filled {
  display: block;
}

.action-bar__divider {
  width: 1px;
  height: 1.75rem;
  background: var(--border);
  flex-shrink: 0;
}

.action-bar__share {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex: 1;
  min-width: 0;
}

.action-bar__share-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  white-space: nowrap;
}

.action-bar__share-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.action-bar__pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.72rem;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}

.action-bar__pill svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.action-bar__pill--fb:hover {
  background: rgba(24, 119, 242, 0.12);
  border-color: rgba(24, 119, 242, 0.22);
  color: #1877f2;
}

.action-bar__pill--zalo:hover {
  background: rgba(0, 104, 255, 0.1);
  border-color: rgba(0, 104, 255, 0.2);
  color: #0068ff;
}

.action-bar__pill--copy:hover,
.action-bar__pill--copy.is-copied {
  background: var(--accent-soft);
  border-color: rgba(6, 182, 212, 0.25);
  color: var(--accent);
}

.action-bar__pill--copy.is-copied .action-bar__pill-text {
  color: var(--accent);
}

@media (max-width: 640px) {
  .action-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    padding: 0.75rem;
    border-radius: 14px;
  }

  .action-bar__follow {
    justify-content: center;
    width: 100%;
  }

  .action-bar__divider {
    display: none;
  }

  .action-bar__share {
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
  }

  .action-bar__share-pills {
    justify-content: center;
    border-radius: 12px;
    padding: 0.35rem;
  }

  .action-bar__pill {
    flex: 1;
    justify-content: center;
    min-width: 0;
  }

  .action-bar__pill-text {
    display: none;
  }

  .action-bar__pill {
    padding: 0.55rem;
  }
}

@media (max-width: 400px) {
  .action-bar__share-label {
    text-align: center;
  }
}

.comic-card {
  position: relative;
}

.comic-card__fav {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #5c6370;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.16);
  transition: transform var(--transition), color var(--transition), background var(--transition), box-shadow var(--transition);
}
.comic-card__fav:hover { color: #e11d48; background: #fff; transform: scale(1.12); box-shadow: var(--shadow-md); }
.comic-card__fav:active { transform: scale(0.92); }

.comic-card__heart { width: 18px; height: 18px; display: block; }
.comic-card__heart--filled { display: none; color: #e11d48; }
.comic-card__fav[aria-pressed='true'] { color: #e11d48; background: #fff; }
.comic-card__fav[aria-pressed='true'] .comic-card__heart--outline { display: none; }
.comic-card__fav[aria-pressed='true'] .comic-card__heart--filled { display: block; animation: heartPop 0.32s ease; }

@keyframes heartPop {
  0% { transform: scale(0.6); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.site-toast {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  z-index: 9999;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  font-size: 0.875rem;
  color: var(--text);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  pointer-events: none;
}

.site-toast.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.comments-section {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.reader-body .comments-section {
  border-top-color: var(--reader-glass-border);
}

.reader-body .comments-section--panel .comments-section__head {
  display: none;
}

.comments-section__placeholder,
.comments-section__empty,
.comments-section__error {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem 1rem;
  border-radius: var(--radius-sm);
  animation: commentsFadeIn 0.35s var(--reader-ease, ease) both;
}

.comments-section__placeholder {
  gap: 0.35rem;
  padding: 1.25rem 0.75rem;
  color: var(--text-muted);
}

.comments-section__placeholder-icon,
.comments-section__empty-icon,
.comments-section__error-icon {
  display: grid;
  place-items: center;
  margin-bottom: 0.35rem;
  color: var(--accent);
  opacity: 0.85;
}

.comments-section__placeholder-icon svg,
.comments-section__empty-icon svg,
.comments-section__error-icon svg {
  display: block;
}

.comments-section__placeholder-title,
.comments-section__empty-title,
.comments-section__error-title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
}

.comments-section__placeholder-text,
.comments-section__empty-text,
.comments-section__error-text {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 22rem;
}

.comments-section__empty {
  gap: 0.4rem;
  padding: 2rem 1rem;
  background: var(--bg-alt);
  border: 1px dashed rgba(6, 182, 212, 0.22);
}

.comments-section__empty-cta {
  margin-top: 0.65rem;
}

.comments-section__error {
  gap: 0.4rem;
  padding: 1.75rem 1rem;
  background: rgba(220, 53, 69, 0.06);
  border: 1px solid rgba(220, 53, 69, 0.18);
}

.comments-section__error-icon {
  color: #e85d6c;
}

.comments-section__error-title {
  color: #e85d6c;
}

.comments-section__retry {
  margin-top: 0.5rem;
}

.comments-section__content {
  animation: commentsFadeIn 0.35s var(--reader-ease, ease) both;
}

.comments-section__loading {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 1rem 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
  animation: commentsFadeIn 0.25s ease both;
}

/* CRITICAL: the author `display: flex` rules on the state blocks above override
   the user-agent `[hidden] { display: none }` (author origin wins the cascade),
   which left the "Đang tải bình luận…" spinner, placeholder and error boxes
   permanently visible no matter what state JS set. Force [hidden] to win so a
   section only ever shows its current state (e.g. "Chưa có bình luận" when empty). */
.comments-section [hidden],
.comments-section__placeholder[hidden],
.comments-section__loading[hidden],
.comments-section__empty[hidden],
.comments-section__error[hidden],
.comments-section__content[hidden],
.comments-section__form-wrap[hidden],
.comments-section__login-prompt[hidden],
.comments-section__load-more[hidden] {
  display: none !important;
}

.reader-body .comments-section__placeholder,
.reader-body .comments-section__empty,
.reader-body .comments-section__error {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}

.reader-body .comments-section__empty {
  border-style: dashed;
  border-color: rgba(6, 182, 212, 0.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.reader-body .comments-section__placeholder-title,
.reader-body .comments-section__empty-title {
  color: var(--reader-text);
}

.reader-body .comments-section__placeholder-text,
.reader-body .comments-section__empty-text,
.reader-body .comments-section__error-text {
  color: var(--reader-muted);
}

.reader-body .comments-section__placeholder-icon,
.reader-body .comments-section__empty-icon {
  color: var(--accent);
  filter: drop-shadow(0 4px 12px rgba(6, 182, 212, 0.25));
}

.reader-body .comments-section__error {
  background: rgba(220, 53, 69, 0.08);
  border-color: rgba(220, 53, 69, 0.22);
}

.reader-body .comments-section__loading {
  color: var(--reader-muted);
}

.comments-section__loading-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(6, 182, 212, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: commentsSpin 0.7s linear infinite;
}

@keyframes commentsSpin {
  to { transform: rotate(360deg); }
}

@keyframes commentsFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.comment-item__header {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.35rem;
}

.comment-item__avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(6, 182, 212, 0.3);
}

.comment-item__author-block {
  min-width: 0;
  flex: 1;
}

.comment-item__author-block .comment-item__author {
  margin-bottom: 0;
}

.comment-reply .comment-item__header {
  margin-bottom: 0.25rem;
}

.comment-reply .comment-item__avatar {
  width: 26px;
  height: 26px;
  font-size: 0.625rem;
}

.comments-section__head h2 {
  margin: 0 0 0.85rem;
  font-size: 1rem;
  font-weight: 700;
}

.comments-section__count { color: var(--text-faint); font-weight: 500; }

.comments-form__input {
  width: 100%;
  padding: 0.65rem 0.75rem;
  font-family: inherit;
  font-size: 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  resize: vertical;
  outline: none;
}

.comments-form__input:focus { border-color: var(--accent); }

.comments-form__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.4rem;
  gap: 0.5rem;
}

.comments-form__hint { font-size: 0.75rem; color: var(--text-faint); }

.comments-section__login-prompt {
  padding: 0.75rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.85rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.comments-section__login-prompt a,
.comments-section__auth-link {
  color: var(--accent);
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.comments-section__auth-link:hover { color: var(--accent-hover); }

.comments-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.comment-item {
  padding: 0.75rem 0.85rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: background var(--transition-smooth, 0.2s ease), border-color var(--transition-smooth, 0.2s ease);
}

.reader-body .comment-item {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.06);
}

.reader-body .comment-item:hover {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(6, 182, 212, 0.15);
}

.reader-body .comment-reply {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.05);
}

.reader-body .comments-form__input {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--reader-text);
}

.reader-body .comments-form__input:focus {
  border-color: rgba(6, 182, 212, 0.45);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.12);
}

.reader-body .comments-section__login-prompt {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--reader-muted);
}

/* Comments panel — reader-themed detail (light theme uses slightly stronger surfaces) */
.reader-body .reader-comments-panel .comments-section {
  border-top-color: var(--reader-glass-border);
}

.reader-body .reader-comments-panel .comments-section__placeholder,
.reader-body .reader-comments-panel .comments-section__empty,
.reader-body .reader-comments-panel .comments-section__error {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(6, 182, 212, 0.22);
}

.reader-body.reader-theme-light .reader-comments-panel .comments-section__placeholder,
.reader-body.reader-theme-light .reader-comments-panel .comments-section__empty,
.reader-body.reader-theme-light .reader-comments-panel .comments-section__error {
  background: rgba(0, 0, 0, 0.03);
}

.reader-body .reader-comments-panel .comments-section__empty {
  border-style: dashed;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.reader-body .reader-comments-panel .comments-section__placeholder-title,
.reader-body .reader-comments-panel .comments-section__empty-title {
  color: var(--reader-text);
}

.reader-body .reader-comments-panel .comments-section__placeholder-text,
.reader-body .reader-comments-panel .comments-section__empty-text,
.reader-body .reader-comments-panel .comments-section__error-text,
.reader-body .reader-comments-panel .comments-section__loading {
  color: var(--reader-muted);
}

.reader-body .reader-comments-panel .comments-section__placeholder-icon,
.reader-body .reader-comments-panel .comments-section__empty-icon {
  filter: none;
}

.reader-body .reader-comments-panel .comments-section__error {
  background: rgba(220, 53, 69, 0.08);
  border-color: rgba(220, 53, 69, 0.22);
}

.reader-body .reader-comments-panel .comment-item {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--reader-glass-border);
}

.reader-body.reader-theme-light .reader-comments-panel .comment-item {
  background: rgba(0, 0, 0, 0.03);
}

.reader-body .reader-comments-panel .comment-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(6, 182, 212, 0.22);
}

.reader-body.reader-theme-light .reader-comments-panel .comment-item:hover {
  background: rgba(6, 182, 212, 0.08);
}

.reader-body .reader-comments-panel .comment-reply {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--reader-glass-border);
}

.reader-body .reader-comments-panel .comments-form__input {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--reader-glass-border);
  color: var(--reader-text);
}

.reader-body.reader-theme-light .reader-comments-panel .comments-form__input {
  background: #fff;
}

.reader-body .reader-comments-panel .comments-form__input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2);
}

.reader-body .reader-comments-panel .comments-section__login-prompt {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--reader-glass-border);
  color: var(--reader-muted);
}

.reader-body.reader-theme-light .reader-comments-panel .comments-section__login-prompt {
  background: rgba(0, 0, 0, 0.03);
}

.reader-body .reader-comments-panel .comment-item__body {
  color: var(--reader-muted);
}

.comment-item__author {
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.comment-item__body {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0;
  padding-left: calc(32px + 0.55rem);
}

.reader-body .comment-item__body {
  color: var(--reader-muted);
}

.comment-reply .comment-item__body {
  padding-left: calc(26px + 0.55rem);
}

.comment-item__meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.25rem;
}

.comment-item__date {
  font-size: 0.6875rem;
  color: var(--text-faint);
}

.comment-item__reply-btn {
  border: none;
  background: none;
  padding: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
}

.comment-item__reply-btn:hover { text-decoration: underline; }

.comment-replies {
  list-style: none;
  margin: 0.55rem 0 0;
  padding: 0 0 0 0.85rem;
  border-left: 2px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.comment-reply {
  padding: 0.45rem 0.55rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.comment-reply-form {
  margin-top: 0.55rem;
}

.comments-section__load-more { margin-top: 0.75rem; }

.recommendations-section { margin-top: 0.5rem; }

.history-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.history-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 0.75rem;
  align-items: center;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition);
}

.history-item:hover { border-color: var(--accent); }

.history-item__cover {
  width: 48px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.history-item__title {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.history-item__chapter {
  font-size: 0.8125rem;
  color: var(--accent);
}

.cms-content {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.cms-content h2, .cms-content h3 {
  color: var(--text);
  margin-top: 1.5rem;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .layout-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .site-nav { display: none; }
  .site-search { display: none; }
  .site-menu-toggle { display: grid; }
  .site-auth__guest .btn-outline { display: none; }
}

@media (max-width: 768px) {
  .comic-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .site-footer__newsletter { grid-column: 1 / -1; }
  .filter-panel__sort--desktop { display: none; }
  .filter-panel__select { display: block; }
  .reader-player__comic-label { display: none; }
  .reader-player__chapter-label { font-size: 0.8125rem; }
  .reader-player__meta-row { gap: 0.25rem 0.4rem; margin-top: 0.2rem; padding-top: 0.25rem; }
  .reader-player__meta-value { max-width: 6.5rem; }
  .reader-player__meta-link { display: none; }
  .reader-player__mini-comic { max-width: 42%; font-size: 0.625rem; }
  .reader-player__mini-chapter { font-size: 0.75rem; }
  .reader-player__mini-meta-item { max-width: 42%; }
  .reader-player__chapter-picker-text { display: none; }
  .reader-player__chapter-picker { padding: 0 0.5rem; min-width: 38px; justify-content: center; }
  .reader-player__nav-item span { display: none; }
  .reader-player__nav-item { min-height: 44px; padding: 0.5rem; }
  .reader-player__bottom-inner { max-width: 100%; }
  .reader-player__nav-pill { flex: 1; }
  .mobile-bottom-nav {
    display: flex;
    padding-bottom: calc(0.35rem + env(safe-area-inset-bottom));
  }
  body.site-body:not(.reader-body) { padding-bottom: 56px; }
  .ranking-page-item { grid-template-columns: 32px 50px 1fr; }
}

@media (max-width: 480px) {
  .site-footer__grid { grid-template-columns: 1fr; }
  .hot-card { flex: 0 0 95px; }
}

/* ── Continue reading ── */
.home-section--continue { padding-top: 1.25rem; }
.continue-scroll {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scroll-snap-type: x proximity;
}
.continue-card {
  flex: 0 0 140px;
  scroll-snap-align: start;
}
.continue-card__link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.continue-card__cover {
  aspect-ratio: 3/4;
  border-radius: 8px;
  overflow: hidden;
  background: var(--site-surface-2, #f0f4f3);
}
.continue-card__cover img { width: 100%; height: 100%; object-fit: cover; }
.continue-card__title {
  font-size: 0.8125rem;
  font-weight: 600;
  margin: 0.4rem 0 0.15rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.continue-card__chapter {
  font-size: 0.75rem;
  color: var(--site-muted, #64748b);
  margin: 0;
}

/* ── Notifications ── */
.site-notifications { position: relative; }
.site-notifications__btn { position: relative; }
.site-notifications__badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  color: #fff;
  background: #e11d48;
  border-radius: 999px;
}
.site-notifications__menu {
  width: min(320px, 92vw);
  max-height: 380px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.site-notifications__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  font-weight: 600;
  font-size: 0.8125rem;
  border-bottom: 1px solid var(--site-border, #e2e8f0);
}
.site-notifications__mark-all {
  background: none;
  border: none;
  color: var(--site-primary, #06b6d4);
  font-size: 0.75rem;
  cursor: pointer;
}
.site-notifications__list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  flex: 1;
}
.site-notifications__item--unread { background: rgba(6, 182, 212, 0.06); }
.site-notifications__link {
  display: block;
  padding: 0.65rem 0.75rem;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--site-border, #e2e8f0);
}
.site-notifications__msg { display: block; font-size: 0.8125rem; }
.site-notifications__time { font-size: 0.6875rem; color: var(--site-muted, #64748b); }
.site-notifications__empty {
  padding: 1rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--site-muted, #64748b);
}
.site-user-continue {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--site-border, #e2e8f0);
}
.site-user-continue__label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--site-muted, #64748b);
  margin-bottom: 0.35rem;
}
.site-user-continue .continue-card { flex: none; margin-bottom: 0.35rem; }
.site-user-continue .continue-card__cover { max-width: 48px; display: inline-block; vertical-align: middle; margin-right: 0.5rem; }
.site-user-continue .continue-card__body { display: inline-block; vertical-align: middle; max-width: calc(100% - 56px); }

/* ── Ratings ── */
.ratings-section {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: var(--site-surface, #fff);
  border: 1px solid var(--site-border, #e2e8f0);
  border-radius: 12px;
}
.ratings-section__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.ratings-section__head h2 { margin: 0; font-size: 1.125rem; }
.ratings-summary { display: flex; align-items: center; gap: 0.35rem; font-size: 0.9375rem; }
.ratings-summary__count { color: var(--site-muted, #64748b); font-size: 0.8125rem; }
.star-display { display: inline-flex; gap: 1px; color: #f59e0b; }
.star-display__star { font-size: 1rem; color: #d1d5db; }
.star-display__star.is-full { color: #f59e0b; }
.star-display__star.is-half { color: #f59e0b; opacity: 0.55; }
.star-input { display: flex; gap: 0.25rem; margin-bottom: 0.5rem; }
.star-input__btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #d1d5db;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.star-input__btn.is-active { color: #f59e0b; }
.ratings-form__review {
  width: 100%;
  margin-bottom: 0.5rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--site-border, #e2e8f0);
  border-radius: 8px;
  font-family: inherit;
  resize: vertical;
}
.ratings-reviews { list-style: none; margin: 1rem 0 0; padding: 0; }
.ratings-reviews__item {
  padding: 0.75rem 0;
  border-top: 1px solid var(--site-border, #e2e8f0);
}
.ratings-reviews__head { display: flex; justify-content: space-between; margin-bottom: 0.25rem; }
.ratings-reviews__stars { color: #f59e0b; }

/* ── Account page ── */
.account-grid { max-width: 720px; }
.account-card {
  background: var(--site-surface, #fff);
  border: 1px solid var(--site-border, #e2e8f0);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.account-card__title { margin: 0 0 0.75rem; font-size: 1.0625rem; }
.account-card__desc { font-size: 0.875rem; color: var(--site-muted, #64748b); margin: 0 0 0.75rem; }
.account-card--stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  text-align: center;
}
.account-stat__value {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--site-primary, #06b6d4);
}
.account-stat__label { font-size: 0.8125rem; color: var(--site-muted, #64748b); }
.mission-list { list-style: none; margin: 0; padding: 0; }
.mission-item { margin-bottom: 0.85rem; }
.mission-item.is-done .mission-item__head { opacity: 0.7; }
.mission-item__head { display: flex; justify-content: space-between; font-size: 0.875rem; }
.mission-item__pts { color: var(--site-primary, #06b6d4); font-size: 0.75rem; }
.mission-item__bar {
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  margin: 0.35rem 0;
  overflow: hidden;
}
.mission-item__bar span {
  display: block;
  height: 100%;
  background: var(--site-primary, #06b6d4);
  border-radius: 999px;
}
.mission-item__prog { font-size: 0.75rem; color: var(--site-muted, #64748b); }
.badge-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.badge-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.65rem;
  background: rgba(6, 182, 212, 0.08);
  border-radius: 999px;
  font-size: 0.8125rem;
}
.referral-box { display: flex; gap: 0.5rem; margin-bottom: 0.5rem; }
.referral-box__input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--site-border, #e2e8f0);
  border-radius: 8px;
  font-size: 0.8125rem;
}
.referral-meta { font-size: 0.8125rem; color: var(--site-muted, #64748b); }
.newsletter-form { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.newsletter-form__input {
  flex: 1;
  min-width: 180px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--site-border, #e2e8f0);
  border-radius: 8px;
}
.newsletter-msg { font-size: 0.8125rem; color: var(--site-primary, #06b6d4); margin-top: 0.5rem; }
.site-footer__newsletter-desc { font-size: 0.8125rem; color: var(--text-muted); margin: 0 0 0.65rem; line-height: 1.5; }
.premium-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 0.5rem;
  padding: 0.15rem 0.55rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #7c4a00;
  background: linear-gradient(135deg, #ffe08a, #f5c842);
  border-radius: 999px;
  vertical-align: middle;
}
.pwa-install-hint {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 56px;
  z-index: 450;
  padding: 0.65rem 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.99));
  border-top: 1px solid rgba(6, 182, 212, 0.35);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.18);
}
.pwa-install-hint__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.pwa-install-hint__text {
  margin: 0;
  font-size: 0.8125rem;
  color: #e2e8f0;
  flex: 1;
  min-width: 180px;
}
.pwa-install-hint__actions { display: flex; gap: 0.5rem; align-items: center; }
.account-empty, .account-empty-inline { text-align: center; color: var(--site-muted, #64748b); }

.category-seo-intro {
  margin: 1rem 0 0;
  padding: 1rem 1.25rem;
  background: rgba(13, 148, 136, 0.08);
  border: 1px solid rgba(13, 148, 136, 0.2);
  border-radius: 12px;
  color: var(--site-text, #0f172a);
  line-height: 1.65;
  font-size: 0.9375rem;
}
.home-banners { padding: 0.75rem 0 0; }
.home-banners__track { display: flex; gap: 0.75rem; overflow-x: auto; scroll-snap-type: x mandatory; }
.home-banner { flex: 0 0 min(100%, 720px); scroll-snap-align: start; border-radius: 12px; overflow: hidden; display: block; }
.home-banner img { width: 100%; height: auto; display: block; }
.push-prompt {
  position: fixed; bottom: 5rem; left: 50%; transform: translateX(-50%);
  z-index: 120; display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
  padding: 0.75rem 1rem; background: #0f766e; color: #fff; border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0,0,0,.2); font-size: 0.875rem;
}
.onboarding-wrap { max-width: 960px; }
.onboarding-step { margin: 1.5rem 0; }
.onboarding-comic-pick { cursor: pointer; }
.onboarding-comic-pick input:checked + .comic-card-grid { outline: 2px solid #0d9488; border-radius: 12px; }
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.news-category-filter { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.25rem; }
.news-category-chip { display: inline-flex; align-items: center; padding: 0.35rem 0.85rem; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-elevated); color: var(--text-muted); font-size: 0.8125rem; text-decoration: none; transition: border-color var(--transition), color var(--transition), background var(--transition); }
.news-category-chip:hover, .news-category-chip.is-active { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.news-category-active { margin: 0 0 1rem; font-size: 0.875rem; color: var(--text-muted); }
.news-card__category { display: inline-block; margin-bottom: 0.45rem; padding: 0.15rem 0.55rem; border-radius: 999px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.news-pagination { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 2rem; }
.news-pagination__link { color: var(--accent); text-decoration: none; font-size: 0.875rem; font-weight: 600; }
.news-pagination__info { font-size: 0.8125rem; color: var(--text-muted); }
.news-post__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin: 0.35rem 0 1rem; }
.news-post__category { display: inline-flex; padding: 0.2rem 0.65rem; border-radius: 999px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); font-size: 0.75rem; font-weight: 600; text-decoration: none; }
.news-card { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--bg-elevated); box-shadow: var(--shadow-sm); transition: box-shadow var(--transition), transform var(--transition); }
.news-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.news-card__link { display: block; padding: 1rem; color: inherit; text-decoration: none; }
.news-card__img { width: 100%; height: 140px; object-fit: cover; border-radius: calc(var(--radius) - 4px); margin-bottom: 0.75rem; }
.news-card__title { margin: 0 0 0.35rem; font-size: 1rem; font-weight: 700; line-height: 1.35; color: var(--text); }
.news-card__excerpt { margin: 0 0 0.5rem; font-size: 0.8125rem; color: var(--text-muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-card__date { display: block; font-size: 0.75rem; color: var(--text-faint); }
.news-post__date { display: block; margin: 0.35rem 0 1rem; font-size: 0.8125rem; color: var(--text-faint); }
.news-post__hero { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--radius); margin-bottom: 1.25rem; }
.news-post__body { font-size: 1rem; line-height: 1.75; color: var(--text); }
.account-level-meta { text-align: center; color: var(--site-muted,#64748b); font-size: 0.875rem; margin: -0.5rem 0 1rem; }

/* ── Accessibility & SEO UX ── */
.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 9999;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
}
.skip-link:focus {
  width: auto;
  height: auto;
  padding: 0.65rem 1rem;
  margin: 0;
  overflow: visible;
  clip-path: none;
  white-space: normal;
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.reader-body > .sr-only {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.home-hero {
  padding: 1.25rem 0 0.75rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 85%);
}
.home-hero__title {
  margin: 0;
  font-size: clamp(1.125rem, 2.5vw, 1.625rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text);
  line-height: 1.25;
}
.home-hero__desc {
  margin: 0.45rem 0 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
  max-width: 42rem;
}

.trust-content h2 {
  margin: 1.5rem 0 0.65rem;
  font-size: 1.0625rem;
}
.trust-content p {
  margin: 0 0 0.75rem;
  line-height: 1.65;
  color: var(--text-muted);
}
.trust-content__links {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
}
.trust-content__links a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (pointer: coarse) {
  .btn,
  .site-nav__link,
  .site-nav__trigger,
  .site-icon-btn,
  .site-mobile-nav__link,
  .site-mobile-bottom-nav__item,
  .action-bar__pill,
  .genre-chip {
    min-height: 44px;
  }
  .site-search__btn,
  .site-icon-btn {
    min-width: 44px;
  }
}

@media (max-width: 640px) {
  body.site-body {
    font-size: 15px;
  }
}

/* ── Share tabs + social + embed panel ── */
.share-tabs {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
}

.share-tabs__nav {
  display: flex;
  gap: 0;
  padding: 2px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.share-tabs__tab {
  flex: 1;
  padding: 0.32rem 0.55rem;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}

.share-tabs__tab.is-active {
  color: var(--accent);
  background: var(--bg-elevated);
  box-shadow: 0 1px 4px rgba(6, 182, 212, 0.12);
}

.share-tabs__panel {
  width: 100%;
  min-width: 0;
}

.share-tabs__panel[hidden] {
  display: none !important;
}

.share-popover__title {
  margin: 0 0 0.45rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.share-social {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
}

.share-social__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  min-height: 3.25rem;
  padding: 0.4rem 0.25rem;
  font: inherit;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  color: var(--text-muted);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 0.55rem;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
}

.share-social__btn svg {
  flex-shrink: 0;
  opacity: 0.85;
}

.share-social__btn:hover {
  color: var(--text);
  border-color: rgba(6, 182, 212, 0.28);
  background: var(--accent-soft);
}

.share-social__btn--fb:hover {
  color: #1877f2;
  border-color: rgba(24, 119, 242, 0.35);
  background: rgba(24, 119, 242, 0.08);
}

.share-social__btn--zalo:hover {
  color: #0068ff;
  border-color: rgba(0, 104, 255, 0.35);
  background: rgba(0, 104, 255, 0.08);
}

.share-social__btn--copy:hover,
.share-social__btn--copy.is-copied {
  color: var(--accent);
  border-color: rgba(6, 182, 212, 0.4);
  background: var(--accent-soft);
}

.action-bar__share {
  flex: 1 1 220px;
  min-width: 0;
}

.share-embed {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  min-width: 0;
}

.share-embed__hint {
  margin: 0;
  font-size: 0.6875rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.share-embed__size-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.share-embed__size-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-faint);
  white-space: nowrap;
}

.share-embed__sizes {
  display: inline-flex;
  flex: 1;
  min-width: 0;
  padding: 2px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
}

.share-embed__size {
  flex: 1;
  padding: 0.28rem 0.45rem;
  font-family: inherit;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: 0.38rem;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}

.share-embed__size + .share-embed__size {
  margin-left: 1px;
}

.share-embed__size.is-active {
  color: var(--accent);
  background: var(--bg-elevated);
  box-shadow: 0 1px 3px rgba(6, 182, 212, 0.14);
}

.share-embed__preview-wrap {
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  overflow: hidden;
  background: #0b0f14;
}

.share-embed__preview {
  display: block;
  width: 100%;
  border: 0;
  background: #0b0f14;
}

.share-embed__code-block {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: 100%;
  min-width: 0;
}

.share-embed__code-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-faint);
}

.share-embed__code {
  display: block;
  width: 100%;
  max-width: none;
  min-height: 6.25rem;
  max-height: 7.5rem;
  padding: 0.45rem 0.55rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.625rem;
  line-height: 1.4;
  color: var(--text);
  background: var(--bg-alt);
  border: 1px solid rgba(6, 182, 212, 0.14);
  border-radius: 0.45rem;
  resize: none;
}

.share-embed__code:focus {
  outline: none;
  border-color: rgba(6, 182, 212, 0.35);
}

.share-embed__copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  width: 100%;
  gap: 0.28rem;
  padding: 0.38rem 0.65rem;
  font-family: inherit;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 0.45rem;
  cursor: pointer;
  white-space: nowrap;
  transition: filter var(--transition), transform var(--transition);
}

.share-embed__copy:hover {
  filter: brightness(1.06);
}

.share-embed__copy.is-copied {
  background: var(--accent-dark);
}

.reader-share-popover__body .share-tabs {
  width: 100%;
}

.reader-share-popover__body .share-tabs__tab {
  color: rgba(255, 255, 255, 0.55);
}

.reader-share-popover__body .share-tabs__tab.is-active {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
}

.reader-share-popover__body .share-tabs__nav {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.reader-share-popover__body .share-popover__title {
  color: rgba(255, 255, 255, 0.45);
}

.reader-share-popover__body .share-social__btn {
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.reader-share-popover__body .share-social__btn:hover {
  color: #fff;
  border-color: rgba(6, 182, 212, 0.4);
  background: rgba(6, 182, 212, 0.12);
}

.reader-share-popover__body .share-embed__hint,
.reader-share-popover__body .share-embed__size-label,
.reader-share-popover__body .share-embed__code-label {
  color: rgba(255, 255, 255, 0.5);
}

.reader-share-popover__body .share-embed__sizes {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.reader-share-popover__body .share-embed__size {
  color: rgba(255, 255, 255, 0.55);
}

.reader-share-popover__body .share-embed__size.is-active {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.1);
}

.reader-share-popover__body .share-embed__code {
  color: rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.25);
  border-color: rgba(6, 182, 212, 0.2);
}

.reader-share-popover__body .share-embed__preview-wrap {
  max-height: 180px;
  overflow: auto;
}

/* ── Embed pages (iframe-friendly) ── */
.embed-body {
  margin: 0;
  min-height: 100vh;
  color: #e8edf3;
  background: #0b0f14;
  font-family: 'Be Vietnam Pro', system-ui, sans-serif;
}

.embed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  background: #121820;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.embed-header__brand,
.embed-header__link,
.embed-header__comic {
  color: #8ec9ff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
}

.embed-header__titles {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  font-size: 0.875rem;
}

.embed-header__chapter {
  color: #c5d0dc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.embed-header__sep {
  color: #5f6f82;
}

.embed-comic {
  padding: 1rem;
}

.embed-comic__hero {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1rem;
}

.embed-comic__cover img {
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
  display: block;
}

.embed-comic__title {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
  line-height: 1.3;
}

.embed-comic__meta,
.embed-comic__desc {
  margin: 0 0 0.5rem;
  color: #9aa8b8;
  font-size: 0.875rem;
  line-height: 1.5;
}

.embed-comic__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.embed-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.9rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #c5d0dc;
  background: #1a2330;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  text-decoration: none;
}

.embed-btn--primary {
  color: #fff;
  background: #06b6d4;
  border-color: #06b6d4;
}

.embed-comic__chapters {
  margin-top: 1.25rem;
}

.embed-comic__chapters h2 {
  margin: 0 0 0.5rem;
  font-size: 0.9375rem;
  color: #c5d0dc;
}

.embed-comic__chapter-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.35rem;
}

.embed-comic__chapter-list a {
  color: #8ec9ff;
  text-decoration: none;
  font-size: 0.875rem;
}

.embed-reader {
  padding: 0.5rem 0;
}

.embed-reader__page {
  max-width: 100%;
}

.embed-reader__iframe {
  width: 100%;
  min-height: 70vh;
  border: none;
}

.embed-reader__empty {
  padding: 2rem 1rem;
  text-align: center;
  color: #9aa8b8;
}

.embed-reader__nav {
  display: flex;
  justify-content: center;
  padding: 0.75rem 1rem 1rem;
}

.embed-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  color: #6f7f92;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.embed-footer a {
  color: #8ec9ff;
  text-decoration: none;
  font-weight: 600;
}

@media (max-width: 560px) {
  .embed-comic__hero {
    grid-template-columns: 1fr;
  }

  .embed-comic__cover {
    max-width: 140px;
  }
}

/* ============================================================
   Premium refresh (Light) — additive override layer
   Keeps green accent; elevates depth, motion, hierarchy.
   ============================================================ */

/* Smooth motion baseline for interactive elements */
.btn,
.comic-card__cover,
.comic-card__img,
.hot-card,
.status-pill,
.chapter-list__item,
.site-search {
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth),
    border-color var(--transition-smooth), background var(--transition), color var(--transition),
    filter var(--transition);
}

/* ── Header: frosted glass ── */
.site-header {
  background: color-mix(in srgb, var(--bg-elevated) 85%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 75%, transparent);
}

/* ── Search: pill with accent focus ring ── */
.site-search {
  border-radius: 999px;
  background: var(--bg-alt);
  border-color: transparent;
}
.site-search:focus-within {
  background: var(--bg-elevated);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--ring);
}

/* ── Buttons: gradient primary + lift ── */
.btn-primary {
  background-image: var(--accent-grad);
  border-color: transparent;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.18);
}
.btn-primary:hover {
  background-image: var(--accent-grad);
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-primary:active { transform: translateY(0); filter: brightness(0.98); }
.btn-outline:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }

/* ── Comic cards: lift + zoom + title accent ── */
.comic-card__cover { border-radius: var(--radius); }
.comic-card:hover .comic-card__cover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--ring);
}
.comic-card:hover .comic-card__img { transform: scale(1.06); }
.comic-card__title { font-size: 0.875rem; }
.comic-card:hover .comic-card__title { color: var(--accent); }
.comic-card__cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.30), rgba(0, 0, 0, 0) 40%);
  opacity: 0;
  transition: opacity var(--transition-smooth);
  pointer-events: none;
}
.comic-card:hover .comic-card__cover::after { opacity: 1; }

/* Featured "hot" cards on home */
.hot-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

/* ── Status pills ── */
.status-pill { padding: 0.16rem 0.5rem; letter-spacing: 0.01em; }

/* ── Section headings: gradient accent bar ── */
.section-bar__title { position: relative; padding-left: 0.7rem; }
.section-bar__title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 1.05em;
  border-radius: 999px;
  background-image: var(--accent-grad);
}

/* ── Home hero: premium gradient panel ── */
.home-hero {
  background:
    radial-gradient(900px 220px at 10% -60%, var(--accent-soft), transparent 62%),
    linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 92%);
}

/* ── Chapter list: scrollable multi-column chip grid ──
   Turns the long single-column list (100+ chapters) into a compact,
   scannable grid panel with a capped height. */
.chapter-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.45rem;
  padding: 0.6rem;
  background: var(--bg-alt);
  border-radius: var(--radius);
  max-height: 30rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.chapter-list__item {
  border-bottom: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
}
.chapter-list__item:hover { border-color: var(--ring); box-shadow: var(--shadow-sm); }
.chapter-list__item--latest { border-color: var(--accent); background: var(--accent-soft); }
.chapter-list__item--current:not(.chapter-list__item--latest) {
  border-color: var(--accent);
  background: rgba(34, 197, 94, 0.07);
}
.chapter-list__link {
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
}
.chapter-list__link:hover { background: transparent; }

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  .comic-card:hover .comic-card__cover,
  .comic-card:hover .comic-card__img,
  .btn-primary:hover,
  .hot-card:hover { transform: none; }
}

/* ============================================================
   Hero feature banner + skeleton shimmer + page polish
   ============================================================ */

/* ── Hero top text ── */
.home-hero__top { margin-bottom: 1rem; }

/* ── Featured banner ── */
.hero-feature {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.5rem;
  align-items: center;
  padding: 1.25rem;
  border-radius: calc(var(--radius) + 4px);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.hero-feature__art {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  box-shadow: var(--shadow-md);
}
.hero-feature__bg {
  position: absolute;
  inset: -20%;
  width: 140%;
  height: 140%;
  object-fit: cover;
  filter: blur(28px) saturate(1.3);
  opacity: 0.45;
  transform: scale(1.1);
  z-index: 0;
}
.hero-feature__cover {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-smooth);
}
.hero-feature__art:hover .hero-feature__cover { transform: scale(1.05); }
.hero-feature__body { min-width: 0; }
.hero-feature__badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-dark);
  background: var(--accent-soft);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.5rem;
}
.hero-feature__title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.25rem, 2.6vw, 1.9rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.hero-feature__title a { color: var(--text); }
.hero-feature__title a:hover { color: var(--accent); }
.hero-feature__genres { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.6rem; }
.hero-feature__genre {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
}
.hero-feature__genre:hover { color: var(--accent); border-color: var(--ring); }
.hero-feature__desc {
  margin: 0 0 0.75rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-feature__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.8125rem;
  color: var(--text-faint);
}
.hero-feature__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.hero-feature__actions .btn { padding: 0.55rem 1.4rem; font-weight: 600; }

@media (max-width: 640px) {
  .hero-feature { grid-template-columns: 110px 1fr; gap: 1rem; padding: 0.9rem; }
  .hero-feature__desc { -webkit-line-clamp: 2; font-size: 0.875rem; }
  .hero-feature__actions .btn { flex: 1; text-align: center; padding: 0.55rem 0.8rem; }
}

/* ── Skeleton shimmer behind cover images (perceived performance) ── */
.comic-card__cover,
.hot-card__cover,
.continue-card__cover,
.hero-feature__art {
  background-color: var(--bg-alt);
  background-image: linear-gradient(
    100deg,
    transparent 30%,
    rgba(255, 255, 255, 0.55) 50%,
    transparent 70%
  );
  background-size: 200% 100%;
  background-repeat: no-repeat;
  animation: wt-shimmer 1.4s ease-in-out infinite;
}
/* Once the image has painted it fully covers the shimmer; stop animating to
   save CPU when the user prefers reduced motion. */
@keyframes wt-shimmer {
  0% { background-position: 150% 0; }
  100% { background-position: -50% 0; }
}
.comic-card__cover.is-loaded,
.hot-card__cover.is-loaded,
.continue-card__cover.is-loaded,
.hero-feature__art.is-loaded {
  animation: none;
  background-image: none;
}
@media (prefers-reduced-motion: reduce) {
  .comic-card__cover,
  .hot-card__cover,
  .continue-card__cover,
  .hero-feature__art { animation: none; }
}

/* ── Page heads (category / ranking) ── */
.page-head__title { letter-spacing: -0.02em; }
.ranking-page-card,
.category-seo-intro {
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.ranking-tab.is-active { background-image: var(--accent-grad); color: #fff; border-color: transparent; }

/* ============================================================
   Compact action toolbar (Yêu thích + Chia sẻ popover)
   ============================================================ */
.action-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.action-bar__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.05rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), color var(--transition), background var(--transition);
}
.action-bar__btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.action-bar__btn:hover { border-color: var(--ring); color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.action-bar__btn:active { transform: translateY(0); }
.action-bar__follow[aria-pressed='true'] {
  background: rgba(225, 29, 72, 0.08);
  border-color: rgba(225, 29, 72, 0.45);
  color: #e11d48;
}
.action-bar__share-wrap {
  position: relative;
  overflow: visible;
}

.comic-detail__actions,
.comic-detail__actions .action-bar,
.reader-extras .action-bar {
  overflow: visible;
}

.share-popover {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 80;
  width: 264px;
  max-width: calc(100vw - 1.5rem);
  padding: 0.65rem;
  background: var(--bg-elevated);
  border: 1px solid rgba(6, 182, 212, 0.12);
  border-radius: 0.75rem;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(6, 182, 212, 0.06);
  animation: commentsFadeIn 0.14s ease both;
}
.share-popover[hidden] { display: none !important; }
.share-popover::before {
  content: '';
  position: absolute;
  top: -5px;
  right: 24px;
  width: 10px;
  height: 10px;
  background: var(--bg-elevated);
  border-left: 1px solid rgba(6, 182, 212, 0.12);
  border-top: 1px solid rgba(6, 182, 212, 0.12);
  transform: rotate(45deg);
}
.share-popover .share-embed__preview-wrap { display: none; }

@media (max-width: 480px) {
  .share-popover {
    right: 0;
    transform: none;
    width: min(264px, calc(100vw - 1.5rem));
  }
  .share-popover::before {
    right: 24px;
  }
  .share-social {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ============================================================
   Footer redesign — premium UI/UX + socials + NAP + history strip
   ============================================================ */
.site-footer {
  margin-top: 3rem;
  background:
    radial-gradient(800px 220px at 100% 0%, var(--accent-soft), transparent 60%),
    linear-gradient(180deg, var(--bg-alt) 0%, var(--bg-elevated) 100%);
  border-top: 1px solid var(--border);
}

/* Reading-history strip */
.footer-history {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
  background: var(--bg-elevated);
}
.footer-history__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}
.footer-history__title { margin: 0; font-size: 1rem; font-weight: 800; letter-spacing: -0.01em; }
.footer-history__more { font-size: 0.8125rem; font-weight: 600; color: var(--accent); white-space: nowrap; }
.footer-history__more:hover { text-decoration: underline; }
.footer-history__scroll { display: flex; gap: 0.85rem; overflow-x: auto; padding-bottom: 0.4rem; scrollbar-width: thin; }

/* Grid */
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(4, 1fr) 1.4fr;
  gap: 2rem 1.5rem;
  padding-top: 2.5rem;
  padding-bottom: 2rem;
}
.site-footer__brand { max-width: 320px; }
.site-footer__tagline { margin: 0.75rem 0 1rem; font-size: 0.875rem; line-height: 1.6; color: var(--text-muted); }
.site-footer__heading {
  margin: 0 0 0.85rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
}
.site-footer__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.site-footer__links a { font-size: 0.875rem; color: var(--text-muted); transition: color var(--transition), padding-left var(--transition); }
.site-footer__links a:hover { color: var(--accent); padding-left: 3px; }

/* Socials */
.footer-social { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.footer-social__link {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--text-muted);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  transition: transform var(--transition), color var(--transition), background var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.footer-social__link:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); color: #fff; }
.footer-social__link--facebook:hover { background: #1877f2; border-color: #1877f2; }
.footer-social__link--youtube:hover { background: #ff0000; border-color: #ff0000; }
.footer-social__link--telegram:hover { background: #229ed9; border-color: #229ed9; }
.footer-social__link--zalo:hover { background: #0068ff; border-color: #0068ff; }
.footer-social__link--tiktok:hover { background: #010101; border-color: #010101; }
.footer-social__link--x:hover { background: #000; border-color: #000; }

/* Contact / NAP */
/* NAP (Name / Address / Phone) — trust + local-SEO signal */
.footer-nap { display: grid; gap: 0.4rem; margin-top: 1.1rem; font-style: normal; }
.footer-nap__name { font-weight: 700; color: var(--text); font-size: 0.875rem; }
.footer-nap__item {
  display: flex;
  gap: 0.45rem;
  align-items: flex-start;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-muted);
}
.footer-nap a.footer-nap__item:hover { color: var(--accent); }
.footer-nap__ico { flex-shrink: 0; }

/* Newsletter */
.site-footer__newsletter-desc { margin: 0 0 0.6rem; font-size: 0.8125rem; color: var(--text-muted); line-height: 1.5; }
.newsletter-form { display: flex; gap: 0.4rem; }
.newsletter-form__input {
  flex: 1; min-width: 0;
  padding: 0.55rem 0.75rem;
  font: inherit; font-size: 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
}
.newsletter-form__input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }

/* Bottom bar */
.site-footer__bottom { border-top: 1px solid var(--border); }
.site-footer__bottom-inner { padding: 1.1rem 0; text-align: center; }
.site-footer__bottom-inner p { margin: 0; font-size: 0.8125rem; color: var(--text-faint); }

@media (max-width: 1024px) {
  .site-footer__grid { grid-template-columns: repeat(3, 1fr); }
  .site-footer__brand { grid-column: 1 / -1; max-width: none; }
}
@media (max-width: 640px) {
  .site-footer__grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem 1rem; }
  .site-footer__newsletter { grid-column: 1 / -1; }
}

/* ============================================================
   Comments: enticing login CTA + comment form + emoji picker
   ============================================================ */
/* Login enticement card (guests) */
.comment-cta {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 1.1rem 1.2rem;
  background:
    radial-gradient(420px 120px at 0% 0%, var(--accent-soft), transparent 70%),
    var(--bg-alt);
  border: 1px dashed rgba(6, 182, 212, 0.3);
  border-radius: var(--radius);
}
.comment-cta__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}
.comment-cta__body { min-width: 0; }
.comment-cta__title { margin: 0 0 0.2rem; font-size: 0.95rem; font-weight: 700; color: var(--text); }
.comment-cta__text { margin: 0 0 0.7rem; font-size: 0.85rem; line-height: 1.5; color: var(--text-muted); }
.comment-cta__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* Comment form */
.comments-form__field { position: relative; }
.comments-form__input {
  width: 100%;
  padding: 0.75rem 2.6rem 0.75rem 0.85rem;
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  resize: vertical;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.comments-form__input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.comments-form__emoji-btn {
  position: absolute;
  right: 0.5rem;
  bottom: 0.5rem;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  line-height: 1;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition), border-color var(--transition);
}
.comments-form__emoji-btn:hover { transform: scale(1.08); border-color: var(--ring); background: var(--accent-soft); }
.comments-form__footer { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-top: 0.55rem; }
.comments-form__hint { font-size: 0.75rem; color: var(--text-faint); }

/* Emoji panel */
.emoji-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.4rem);
  z-index: 90;
  width: 300px;
  max-width: calc(100vw - 2rem);
  max-height: 260px;
  overflow-y: auto;
  padding: 0.6rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  animation: commentsFadeIn 0.14s ease both;
}
.emoji-panel[hidden] { display: none !important; }
.emoji-panel__group + .emoji-panel__group { margin-top: 0.5rem; }
.emoji-panel__label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 0.3rem;
  position: sticky;
  top: -0.6rem;
  background: var(--bg-elevated);
  padding: 0.15rem 0;
}
.emoji-panel__grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 0.1rem; }
.emoji-panel__item {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  font-size: 1.2rem;
  line-height: 1;
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.emoji-panel__item:hover { background: var(--accent-soft); transform: scale(1.15); }
.emoji-panel::-webkit-scrollbar { width: 8px; }
.emoji-panel::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 999px; }

@media (max-width: 768px) {
  .comic-detail__hero { grid-template-columns: 120px 1fr; gap: 0.75rem; padding: 0.75rem; }
  .comic-detail__cover { max-width: 120px; }
  .comic-detail__title { font-size: 1.05rem; }
}

@media (max-width: 640px) {
  .comic-detail__hero { grid-template-columns: 104px 1fr; gap: 0.65rem; padding: 0.65rem 0.75rem; }
  .comic-detail__cover { max-width: 104px; }
  .comic-detail__meta-row { gap: 0.3rem; }
  .comic-detail__stats { gap: 0.15rem 0.5rem; font-size: 0.72rem; }
  .comic-detail__stats .comic-stat:not(:last-child) { padding-right: 0.5rem; }
  .comic-detail__toolbar { flex-direction: column; align-items: stretch; }
  .comic-detail__actions .action-bar { justify-content: flex-start; }
}

/* ============================================================
   PUBLIC PREMIUM POLISH — taste-skill (redesign-existing-projects)
   Additive, uses existing green accent token. No markup changes.
   ============================================================ */

/* Hero: ambient green depth instead of a flat gradient panel */
.home-hero { position: relative; overflow: hidden; }
.home-hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(58% 90% at 88% -25%, var(--accent-soft), transparent 60%),
    radial-gradient(46% 70% at -5% 130%, rgba(6, 182, 212, 0.06), transparent 60%);
}
.home-hero > .container { position: relative; z-index: 1; }

/* Comic cards: lift + cover zoom + accent-tinted shadow */
.comic-card { position: relative; transition: transform var(--transition-smooth), box-shadow var(--transition-smooth); }
.comic-card:hover { transform: translateY(-4px); box-shadow: 0 18px 38px -16px rgba(6, 182, 212, 0.30), var(--shadow-md); }
.comic-card__cover, .hot-card__cover { position: relative; overflow: hidden; }
.comic-card__img, .hot-card__cover img { transition: transform 0.42s cubic-bezier(0.2, 0.6, 0.2, 1); will-change: transform; }
.comic-card:hover .comic-card__img, .hot-card:hover .hot-card__cover img { transform: scale(1.06); }
.comic-card__cover::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(8, 15, 12, 0.30), transparent 40%);
  opacity: 0; transition: opacity var(--transition);
}
.comic-card:hover .comic-card__cover::after { opacity: 1; }

/* Hot rail cards */
.hot-card { transition: transform var(--transition-smooth); }
.hot-card:hover { transform: translateY(-3px); }

/* Hero feature: warmer elevation on hover of the cover */
.hero-feature__art { transition: transform var(--transition-smooth); }
.hero-feature:hover .hero-feature__art { transform: translateY(-2px); }

/* Section titles: a small accent tick — gives rhythm + brand presence */
.section-bar__title { position: relative; padding-left: 0.8rem; letter-spacing: -0.01em; }
.section-bar__title::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 4px; height: 1.05em; border-radius: 99px;
  background: linear-gradient(180deg, var(--accent), var(--accent-dark));
}

/* Genre chips: branded active + press feedback */
.genre-chip { transition: background var(--transition), color var(--transition), border-color var(--transition), transform 0.1s; }
.genre-chip:active { transform: scale(0.96); }

/* Buttons: physical press feedback */
.btn:active { transform: translateY(1px); }

/* Accessibility: visible focus ring site-wide */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: none; box-shadow: 0 0 0 3px var(--ring);
}
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  .comic-card:hover, .hot-card:hover, .hero-feature:hover .hero-feature__art { transform: none; }
  .comic-card:hover .comic-card__img, .hot-card:hover .hot-card__cover img { transform: none; }
  html { scroll-behavior: auto; }
}

/* ===== Public: comic detail light polish (safe, additive) ===== */
.comic-detail__cover { transition: transform var(--transition-smooth), box-shadow var(--transition-smooth); }
.comic-detail__cover:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -12px rgba(6, 182, 212, 0.30); }
.comic-detail__desc, .comic-detail__synopsis, .comic-detail__content p { max-width: 72ch; line-height: 1.72; }
.comic-meta-chip { transition: border-color var(--transition), background var(--transition); }
.comic-meta-chip:hover { border-color: var(--border-hover); }

/* News cards: accent-tinted hover to match comic cards */
.news-card:hover { box-shadow: 0 14px 30px -12px rgba(6, 182, 212, 0.22), var(--shadow-md); }
.news-card__title { letter-spacing: -0.01em; }

/* ===== Composed empty states (public) — match the premium admin ones ===== */
.empty-state { padding: 3.5rem 1.5rem; max-width: 440px; margin: 0 auto; }
.empty-state::before {
  content: "📭"; display: grid; place-items: center;
  width: 72px; height: 72px; margin: 0 auto 1.1rem; font-size: 1.9rem; line-height: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--accent-soft), transparent 72%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 14%, transparent);
}
#historyEmpty::before { content: "🕑"; }
#followsEmpty::before { content: "💚"; }
#followsLogin::before, #historyLogin::before { content: "🔒"; }
.empty-state h3 { font-size: 1.08rem; font-weight: 700; letter-spacing: -0.01em; }
.empty-state p { margin: 0 auto 1.15rem; line-height: 1.65; max-width: 36ch; }

/* Account login state → composed (lock icon) + post body reading width */
#accountLogin::before { content: "🔒"; }
.news-post__body { max-width: 72ch; }
.news-post__body p { margin: 0 0 1.1rem; }
.news-post__body h2, .news-post__body h3 { letter-spacing: -0.01em; }

/* ===== Account gamification polish (missions / points / badges) ===== */
.account-card { box-shadow: var(--shadow-sm); transition: box-shadow var(--transition); }
.account-card:hover { box-shadow: var(--shadow-md); }
.account-card__title { position: relative; padding-left: 0.75rem; letter-spacing: -0.01em; }
.account-card__title::before {
  content: ""; position: absolute; left: 0; top: 0.15em; width: 3px; height: 0.95em;
  border-radius: 99px; background: linear-gradient(180deg, var(--accent), var(--accent-dark));
}
.account-card--stats { grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); }
.account-stat {
  padding: 0.9rem 0.5rem; border-radius: 12px; background: var(--bg-alt);
  border: 1px solid var(--border); transition: transform 0.16s, box-shadow 0.16s;
}
.account-stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.account-stat__value { font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.mission-item__bar { background: var(--bg-alt); border-radius: 99px; overflow: hidden; }
.mission-item__bar > div, .mission-item__fill, .mission-item__bar span {
  background: linear-gradient(90deg, var(--accent), #22c9a0);
}
.badge-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.account-empty-inline { color: var(--text-muted); font-size: 0.85rem; }

/* ===== Trust pages (About / Contact): comfortable reading width ===== */
.trust-content { max-width: 760px; }
.trust-content p, .trust-content li { max-width: 72ch; }

/* ============================================================
   CWV: defer rendering of off-screen comic cards in long grids.
   content-visibility:auto only skips elements outside the viewport,
   so on-screen cards are unaffected. contain-intrinsic-size reserves
   space to avoid scroll jumps. (Hero/above-fold cards excluded.)
   ============================================================ */
.comic-grid > .comic-card,
.comic-grid > article.comic-card {
  content-visibility: auto;
  contain-intrinsic-size: auto 300px;
}

/* ============================================================
   PREMIUM POLISH LAYER (Public site) — additive overrides only
   ------------------------------------------------------------
   Goal: a cohesive, restrained premium pass over the public UI.
   - ONE brand accent (green #06b6d4 via --accent); no AI gradients.
   - Tinted shadows, tabular numerals, tighter type hierarchy.
   - Consistent hover / active / focus-visible states + smooth motion.
   - Refined empty states, unified badges/chips/buttons.
   Scope: does NOT touch the chapter reader (.reader-*) rules.
   Everything below is appended so it wins the cascade over the
   base rules without rewriting them.
   ============================================================ */

/* ── Shared animation: spinner used by loaders / busy chips ── */
@keyframes wt-spin { to { transform: rotate(360deg); } }

/* ── Global numeric alignment: tabular figures for counts/stats ──
   View counts, chapter numbers and rankings sit in columns; lining
   tabular figures stop them from jittering as digits change. */
.hero-feature__meta,
.hot-card__views,
.comic-card__chapter,
.comic-card__chapters,
.comic-card__meta,
.comic-stat b,
.comic-detail__stats,
.ranking-item__rank,
.ranking-item__views,
.ranking-page-item__rank,
.ranking-page-item__meta,
.account-stat__value,
.news-pagination__info {
  font-variant-numeric: tabular-nums;
}

/* ── Global keyboard focus: single visible accent ring ──
   Mouse users keep the clean look; keyboard users always see focus. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
[aria-invalid='true'] { border-color: #dc2626 !important; }

/* ── Buttons: smooth lift + consistent press feedback ── */
.btn {
  transition: background var(--transition), border-color var(--transition),
    color var(--transition), transform var(--transition-smooth),
    box-shadow var(--transition-smooth), filter var(--transition);
}
.btn:active { transform: scale(0.98); }
.btn-secondary:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--ring); }
.btn-outline:focus-visible,
.btn-primary:focus-visible,
.btn-secondary:focus-visible { box-shadow: 0 0 0 3px var(--ring); }
.btn-primary:focus-visible { outline: none; }

/* Load-more: press feedback + visible spinner while loading */
.btn-load-more:active { transform: scale(0.96); }
.btn-load-more.is-loading .btn-load-more__spinner,
.btn-load-more__spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 0.4rem;
  border: 2px solid var(--ring);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: wt-spin 0.8s linear infinite;
  vertical-align: -2px;
}

/* ── Comic / hot cards: branded hover, keyboard focus, loading ── */
.comic-card { transition: box-shadow var(--transition-smooth); }
.comic-card:focus-within .comic-card__cover {
  box-shadow: 0 0 0 2px var(--accent), var(--shadow-md);
  border-color: var(--accent);
}
.comic-card:hover .comic-card__cover {
  border-color: rgba(6, 182, 212, 0.28);
}
.comic-card__title { line-height: 1.4; letter-spacing: 0.01em; }
.comic-card__footer,
.hot-card__meta { align-items: center; gap: 0.35rem; }
/* Skeleton/placeholder state for async-populated cards */
.comic-card.is-loading { opacity: 0.6; animation: wt-pulse 1.6s ease-in-out infinite; }
@keyframes wt-pulse { 0%, 100% { opacity: 0.6; } 50% { opacity: 0.85; } }
@media (prefers-reduced-motion: reduce) {
  .comic-card.is-loading { animation: none; }
  .btn-load-more__spinner { animation: none; }
}

/* ── Status pills: lift off card backgrounds, readable, consistent ──
   Single source of truth for padding/size; ongoing uses the brand
   accent, done becomes a quiet bordered chip (not ghosted text). */
.status-pill {
  padding: 0.15rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.01em;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.status-pill--ongoing {
  color: var(--status-ongoing);
  background: var(--status-ongoing-bg);
  border-color: rgba(6, 182, 212, 0.2);
}
.status-pill--done {
  color: var(--text);
  background: var(--bg-alt);
  border-color: var(--border);
}
/* Drop the legacy detail-page size override; inherit the unified pill. */
.comic-detail__meta-row .status-pill { padding: 0.15rem 0.5rem; font-size: 0.6875rem; }

/* ── Genre / filter / sort chips: depth + states + busy spinner ── */
.genre-chip,
.filter-chip,
.sort-chip { box-shadow: var(--shadow-sm); position: relative; }
.genre-chip:hover,
.filter-chip:hover,
.sort-chip:hover {
  background: rgba(6, 182, 212, 0.05);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}
.genre-chip:active,
.filter-chip:active,
.sort-chip:active { transform: scale(0.96); }
.genre-chip.is-active,
.filter-chip.is-active,
.sort-chip.is-active { box-shadow: 0 2px 8px rgba(6, 182, 212, 0.25); }
.genre-chip:focus-visible,
.filter-chip:focus-visible,
.sort-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Loading feedback when a filter is being applied via JS */
.genre-chip[aria-busy='true'],
.filter-chip[aria-busy='true'],
.sort-chip[aria-busy='true'] { opacity: 0.6; pointer-events: none; }
.genre-chip[aria-busy='true']::after,
.filter-chip[aria-busy='true']::after,
.sort-chip[aria-busy='true']::after {
  content: '';
  position: absolute;
  right: 0.5rem;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  border: 2px solid var(--accent);
  border-top-color: transparent;
  border-radius: 50%;
  animation: wt-spin 0.6s linear infinite;
}

/* ── Sort label discoverability ── */
.filter-panel__sort-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

/* ── Section heading bar: scale the accent rule with the title ── */
.section-bar { margin-bottom: 1.15rem; }
.section-bar__title::before { height: 1em; }

/* ── Type hierarchy: tighter premium tracking across tiers ── */
.page-head__title { font-size: clamp(1.375rem, 1.8vw, 1.5rem); letter-spacing: -0.025em; }
.filter-panel__title { font-size: 1.1rem; letter-spacing: -0.015em; }
.section-bar__title { letter-spacing: -0.015em; }
.news-card__title { font-size: 1.0625rem; letter-spacing: -0.015em; }

/* ── Page rhythm: steadier vertical spacing ── */
.page-head { padding: 1.25rem 0 1rem; }
.breadcrumb { margin-bottom: 0.85rem; }
.home-hero { padding: 1.5rem 0 2rem; }
.home-section:first-of-type { padding-top: 2rem; }

/* ── Comic grid: a touch more breathing room for VN titles ── */
.comic-grid {
  grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
  gap: 1rem 0.75rem;
}

/* ── Hero feature banner: stat hierarchy, text weight, line length ── */
.hero-feature__stat { font-size: 0.8125rem; font-weight: 500; color: var(--text-muted); }
.hero-feature__stat b { font-weight: 600; color: var(--text); }
.hero-feature__badge { color: var(--accent-dark); font-weight: 700; letter-spacing: 0.02em; }
.hero-feature__desc { max-width: 52ch; }
/* Metadata genre tags read as outline links, distinct from filter chips */
.hero-feature__genre {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--accent);
}
.hero-feature__genre:hover { background: var(--accent-soft); border-color: var(--accent); }
/* Cap action width so buttons don't bloat across the row */
.hero-feature__actions { gap: 0.75rem; max-width: 480px; }
.hero-feature__actions .btn { flex: 0 1 auto; min-width: 120px; }

/* ── Comic detail hero: ambient rim light instead of flat gradient ── */
.comic-detail__hero {
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg-alt) 50%, var(--bg) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), var(--shadow-sm);
}
.comic-detail__cover { box-shadow: 0 2px 10px rgba(6, 182, 212, 0.1); }

/* ── Comic detail meta chips: reduce noise, lift tags, add hover ── */
.comic-meta-chip { background: transparent; border-color: transparent; }
.comic-meta-chip--tag {
  background: var(--accent-soft);
  border-color: transparent;
  padding: 0.2rem 0.55rem;
  font-weight: 600;
}
.comic-meta-chip:not(.comic-meta-chip--muted):not(.comic-meta-chip--tag):hover {
  background: var(--bg-alt);
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Comic detail stats + synopsis legibility ── */
.comic-detail__stats { font-size: 0.8125rem; line-height: 1.5; }

/* ── Synopsis toggle + chapter sort: clearly interactive ── */
.comic-detail__synopsis-toggle,
.chapter-section__sort { transition: color var(--transition), opacity var(--transition); }
.comic-detail__synopsis-toggle:hover,
.chapter-section__sort:hover { text-decoration: underline; opacity: 0.82; }
.comic-detail__synopsis-toggle:focus-visible,
.chapter-section__sort:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.chapter-section__tools { color: var(--text-muted); }

/* ── Ranking tabs: solid accent active (no gradient), softer hover ── */
.ranking-tab.is-active {
  background: var(--accent);
  background-image: none;
  color: #fff;
  border-color: transparent;
}
.ranking-tab:hover:not(.is-active) { background: rgba(6, 182, 212, 0.06); }
.ranking-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── Ranking lists: tactile hover + rank as a visual anchor ── */
.ranking-page-item:hover {
  background: rgba(6, 182, 212, 0.08);
  box-shadow: inset 0 0 0 1px rgba(6, 182, 212, 0.12);
}
.ranking-page-item__rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: rgba(6, 182, 212, 0.08);
}
.ranking-item { transition: background var(--transition); border-radius: var(--radius-sm); }
.ranking-item:hover { background: var(--accent-soft); }
.ranking-item__rank { color: var(--accent); }

/* ── News grid: natural poster proportions, no fixed-height squash ── */
.news-card__img {
  height: auto;
  aspect-ratio: 16 / 10;
  max-height: 160px;
}
.news-card__title { line-height: 1.4; }
.news-pagination__link:hover { text-decoration: underline; opacity: 0.8; }
.news-pagination__link:active { opacity: 0.8; transform: translateY(1px); }
.news-pagination__link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.news-pagination__info { font-size: 0.875rem; font-weight: 500; color: var(--text-muted); }

/* ── Empty state: refined branded sphere icon + breathing room ── */
.empty-state { padding: 3.5rem 2rem; }
.empty-state::before {
  content: '';
  display: block;
  width: 66px;
  height: 66px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(6, 182, 212, 0.16), rgba(6, 182, 212, 0.05));
  box-shadow: inset 0 0 0 1px rgba(6, 182, 212, 0.14);
}
.empty-state h3 { font-size: 1.125rem; letter-spacing: -0.015em; }
.load-more-wrap__hint { color: var(--text-muted); font-weight: 500; }

/* Continue-reading empty placeholder (no history → gentle prompt).
   NB: keep the section in normal block flow. Putting `display:flex` on the
   [hidden] element made the header `.container` and the ::after prompt flex
   siblings → they overlapped ("Tiếp tục đọc / Xem tất cả / Hãy bắt đầu…").
   Render the prompt INSIDE the (empty) scroll row, below the section header. */
.home-section--continue[hidden] { display: block; }
.home-section--continue[hidden] .continue-scroll {
  min-height: 96px;
  display: grid;
  place-items: center;
}
.home-section--continue[hidden] .continue-scroll::after {
  content: 'Hãy bắt đầu đọc để xem lịch sử';
  color: var(--text-faint);
  font-size: 0.9375rem;
}

/* ── Auth pages: restrained card, visible focus, calmer error ── */
.auth-card {
  box-shadow: 0 6px 16px -4px rgba(22, 34, 56, 0.08), 0 2px 4px -2px rgba(22, 34, 56, 0.04);
}
.auth-card__title { letter-spacing: -0.02em; }
.auth-form__field { margin-bottom: 1.15rem; }
.auth-form__field:last-of-type { margin-bottom: 0.5rem; }
.auth-form__field label { font-weight: 700; letter-spacing: -0.01em; }
.auth-form__field input::selection { background: var(--accent-soft); color: var(--text); }
.auth-form__field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);
}
.auth-form__field input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: var(--bg-alt);
}
.auth-form__submit { margin-top: 1rem; }
.auth-form__error {
  color: #7c2d12;
  background: rgba(237, 129, 96, 0.06);
  border-color: rgba(237, 129, 96, 0.2);
}
/* Social button hover: add a real background shift for affordance */
.auth-social__btn:hover { box-shadow: var(--shadow-lg); }
.account-level-meta { font-style: italic; letter-spacing: 0.01em; line-height: 1.5; }

/* ── Account / gamification cards: hierarchy + token unification ── */
.account-card { padding: 1.5rem; }
.account-card__title { margin-bottom: 0.85rem; }
.account-card--stats { gap: 1.25rem; }
/* Distinguish stat tiles from generic form-input surfaces */
.account-stat {
  background: var(--accent-soft);
  border-color: rgba(6, 182, 212, 0.25);
}
.account-card__desc,
.referral-meta,
.account-level-meta,
.mission-item__pts,
.mission-item__prog,
.account-stat__label { color: var(--text-muted); }
.account-stat__value,
.mission-item__pts,
.newsletter-msg { color: var(--accent); }
/* Consistent accent fill for mission progress (single brand color) */
.mission-item__bar > div,
.mission-item__fill,
.mission-item__bar span {
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
}
.mission-item { transition: background var(--transition); border-radius: var(--radius-sm); }
.mission-item:hover { background: var(--bg-alt); padding: 0.5rem; }

/* Referral input gets its own rounded corners back */
.referral-box__input { border-radius: var(--radius-sm); }

/* Premium badge: keep ONE definition (gold). Neutralise the older
   green gradient version so branding is consistent site-wide. */
.premium-badge {
  color: #7c4a00;
  background: linear-gradient(135deg, #ffe08a, #f5c842);
  border: none;
}
.premium-badge:hover { transform: translateY(-1px); box-shadow: 0 2px 6px rgba(124, 74, 0, 0.2); transition: transform var(--transition), box-shadow var(--transition); }

/* Trust page links: hover feedback */
.trust-content__links a:hover { color: var(--accent-dark); }

/* ── Newsletter form: stack cleanly on small screens ── */
@media (max-width: 480px) {
  .newsletter-form { flex-direction: column; gap: 0.5rem; }
  .newsletter-form__input { min-width: 100%; }
}

/* ── Respect reduced motion for newly added transitions ── */
@media (prefers-reduced-motion: reduce) {
  .btn:active,
  .genre-chip:active,
  .filter-chip:active,
  .sort-chip:active,
  .btn-load-more:active,
  .premium-badge:hover,
  .news-pagination__link:active { transform: none; }
}

/* ============================================================
   READER — THEMED seamless layout (Sáng / Tối / OLED đồng bộ).
   Root bug fixed: body.site-body{background:var(--bg)} (white, higher
   specificity) overrode .reader-body's dark bg, and a transparent
   comments panel leaked that white in dark mode. Now the reading area
   AND the comments panel both ride var(--reader-bg) per theme; inner
   cards ride var(--reader-surface). Futuristic glass + accent glow.
   ============================================================ */

.reader-body { --reader-accent: var(--accent, #10b981); }

/* 1) Reader owns the page background in EVERY theme (beats body.site-body 0,1,1) */
body.site-body.reader-body { background: var(--reader-bg); }
html:has(body.reader-body) { background: var(--reader-bg); }

/* 2) Comments panel — themed surface, continuous with the reading column */
.reader-body .reader-comments-panel:not([hidden]),
.reader-body.reader-sidebar-desktop .reader-comments-panel {
  background: var(--reader-bg);
  color: var(--reader-text);
  box-shadow: none;
}
.reader-body.reader-sidebar-desktop .reader-comments-panel {
  border-left: 1px solid var(--reader-glass-border);
}
/* whisper-thin accent seam (futuristic, themed, very subtle) */
.reader-body.reader-sidebar-desktop .reader-comments-panel::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 -1px;
  width: 1px;
  background: linear-gradient(180deg, transparent 8%, var(--reader-accent) 50%, transparent 92%);
  opacity: 0.30;
  pointer-events: none;
}
.reader-body.reader-sidebar-desktop .reader-comments-panel > * { position: relative; }

/* glassy header that floats over the shared bg */
.reader-body .reader-comments-panel__header {
  background: color-mix(in srgb, var(--reader-bg) 82%, transparent);
  border-bottom: 1px solid var(--reader-glass-border);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
}
.reader-body .reader-comments-panel__title { color: var(--reader-text); letter-spacing: -0.01em; }
.reader-body .reader-comments-panel__subtitle { color: var(--reader-muted); }

/* 3) Inner cards — elevated themed surface + soft ring (premium, both modes) */
.reader-body .reader-comments-panel .comments-section__empty,
.reader-body .reader-comments-panel .comments-section__placeholder,
.reader-body .reader-comments-panel .comments-form,
.reader-body .reader-comments-panel .comment-item {
  background: var(--reader-surface);
  border: 1px solid var(--reader-glass-border);
  border-radius: 16px;
  color: var(--reader-text);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset;
}
.reader-body.reader-theme-light .reader-comments-panel .comments-section__empty,
.reader-body.reader-theme-light .reader-comments-panel .comments-section__placeholder,
.reader-body.reader-theme-light .reader-comments-panel .comments-form,
.reader-body.reader-theme-light .reader-comments-panel .comment-item {
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06);
}
.reader-body .reader-comments-panel .comments-section__empty { padding: 2.25rem 1.25rem; text-align: center; }
.reader-body .reader-comments-panel .comments-section__empty-title,
.reader-body .reader-comments-panel .comments-section__placeholder-title { color: var(--reader-text); font-weight: 700; letter-spacing: -0.01em; }
.reader-body .reader-comments-panel .comments-section__empty-text,
.reader-body .reader-comments-panel .comments-section__placeholder-text { color: var(--reader-muted); }

/* futuristic glowing icon chip for the empty/placeholder state */
.reader-body .reader-comments-panel .comments-section__empty-icon,
.reader-body .reader-comments-panel .comments-section__placeholder-icon {
  color: var(--reader-accent);
  filter: drop-shadow(0 0 12px color-mix(in srgb, var(--reader-accent) 55%, transparent));
}

/* comment input themed (so it isn't a white box in dark mode) */
.reader-body .reader-comments-panel .comments-form__input,
.reader-body .reader-comments-panel textarea,
.reader-body .reader-comments-panel input[type="text"] {
  background: color-mix(in srgb, var(--reader-text) 6%, transparent);
  border: 1px solid var(--reader-glass-border);
  color: var(--reader-text);
  border-radius: 12px;
}
.reader-body .reader-comments-panel .comments-form__input::placeholder,
.reader-body .reader-comments-panel textarea::placeholder { color: var(--reader-muted); }

/* the scroll body of the panel matches the bg (no white gap) */
.reader-body .reader-comments-panel__body { background: transparent; color: var(--reader-text); }

@media (prefers-reduced-motion: reduce) {
  .reader-body .reader-comments-panel__header { backdrop-filter: none; -webkit-backdrop-filter: none; }
}
/* ===================== END READER THEMED LAYER ============================ */

/* ============================================================
   READER — NEON / CYBER GLASS aesthetic (sci-fi, Sáng+Tối đồng bộ).
   Electric-cyan accent, glassmorphism chrome, neon glow on
   interactive/active states. Light mode uses a deeper cyan +
   softer glow so it stays legible.
   ============================================================ */
.reader-body {
  --reader-accent: #22d3ee;            /* electric cyan */
  --reader-accent-2: #38bdf8;          /* sky (cyber duo, NOT purple) */
  --reader-accent-soft: rgba(34, 211, 238, 0.14);
  --reader-glow: 0 0 18px rgba(34, 211, 238, 0.42);
}
.reader-body.reader-theme-light {
  --reader-accent: #0891b2;
  --reader-accent-2: #0ea5e9;
  --reader-accent-soft: rgba(8, 145, 178, 0.12);
  --reader-glow: 0 0 14px rgba(8, 145, 178, 0.26);
}

/* ── Glass: floating chrome cards ── */
.reader-body .reader-player__nav-pill,
.reader-body .reader-player__mini-bar,
.reader-body .reader-settings:not([hidden]) {
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
  background: color-mix(in srgb, var(--reader-nav-bg) 84%, transparent);
  border: 1px solid var(--reader-glass-border);
  box-shadow: none;
}
/* top bar: blur only (keep its own bottom border) */
.reader-body .reader-player__top {
  -webkit-backdrop-filter: saturate(150%) blur(16px);
  backdrop-filter: saturate(150%) blur(16px);
  background: color-mix(in srgb, var(--reader-nav-bg) 84%, transparent);
}
/* cyber edge-light along the top of the floating nav pill */
.reader-body .reader-player__nav-pill { position: relative; }
.reader-body .reader-player__nav-pill::before {
  content: '';
  position: absolute;
  left: 18%; right: 18%; top: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--reader-accent), transparent);
  opacity: 0.7;
  box-shadow: var(--reader-glow);
  pointer-events: none;
}

/* ── Neon interactive states ── */
.reader-body .reader-player__btn { transition: color .2s, box-shadow .2s, border-color .2s; }
.reader-body .reader-player__btn:hover {
  color: var(--reader-accent);
  border-color: color-mix(in srgb, var(--reader-accent) 55%, transparent);
  box-shadow: var(--reader-glow);
}
.reader-body .reader-player__nav-item { transition: color .2s, background .2s, box-shadow .2s; }
.reader-body .reader-player__nav-item:hover:not(.is-disabled),
.reader-body .reader-player__nav-item.is-active {
  color: var(--reader-accent);
  background: var(--reader-accent-soft);
}
.reader-body .reader-player__nav-item--next { color: var(--reader-accent); }
.reader-body .reader-player__nav-item--next:hover { box-shadow: var(--reader-glow); }
.reader-body .reader-player__btn--follow[aria-pressed="true"],
.reader-body .reader-player__nav-item--comments.is-active {
  color: var(--reader-accent);
  box-shadow: var(--reader-glow);
}

/* settings chips active = neon outline */
.reader-body .reader-settings__chip.is-active {
  border-color: var(--reader-accent);
  color: var(--reader-accent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--reader-accent) 40%, transparent), 0 0 10px color-mix(in srgb, var(--reader-accent) 28%, transparent);
}

/* progress bar = neon line */
.reader-body .reader-progress {
  background: linear-gradient(90deg, var(--reader-accent), var(--reader-accent-2));
  box-shadow: var(--reader-glow);
}

/* ── Comment cards: accent ring on hover / focus ── */
.reader-body .reader-comments-panel .comment-item:hover,
.reader-body .reader-comments-panel .comments-form:focus-within {
  border-color: color-mix(in srgb, var(--reader-accent) 45%, var(--reader-glass-border));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--reader-accent) 28%, transparent), var(--reader-glow);
}

/* ── Cyber CTAs (comment submit / first-comment / follow-cta) ── */
.reader-body .reader-comments-panel .btn-primary,
.reader-body .comments-section__empty .btn-primary,
.reader-body .comments-section__placeholder .btn-primary,
.reader-body .reader-end-card__comments-btn,
.reader-body .comments-form__submit {
  background: linear-gradient(135deg, var(--reader-accent), var(--reader-accent-2)) !important;
  border: none !important;
  color: #04212b !important;
  font-weight: 700;
  box-shadow: 0 4px 18px color-mix(in srgb, var(--reader-accent) 38%, transparent);
  transition: box-shadow .2s, transform .15s;
}
.reader-body .reader-comments-panel .btn-primary:hover,
.reader-body .comments-section__empty .btn-primary:hover,
.reader-body .comments-section__placeholder .btn-primary:hover,
.reader-body .reader-end-card__comments-btn:hover,
.reader-body .comments-form__submit:hover {
  box-shadow: 0 6px 28px color-mix(in srgb, var(--reader-accent) 55%, transparent), var(--reader-glow);
  transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
  .reader-body .reader-comments-panel .btn-primary:hover,
  .reader-body .comments-section__empty .btn-primary:hover { transform: none; }
}
/* ===================== END NEON / CYBER GLASS ============================ */

/* ============================================================
   READER — NEON refined for long reading comfort.
   Calm when reading (glows toned down + only on interaction),
   alive on touch (hover/active/focus bloom), one purposeful
   micro-pulse on the "next chapter" control. Reading surface
   stays pristine. Reduced-motion fully respected.
   ============================================================ */

/* 1) Tone DOWN always-on glows (comfort) */
.reader-body .reader-player__nav-pill::before {
  opacity: 0.32;                                   /* was 0.7 — subtle edge-light */
  box-shadow: 0 0 8px color-mix(in srgb, var(--reader-accent) 35%, transparent);
}
.reader-body .reader-progress {
  box-shadow: 0 0 8px color-mix(in srgb, var(--reader-accent) 30%, transparent);
}
/* next-chapter sits as a calm accent until hovered */
.reader-body .reader-player__nav-item--next { box-shadow: none; }

/* 2) Bloom ONLY on interaction (alive on touch) */
.reader-body .reader-player__btn:hover,
.reader-body .reader-player__nav-item:hover:not(.is-disabled) {
  box-shadow: 0 0 16px color-mix(in srgb, var(--reader-accent) 45%, transparent);
}
.reader-body .reader-player__nav-item.is-active {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--reader-accent) 35%, transparent);
}

/* 3) One purposeful micro-pulse on the next-chapter control */
@keyframes reader-next-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--reader-accent) 0%, transparent); }
  50%      { box-shadow: 0 0 14px 1px color-mix(in srgb, var(--reader-accent) 40%, transparent); }
}
.reader-body .reader-player__nav-item--next:not(.is-disabled) {
  animation: reader-next-pulse 3.4s ease-in-out infinite;
}
.reader-body .reader-player__nav-item--next:hover {
  animation: none;
  box-shadow: 0 0 20px color-mix(in srgb, var(--reader-accent) 55%, transparent);
}

/* end-card "next chapter" CTA: gentle cyber bloom */
.reader-body .reader-end-card__nav-btn--next,
.reader-body .reader-end-card a[class*="next"] {
  border-color: color-mix(in srgb, var(--reader-accent) 45%, var(--reader-glass-border));
  color: var(--reader-accent);
}
.reader-body .reader-end-card__nav-btn--next:hover {
  box-shadow: 0 0 18px color-mix(in srgb, var(--reader-accent) 45%, transparent);
}

/* 4) Comment CTA: calmer base, bloom on hover (don't scream while reading) */
.reader-body .reader-comments-panel .btn-primary,
.reader-body .comments-section__empty .btn-primary,
.reader-body .comments-section__placeholder .btn-primary,
.reader-body .reader-end-card__comments-btn,
.reader-body .comments-form__submit {
  box-shadow: 0 3px 14px color-mix(in srgb, var(--reader-accent) 26%, transparent);
}

@media (prefers-reduced-motion: reduce) {
  .reader-body .reader-player__nav-item--next:not(.is-disabled) { animation: none; }
}
/* ===================== END NEON refined ============================ */

/* ============================================================
   READER — UNIFIED TEAL (đồng bộ toàn dự án) + STRONGER neon +
   cohesive toolbar/scroll/comments via blur. Brand teal #06b6d4;
   reader = brighter teal-cyan neon. Both Sáng + Tối.
   ============================================================ */

/* (C) reader accent -> bright teal-cyan (same family as brand) */
.reader-body {
  --reader-accent: #2dd4bf; --reader-accent-2: #5eead4;
  --reader-accent-soft: rgba(45, 212, 191, 0.16);
  --reader-glow: 0 0 22px rgba(45, 212, 191, 0.50);
}
.reader-body.reader-theme-light {
  --reader-accent: #0d9488; --reader-accent-2: #14b8a6;
  --reader-accent-soft: rgba(13, 148, 136, 0.12);
  --reader-glow: 0 0 16px rgba(13, 148, 136, 0.30);
}

/* (A) STRONGER neon — brighter edge-light + progress PULSE + pill glow */
.reader-body .reader-player__nav-pill::before {
  opacity: 0.62; height: 2px;
  box-shadow: 0 0 14px color-mix(in srgb, var(--reader-accent) 60%, transparent);
}
@keyframes reader-progress-pulse {
  0%, 100% { box-shadow: 0 0 10px color-mix(in srgb, var(--reader-accent) 38%, transparent); }
  50%      { box-shadow: 0 0 22px color-mix(in srgb, var(--reader-accent) 68%, transparent); }
}
.reader-body .reader-progress {
  background: linear-gradient(90deg, var(--reader-accent), var(--reader-accent-2));
  animation: reader-progress-pulse 2.8s ease-in-out infinite;
}
.reader-body .reader-progress-pill {
  border: 1px solid color-mix(in srgb, var(--reader-accent) 45%, var(--reader-glass-border));
  color: var(--reader-accent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--reader-accent) 30%, transparent);
}

/* (B) SCROLLBAR — themed teal/glass (was default OS light → jarring in dark) */
.reader-body { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--reader-accent) 45%, var(--reader-glass-border)) transparent; }
.reader-body ::-webkit-scrollbar { width: 10px; height: 10px; }
.reader-body ::-webkit-scrollbar-track { background: transparent; }
.reader-body ::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--reader-accent) 26%, var(--reader-surface));
  border-radius: 999px; border: 2px solid transparent; background-clip: padding-box;
}
.reader-body ::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--reader-accent) 52%, var(--reader-surface)); background-clip: padding-box;
}

/* (B) ĐỒNG MÀU via blur — toolbar + thumb-strip + comments header share the
   same glassy nav tint; reading + comments body stay seamless reader-bg */
.reader-body .reader-player__top,
.reader-body .reader-thumb-strip,
.reader-body .reader-comments-panel__header {
  -webkit-backdrop-filter: saturate(150%) blur(16px);
  backdrop-filter: saturate(150%) blur(16px);
  background: color-mix(in srgb, var(--reader-nav-bg) 74%, transparent);
  border-color: var(--reader-glass-border);
}
.reader-body .reader-thumb-strip { border-right: 1px solid var(--reader-glass-border); }
/* active page thumbnail = teal ring */
.reader-body .reader-thumb-strip .is-active,
.reader-body .reader-thumb-strip [aria-current="true"],
.reader-body .reader-thumb-strip__item.is-active {
  outline: 2px solid var(--reader-accent);
  box-shadow: var(--reader-glow);
  border-radius: 8px;
}

@media (prefers-reduced-motion: reduce) {
  .reader-body .reader-progress { animation: none; }
}
/* ===================== END UNIFIED TEAL + STRONGER NEON ============================ */

/* ============================================================
   READER — SHADE shift to colder CYAN (#06b6d4 family, neon/cyber)
   + STRONGER neon incl. idle glow on toolbar buttons. Sáng+Tối.
   ============================================================ */
.reader-body {
  --reader-accent: #22d3ee; --reader-accent-2: #67e8f9;
  --reader-accent-soft: rgba(34, 211, 238, 0.18);
  --reader-glow: 0 0 24px rgba(34, 211, 238, 0.55);
}
.reader-body.reader-theme-light {
  --reader-accent: #0891b2; --reader-accent-2: #06b6d4;
  --reader-accent-soft: rgba(8, 145, 178, 0.14);
  --reader-glow: 0 0 18px rgba(8, 145, 178, 0.34);
}

/* IDLE glow on toolbar + nav buttons (always-on, subtle → bright on hover) */
.reader-body .reader-player__btn {
  box-shadow: 0 0 10px color-mix(in srgb, var(--reader-accent) 24%, transparent);
  transition: box-shadow .2s, color .2s, border-color .2s;
}
.reader-body .reader-player__btn:hover {
  box-shadow: 0 0 22px color-mix(in srgb, var(--reader-accent) 58%, transparent);
  color: var(--reader-accent);
  border-color: color-mix(in srgb, var(--reader-accent) 55%, transparent);
}
.reader-body .reader-player__btn[aria-pressed="true"] {
  color: var(--reader-accent);
  box-shadow: 0 0 18px color-mix(in srgb, var(--reader-accent) 50%, transparent);
}
/* nav labels get a faint neon text-shadow (alive) */
.reader-body .reader-player__nav-item:not(.is-disabled) {
  text-shadow: 0 0 7px color-mix(in srgb, var(--reader-accent) 16%, transparent);
}

/* STRONGER bottom-nav: brighter edge-light + accent ring on the pill */
.reader-body .reader-player__nav-pill::before {
  opacity: 0.78; height: 2px;
  box-shadow: 0 0 18px color-mix(in srgb, var(--reader-accent) 72%, transparent);
}
.reader-body .reader-player__nav-pill {
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.30),
              inset 0 1px 0 rgba(255, 255, 255, 0.07),
              0 0 0 1px color-mix(in srgb, var(--reader-accent) 20%, transparent);
}
/* settings gear / mini-bar buttons share the idle glow */
.reader-body .reader-player__mini-bar .reader-player__btn { box-shadow: 0 0 8px color-mix(in srgb, var(--reader-accent) 20%, transparent); }
/* ===================== END CYAN + IDLE GLOW ============================ */

/* ============================================================
   READER — CLEAN PREMIUM chapter header (declutter the meta row).
   The header is for reading context, not a data dump: keep comic
   title + chapter (the focus) + a single quiet line (status ·
   progress). Author/tags/rating/redundant link live on detail.
   ============================================================ */
/* Title hierarchy: comic small & quiet, chapter is the hero */
.reader-body .reader-player__comic-label {
  font-size: 0.66rem; letter-spacing: 0.08em; opacity: 0.62;
}
.reader-body .reader-player__chapter-label {
  font-size: 1.05rem; font-weight: 750; letter-spacing: -0.015em; margin-top: 0.1rem;
}

/* Meta row -> one calm muted line */
.reader-body .reader-player__meta-row {
  gap: 0; margin-top: 0.28rem; padding-top: 0; border-top: none;
  font-size: 0.7rem; flex-wrap: nowrap;
  justify-content: flex-start;
}
.reader-body .reader-player__meta-label { display: none; }                 /* drop "Tác giả"/"Tiến độ" prefixes */
.reader-body .reader-player__meta-item--tags,
.reader-body .reader-player__meta-item--rating,
.reader-body .reader-player__meta-link,
.reader-body .reader-player__read-badge { display: none !important; }       /* declutter: detail-page info / redundant */
.reader-body .reader-player__meta-item {
  font-size: 0.7rem; color: var(--reader-muted); line-height: 1.2;
}
.reader-body .reader-player__meta-value { color: var(--reader-muted); font-weight: 500; }
/* gentle dot separator before each item except the first VISIBLE one */
.reader-body .reader-player__meta-item:not(:first-child) { margin-left: 0.6rem; position: relative; }
.reader-body .reader-player__meta-item:not(:first-child)::before {
  content: '·'; position: absolute; left: -0.42rem; color: var(--reader-muted); opacity: 0.55;
}
/* status as a clean dot-tag (no heavy pill) */
.reader-body .reader-player__status {
  background: transparent !important; padding: 0 !important;
  color: var(--reader-accent); font-weight: 600; letter-spacing: 0.01em;
}
.reader-body .reader-player__status--ongoing::after { content: ''; }

/* Actions: tighter, calmer icon group */
.reader-body .reader-player__top-actions { gap: 0.3rem; }
.reader-body .reader-player__chapter-picker__btn {
  border: 1px solid var(--reader-glass-border);
  background: color-mix(in srgb, var(--reader-text) 5%, transparent);
}
.reader-body .reader-player__chapter-picker__btn:hover {
  border-color: color-mix(in srgb, var(--reader-accent) 45%, transparent);
  box-shadow: 0 0 14px color-mix(in srgb, var(--reader-accent) 30%, transparent);
}
/* a touch more breathing room around the title block */
.reader-body .reader-player__title-block { padding: 0 0.75rem; }
.reader-body .reader-player__title-main {
  justify-content: flex-start;
}
.reader-body .reader-player__title-copy {
  text-align: left;
}
.reader-body .reader-player__mini-title-block,
.reader-body .reader-player__mini-line,
.reader-body .reader-player__mini-meta {
  justify-content: flex-start;
  align-items: flex-start;
  text-align: left;
}
/* ===================== END CLEAN READER HEADER ============================ */

/* ============================================================
   READER POLISH v3 — rail, bottom nav, comments, color sync.
   Fully theme-aware (Sáng/Tối) via reader tokens + cyan accent.
   ============================================================ */

/* ---------- THUMB RAIL — clean, premium, collapsible ---------- */
.reader-body .reader-thumb-strip {
  transition: transform .28s var(--reader-ease, ease);
}
/* NON-destructive: keep .reader-thumb__item's display/aspect-ratio/overflow and
   .reader-thumb__img's object-fit. Only add polish. */
.reader-body .reader-thumb-strip .reader-thumb__item {
  opacity: 0.55; border-radius: 8px;
  outline: 2px solid transparent; outline-offset: 0;
  transition: opacity .2s, transform .2s, outline-color .2s, box-shadow .2s;
}
.reader-body .reader-thumb-strip .reader-thumb__item:hover { opacity: 1; transform: translateX(2px); }
.reader-body .reader-thumb-strip .reader-thumb__item.is-active,
.reader-body .reader-thumb-strip .reader-thumb__item.is-current,
.reader-body .reader-thumb-strip .reader-thumb__item[aria-current="true"] {
  opacity: 1; outline-color: var(--reader-accent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--reader-accent) 48%, transparent);
}
/* themed thin scrollbar inside the rail */
.reader-body .reader-thumb-strip::-webkit-scrollbar { width: 5px; }
.reader-body .reader-thumb-strip::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--reader-accent) 30%, transparent); border-radius: 999px; }
/* collapsed state (JS toggles .reader-rail-collapsed on body) */
.reader-body.reader-rail-collapsed .reader-thumb-strip { transform: translateX(-108%); }
.reader-body.reader-rail-collapsed .reader-layout__main { margin-left: 0 !important; }

/* the JS-created rail toggle button */
.reader-rail-toggle {
  position: fixed; left: 56px; top: calc(var(--reader-chrome-h) + 10px); z-index: 101;
  width: 26px; height: 40px; border: 1px solid var(--reader-glass-border); border-left: none;
  border-radius: 0 12px 12px 0; display: grid; place-items: center; cursor: pointer;
  color: var(--reader-muted); background: color-mix(in srgb, var(--reader-nav-bg) 80%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 0 12px color-mix(in srgb, var(--reader-accent) 16%, transparent);
  transition: color .2s, box-shadow .2s, transform .2s;
}
.reader-rail-toggle:hover { color: var(--reader-accent); box-shadow: var(--reader-glow); }
.reader-rail-toggle svg { transition: transform .28s var(--reader-ease, ease); }
.reader-body.reader-rail-collapsed .reader-rail-toggle svg { transform: rotate(180deg); }
.reader-body.reader-rail-collapsed .reader-rail-toggle { left: 0; }
/* hide rail toggle on mobile (no rail) */
@media (max-width: 1023px) { .reader-rail-toggle { display: none !important; } }

/* ---------- BOTTOM NAV — refined, accent "Sau" ---------- */
.reader-body .reader-player__nav-pill { padding: 0.4rem 0.5rem; gap: 0.12rem; }
.reader-body .reader-player__nav-divider { background: var(--reader-glass-border); height: 18px; }
.reader-body .reader-player__nav-item {
  border-radius: 12px; padding: 0.46rem 0.7rem; font-weight: 600;
}
.reader-body .reader-player__nav-item:hover:not(.is-disabled) {
  background: var(--reader-accent-soft); color: var(--reader-accent);
}
.reader-body .reader-player__nav-item--next:not(.is-disabled) {
  background: color-mix(in srgb, var(--reader-accent) 15%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--reader-accent) 38%, transparent);
}
.reader-body .reader-player__nav-item--next:hover:not(.is-disabled) {
  background: color-mix(in srgb, var(--reader-accent) 26%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--reader-accent) 55%, transparent), var(--reader-glow);
}
.reader-body .reader-player__fab-btn {
  border: 1px solid var(--reader-glass-border); border-radius: 14px;
  box-shadow: 0 0 10px color-mix(in srgb, var(--reader-accent) 16%, transparent);
}
.reader-body .reader-player__fab-btn:hover { color: var(--reader-accent); box-shadow: var(--reader-glow); }

/* ---------- COMMENTS — richer empty/placeholder + form ---------- */
.reader-body .reader-comments-panel .comments-section__empty,
.reader-body .reader-comments-panel .comments-section__placeholder { padding: 2.4rem 1.25rem; }
.reader-body .reader-comments-panel .comments-section__empty-icon,
.reader-body .reader-comments-panel .comments-section__placeholder-icon {
  width: 58px; height: 58px; margin: 0 auto 1rem; display: grid; place-items: center;
  border-radius: 18px;
  background: color-mix(in srgb, var(--reader-accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--reader-accent) 30%, transparent);
  box-shadow: 0 0 24px color-mix(in srgb, var(--reader-accent) 22%, transparent);
}
.reader-body .reader-comments-panel .comments-form__input,
.reader-body .reader-comments-panel textarea {
  min-height: 92px; line-height: 1.55;
}
.reader-body .reader-comments-panel .comments-form:focus-within {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--reader-accent) 38%, transparent), var(--reader-glow);
}
/* comment items: avatar/name accent on hover */
.reader-body .reader-comments-panel .comment-item { transition: border-color .2s, box-shadow .2s; }

/* ---------- COLOR SYNC — anything still off-accent ---------- */
.reader-body .reader-progress-pill,
.reader-body .reader-player__rating-value,
.reader-body .reader-chapter-picker__current { color: var(--reader-accent); }
.reader-body .reader-settings__chip.is-active { color: var(--reader-accent); border-color: var(--reader-accent); }
/* ===================== END READER POLISH v3 ============================ */

/* ============================================================
   READER END-CARD — fix button hierarchy + theme + no-clip.
   Bug: the 'Cyber CTAs' layer turned the SECONDARY "Nhận xét"
   button into a loud cyan primary, inverting hierarchy. Restore:
   ONE accent primary CTA + muted ghost secondaries. Sáng+Tối.
   ============================================================ */
/* label + cover ring track the reader cyan (was public --accent) */
.reader-body .reader-end-card__label { color: var(--reader-accent); }

/* PRIMARY CTA = reader accent (Chương tiếp theo / Về trang truyện) */
.reader-body .reader-end-card__cta,
.reader-body .reader-end-card__cta--secondary {
  background: linear-gradient(135deg, var(--reader-accent), var(--reader-accent-2)) !important;
  color: #04212b !important; border: none !important; font-weight: 700;
  box-shadow: 0 6px 22px color-mix(in srgb, var(--reader-accent) 36%, transparent) !important;
}
.reader-body .reader-end-card__cta:hover,
.reader-body .reader-end-card__cta--secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px color-mix(in srgb, var(--reader-accent) 50%, transparent), var(--reader-glow) !important;
}

/* SECONDARY = muted ghost (undo the loud cyan fill on "Nhận xét chương này") */
.reader-body .reader-end-card__comments-btn {
  background: color-mix(in srgb, var(--reader-text) 5%, transparent) !important;
  color: var(--reader-muted) !important;
  border: 1px solid var(--reader-glass-border) !important;
  box-shadow: none !important; font-weight: 600 !important;
}
.reader-body .reader-end-card__comments-btn:hover {
  color: var(--reader-accent) !important;
  border-color: color-mix(in srgb, var(--reader-accent) 45%, transparent) !important;
  background: var(--reader-accent-soft) !important;
  box-shadow: 0 0 14px color-mix(in srgb, var(--reader-accent) 26%, transparent) !important;
  transform: none;
}

/* "Tóm tắt AI" + follow = ghost too (consistent secondary row) */
.reader-body .reader-end-card__recap {
  background: color-mix(in srgb, var(--reader-text) 5%, transparent);
  border: 1px solid var(--reader-glass-border); color: var(--reader-text);
}
.reader-body .reader-end-card__recap:hover {
  border-color: color-mix(in srgb, var(--reader-accent) 40%, transparent);
  color: var(--reader-accent);
}
/* quick-rate "Gửi đánh giá" -> reader accent (was public cyan gradient) */
.reader-body .reader-end-card .btn-primary {
  background: linear-gradient(135deg, var(--reader-accent), var(--reader-accent-2)) !important;
  border: none !important; color: #04212b !important;
  box-shadow: 0 4px 16px color-mix(in srgb, var(--reader-accent) 32%, transparent) !important;
}
/* selected stars glow accent */
.reader-body .reader-end-card .star-input__btn.is-active,
.reader-body .reader-end-card .star-input__btn:hover { color: var(--reader-accent); }
/* inner card surface tracks theme */
.reader-body .reader-end-card__inner { background: color-mix(in srgb, var(--reader-surface) 92%, transparent); }
/* ===================== END END-CARD FIX ============================ */

/* ============================================================
   READER END-CARD — CLEAN PREMIUM REDESIGN.
   Fixes: stretched cover (72x265 strip), 868px sprawl, clutter.
   Contained centered card, true 3:4 cover, calm hierarchy. Sáng/Tối.
   ============================================================ */
.reader-body .reader-end-card.is-visible { max-height: 1400px; }

/* contained, centered card (was full-width sprawl) */
.reader-body .reader-end-card__inner {
  max-width: 560px; margin: 0 auto;
  grid-template-columns: 104px 1fr;
  gap: 0 1.2rem;
  padding: 1.6rem 1.6rem 1.4rem;
  border-radius: 18px;
  background: color-mix(in srgb, var(--reader-surface) 97%, transparent) !important;
  border: 1px solid var(--reader-glass-border);
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* COVER: true 3:4 thumbnail, top-aligned, NOT stretched */
.reader-body .reader-end-card__cover {
  grid-row: 1; grid-column: 1; align-self: start;
  width: 104px; height: auto; min-height: 0;
  aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.34);
}
.reader-body .reader-end-card__cover img {
  width: 100%; height: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: center;
}

/* INFO */
.reader-body .reader-end-card__info { grid-row: 1; grid-column: 2; min-width: 0; }
.reader-body .reader-end-card__label { color: var(--reader-accent); font-size: 0.64rem; letter-spacing: 0.09em; }
.reader-body .reader-end-card__comic { font-size: 1.12rem; margin-top: 0.28rem; }

/* quick-rate: compact tidy block */
.reader-body .reader-end-card__quick-rate {
  margin-top: 0.7rem; padding-top: 0.7rem; border-top: 1px solid var(--reader-glass-border);
}
.reader-body .reader-end-card__quick-rate-label { margin: 0 0 0.3rem; }
.reader-body .reader-end-card .star-input { font-size: 1.05rem; gap: 0.1rem; }
.reader-body .reader-end-card .btn-primary {
  margin-top: 0.5rem; min-height: 34px; padding: 0.3rem 0.9rem; font-size: 0.8rem; border-radius: 9px;
}

/* secondary actions (heart + Tóm tắt AI): subtle ghost */
.reader-body .reader-end-card__follow,
.reader-body .reader-end-card__recap {
  margin-top: 0.7rem; min-height: 36px; font-size: 0.8rem; border-radius: 9px;
  border: 1px solid var(--reader-glass-border) !important;
  background: color-mix(in srgb, var(--reader-text) 5%, transparent) !important;
  color: var(--reader-muted) !important; box-shadow: none !important;
}
.reader-body .reader-end-card__follow:hover,
.reader-body .reader-end-card__recap:hover {
  color: var(--reader-accent) !important;
  border-color: color-mix(in srgb, var(--reader-accent) 40%, transparent) !important;
}

/* ACTIONS: full width below, refined accent primary */
.reader-body .reader-end-card__actions {
  grid-row: 2; grid-column: 1 / -1; margin-top: 0.5rem; padding-top: 1rem;
}
.reader-body .reader-end-card__cta,
.reader-body .reader-end-card__cta--secondary {
  min-height: 46px; border-radius: 12px; font-size: 0.9rem; font-weight: 700;
  background: var(--reader-accent) !important; color: #04212b !important; border: none !important;
  box-shadow: 0 6px 20px color-mix(in srgb, var(--reader-accent) 28%, transparent) !important;
}
.reader-body .reader-end-card__cta:hover,
.reader-body .reader-end-card__cta--secondary:hover {
  filter: brightness(1.06);
  box-shadow: 0 9px 26px color-mix(in srgb, var(--reader-accent) 42%, transparent) !important;
}
.reader-body .reader-end-card__comments-btn { min-height: 40px; }
/* related comics (when present): compact grid */
.reader-body .reader-end-card__related { margin-top: 0.7rem; padding-top: 0.7rem; border-top: 1px solid var(--reader-glass-border); }
/* ===================== END END-CARD REDESIGN ============================ */

/* ============================================================
   READER END-CARD v3 — Premium commercial completion UI
   ============================================================ */
.reader-body .reader-end-card {
  max-width: 640px;
  padding: 0 1rem;
}

.reader-body .reader-end-card.is-visible {
  max-height: 1600px;
  padding: 2rem 1rem 2.75rem;
}

.reader-body .reader-end-card__shell {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding: 1.35rem 1.35rem 1.25rem;
  border-radius: 20px;
  background:
    linear-gradient(165deg, color-mix(in srgb, var(--reader-surface) 96%, var(--reader-accent) 4%), color-mix(in srgb, var(--reader-surface) 99%, transparent));
  border: 1px solid color-mix(in srgb, var(--reader-accent) 18%, var(--reader-glass-border));
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.reader-body .reader-end-card__shell::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--reader-accent) 55%, transparent), transparent);
  pointer-events: none;
}

.reader-body .reader-end-card__celebrate {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--reader-accent) 22%, transparent), color-mix(in srgb, var(--reader-accent-2) 14%, transparent));
  border: 1px solid color-mix(in srgb, var(--reader-accent) 35%, transparent);
  color: var(--reader-text);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.reader-body .reader-end-card__celebrate-glow {
  position: absolute;
  inset: -20% 10%;
  background: radial-gradient(circle, color-mix(in srgb, var(--reader-accent) 28%, transparent), transparent 70%);
  pointer-events: none;
}

.reader-body .reader-end-card__celebrate-icon {
  color: var(--reader-accent);
  font-size: 0.9rem;
}

.reader-body .reader-end-card__hero {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 1rem 1.15rem;
  align-items: start;
}

.reader-body .reader-end-card__cover {
  width: 112px;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.reader-body .reader-end-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reader-body .reader-end-card__meta { min-width: 0; }

.reader-body .reader-end-card__eyebrow,
.reader-body .reader-end-card__label {
  margin: 0;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--reader-accent);
}

.reader-body .reader-end-card__comic {
  margin: 0.35rem 0 0;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.25;
  color: var(--reader-text);
}

.reader-body .reader-end-card__chapter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
  margin: 0.45rem 0 0;
  font-size: 0.8125rem;
  color: var(--reader-muted);
}

.reader-body .reader-end-card__chapter-num {
  font-weight: 600;
  color: color-mix(in srgb, var(--reader-text) 88%, var(--reader-muted));
}

.reader-body .reader-end-card__chapter-title {
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--reader-text) 6%, transparent);
  border: 1px solid var(--reader-glass-border);
  color: var(--reader-text);
  font-weight: 600;
  font-size: 0.75rem;
}

.reader-body .reader-end-card__author {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: var(--reader-muted);
}

.reader-body .reader-end-card__rating {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.45rem;
  font-size: 0.75rem;
  color: var(--reader-muted);
}

.reader-body .reader-end-card__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding-top: 0.15rem;
}

.reader-body .reader-end-card__tool {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 38px;
  padding: 0 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--reader-glass-border);
  background: color-mix(in srgb, var(--reader-text) 4%, transparent);
  color: var(--reader-muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.reader-body .reader-end-card__tool:hover,
.reader-body .reader-end-card__tool[aria-pressed='true'] {
  color: var(--reader-accent);
  border-color: color-mix(in srgb, var(--reader-accent) 42%, transparent);
  background: var(--reader-accent-soft);
}

.reader-body .reader-end-card__share-wrap {
  position: relative;
}

.reader-body .reader-end-card__share-pop {
  right: 0;
  left: auto;
  min-width: 280px;
}

.reader-body .reader-end-card__rate {
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  background: color-mix(in srgb, var(--reader-text) 3%, transparent);
  border: 1px solid var(--reader-glass-border);
}

.reader-body .reader-end-card__rate-label,
.reader-body .reader-end-card__quick-rate-label {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--reader-muted);
}

.reader-body .reader-end-card__rate-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.reader-body .reader-end-card__rate-submit {
  flex-shrink: 0;
  min-height: 34px;
  padding: 0 0.95rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--reader-accent), var(--reader-accent-2));
  color: #04212b;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px color-mix(in srgb, var(--reader-accent) 30%, transparent);
}

.reader-body .reader-end-card__rate-submit:hover {
  filter: brightness(1.06);
}

.reader-body .reader-end-card .star-input {
  font-size: 1.15rem;
  gap: 0.08rem;
}

.reader-body .reader-end-card .star-input__btn.is-active,
.reader-body .reader-end-card .star-input__btn:hover {
  color: var(--reader-accent);
}

.reader-body .reader-end-card__actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.15rem;
}

.reader-body .reader-end-card__cta {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  min-height: 56px;
  padding: 0.85rem 3rem 0.85rem 1rem;
  border-radius: 14px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}

.reader-body .reader-end-card__cta--primary {
  background: linear-gradient(135deg, var(--reader-accent), var(--reader-accent-2)) !important;
  color: #04212b !important;
  border: none !important;
  box-shadow: 0 8px 28px color-mix(in srgb, var(--reader-accent) 34%, transparent) !important;
}

.reader-body .reader-end-card__cta--primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 12px 34px color-mix(in srgb, var(--reader-accent) 46%, transparent) !important;
}

.reader-body .reader-end-card__cta-label {
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.2;
}

.reader-body .reader-end-card__cta-sub {
  font-size: 0.78rem;
  font-weight: 600;
  opacity: 0.82;
  line-height: 1.35;
}

.reader-body .reader-end-card__cta-arrow {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.reader-body .reader-end-card__comments-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0 1rem;
  border-radius: 12px;
  border: 1px solid var(--reader-glass-border) !important;
  background: color-mix(in srgb, var(--reader-text) 4%, transparent) !important;
  color: var(--reader-muted) !important;
  font-size: 0.84rem;
  font-weight: 600;
  box-shadow: none !important;
  cursor: pointer;
}

.reader-body .reader-end-card__comments-btn:hover {
  color: var(--reader-accent) !important;
  border-color: color-mix(in srgb, var(--reader-accent) 40%, transparent) !important;
  background: var(--reader-accent-soft) !important;
}

.reader-body .reader-end-card__auto-next {
  margin: 0;
  font-size: 0.78rem;
  color: var(--reader-muted);
  text-align: center;
}

.reader-body .reader-end-card__related {
  padding-top: 0.85rem;
  border-top: 1px solid var(--reader-glass-border);
}

.reader-body .reader-end-card__related-label {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--reader-muted);
}

.reader-body .reader-end-card__related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.reader-body .reader-end-card__related-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem;
  border-radius: 10px;
  border: 1px solid var(--reader-glass-border);
  background: color-mix(in srgb, var(--reader-text) 3%, transparent);
  color: var(--reader-text);
  font-size: 0.75rem;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}

.reader-body .reader-end-card__related-item:hover {
  border-color: color-mix(in srgb, var(--reader-accent) 35%, transparent);
  background: var(--reader-accent-soft);
}

.reader-body .reader-end-card__related-item img {
  width: 40px;
  height: 54px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

/* Reader below + site footer integration */
.reader-body .reader-below {
  padding-top: 0.5rem;
}

.reader-body .reader-below__discover {
  padding: 1.5rem 0 0.5rem;
}

.reader-body .reader-below__crumb {
  padding: 1.25rem 0 1.5rem;
  border-top: 1px solid var(--reader-glass-border);
}

.reader-body .reader-breadcrumb .breadcrumb {
  justify-content: center;
  flex-wrap: wrap;
}

.reader-body .reader-site-footer {
  border-top: 1px solid var(--reader-glass-border);
  background: var(--reader-bg);
}

.reader-body .reader-site-footer .site-footer {
  --bg: var(--reader-bg);
  --bg-alt: var(--reader-surface);
  --text: var(--reader-text);
  --text-muted: var(--reader-muted);
  --text-faint: var(--reader-muted);
  --border: var(--reader-glass-border);
  background: var(--reader-bg);
  color: var(--reader-text);
}

.reader-body .reader-site-footer .site-footer__links a,
.reader-body .reader-site-footer .site-footer__tagline,
.reader-body .reader-site-footer .site-footer__newsletter-desc,
.reader-body .reader-site-footer .site-footer__bottom-inner p {
  color: var(--reader-muted);
}

.reader-body .reader-site-footer .site-footer__links a:hover {
  color: var(--reader-accent);
}

.reader-body .reader-site-footer .site-footer__heading {
  color: var(--reader-text);
}

.reader-body .reader-site-footer .pwa-install-hint {
  display: none !important;
}

/* Reader footer history strip should track reader themes */
.reader-body .reader-site-footer .footer-history {
  border-bottom-color: var(--reader-glass-border);
  background: color-mix(in srgb, var(--reader-surface) 92%, transparent);
}

.reader-body .reader-site-footer .footer-history__title {
  color: var(--reader-text);
}

.reader-body .reader-site-footer .footer-history__more {
  color: var(--reader-accent);
}

.reader-body .reader-site-footer .footer-history__more:hover {
  color: color-mix(in srgb, var(--reader-accent) 78%, white 22%);
}

.reader-body.reader-theme-light .reader-site-footer .footer-history {
  background: color-mix(in srgb, #ffffff 92%, var(--reader-accent-soft) 8%);
}

.reader-body.reader-theme-light .reader-site-footer .footer-history__title {
  color: color-mix(in srgb, var(--reader-text) 96%, #0b1220);
}

/* ============================================================
   Site footer v3 - luxury cinematic cleanup
   ============================================================ */

.site-footer.site-footer--v3 {
  margin-top: 3.25rem;
  border-top: 1px solid color-mix(in srgb, var(--border) 75%, var(--accent) 25%);
  background:
    radial-gradient(900px 260px at 100% -10%, color-mix(in srgb, var(--accent-soft) 55%, transparent), transparent 64%),
    linear-gradient(180deg, color-mix(in srgb, var(--bg-alt) 92%, var(--bg) 8%), var(--bg-elevated));
}

.site-footer.site-footer--v3 .footer-history {
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-elevated) 88%, transparent);
  padding: 1.2rem 0;
}

.site-footer.site-footer--v3 .footer-history__title {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

.site-footer.site-footer--v3 .footer-history__more {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
}

.site-footer.site-footer--v3 .site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) repeat(4, minmax(0, 1fr)) minmax(0, 1.35fr);
  gap: 2rem 1.35rem;
  padding-top: 2.4rem;
  padding-bottom: 2rem;
}

.site-footer.site-footer--v3 .site-footer__col {
  min-width: 0;
}

.site-footer.site-footer--v3 .site-footer__brand {
  max-width: 370px;
}

.site-footer.site-footer--v3 .site-footer__tagline {
  margin: 0.8rem 0 1.05rem;
  max-width: 52ch;
  color: var(--text-muted);
  line-height: 1.62;
  font-size: 0.875rem;
}

.site-footer.site-footer--v3 .site-footer__heading {
  margin: 0 0 0.8rem;
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.site-footer.site-footer--v3 .site-footer__links {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.54rem;
}

.site-footer.site-footer--v3 .site-footer__links a {
  display: inline-flex;
  align-items: center;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.86rem;
  transition: color 0.2s ease, transform 0.2s ease;
}

.site-footer.site-footer--v3 .site-footer__links a:hover {
  color: var(--accent);
  transform: translateX(2px);
}

.site-footer.site-footer--v3 .footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.48rem;
  margin-top: 1rem;
}

.site-footer.site-footer--v3 .footer-social__link {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-alt) 88%, transparent);
  color: var(--text-muted);
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.site-footer.site-footer--v3 .footer-social__link:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent-soft) 42%, transparent);
}

.site-footer.site-footer--v3 .footer-nap {
  margin-top: 1rem;
  display: grid;
  gap: 0.42rem;
  font-style: normal;
}

.site-footer.site-footer--v3 .footer-nap__name {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text);
}

.site-footer.site-footer--v3 .footer-nap__item {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 0.42rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.45;
  text-decoration: none;
}

.site-footer.site-footer--v3 .footer-nap__item:hover {
  color: var(--accent);
}

.site-footer.site-footer--v3 .footer-nap__label {
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: color-mix(in srgb, var(--text-muted) 80%, var(--text) 20%);
  padding-top: 0.1rem;
}

.site-footer.site-footer--v3 .site-footer__newsletter {
  border: 1px solid color-mix(in srgb, var(--border) 74%, var(--accent) 26%);
  border-radius: 16px;
  background: color-mix(in srgb, var(--bg-alt) 92%, transparent);
  padding: 1rem;
  align-self: start;
}

.site-footer.site-footer--v3 .site-footer__newsletter-desc {
  margin: 0 0 0.65rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.site-footer.site-footer--v3 .newsletter-form {
  display: flex;
  gap: 0.45rem;
}

.site-footer.site-footer--v3 .newsletter-form__input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--bg-elevated) 94%, transparent);
  color: var(--text);
  padding: 0.55rem 0.72rem;
  font-size: 0.86rem;
}

.site-footer.site-footer--v3 .newsletter-form__input:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 62%, white 38%);
  outline-offset: 2px;
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
}

.site-footer.site-footer--v3 .site-footer__bottom {
  border-top: 1px solid var(--border);
}

.site-footer.site-footer--v3 .site-footer__bottom-inner {
  padding: 1rem 0;
  text-align: center;
}

.site-footer.site-footer--v3 .site-footer__bottom-inner p {
  margin: 0;
  color: var(--text-faint);
  font-size: 0.8rem;
}

@media (max-width: 1100px) {
  .site-footer.site-footer--v3 .site-footer__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .site-footer.site-footer--v3 .site-footer__brand {
    grid-column: 1 / -1;
    max-width: none;
  }

  .site-footer.site-footer--v3 .site-footer__newsletter {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .site-footer.site-footer--v3 .site-footer__grid {
    grid-template-columns: 1fr;
    gap: 1.4rem;
    padding-top: 1.8rem;
  }

  .site-footer.site-footer--v3 .site-footer__newsletter {
    padding: 0.9rem;
  }

  .site-footer.site-footer--v3 .newsletter-form {
    flex-direction: column;
  }
}

/* Final priority: keep reader history strip synced with reader theme */
.reader-body .reader-site-footer .site-footer.site-footer--v3 .footer-history {
  border-bottom-color: var(--reader-glass-border);
  background: color-mix(in srgb, var(--reader-surface) 92%, transparent);
}

.reader-body .reader-site-footer .site-footer.site-footer--v3 .footer-history__title {
  color: var(--reader-text);
}

.reader-body .reader-site-footer .site-footer.site-footer--v3 .footer-history__more {
  color: var(--reader-accent);
}

.reader-body .reader-site-footer .site-footer.site-footer--v3 .footer-history__more:hover {
  color: color-mix(in srgb, var(--reader-accent) 78%, white 22%);
}

.reader-body.reader-theme-light .reader-site-footer .site-footer.site-footer--v3 .footer-history {
  background: color-mix(in srgb, #ffffff 92%, var(--reader-accent-soft) 8%);
}

/* ============================================================
   Site footer minimal - high-end edition
   ============================================================ */

.site-footer.site-footer--minimal {
  margin-top: 3.25rem;
  border-top: 1px solid color-mix(in srgb, var(--border) 74%, var(--accent) 26%);
  background:
    radial-gradient(900px 280px at 100% -10%, color-mix(in srgb, var(--accent-soft) 50%, transparent), transparent 62%),
    linear-gradient(180deg, color-mix(in srgb, var(--bg-alt) 90%, var(--bg) 10%), var(--bg-elevated));
}

.site-footer.site-footer--minimal .footer-history {
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-elevated) 90%, transparent);
  padding: 1.15rem 0;
}

.site-footer.site-footer--minimal .footer-history__title {
  margin: 0;
  font-size: 0.94rem;
}

.site-footer.site-footer--minimal .footer-history__more {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
}

.site-footer.site-footer--minimal .site-footer__minimal-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1.65fr);
  gap: 2rem 2.4rem;
  padding-top: 2.3rem;
  padding-bottom: 1.8rem;
}

.site-footer.site-footer--minimal .site-footer__minimal-brand {
  min-width: 0;
}

.site-footer.site-footer--minimal .site-footer__tagline {
  margin: 0.85rem 0 1rem;
  color: var(--text-muted);
  line-height: 1.62;
  max-width: 52ch;
  font-size: 0.875rem;
}

.site-footer.site-footer--minimal .site-footer__cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.site-footer.site-footer--minimal .site-footer__minimal-info {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.4rem 1.4rem;
  align-content: start;
}

.site-footer.site-footer--minimal .site-footer__minimal-block {
  min-width: 0;
}

.site-footer.site-footer--minimal .site-footer__heading {
  margin: 0 0 0.78rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
}

.site-footer.site-footer--minimal .site-footer__links {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.site-footer.site-footer--minimal .site-footer__links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.84rem;
  transition: color 0.2s ease, transform 0.2s ease;
}

.site-footer.site-footer--minimal .site-footer__links a:hover {
  color: var(--accent);
  transform: translateX(2px);
}

.site-footer.site-footer--minimal .site-footer__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.site-footer.site-footer--minimal .site-footer__chip {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.24rem 0.56rem;
  font-size: 0.76rem;
  text-decoration: none;
  color: var(--text-muted);
  background: color-mix(in srgb, var(--bg-alt) 90%, transparent);
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.site-footer.site-footer--minimal .site-footer__chip:hover {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  background: color-mix(in srgb, var(--accent-soft) 35%, transparent);
}

.site-footer.site-footer--minimal .footer-nap--minimal {
  display: grid;
  gap: 0.42rem;
  font-style: normal;
}

.site-footer.site-footer--minimal .footer-nap__name {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text);
}

.site-footer.site-footer--minimal .footer-nap__item {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 0.42rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-decoration: none;
  line-height: 1.45;
}

.site-footer.site-footer--minimal .footer-nap__item:hover {
  color: var(--accent);
}

.site-footer.site-footer--minimal .footer-nap__label {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--text-muted) 82%, var(--text) 18%);
}

.site-footer.site-footer--minimal .footer-social {
  margin-top: 0.95rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.site-footer.site-footer--minimal .footer-social__link {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-alt) 88%, transparent);
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.site-footer.site-footer--minimal .footer-social__link:hover {
  transform: translateY(-1px);
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 42%, transparent);
}

.site-footer.site-footer--minimal .site-footer__newsletter--minimal {
  margin-top: 1rem;
  border: 1px solid color-mix(in srgb, var(--border) 72%, var(--accent) 28%);
  border-radius: 14px;
  background: color-mix(in srgb, var(--bg-alt) 92%, transparent);
  padding: 0.95rem;
}

.site-footer.site-footer--minimal .site-footer__newsletter-desc {
  margin: 0 0 0.62rem;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.site-footer.site-footer--minimal .newsletter-form {
  display: flex;
  gap: 0.42rem;
}

.site-footer.site-footer--minimal .newsletter-form__input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.52rem 0.72rem;
  background: color-mix(in srgb, var(--bg-elevated) 95%, transparent);
  color: var(--text);
  font-size: 0.84rem;
}

.site-footer.site-footer--minimal .newsletter-form__input:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 62%, white 38%);
  outline-offset: 2px;
}

.site-footer.site-footer--minimal .site-footer__seo-strip {
  border-top: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
  padding-top: 1rem;
  padding-bottom: 0.95rem;
}

.site-footer.site-footer--minimal .site-footer__seo-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.52rem;
}

.site-footer.site-footer--minimal .site-footer__seo-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.76rem;
  border: 1px solid color-mix(in srgb, var(--border) 92%, transparent);
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
  background: color-mix(in srgb, var(--bg-alt) 86%, transparent);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.site-footer.site-footer--minimal .site-footer__seo-links a:hover {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 42%, transparent);
}

.site-footer.site-footer--minimal .site-footer__bottom {
  border-top: 1px solid var(--border);
}

.site-footer.site-footer--minimal .site-footer__bottom-inner {
  padding: 0.95rem 0;
  text-align: center;
}

.site-footer.site-footer--minimal .site-footer__bottom-inner p {
  margin: 0;
  color: var(--text-faint);
  font-size: 0.8rem;
}

@media (max-width: 1050px) {
  .site-footer.site-footer--minimal .site-footer__minimal-wrap {
    grid-template-columns: 1fr;
    gap: 1.6rem;
  }

  .site-footer.site-footer--minimal .site-footer__minimal-info {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .site-footer.site-footer--minimal .site-footer__minimal-info {
    grid-template-columns: 1fr;
  }

  .site-footer.site-footer--minimal .newsletter-form {
    flex-direction: column;
  }

  .site-footer.site-footer--minimal .site-footer__seo-strip {
    padding-top: 0.8rem;
  }
}

/* ============================================================
   Site footer v3 polished - full layout
   ============================================================ */

.site-footer.site-footer--v3 {
  margin-top: 3.25rem;
  border-top: 1px solid color-mix(in srgb, var(--border) 75%, var(--accent) 25%);
  background:
    radial-gradient(920px 260px at 100% -10%, color-mix(in srgb, var(--accent-soft) 56%, transparent), transparent 64%),
    linear-gradient(180deg, color-mix(in srgb, var(--bg-alt) 92%, var(--bg) 8%), var(--bg-elevated));
}

.site-footer.site-footer--v3 .footer-history {
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-elevated) 88%, transparent);
  padding: 1.2rem 0;
}

.site-footer.site-footer--v3 .footer-history__title {
  margin: 0;
  font-size: 0.95rem;
}

.site-footer.site-footer--v3 .footer-history__more {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
}

.site-footer.site-footer--v3 .site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) repeat(4, minmax(0, 1fr)) minmax(0, 1.28fr);
  gap: 1.95rem 1.3rem;
  padding-top: 2.35rem;
  padding-bottom: 1.9rem;
}

.site-footer.site-footer--v3 .site-footer__col {
  min-width: 0;
}

.site-footer.site-footer--v3 .site-footer__brand {
  max-width: 360px;
}

.site-footer.site-footer--v3 .site-footer__tagline {
  margin: 0.8rem 0 1rem;
  max-width: 52ch;
  color: var(--text-muted);
  line-height: 1.62;
  font-size: 0.875rem;
}

.site-footer.site-footer--v3 .site-footer__heading {
  margin: 0 0 0.8rem;
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.site-footer.site-footer--v3 .site-footer__links {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.52rem;
}

.site-footer.site-footer--v3 .site-footer__links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s ease, transform 0.2s ease;
}

.site-footer.site-footer--v3 .site-footer__links a:hover {
  color: var(--accent);
  transform: translateX(2px);
}

.site-footer.site-footer--v3 .footer-social {
  margin-top: 0.95rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.46rem;
}

.site-footer.site-footer--v3 .footer-social__link {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-alt) 88%, transparent);
  color: var(--text-muted);
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.site-footer.site-footer--v3 .footer-social__link:hover {
  transform: translateY(-1px);
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 42%, transparent);
}

.site-footer.site-footer--v3 .footer-nap {
  margin-top: 1rem;
  display: grid;
  gap: 0.42rem;
  font-style: normal;
}

.site-footer.site-footer--v3 .footer-nap__name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
}

.site-footer.site-footer--v3 .footer-nap__item {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 0.42rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-decoration: none;
  line-height: 1.45;
}

.site-footer.site-footer--v3 .footer-nap__item:hover {
  color: var(--accent);
}

.site-footer.site-footer--v3 .footer-nap__label {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--text-muted) 80%, var(--text) 20%);
}

.site-footer.site-footer--v3 .site-footer__newsletter {
  border: 1px solid color-mix(in srgb, var(--border) 74%, var(--accent) 26%);
  border-radius: 18px;
  background:
    radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--accent-soft) 52%, transparent), transparent 54%),
    color-mix(in srgb, var(--bg-alt) 92%, transparent);
  padding: 0;
  align-self: start;
  overflow: hidden;
}

.site-footer.site-footer--v3 .site-footer__newsletter-inner {
  position: relative;
  padding: 1rem 1rem 0.95rem;
}

.site-footer.site-footer--v3 .site-footer__newsletter-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 35%);
}

.site-footer.site-footer--v3 .site-footer__newsletter-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--accent) 78%, white 22%);
}

.site-footer.site-footer--v3 .site-footer__newsletter-desc {
  margin: 0 0 0.7rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.site-footer.site-footer--v3 .newsletter-form {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem;
  align-items: center;
  margin-bottom: 0.55rem;
}

.site-footer.site-footer--v3 .site-footer__newsletter-input-wrap {
  border: 1px solid color-mix(in srgb, var(--border) 70%, var(--accent) 30%);
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg-elevated) 96%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.site-footer.site-footer--v3 .newsletter-form__input {
  flex: 1;
  min-width: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  padding: 0.58rem 0.72rem;
  font-size: 0.85rem;
}

.site-footer.site-footer--v3 .newsletter-form__input:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 66%, white 34%);
  outline-offset: 2px;
}

.site-footer.site-footer--v3 .newsletter-form .btn {
  min-height: 40px;
  border-radius: 12px;
  padding-inline: 0.9rem;
  box-shadow: 0 10px 20px color-mix(in srgb, var(--accent) 24%, transparent);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.site-footer.site-footer--v3 .newsletter-form .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px color-mix(in srgb, var(--accent) 30%, transparent);
}

.site-footer.site-footer--v3 .site-footer__newsletter-meta {
  margin: 0;
  font-size: 0.72rem;
  color: var(--text-faint);
}

.site-footer.site-footer--v3 .site-footer__seo-strip {
  border-top: 1px solid color-mix(in srgb, var(--border) 84%, transparent);
  padding-top: 1rem;
  padding-bottom: 0.95rem;
}

.site-footer.site-footer--v3 .site-footer__seo-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.52rem;
}

.site-footer.site-footer--v3 .site-footer__seo-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.76rem;
  border: 1px solid color-mix(in srgb, var(--border) 92%, transparent);
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
  background: color-mix(in srgb, var(--bg-alt) 86%, transparent);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.site-footer.site-footer--v3 .site-footer__seo-links a:hover {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 42%, transparent);
}

.site-footer.site-footer--v3 .site-footer__bottom {
  border-top: 1px solid var(--border);
}

.site-footer.site-footer--v3 .site-footer__bottom-inner {
  padding: 0.98rem 0;
  text-align: center;
}

.site-footer.site-footer--v3 .site-footer__bottom-inner p {
  margin: 0;
  color: var(--text-faint);
  font-size: 0.8rem;
}

@media (max-width: 1100px) {
  .site-footer.site-footer--v3 .site-footer__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .site-footer.site-footer--v3 .site-footer__brand {
    grid-column: 1 / -1;
    max-width: none;
  }

  .site-footer.site-footer--v3 .site-footer__newsletter {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .site-footer.site-footer--v3 .site-footer__grid {
    grid-template-columns: 1fr;
    gap: 1.4rem;
    padding-top: 1.8rem;
  }

  .site-footer.site-footer--v3 .newsletter-form {
    grid-template-columns: 1fr;
  }
}

.reader-body .reader-extras .action-bar {
  justify-content: center;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  border: 1px solid var(--reader-glass-border);
  background: color-mix(in srgb, var(--reader-surface) 92%, transparent);
}

@media (max-width: 560px) {
  .reader-body .reader-end-card__hero {
    grid-template-columns: 88px 1fr;
    gap: 0.85rem;
  }

  .reader-body .reader-end-card__cover {
    width: 88px;
  }

  .reader-body .reader-end-card__comic {
    font-size: 1.05rem;
  }

  .reader-body .reader-end-card__toolbar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .reader-body .reader-end-card__tool {
    justify-content: center;
    padding: 0 0.45rem;
    font-size: 0.72rem;
  }

  .reader-body .reader-end-card__tool span:last-child {
    display: none;
  }

  .reader-body .reader-end-card__rate-row {
    flex-direction: column;
    align-items: stretch;
  }

  .reader-body .reader-end-card__rate-submit {
    width: 100%;
  }

  .reader-body .reader-end-card__related-grid {
    grid-template-columns: 1fr;
  }
}

/* Footer newsletter hard-fix: lock input/button rendering across layers */
.site-footer.site-footer--v3 .site-footer__newsletter .newsletter-form__input {
  width: 100%;
  min-height: 40px;
  line-height: 1.25;
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  color: var(--text);
  caret-color: var(--accent);
}

.site-footer.site-footer--v3 .site-footer__newsletter .newsletter-form__input::placeholder {
  color: color-mix(in srgb, var(--text-muted) 82%, transparent);
  opacity: 1;
}

.site-footer.site-footer--v3 .site-footer__newsletter .newsletter-form__input:focus {
  background: color-mix(in srgb, var(--bg-elevated) 98%, transparent);
}

.site-footer.site-footer--v3 .site-footer__newsletter .newsletter-form .btn.btn-primary {
  min-height: 40px;
  min-width: 104px;
  border: 1px solid transparent;
  background-image: var(--accent-grad);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-sizing: border-box;
}

.site-footer.site-footer--v3 .site-footer__newsletter .newsletter-form .btn.btn-primary span {
  color: inherit;
}

.site-footer.site-footer--v3 .site-footer__newsletter .newsletter-form .btn.btn-primary:hover {
  filter: brightness(1.04);
}

@media (max-width: 680px) {
  .site-footer.site-footer--v3 .site-footer__newsletter .newsletter-form .btn.btn-primary {
    width: 100%;
  }
}
/* ===================== END READER END-CARD v3 ============================ */

/* ===================== COMPACT REFINEMENT LAYER ============================
   Goal: reduce oversized/thick UI across public site without changing structure.
   ========================================================================== */

/* Footer newsletter: widen input zone, shrink submit button */
.site-footer.site-footer--v3 .site-footer__grid {
  grid-template-columns: minmax(0, 1.6fr) repeat(4, minmax(0, 1fr)) minmax(280px, 1.45fr);
}

.site-footer.site-footer--v3 .site-footer__newsletter .newsletter-form {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.36rem;
}

.site-footer.site-footer--v3 .site-footer__newsletter .site-footer__newsletter-input-wrap {
  min-width: 0;
  flex: 1 1 auto;
}

.site-footer.site-footer--v3 .site-footer__newsletter .newsletter-form__input {
  min-height: 34px;
  padding: 0.4rem 0.58rem;
  font-size: 0.78rem;
}

.site-footer.site-footer--v3 .site-footer__newsletter .newsletter-form .btn.btn-primary {
  min-height: 34px;
  min-width: 74px;
  padding: 0.28rem 0.52rem;
  font-size: 0.74rem;
  border-radius: 9px;
}

/* Compact buttons / cards / sections on public pages */
.btn {
  padding: 0.44rem 0.86rem;
  font-size: 0.84rem;
}

.btn--sm {
  padding: 0.3rem 0.62rem;
  font-size: 0.76rem;
}

.home-section {
  padding: 1rem 0 1.2rem;
}

.page-section {
  padding: 1rem 0 1.55rem;
}

.section-bar {
  margin-bottom: 0.75rem;
}

.comic-grid {
  gap: 0.85rem;
}

.comic-card:hover {
  transform: translateY(-2px);
}

.hero-feature {
  padding: 1rem;
  gap: 1rem;
}

.hero-feature__actions .btn {
  padding: 0.45rem 1rem;
}

@media (max-width: 1100px) {
  .site-footer.site-footer--v3 .site-footer__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .site-footer.site-footer--v3 .site-footer__newsletter .newsletter-form {
    grid-template-columns: 1fr;
  }

  .site-footer.site-footer--v3 .site-footer__newsletter .newsletter-form .btn.btn-primary {
    width: 100%;
  }
}

/* Reader chrome flat mode: remove all requested shadows */
.reader-body.reader-player--chrome-hidden .reader-player__mini-bar,
.reader-body .reader-player__nav-pill,
.reader-body .reader-player__mini-bar,
.reader-body .reader-settings:not([hidden]),
.reader-player__mini-bar {
  box-shadow: none !important;
}

/* Reader bottom nav redesign: compact premium layout */
.reader-body .reader-player__bottom-inner {
  width: min(560px, calc(100vw - 1.2rem));
  max-width: 560px;
  gap: 0.55rem;
  align-items: center;
}

.reader-body .reader-player__nav-pill {
  border-radius: 16px;
  padding: 0.3rem;
  border-color: color-mix(in srgb, var(--reader-glass-border) 75%, var(--reader-accent) 25%);
  background: color-mix(in srgb, var(--reader-nav-bg) 90%, transparent);
}

.reader-body .reader-player__nav-divider {
  height: 16px;
  opacity: 0.5;
}

.reader-body .reader-player__nav-item {
  min-height: 38px;
  padding: 0.32rem 0.54rem;
  border-radius: 11px;
  font-size: 0.765rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  color: color-mix(in srgb, var(--reader-text) 78%, var(--reader-muted) 22%);
  border: 1px solid transparent;
  transition:
    transform 0.18s ease,
    background-color 0.22s ease,
    color 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

.reader-body .reader-player__nav-item svg {
  width: 16px;
  height: 16px;
}

.reader-body .reader-player__nav-item:hover:not(.is-disabled) {
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--reader-accent) 10%, transparent);
  border-color: color-mix(in srgb, var(--reader-accent) 28%, transparent);
  color: color-mix(in srgb, var(--reader-text) 88%, var(--reader-accent) 12%);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--reader-accent) 14%, transparent);
}

.reader-body .reader-player__nav-item--comments {
  color: color-mix(in srgb, var(--reader-text) 72%, var(--reader-muted) 28%);
}

.reader-body .reader-player__nav-item--comments.is-active,
.reader-body .reader-player__nav-item--comments:hover {
  background: color-mix(in srgb, var(--reader-accent) 12%, transparent);
  border-color: color-mix(in srgb, var(--reader-accent) 34%, transparent);
  color: var(--reader-accent);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--reader-accent) 18%, transparent);
}

/* Keep first-comment CTA text white for readability */
.reader-body .comments-section__empty .btn.btn-primary.btn--sm.comments-section__empty-cta,
.reader-body .comments-section__placeholder .btn.btn-primary.btn--sm.comments-section__empty-cta {
  color: #fff !important;
}

.reader-body .comments-section__empty .btn.btn-primary.btn--sm.comments-section__empty-cta span,
.reader-body .comments-section__placeholder .btn.btn-primary.btn--sm.comments-section__empty-cta span {
  color: #fff !important;
}

.reader-body .reader-player__nav-item--next:not(.is-disabled) {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--reader-accent) 22%, transparent),
    color-mix(in srgb, var(--reader-accent-2) 18%, transparent)
  );
  color: var(--reader-accent);
}

.reader-body .reader-player__nav-item--next:hover:not(.is-disabled) {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--reader-accent) 24%, transparent),
    color-mix(in srgb, var(--reader-accent-2) 20%, transparent)
  );
  border-color: color-mix(in srgb, var(--reader-accent) 42%, transparent);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--reader-accent) 24%, transparent);
}

.reader-body .reader-player__nav-item:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--reader-accent) 62%, white 38%);
  outline-offset: 1px;
}

/* Reader share popover theme sync (dark/light) */
.reader-body .reader-share-popover:not([hidden]) {
  background: color-mix(in srgb, #000 52%, transparent);
}

.reader-body .reader-share-popover__panel {
  color: var(--reader-text);
  background: color-mix(in srgb, var(--reader-surface) 96%, transparent);
  border-color: var(--reader-glass-border);
  box-shadow: 0 14px 36px color-mix(in srgb, #000 28%, transparent);
}

.reader-body .reader-share-popover__header {
  border-bottom-color: var(--reader-glass-border);
}

.reader-body .reader-share-popover__body .share-tabs__nav {
  background: color-mix(in srgb, var(--reader-surface) 88%, transparent);
  border-color: var(--reader-glass-border);
}

.reader-body .reader-share-popover__body .share-tabs__tab {
  color: var(--reader-muted);
}

.reader-body .reader-share-popover__body .share-tabs__tab.is-active {
  color: var(--reader-accent);
  background: color-mix(in srgb, var(--reader-accent) 16%, transparent);
}

.reader-body .reader-share-popover__body .share-popover__title,
.reader-body .reader-share-popover__body .share-embed__hint,
.reader-body .reader-share-popover__body .share-embed__size-label,
.reader-body .reader-share-popover__body .share-embed__code-label {
  color: var(--reader-muted);
}

.reader-body .reader-share-popover__body .share-social__btn {
  color: var(--reader-text);
  background: color-mix(in srgb, var(--reader-surface) 90%, transparent);
  border-color: var(--reader-glass-border);
}

.reader-body .reader-share-popover__body .share-social__btn:hover {
  color: var(--reader-accent);
  border-color: color-mix(in srgb, var(--reader-accent) 44%, transparent);
  background: color-mix(in srgb, var(--reader-accent) 16%, transparent);
}

.reader-body .reader-share-popover__body .share-embed__sizes {
  background: color-mix(in srgb, var(--reader-surface) 88%, transparent);
  border-color: var(--reader-glass-border);
}

.reader-body .reader-share-popover__body .share-embed__size {
  color: var(--reader-muted);
}

/* Comic detail — premium rating/comment composition */
body.site-body:not(.reader-body) .ratings-section,
body.site-body:not(.reader-body) .comments-section {
  margin-top: 1.1rem;
  padding: 1.2rem 1.05rem;
  border: 1px solid color-mix(in srgb, var(--site-border, #e2e8f0) 80%, var(--site-primary, #06b6d4) 20%);
  border-radius: 16px;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--site-surface, #fff) 95%, #fff 5%),
    color-mix(in srgb, var(--site-surface, #fff) 98%, transparent 2%)
  );
  box-shadow: 0 12px 30px rgba(2, 8, 23, 0.07);
}

body.site-body:not(.reader-body) .ratings-section__head {
  margin-bottom: 0.7rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid color-mix(in srgb, var(--site-border, #e2e8f0) 76%, transparent);
}

body.site-body:not(.reader-body) .ratings-section__head h2,
body.site-body:not(.reader-body) .comments-section__head h2 {
  font-size: 1.03rem;
  font-weight: 750;
  letter-spacing: -0.01em;
}

body.site-body:not(.reader-body) .ratings-summary__empty,
body.site-body:not(.reader-body) .comments-section__count {
  color: var(--site-muted, #64748b);
  font-size: 0.8rem;
}

body.site-body:not(.reader-body) .star-input {
  gap: 0.28rem;
  margin-bottom: 0.62rem;
  padding: 0.38rem;
  width: fit-content;
  border-radius: 12px;
  background: color-mix(in srgb, var(--site-surface, #fff) 90%, var(--site-primary, #06b6d4) 10%);
  border: 1px solid color-mix(in srgb, var(--site-primary, #06b6d4) 22%, var(--site-border, #e2e8f0) 78%);
}

body.site-body:not(.reader-body) .star-input__btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  font-size: 1.2rem;
  background: color-mix(in srgb, var(--site-surface, #fff) 96%, transparent);
  border: 1px solid color-mix(in srgb, var(--site-border, #e2e8f0) 82%, transparent);
  transition: transform 0.15s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

body.site-body:not(.reader-body) .star-input__btn:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--site-primary, #06b6d4) 42%, transparent);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--site-primary, #06b6d4) 16%, transparent);
}

body.site-body:not(.reader-body) .star-input__btn.is-active {
  color: #f59e0b;
  border-color: color-mix(in srgb, #f59e0b 42%, transparent);
  background: color-mix(in srgb, #f59e0b 14%, var(--site-surface, #fff));
}

body.site-body:not(.reader-body) .ratings-form__review {
  min-height: 90px;
  border-radius: 12px;
  padding: 0.7rem 0.82rem;
  margin-top: 0.1rem;
}

body.site-body:not(.reader-body) .ratings-form__label {
  margin: 0 0 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--site-muted, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

body.site-body:not(.reader-body) .ratings-form__login {
  margin: 0.55rem 0 0;
  font-size: 0.8rem;
  color: var(--site-muted, #64748b);
}

body.site-body:not(.reader-body) .ratings-form .btn.btn-primary.btn--sm,
body.site-body:not(.reader-body) .comments-section .btn.btn-primary.btn--sm {
  min-height: 35px;
  border-radius: 11px;
  padding: 0.36rem 0.84rem;
  font-size: 0.79rem;
}

body.site-body:not(.reader-body) .ratings-form .btn.btn-primary.btn--sm {
  margin-top: 0.1rem;
}

body.site-body:not(.reader-body) .comments-section {
  border-top: 1px solid color-mix(in srgb, var(--site-border, #e2e8f0) 82%, var(--site-primary, #06b6d4) 18%);
  padding-top: 1.1rem;
}

body.site-body:not(.reader-body) .comments-section__placeholder,
body.site-body:not(.reader-body) .comments-section__empty,
body.site-body:not(.reader-body) .comments-section__error {
  border-radius: 12px;
  border: 1px dashed color-mix(in srgb, var(--site-primary, #06b6d4) 30%, var(--site-border, #e2e8f0) 70%);
  background: color-mix(in srgb, var(--site-surface, #fff) 92%, var(--site-primary, #06b6d4) 8%);
  padding: 1.35rem 0.95rem;
}

body.site-body:not(.reader-body) .comments-section__empty-title {
  font-size: 1rem;
}

body.site-body:not(.reader-body) .comments-section__empty-text {
  font-size: 0.84rem;
  max-width: 30rem;
}

body.site-body:not(.reader-body) .comments-section__empty-cta {
  margin-top: 0.75rem;
  min-width: 170px;
}

@media (max-width: 680px) {
  body.site-body:not(.reader-body) .ratings-section,
  body.site-body:not(.reader-body) .comments-section {
    padding: 1rem 0.85rem;
    border-radius: 14px;
  }

  body.site-body:not(.reader-body) .ratings-section__head {
    align-items: flex-start;
    gap: 0.35rem;
  }

  body.site-body:not(.reader-body) .star-input {
    width: 100%;
    justify-content: space-between;
  }

  body.site-body:not(.reader-body) .star-input__btn {
    flex: 1 1 0;
    max-width: none;
  }

  body.site-body:not(.reader-body) .comments-section__empty-cta {
    width: 100%;
  }
}

.reader-body .reader-share-popover__body .share-embed__size.is-active {
  color: var(--reader-accent);
  background: color-mix(in srgb, var(--reader-accent) 14%, transparent);
}

.reader-body .reader-share-popover__body .share-embed__code {
  color: var(--reader-text);
  background: color-mix(in srgb, var(--reader-surface) 82%, transparent);
  border-color: color-mix(in srgb, var(--reader-accent) 28%, var(--reader-glass-border));
}

.reader-body.reader-theme-light .reader-share-popover:not([hidden]) {
  background: color-mix(in srgb, #0f172a 26%, transparent);
}

/* Reader marketing share popover should float above nav buttons */
.reader-body .reader-mkt__actions-bar .action-bar__share-wrap {
  position: relative;
  z-index: 80;
}

.reader-body .reader-mkt__actions-bar .share-popover {
  top: auto;
  bottom: calc(100% + 0.45rem);
  z-index: 120;
}

.reader-body .reader-mkt__actions-bar .share-popover::before {
  top: auto;
  bottom: -5px;
  border-top: none;
  border-left: none;
  border-right: 1px solid color-mix(in srgb, var(--reader-accent) 22%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--reader-accent) 22%, transparent);
}

/* ============================================================================
   SEO Admin Bar (front-end SEO editor for logged-in admins)
   ========================================================================== */
.wt-seo-bar {
  position: fixed; left: 16px; bottom: 16px; z-index: 2147483000;
  font-family: 'Be Vietnam Pro', system-ui, sans-serif;
}
@media (max-width: 768px) { .wt-seo-bar { bottom: 76px; left: 12px; } }
.wt-seo-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, #22d3ee, #0891b2); color: #fff;
  border: none; border-radius: 999px; padding: 9px 14px; font-size: 13px; font-weight: 700;
  cursor: pointer; box-shadow: 0 6px 20px rgba(8, 145, 178, 0.35); letter-spacing: .02em;
}
.wt-seo-toggle:hover { filter: brightness(1.05); }
.wt-seo-bar:not(.is-collapsed) .wt-seo-toggle { border-bottom-left-radius: 6px; border-bottom-right-radius: 6px; }
.wt-seo-panel {
  width: 320px; max-width: calc(100vw - 32px); margin-top: 8px;
  background: #fff; color: #1c1e21; border: 1px solid #dadde1; border-radius: 12px;
  box-shadow: 0 16px 50px rgba(15, 23, 42, 0.22); padding: 12px 14px;
  max-height: 70vh; overflow: auto;
}
.wt-seo-bar.is-collapsed .wt-seo-panel { display: none; }
.wt-seo-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.wt-seo-head strong { font-size: 13.5px; }
.wt-seo-badge { font-size: 10.5px; font-weight: 700; background: rgba(8,145,178,.12); color: #0891b2; padding: 2px 8px; border-radius: 999px; }
.wt-seo-x { margin-left: auto; border: none; background: none; cursor: pointer; color: #90949c; font-size: 14px; line-height: 1; padding: 2px; }
.wt-seo-name { font-size: 12px; color: #606770; margin: 0 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wt-seo-snapshot { border-top: 1px solid #eef0f2; border-bottom: 1px solid #eef0f2; padding: 6px 0; margin-bottom: 10px; }
.wt-seo-row { display: flex; align-items: center; gap: 8px; font-size: 12px; padding: 3px 0; }
.wt-seo-row-k { color: #606770; min-width: 108px; }
.wt-seo-row-v { color: #1c1e21; font-weight: 600; font-variant-numeric: tabular-nums; }
.wt-seo-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.wt-seo-dot.wt-ok { background: #22c55e; } .wt-seo-dot.wt-warn { background: #f59e0b; } .wt-seo-dot.wt-bad { background: #ef4444; }
.wt-seo-field { display: block; margin-bottom: 9px; }
.wt-seo-field-label { display: block; font-size: 11.5px; font-weight: 700; color: #606770; margin-bottom: 4px; }
.wt-seo-field-label em { color: #0891b2; font-style: normal; }
.wt-seo-field input, .wt-seo-field textarea {
  width: 100%; box-sizing: border-box; border: 1px solid #dadde1; border-radius: 8px;
  padding: 7px 9px; font-size: 12.5px; font-family: inherit; color: #1c1e21; resize: vertical;
}
.wt-seo-field input:focus, .wt-seo-field textarea:focus { outline: none; border-color: #0891b2; box-shadow: 0 0 0 3px rgba(8,145,178,.15); }
.wt-seo-field small { display: block; font-size: 10.5px; color: #90949c; margin-top: 3px; }
.wt-seo-actions { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.wt-seo-save { background: linear-gradient(135deg, #22d3ee, #0891b2); color: #fff; border: none; border-radius: 8px; padding: 8px 16px; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.wt-seo-save:disabled { opacity: .6; cursor: default; }
.wt-seo-cms { font-size: 12px; font-weight: 600; color: #0891b2; text-decoration: none; }
.wt-seo-cms:hover { text-decoration: underline; }
.wt-seo-cms--block { display: block; text-align: center; padding: 9px; border: 1px solid #dadde1; border-radius: 8px; }
.wt-seo-msg { font-size: 12px; font-weight: 600; margin-top: 8px; }
.wt-seo-msg.wt-ok { color: #15803d; } .wt-seo-msg.wt-bad { color: #b91c1c; }
/* ===================== END SEO ADMIN BAR ============================ */

.wt-seo-canon { display: inline-block; max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; color: #0891b2; text-decoration: none; font-weight: 600; }
.wt-seo-canon:hover { text-decoration: underline; }

/* ============================================================================
   FAQ section (homepage) — native <details> accordion
   ========================================================================== */
.faq-list { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: 0.6rem; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elevated); overflow: hidden; box-shadow: var(--shadow-sm); }
.faq-item > summary.faq-q { cursor: pointer; list-style: none; padding: 0.95rem 2.6rem 0.95rem 1.1rem; font-weight: 700; font-size: 0.95rem; color: var(--text); position: relative; }
.faq-item > summary.faq-q::-webkit-details-marker { display: none; }
.faq-item > summary.faq-q::after { content: '+'; position: absolute; right: 1.05rem; top: 50%; transform: translateY(-50%); font-size: 1.3rem; font-weight: 400; line-height: 1; color: var(--accent); }
.faq-item[open] > summary.faq-q::after { content: '−'; }
.faq-item > summary.faq-q:hover { color: var(--accent); }
.faq-a { padding: 0 1.1rem 1rem; color: var(--text-muted); font-size: 0.9rem; line-height: 1.65; }

/* ============================================================================
   Contact section (FAQ page)
   ========================================================================== */
.contact-section { border-top: 1px solid var(--border); }
.contact-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 2rem; align-items: start; }
.contact-info__title { font-size: 1.35rem; margin: 0 0 0.5rem; color: var(--text); }
.contact-info__desc { color: var(--text-muted); margin: 0 0 1.1rem; line-height: 1.6; }
.contact-info__list { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-direction: column; gap: 0.65rem; }
.contact-info__list li { display: flex; align-items: center; gap: 0.6rem; color: var(--text); font-size: 0.92rem; }
.contact-info__list a { color: var(--accent); text-decoration: none; }
.contact-info__list a:hover { text-decoration: underline; }
.contact-info__ic { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); flex: none; font-size: 0.9rem; }
.contact-info__socials { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.contact-info__socials a { font-size: 0.8rem; font-weight: 600; padding: 0.3rem 0.75rem; border: 1px solid var(--border); border-radius: 999px; color: var(--text-muted); text-decoration: none; }
.contact-info__socials a:hover { border-color: var(--accent); color: var(--accent); }
.contact-form { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow-sm); }
.contact-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.contact-field { display: block; margin-bottom: 0.9rem; }
.contact-field > span { display: block; font-size: 0.8rem; font-weight: 700; color: var(--text-muted); margin-bottom: 0.35rem; }
.contact-field input, .contact-field textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--border); border-radius: 10px; padding: 0.6rem 0.75rem; font-family: inherit; font-size: 0.9rem; color: var(--text); background: var(--bg); resize: vertical; }
.contact-field input:focus, .contact-field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.contact-form__foot { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.contact-form__msg { margin: 0; font-size: 0.85rem; font-weight: 600; }
.contact-form__msg.is-ok { color: #15803d; }
.contact-form__msg.is-err { color: #b91c1c; }
@media (max-width: 720px) { .contact-grid { grid-template-columns: 1fr; gap: 1.4rem; } .contact-form__row { grid-template-columns: 1fr; } }

/* ============================================================================
   Newspaper layout (/tin-tuc)
   ========================================================================== */
.newspaper { padding: 1.5rem 0 3rem; }
.newspaper__masthead { text-align: center; padding: 0.4rem 0 1.1rem; border-bottom: 3px double var(--border); }
.newspaper__title { font-size: clamp(1.7rem, 4vw, 2.5rem); font-weight: 800; letter-spacing: -0.02em; margin: 0; color: var(--text); }
.newspaper__tagline { margin: 0.4rem 0 0; color: var(--text-muted); font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; }
.newspaper__layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 2rem; align-items: start; margin-top: 1.3rem; }
.newspaper__main { min-width: 0; }
.np-lead { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1.4rem; padding-bottom: 1.6rem; margin-bottom: 1.4rem; border-bottom: 1px solid var(--border); align-items: center; }
.np-lead__media { display: block; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 10; background: var(--bg-alt); }
.np-lead__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.np-lead:hover .np-lead__media img { transform: scale(1.03); }
.np-lead__title { font-size: clamp(1.3rem, 2.6vw, 1.85rem); line-height: 1.2; font-weight: 800; letter-spacing: -0.01em; margin: 0.5rem 0 0.6rem; }
.np-lead__title a { color: var(--text); text-decoration: none; }
.np-lead__title a:hover { color: var(--accent); }
.np-lead__excerpt { color: var(--text-muted); font-size: 0.97rem; line-height: 1.6; margin: 0 0 0.8rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.np-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--border); }
.np-row__media { display: block; border-radius: calc(var(--radius) - 4px); overflow: hidden; aspect-ratio: 16 / 11; background: var(--bg-alt); }
.np-row__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.np-row__title { font-size: 1.05rem; font-weight: 700; line-height: 1.3; margin: 0.3rem 0 0.4rem; }
.np-row__title a { color: var(--text); text-decoration: none; }
.np-row__title a:hover { color: var(--accent); }
.np-row__excerpt { color: var(--text-muted); font-size: 0.85rem; line-height: 1.5; margin: 0 0 0.45rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.np-row__date { font-size: 0.75rem; color: var(--text-faint); }
.np-kicker { display: inline-block; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); text-decoration: none; }
.np-meta { display: flex; align-items: center; gap: 1rem; font-size: 0.82rem; color: var(--text-faint); }
.np-readmore { color: var(--accent); font-weight: 700; text-decoration: none; }
.np-readmore:hover { text-decoration: underline; }
.np-ph { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, var(--bg-alt), var(--border)); }
.newspaper__aside { position: sticky; top: 84px; }
.np-widget { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elevated); padding: 1rem 1.1rem; box-shadow: var(--shadow-sm); }
.np-widget__head { font-size: 1rem; font-weight: 800; margin: 0 0 0.8rem; padding-bottom: 0.55rem; border-bottom: 2px solid var(--accent); color: var(--text); }
.np-toplist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.7rem; }
.np-toplist__item { display: flex; align-items: center; gap: 0.55rem; }
.np-toplist__rank { font-size: 1.1rem; font-weight: 800; color: var(--text-faint); min-width: 18px; text-align: center; }
.np-toplist__item:nth-child(1) .np-toplist__rank { color: var(--accent); }
.np-toplist__link { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; min-width: 0; }
.np-toplist__link img { width: 44px; height: 59px; object-fit: cover; border-radius: 6px; flex: none; }
.np-toplist__title { font-size: 0.85rem; font-weight: 600; color: var(--text); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.np-toplist__link:hover .np-toplist__title { color: var(--accent); }
@media (max-width: 900px) { .newspaper__layout { grid-template-columns: 1fr; } .newspaper__aside { position: static; } }
@media (max-width: 600px) { .np-lead { grid-template-columns: 1fr; gap: 0.9rem; } .np-row { grid-template-columns: 110px minmax(0,1fr); gap: 0.8rem; } }

/* ============================================================================
   Magazine layout (/tin-tuc) — Soledad "Times Magazine" inspired
   ========================================================================== */
.mag { padding: 1.4rem 0 3rem; }
.mag__masthead { text-align: center; padding: 0.4rem 0 1.3rem; }
.mag__eyebrow { display: inline-block; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.35rem; }
.mag__title { font-size: clamp(1.9rem, 4.5vw, 2.8rem); font-weight: 900; letter-spacing: -0.02em; margin: 0; color: var(--text); }
.mag__tagline { margin: 0.4rem 0 0; color: var(--text-muted); font-size: 0.8rem; letter-spacing: 0.05em; text-transform: uppercase; }
.mag-hero { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1.1rem; margin: 1.1rem 0 2rem; }
.mag-hero__side { display: grid; grid-template-rows: 1fr 1fr; gap: 1.1rem; min-height: 0; }
.mag-feat { position: relative; display: block; border-radius: var(--radius); overflow: hidden; text-decoration: none; background: var(--bg-alt); }
.mag-feat--lead { min-height: 420px; }
.mag-feat__img { position: absolute; inset: 0; display: block; }
.mag-feat__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.mag-feat:hover .mag-feat__img img { transform: scale(1.05); }
.mag-feat::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.82) 0%, rgba(0,0,0,.32) 48%, rgba(0,0,0,0) 78%); }
.mag-feat__overlay { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 1.2rem 1.3rem; display: flex; flex-direction: column; gap: 0.5rem; }
.mag-feat--side .mag-feat__overlay { padding: 0.9rem 1rem; gap: 0.4rem; }
.mag-feat__title { color: #fff; font-weight: 800; line-height: 1.25; letter-spacing: -0.01em; }
.mag-feat--lead .mag-feat__title { font-size: clamp(1.35rem, 2.6vw, 1.95rem); }
.mag-feat--side .mag-feat__title { font-size: 1rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mag-feat__excerpt { color: rgba(255,255,255,.82); font-size: 0.92rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mag-feat__meta { color: rgba(255,255,255,.7); font-size: 0.78rem; }
.mag-cat { align-self: flex-start; display: inline-block; background: var(--accent); color: #fff; font-size: 0.67rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; padding: 0.24rem 0.6rem; border-radius: 4px; }
.mag-ph { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, #1f2937, #374151); }
.mag-body { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 2.2rem; align-items: start; }
.mag-main { min-width: 0; }
.mag-secheading { display: flex; align-items: center; justify-content: space-between; margin: 0 0 1.2rem; padding-bottom: 0.45rem; border-bottom: 2px solid var(--border); position: relative; }
.mag-secheading::before { content: ''; position: absolute; left: 0; bottom: -2px; width: 64px; height: 2px; background: var(--accent); }
.mag-secheading h2 { font-size: 1.05rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em; margin: 0; color: var(--text); }
.mag-secheading__more { font-size: 0.8rem; font-weight: 700; color: var(--accent); text-decoration: none; }
.mag-secheading__more:hover { text-decoration: underline; }
.mag-secheading--sm { margin-bottom: 0.9rem; }
.mag-secheading--sm h2 { font-size: 0.9rem; }
.mag-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1.5rem; }
.mag-card { display: flex; flex-direction: column; }
.mag-card__img { display: block; border-radius: calc(var(--radius) - 2px); overflow: hidden; aspect-ratio: 16/10; background: var(--bg-alt); margin-bottom: 0.7rem; }
.mag-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.mag-card:hover .mag-card__img img { transform: scale(1.04); }
.mag-cat--text { background: none; padding: 0; color: var(--accent); border-radius: 0; }
.mag-card__title { font-size: 1.06rem; font-weight: 700; line-height: 1.3; margin: 0.35rem 0 0.4rem; }
.mag-card__title a { color: var(--text); text-decoration: none; }
.mag-card__title a:hover { color: var(--accent); }
.mag-card__excerpt { color: var(--text-muted); font-size: 0.85rem; line-height: 1.55; margin: 0 0 0.5rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mag-card__meta { font-size: 0.75rem; color: var(--text-faint); margin-top: auto; }
.mag-note { color: var(--text-muted); padding: 0.8rem 0; }
.mag-aside { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 1.6rem; }
.mag-trend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.8rem; }
.mag-trend__item { display: flex; align-items: center; gap: 0.7rem; }
.mag-trend__rank { font-size: 1.4rem; font-weight: 900; color: var(--border-hover); min-width: 24px; text-align: center; font-style: italic; }
.mag-trend__item:nth-child(-n+3) .mag-trend__rank { color: var(--accent); }
.mag-trend__link { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; min-width: 0; }
.mag-trend__link img { width: 46px; height: 62px; object-fit: cover; border-radius: 6px; flex: none; }
.mag-trend__title { font-size: 0.85rem; font-weight: 600; color: var(--text); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mag-trend__link:hover .mag-trend__title { color: var(--accent); }
.mag-cats { list-style: none; margin: 0; padding: 0; }
.mag-cats li { border-bottom: 1px solid var(--border); }
.mag-cats a { display: block; padding: 0.55rem 0; color: var(--text); text-decoration: none; font-size: 0.9rem; font-weight: 500; }
.mag-cats a:hover { color: var(--accent); }
@media (max-width: 980px) { .mag-body { grid-template-columns: 1fr; } .mag-aside { position: static; flex-direction: row; flex-wrap: wrap; } .mag-aside .mag-widget { flex: 1 1 280px; } }
@media (max-width: 760px) { .mag-hero { grid-template-columns: 1fr; } .mag-hero__side { grid-template-rows: none; grid-template-columns: 1fr 1fr; } .mag-feat--lead { min-height: 300px; } .mag-feat--side { min-height: 180px; } .mag-grid { grid-template-columns: 1fr; } .mag-aside { flex-direction: column; } }

/* ── News article page (magazine) ── */
.news-article { min-width: 0; }
.news-article__header { margin-bottom: 1.1rem; }
.news-article__title { font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 900; line-height: 1.18; letter-spacing: -0.02em; margin: 0.6rem 0 0.7rem; color: var(--text); }
.news-article__lede { font-size: 1.08rem; line-height: 1.6; color: var(--text-muted); margin: 0 0 0.9rem; font-weight: 500; }
.news-article__meta { display: flex; align-items: center; gap: 1rem; font-size: 0.85rem; color: var(--text-faint); padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.news-article__by { font-weight: 700; color: var(--accent); }
.news-article__hero { width: 100%; border-radius: var(--radius); margin: 1.2rem 0; aspect-ratio: 16/9; object-fit: cover; display: block; }
.news-article__body { font-size: 1.05rem; line-height: 1.8; color: var(--text); }
.news-article__body p { margin: 0 0 1.1rem; }
.news-share { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin: 1.1rem 0; padding: 0.7rem 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.news-share__label { font-size: 0.78rem; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-right: 0.3rem; }
.news-share__btn { display: inline-flex; align-items: center; gap: 0.4rem; border: 1px solid var(--border); background: var(--bg-elevated); color: var(--text); border-radius: 8px; padding: 0.42rem 0.72rem; font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: all .15s; font-family: inherit; }
.news-share__btn:hover { color: #fff; }
.news-share__btn.is-fb:hover { background: #1877f2; border-color: #1877f2; }
.news-share__btn.is-x:hover { background: #000; border-color: #000; }
.news-share__btn.is-yt:hover { background: #ff0000; border-color: #ff0000; }
.news-share__btn.is-ig:hover { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); border-color: transparent; }
.news-share__btn.is-copy:hover { background: var(--accent); border-color: var(--accent); }
.news-related { margin-top: 2rem; }
.news-related__grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1.3rem; }
.news-related__card { min-width: 0; }
.news-related__img { display: block; border-radius: calc(var(--radius) - 2px); overflow: hidden; aspect-ratio: 16/9; background: var(--bg-alt); margin-bottom: 0.55rem; }
.news-related__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s; }
.news-related__card:hover .news-related__img img { transform: scale(1.05); }
.news-related__t { font-size: 0.98rem; font-weight: 700; line-height: 1.32; margin: 0 0 0.3rem; }
.news-related__t a { color: var(--text); text-decoration: none; }
.news-related__t a:hover { color: var(--accent); }
.news-related__d { font-size: 0.74rem; color: var(--text-faint); }
/* sidebar category nav active + tags + read-list */
.mag-cats a.is-active { color: var(--accent); font-weight: 800; }
.mag-widget--cats .mag-cats a { display: flex; align-items: center; justify-content: space-between; }
.mag-widget--cats .mag-cats a::after { content: '›'; opacity: .4; font-size: 1.1rem; }
.mag-cats--tags { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.mag-cats--tags li { border: none; }
.mag-cats--tags a { padding: 0.32rem 0.7rem; border: 1px solid var(--border); border-radius: 999px; font-size: 0.8rem; }
.mag-cats--tags a::after { content: none; }
.mag-cats--tags a:hover { border-color: var(--accent); }
.mag-readlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.7rem; }
.mag-readlist a { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.mag-readlist img, .mag-readlist__ph { width: 56px; height: 38px; object-fit: cover; border-radius: 6px; flex: none; background: var(--bg-alt); }
.mag-readlist__t { font-size: 0.82rem; font-weight: 600; color: var(--text); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mag-readlist a:hover .mag-readlist__t { color: var(--accent); }
@media (max-width: 600px) { .news-related__grid { grid-template-columns: 1fr; } }

/* news-share: two groups (share + follow) */
.news-share { flex-direction: column; align-items: stretch; gap: 0.6rem; }
.news-share__group { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.news-share__follow { padding-top: 0.55rem; border-top: 1px dashed var(--border); }
.news-follow { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.4rem 0.85rem; border-radius: 999px; font-size: 0.8rem; font-weight: 700; text-decoration: none; color: #fff; transition: filter .15s, transform .15s; }
.news-follow:hover { filter: brightness(1.08); transform: translateY(-1px); }
.news-follow.is-facebook { background: #1877f2; }
.news-follow.is-youtube { background: #ff0000; }
.news-follow.is-instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.news-follow.is-tiktok { background: #111; }
.news-follow.is-threads { background: #000; }
.news-follow.is-pinterest { background: #e60023; }
.news-follow.is-whatsapp { background: #25d366; }
.news-follow.is-telegram { background: #229ed9; }
.news-follow.is-zalo { background: #0068ff; }
.news-follow.is-x { background: #000; }

/* ── Contact page (/lien-he) guidance cards ── */
.contact-guide { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1.4rem; margin-top: 2rem; padding-top: 1.8rem; border-top: 1px solid var(--border); }
.contact-guide__card { background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem 1.3rem; }
.contact-guide__h { font-size: 1rem; font-weight: 800; margin: 0 0 0.6rem; color: var(--text); }
.contact-guide__card p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; margin: 0 0 0.5rem; }
.contact-guide__card p:last-child { margin-bottom: 0; }
.trust-content__links { margin-top: 1.6rem; font-size: 0.88rem; color: var(--text-muted); }
.trust-content__links a { color: var(--accent); text-decoration: none; }
.trust-content__links a:hover { text-decoration: underline; }
@media (max-width: 720px) { .contact-guide { grid-template-columns: 1fr; } }

/* ============================================================================
   Contact page (/lien-he) — beautiful split card
   ========================================================================== */
.contact-page { background: linear-gradient(180deg, var(--accent-soft) 0%, transparent 240px); }
.contact-card { display: grid; grid-template-columns: 0.82fr 1.18fr; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 24px; overflow: hidden; box-shadow: 0 30px 70px -34px rgba(8,145,178,.45), 0 6px 24px -12px rgba(15,23,42,.12); }
.contact-card__info { position: relative; overflow: hidden; color: #fff; padding: 2.6rem 2.3rem; background: linear-gradient(155deg, #0e7490 0%, #0891b2 55%, #22b8cf 100%); }
.contact-card__info::before, .contact-card__info::after { content: ''; position: absolute; border-radius: 50%; background: rgba(255,255,255,.08); pointer-events: none; }
.contact-card__info::before { width: 300px; height: 300px; top: -130px; right: -110px; }
.contact-card__info::after { width: 200px; height: 200px; bottom: -90px; left: -70px; background: rgba(255,255,255,.06); }
.contact-card__info > * { position: relative; z-index: 1; }
.contact-panel__title { font-size: 1.45rem; font-weight: 800; margin: 0 0 0.55rem; letter-spacing: -0.01em; }
.contact-panel__desc { color: rgba(255,255,255,.82); font-size: 0.92rem; line-height: 1.6; margin: 0 0 2rem; }
.contact-rows { list-style: none; margin: 0 0 2rem; padding: 0; display: flex; flex-direction: column; gap: 1.2rem; }
.contact-row { display: flex; align-items: center; gap: 0.95rem; }
.contact-row__ic { width: 44px; height: 44px; border-radius: 13px; background: rgba(255,255,255,.16); display: grid; place-items: center; flex: none; }
.contact-row__ic svg { width: 20px; height: 20px; }
.contact-row__txt { display: flex; flex-direction: column; min-width: 0; }
.contact-row__label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255,255,255,.65); margin-bottom: 2px; }
.contact-row__val { font-size: 0.95rem; font-weight: 600; color: #fff; text-decoration: none; word-break: break-word; }
a.contact-row__val:hover { text-decoration: underline; }
.contact-socials { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.contact-social { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.15); display: grid; place-items: center; color: #fff; transition: background .2s, color .2s, transform .2s; }
.contact-social svg { width: 18px; height: 18px; }
.contact-social:hover { background: #fff; color: #0891b2; transform: translateY(-3px); }
.contact-card__form { padding: 2.6rem 2.3rem; }
.contact-form__head { font-size: 1.35rem; font-weight: 800; margin: 0 0 0.3rem; color: var(--text); letter-spacing: -0.01em; }
.contact-form__sub { color: var(--text-muted); font-size: 0.9rem; margin: 0 0 1.5rem; }
.contact-card__form .contact-form { background: none; border: none; box-shadow: none; padding: 0; }
.contact-card__form .contact-form__foot { flex-direction: column; align-items: stretch; gap: 0.7rem; }
.contact-card__form .contact-form__submit { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.82rem 1rem; font-size: 0.95rem; font-weight: 700; border-radius: 12px; border: none; color: #fff; background: linear-gradient(135deg, #0891b2, #06b6d4); box-shadow: 0 10px 24px -10px rgba(8,145,178,.7); transition: transform .15s, box-shadow .2s, filter .2s; }
.contact-card__form .contact-form__submit:hover { filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 14px 30px -10px rgba(8,145,178,.8); }
.contact-card__form .contact-form__submit:active { transform: translateY(0); }
.contact-guide__card { position: relative; }
.contact-guide__ic { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; background: var(--accent-soft); color: var(--accent); margin-bottom: 0.85rem; }
.contact-guide__ic svg { width: 22px; height: 22px; }
@media (max-width: 820px) { .contact-card { grid-template-columns: 1fr; border-radius: 20px; } .contact-card__info, .contact-card__form { padding: 1.9rem 1.6rem; } }
