/**
 * BeengTV last-wins overrides.
 * Linked AFTER site-theme so media-mobile cannot hide desktop nav,
 * and slider sizes stay locked to vlognovel.
 */

/* ---- Desktop nav (≥1024): undo media-mobile drawer hide ---- */
@media (min-width: 1024px) {
  body.site-theme .main-header,
  .main-header {
    height: 64px !important;
  }

  body.site-theme .main-header .wrapper,
  .main-header .wrapper {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 16px !important;
    height: 64px !important;
  }

  body.site-theme .main-header .nav-logo,
  .main-header .nav-logo {
    display: flex !important;
    align-items: center !important;
    flex: 0 0 118px !important;
    width: 118px !important;
    min-width: 118px !important;
  }

  body.site-theme .main-header .nav-logo a,
  .main-header .nav-logo a {
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
  }

  body.site-theme .main-header .nav-logo img,
  .main-header .nav-logo img {
    display: block !important;
    height: 34px !important;
    width: auto !important;
    max-width: 118px !important;
    object-fit: contain !important;
  }

  body.site-theme .main-header .wrapper > *,
  .main-header .wrapper > * {
    align-self: center !important;
  }

  body.site-theme .main-header #novelSearchForm,
  .main-header #novelSearchForm {
    position: relative !important;
    display: block !important;
    width: 200px !important;
    min-width: 0 !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
  }

  body.site-theme .main-header #novelSearchForm .search_label,
  .main-header #novelSearchForm .search_label {
    position: absolute !important;
    left: 0 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 2 !important;
    display: flex !important;
    align-items: center !important;
    pointer-events: none !important;
    margin: 0 !important;
  }

  body.site-theme .main-header #inputContent,
  .main-header #inputContent {
    width: 100% !important;
    min-width: 0 !important;
    height: 40px !important;
    padding: 0 12px 0 34px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    line-height: normal !important;
  }

  body.site-theme .main-header .navbar-menu > .nav-item:first-child,
  .main-header .navbar-menu > .nav-item:first-child {
    display: flex !important;
    align-items: center !important;
  }

  #mobile-menu-btn,
  .mobile-nav-header,
  #mobile-nav-backdrop {
    display: none !important;
  }

  body.site-theme .main-header .navigation-bar,
  .main-header .navigation-bar {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
    color: inherit !important;
    transform: none !important;
    -webkit-transform: none !important;
    visibility: visible !important;
    opacity: 1 !important;
    overflow: visible !important;
    pointer-events: auto !important;
    display: flex !important;
    flex: 1 1 auto !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    z-index: 1 !important;
  }

  body.site-theme .main-header .navigation-bar nav,
  .main-header .navigation-bar nav {
    display: flex !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
  }

  body.site-theme .main-header .navbar-menu,
  .main-header .navbar-menu {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    gap: 2px !important;
  }

  body.site-theme .main-header .navbar-menu > .nav-item,
  .main-header .navbar-menu > .nav-item {
    width: auto !important;
    padding: 0 !important;
    margin: 0 4px 0 0 !important;
  }

  body.site-theme .main-header .nav-link,
  body.site-theme .main-header .dropdown-toggle,
  .main-header .nav-link,
  .main-header .dropdown-toggle {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    height: 40px !important;
    line-height: 1 !important;
    padding: 0 10px !important;
    background: transparent !important;
    border: 0 !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--st-text, #1e293b) !important;
    white-space: nowrap !important;
    border-radius: 8px !important;
    transition: background 0.15s ease, color 0.15s ease;
  }

  body.site-theme .main-header .nav-item.dropdown._active > .dropdown-toggle,
  body.site-theme .main-header .nav-item.dropdown:hover > .dropdown-toggle,
  .main-header .nav-item.dropdown._active > .dropdown-toggle,
  .main-header .nav-item.dropdown:hover > .dropdown-toggle {
    background: var(--st-accent-soft, rgba(13, 148, 136, 0.1)) !important;
    color: var(--st-accent-dark, #0f766e) !important;
  }

  body.site-theme .main-header .header-actions,
  .main-header .header-actions {
    display: flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
    gap: 8px !important;
  }

  body.site-theme .main-header .login-wrap-nav,
  .main-header .login-wrap-nav {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
  }

  body.site-theme .main-header .login-wrap-nav .login.button,
  body.site-theme .main-header .login-wrap-nav button.login,
  .main-header .login-wrap-nav .login.button,
  .main-header .login-wrap-nav button.login {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  body.site-theme .main-header .nav-item.dropdown,
  .main-header .nav-item.dropdown {
    position: relative !important;
    padding-bottom: 14px !important;
    margin-bottom: -14px !important;
  }

  body.site-theme .main-header .dropdown-menu,
  .main-header .dropdown-menu {
    position: absolute !important;
    top: calc(100% - 14px) !important;
    left: 0 !important;
    min-width: 200px !important;
    display: none !important;
    z-index: 1200 !important;
    background: #fff !important;
    border: 1px solid var(--st-border, #e2e8f0) !important;
    border-radius: 10px !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12) !important;
    padding: 8px !important;
    list-style: none !important;
    margin: 0 !important;
  }

  body.site-theme .main-header .dropdown-menu::before,
  .main-header .dropdown-menu::before {
    content: "";
    position: absolute;
    top: -16px;
    left: 0;
    right: 0;
    height: 18px;
  }

  body.site-theme .main-header .dropdown-toggle i.fa-caret-down,
  .main-header .dropdown-toggle i.fa-caret-down {
    font-size: 12px !important;
    line-height: 1 !important;
    margin-left: 2px !important;
    opacity: 0.75;
  }

  body.site-theme .main-header .nav-item.dropdown._active > .dropdown-menu,
  body.site-theme .main-header .nav-item.dropdown:hover > .dropdown-menu,
  .main-header .nav-item.dropdown._active > .dropdown-menu,
  .main-header .nav-item.dropdown:hover > .dropdown-menu {
    display: block !important;
  }

  body.site-theme .main-header .dropdown-menu .nav-link,
  .main-header .dropdown-menu .nav-link {
    display: block !important;
    height: auto !important;
    line-height: 1.4 !important;
    padding: 10px 12px !important;
    text-align: left !important;
    border-radius: 8px !important;
    color: var(--st-text, #1e293b) !important;
    background: transparent !important;
    font-weight: 500 !important;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease !important;
  }

  /* Top-level menu hover */
  body.site-theme .main-header .navbar-menu > .nav-item > .nav-link:hover,
  body.site-theme .main-header .navbar-menu > .nav-item > .dropdown-toggle:hover,
  .main-header .navbar-menu > .nav-item > .nav-link:hover,
  .main-header .navbar-menu > .nav-item > .dropdown-toggle:hover {
    background: var(--st-accent-soft, rgba(13, 148, 136, 0.12)) !important;
    color: var(--st-accent-dark, #0f766e) !important;
  }

  body.site-theme .main-header .navbar-menu > .nav-item > .nav-link:focus-visible,
  body.site-theme .main-header .navbar-menu > .nav-item > .dropdown-toggle:focus-visible,
  .main-header .navbar-menu > .nav-item > .nav-link:focus-visible,
  .main-header .navbar-menu > .nav-item > .dropdown-toggle:focus-visible {
    outline: 2px solid rgba(13, 148, 136, 0.45) !important;
    outline-offset: 2px !important;
  }

  /* Dropdown item hover */
  body.site-theme .main-header .dropdown-menu .nav-item,
  .main-header .dropdown-menu .nav-item {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.site-theme .main-header .dropdown-menu .nav-link:hover,
  body.site-theme .main-header .dropdown-menu .nav-item:hover > .nav-link,
  body.site-theme .main-header .dropdown-menu .nav-link:focus-visible,
  .main-header .dropdown-menu .nav-link:hover,
  .main-header .dropdown-menu .nav-item:hover > .nav-link,
  .main-header .dropdown-menu .nav-link:focus-visible {
    background: var(--st-accent-soft, rgba(13, 148, 136, 0.14)) !important;
    color: var(--st-accent-dark, #0f766e) !important;
  }

  body.site-theme .main-header .dropdown-menu .nav-link:active,
  .main-header .dropdown-menu .nav-link:active {
    background: rgba(13, 148, 136, 0.22) !important;
    color: var(--st-accent-dark, #0f766e) !important;
  }

  body.site-theme .main-header .dropdown-menu.columns,
  .main-header .dropdown-menu.columns {
    min-width: 380px !important;
    max-width: min(90vw, 560px) !important;
    columns: unset !important;
    column-count: unset !important;
  }

  body.site-theme .main-header .nav-item.dropdown._active > .dropdown-menu.columns,
  body.site-theme .main-header .nav-item.dropdown:hover > .dropdown-menu.columns,
  .main-header .nav-item.dropdown._active > .dropdown-menu.columns,
  .main-header .nav-item.dropdown:hover > .dropdown-menu.columns {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 2px !important;
  }

  body.site-theme .main-header .dropdown-menu.columns > .nav-item,
  .main-header .dropdown-menu.columns > .nav-item {
    break-inside: avoid !important;
    -webkit-column-break-inside: avoid !important;
    display: block !important;
    width: 100% !important;
  }

  body.site-theme .main-header .notif-wrap,
  .main-header .notif-wrap {
    display: flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
    align-self: center !important;
    height: 40px !important;
    margin: 0 !important;
    position: relative !important;
  }

  body.site-theme .main-header #notification,
  .main-header #notification {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    margin: 0 !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
  }

  body.site-theme .main-header .notif-popover,
  .main-header .notif-popover {
    position: absolute !important;
    top: calc(100% + 8px) !important;
    right: 0 !important;
    left: auto !important;
    width: min(360px, calc(100vw - 24px)) !important;
    max-height: min(70vh, 480px) !important;
    overflow: hidden auto !important;
    background: #fff !important;
    border: 1px solid var(--st-border, #e2e8f0) !important;
    border-radius: 12px !important;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14) !important;
    z-index: 1300 !important;
  }

  body.site-theme .main-header .notif-popover-head,
  .main-header .notif-popover-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    padding: 12px 14px !important;
    border-bottom: 1px solid var(--st-border, #e2e8f0) !important;
  }

  body.site-theme .main-header .notif-popover-head strong,
  .main-header .notif-popover-head strong {
    font-size: 14px !important;
    font-weight: 700 !important;
  }

  body.site-theme .main-header .notif-popover .mark-read-all,
  .main-header .notif-popover .mark-read-all {
    border: 0 !important;
    background: transparent !important;
    color: var(--st-accent-dark, #0f766e) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    padding: 0 !important;
    white-space: nowrap !important;
  }

  body.site-theme .main-header .notif-popover .short-notification,
  .main-header .notif-popover .short-notification {
    list-style: none !important;
    margin: 0 !important;
    padding: 8px !important;
  }

  body.site-theme .main-header .notif-popover .short-notification li a,
  .main-header .notif-popover .short-notification li a {
    display: flex !important;
    align-items: flex-start !important;
    gap: 10px !important;
    padding: 10px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    color: inherit !important;
  }

  body.site-theme .main-header .notif-popover .short-notification li a:hover,
  .main-header .notif-popover .short-notification li a:hover {
    background: var(--st-bg-subtle, #f8fafc) !important;
  }

  body.site-theme .main-header .notif-popover .view-all-notification,
  .main-header .notif-popover .view-all-notification {
    display: block !important;
    padding: 12px 14px !important;
    text-align: center !important;
    border-top: 1px solid var(--st-border, #e2e8f0) !important;
    color: var(--st-accent-dark, #0f766e) !important;
    font-weight: 600 !important;
    text-decoration: none !important;
  }
}

/* ---- Mobile drawer open ---- */
@media (max-width: 1023px) {
  body.navigation .navigation-bar,
  body.navigation .main-header .navigation-bar,
  body.site-theme.navigation .navigation-bar {
    visibility: visible !important;
    opacity: 1 !important;
    transform: translate3d(0, 0, 0) !important;
    -webkit-transform: translate3d(0, 0, 0) !important;
    pointer-events: auto !important;
  }

  #mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.45);
    border: 0;
  }

  body.site-theme .main-header .navigation-bar .nav-link,
  body.site-theme .main-header .navigation-bar .dropdown-toggle,
  .main-header .navigation-bar .nav-link,
  .main-header .navigation-bar .dropdown-toggle {
    transition: background 0.15s ease, color 0.15s ease !important;
    border-radius: 8px !important;
  }

  body.site-theme .main-header .navigation-bar .nav-link:hover,
  body.site-theme .main-header .navigation-bar .nav-link:active,
  body.site-theme .main-header .navigation-bar .dropdown-toggle:hover,
  body.site-theme .main-header .navigation-bar .dropdown-toggle:active,
  body.site-theme .main-header .dropdown-menu .nav-link:hover,
  body.site-theme .main-header .dropdown-menu .nav-link:active,
  .main-header .navigation-bar .nav-link:hover,
  .main-header .navigation-bar .nav-link:active,
  .main-header .navigation-bar .dropdown-toggle:hover,
  .main-header .navigation-bar .dropdown-toggle:active,
  .main-header .dropdown-menu .nav-link:hover,
  .main-header .dropdown-menu .nav-link:active {
    background: var(--st-accent-soft, rgba(13, 148, 136, 0.14)) !important;
    color: var(--st-accent-dark, #0f766e) !important;
  }
}

/* ---- Top slide: LUÔN 2 row — mỗi cột = 2 cover xếp dọc ---- */
body.site-theme .top-home-hot .top-slide,
.top-home-hot .top-slide {
  overflow: hidden !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  touch-action: pan-y;
}

body.site-theme .top-home-hot .novel-list.top-slide-track,
.top-home-hot .novel-list.top-slide-track {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  margin-left: 0 !important;
  margin-bottom: 0 !important;
  padding: 0 !important;
  gap: 10px !important;
  list-style: none !important;
  transition: transform 0.35s ease;
  will-change: transform;
  grid-template-columns: none !important;
}

/* Mỗi cột = 2 cover xếp dọc (2 row). Width do JS --slide-col-w */
body.site-theme .top-home-hot .novel-list.top-slide-track > .novel-item.top-slide-col,
.top-home-hot .novel-list.top-slide-track > .novel-item.top-slide-col,
.top-home-hot .top-slide-track > .top-slide-col {
  flex: 0 0 var(--slide-col-w, calc((100% - 50px) / 6)) !important;
  width: var(--slide-col-w, calc((100% - 50px) / 6)) !important;
  max-width: var(--slide-col-w, calc((100% - 50px) / 6)) !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  float: none !important;
  box-sizing: border-box !important;
  grid-template-columns: none !important;
}

.top-home-hot .top-slide-col > a {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  flex: 0 0 auto !important;
  text-decoration: none;
  color: inherit;
}

body.site-theme .top-home-hot .top-slide-col .novel-cover,
.top-home-hot .top-slide-col .novel-cover {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  height: 0 !important;
  margin: 0 !important;
  padding-top: 140% !important;
  overflow: hidden !important;
  border-radius: 8px !important;
  background: #f1f5f9 !important;
}

body.site-theme .top-home-hot .top-slide-col .novel-cover img,
.top-home-hot .top-slide-col .novel-cover img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover !important;
  object-position: top center !important;
  display: block !important;
}

/* ≤1023: 4 cột × 2 row — cover nhỏ, khung gọn; ≥1024: 6 cột */
@media (max-width: 1023px) {
  body.site-theme .top-home-hot .novel-list.top-slide-track,
  .top-home-hot .novel-list.top-slide-track {
    gap: 8px !important;
  }

  body.site-theme .top-home-hot .novel-list.top-slide-track > .novel-item.top-slide-col,
  .top-home-hot .novel-list.top-slide-track > .novel-item.top-slide-col,
  .top-home-hot .top-slide-track > .top-slide-col {
    flex: 0 0 var(--slide-col-w, calc((100% - 24px) / 4)) !important;
    width: var(--slide-col-w, calc((100% - 24px) / 4)) !important;
    max-width: var(--slide-col-w, calc((100% - 24px) / 4)) !important;
    gap: 6px !important;
  }

  body.site-theme .top-home-hot .top-slide-col .novel-cover,
  .top-home-hot .top-slide-col .novel-cover {
    border-radius: 6px !important;
  }
}

@media (max-width: 767px) {
  body.site-theme .top-home-hot,
  .top-home-hot {
    margin-top: 8px !important;
    margin-bottom: 2px !important;
  }

  body.site-theme .top-home-hot .novel-list.top-slide-track,
  .top-home-hot .novel-list.top-slide-track {
    display: flex !important;
    flex-wrap: nowrap !important;
    grid-template-columns: none !important;
    gap: 6px !important;
  }

  body.site-theme .top-home-hot .novel-list.top-slide-track > .novel-item.top-slide-col,
  .top-home-hot .novel-list.top-slide-track > .novel-item.top-slide-col,
  .top-home-hot .top-slide-track > .top-slide-col {
    flex: 0 0 var(--slide-col-w, calc((100% - 18px) / 4)) !important;
    width: var(--slide-col-w, calc((100% - 18px) / 4)) !important;
    max-width: var(--slide-col-w, calc((100% - 18px) / 4)) !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
    grid-template-columns: none !important;
    float: none !important;
  }

  body.site-theme .top-home-hot .top-slide-col .novel-cover,
  .top-home-hot .top-slide-col .novel-cover {
    border-radius: 6px !important;
  }

  .top-slide-dots-compact {
    display: flex !important;
    justify-content: center;
    align-items: center;
    gap: 6px !important;
    margin: 8px 0 0 !important;
  }

  .top-slide-dots-compact button {
    width: 6px !important;
    height: 6px !important;
    min-width: 6px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: #cbd5e1 !important;
    cursor: pointer;
  }

  .top-slide-dots-compact button.active {
    background: var(--st-accent, #0d9488) !important;
    transform: scale(1.2);
  }
}

/* ---- Novel list column lock (exclude category/bookmark/related/slider) ---- */
/* Exclude reading strip from grid column lock */
body.site-theme .novel-list:not(.horizontal):not(.category-cards):not(.bookmark-cards):not(.related-list):not(.top-slide-track):not(.reading-scroll) .novel-item,
.novel-list:not(.horizontal):not(.category-cards):not(.bookmark-cards):not(.related-list):not(.top-slide-track):not(.reading-scroll) .novel-item {
  width: calc((100% / 6) - 20px) !important;
  margin-left: 20px !important;
  margin-bottom: 20px !important;
}

@media (max-width: 1023px) {
  body.site-theme .novel-list:not(.horizontal):not(.category-cards):not(.bookmark-cards):not(.related-list):not(.top-slide-track):not(.reading-scroll) .novel-item,
  .novel-list:not(.horizontal):not(.category-cards):not(.bookmark-cards):not(.related-list):not(.top-slide-track):not(.reading-scroll) .novel-item {
    width: calc((100% / 3) - 16px) !important;
    margin-left: 16px !important;
  }
}

@media (max-width: 767px) {
  body.site-theme .novel-list:not(.horizontal):not(.category-cards):not(.bookmark-cards):not(.related-list):not(.top-slide-track):not(.reading-scroll),
  .novel-list:not(.horizontal):not(.category-cards):not(.bookmark-cards):not(.related-list):not(.top-slide-track):not(.reading-scroll) {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px 10px !important;
    margin-left: 0 !important;
    width: 100% !important;
  }

  body.site-theme .novel-list:not(.horizontal):not(.category-cards):not(.bookmark-cards):not(.related-list):not(.top-slide-track):not(.reading-scroll) .novel-item,
  .novel-list:not(.horizontal):not(.category-cards):not(.bookmark-cards):not(.related-list):not(.top-slide-track):not(.reading-scroll) .novel-item,
  body.site-theme .novel-list.col5 .novel-item,
  .novel-list.col5 .novel-item,
  body.site-theme .novel-list.col3 .novel-item,
  .novel-list.col3 .novel-item,
  body.site-theme .novel-list.col2 .novel-item,
  .novel-list.col2 .novel-item {
    width: 100% !important;
    margin: 0 !important;
    margin-left: 0 !important;
    margin-bottom: 0 !important;
  }
}

.page-category#explore .novel-list.category-cards {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 14px 10px !important;
  margin: 0 !important;
  margin-left: 0 !important;
  width: 100% !important;
}

.page-category#explore .novel-list.category-cards .novel-item {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  margin-left: 0 !important;
  margin-bottom: 0 !important;
}

@media (min-width: 768px) {
  .page-category#explore .novel-list.category-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 16px 12px !important;
  }
}

@media (min-width: 1024px) {
  .page-category#explore .novel-list.category-cards {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 18px 14px !important;
  }
}

/* Search / explore lists — same 2 → 3 → 6 rhythm */
#explore .novel-list.category-cards.col5,
#search-section .novel-list:not(.horizontal),
.page-category#explore .novel-list:not(.horizontal):not(.category-cards) {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 14px 10px !important;
  margin: 0 !important;
  margin-left: 0 !important;
  width: 100% !important;
}

#explore .novel-list.category-cards.col5 .novel-item,
#search-section .novel-list:not(.horizontal) .novel-item,
.page-category#explore .novel-list:not(.horizontal):not(.category-cards) .novel-item {
  width: 100% !important;
  margin: 0 !important;
  margin-left: 0 !important;
}

@media (min-width: 768px) {
  #explore .novel-list.category-cards.col5,
  #search-section .novel-list:not(.horizontal),
  .page-category#explore .novel-list:not(.horizontal):not(.category-cards) {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 16px 12px !important;
  }
}

@media (min-width: 1024px) {
  #explore .novel-list.category-cards.col5,
  #search-section .novel-list:not(.horizontal),
  .page-category#explore .novel-list:not(.horizontal):not(.category-cards) {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 18px 14px !important;
  }
}

/* Category index cards */
.page-category .category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0 28px;
}

.page-category .category-card {
  display: block;
  padding: 16px;
  border: 1px solid var(--st-border, #e2e8f0);
  border-radius: 12px;
  background: var(--st-surface, #fff);
  color: inherit;
}

.page-category .category-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.page-category .category-card p {
  margin: 0;
  font-size: 13px;
  color: var(--st-text-muted, #64748b);
  line-height: 1.4;
}

@media (min-width: 768px) {
  .page-category .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .page-category .category-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Filter bar (search / category) */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: flex-end;
  margin: 0 0 20px;
  padding: 14px;
  border: 1px solid var(--st-border, #e2e8f0);
  border-radius: 12px;
  background: var(--st-surface, #fff);
}

.filter-bar .filter-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 120px;
}

.filter-bar .filter-field.grow {
  flex: 1 1 200px;
}

.filter-bar .filter-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--st-text-muted, #64748b);
}

.filter-bar input,
.filter-bar select {
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--st-border, #e2e8f0);
  border-radius: 8px;
  background: #fff;
  font: inherit;
}

.filter-bar .filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Comments on detail */
.page-manga-detail .comment-thread {
  margin-top: 8px;
}

.page-manga-detail .comment-compose textarea,
.page-manga-detail .comment-reply-form textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--st-border, #e2e8f0);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  resize: vertical;
}

.page-manga-detail .comment-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}

.page-manga-detail .comment-item {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--st-border, #e2e8f0);
  align-items: flex-start;
}

.page-manga-detail .comment-avatar {
  flex: 0 0 auto;
  position: relative;
  z-index: 0;
}

.page-manga-detail .comment-avatar .member-avatar {
  margin-bottom: 0 !important;
}

.page-manga-detail .comment-body {
  flex: 1 1 auto;
  min-width: 0;
}

.page-manga-detail .comment-avatar img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.page-manga-detail .comment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  align-items: center;
  margin-bottom: 4px;
  font-size: 13px;
}

.page-manga-detail .comment-meta strong {
  font-weight: 700;
  color: var(--st-text, #1e293b);
}

.page-manga-detail .comment-meta span {
  color: var(--st-text-muted, #64748b);
}

.page-manga-detail .comment-meta .comment-membership-pill {
  color: var(--membership-accent, #0d9488);
  flex: 0 1 auto;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-manga-detail .comment-body > p {
  margin: 0 0 6px;
  line-height: 1.5;
  word-break: break-word;
}

.page-manga-detail .comment-reply-btn {
  border: 0;
  background: transparent;
  color: var(--st-accent, #0d9488);
  padding: 0;
  cursor: pointer;
  font-size: 13px;
}

.page-manga-detail .comment-replies {
  list-style: none;
  margin: 10px 0 0;
  padding: 0 0 0 12px;
  border-left: 2px solid var(--st-border, #e2e8f0);
}

.page-manga-detail .comment-replies li {
  margin: 6px 0;
  font-size: 13px;
}

/* Chapter reader extras */
body.chapter-read-page {
  padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)) !important;
}

body.chapter-read-page .site-footer,
body.chapter-read-page footer {
  display: none !important;
}

body.chapter-read-page .bottom-bar {
  display: block !important;
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 120 !important;
  width: 100% !important;
  max-width: none !important;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

body.chapter-read-page .bottom-bar .bottom-bar-status {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center !important;
  gap: 8px;
  min-height: 56px !important;
  height: auto !important;
  padding: 10px 14px !important;
  box-sizing: border-box;
}

body.chapter-read-page .bottom-bar .bar-control-left,
body.chapter-read-page .bottom-bar .bar-control,
body.chapter-read-page .bottom-bar .bar-control-right {
  display: flex !important;
  align-items: center !important;
  min-height: 40px;
}

body.chapter-read-page .bottom-bar .bar-control {
  justify-content: center;
  gap: 6px;
}

body.chapter-read-page .bottom-bar .bar-control-left {
  justify-content: flex-start;
}

body.chapter-read-page .bottom-bar .bar-control-right {
  justify-content: flex-end;
}

body.chapter-read-page .bottom-bar .bar-control-left a,
body.chapter-read-page .bottom-bar .bar-control a,
body.chapter-read-page .bottom-bar .bar-control-right a {
  min-height: 40px !important;
  padding: 8px 10px !important;
  border-radius: 10px;
  gap: 6px !important;
}

body.chapter-read-page .bottom-bar .bar-control-left b,
body.chapter-read-page .bottom-bar .bar-control b,
body.chapter-read-page .bottom-bar .bar-control-right b {
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
}

body.chapter-read-page .chapter-read-layout {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 12px 20px;
}

body.chapter-read-page .page-chapter-read .titles {
  position: relative;
  padding-right: 44px;
}

body.chapter-read-page .page-chapter-read .control-action-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 5;
}

body.chapter-read-page .page-chapter-read.is-novel .chapter-content {
  padding: 8px 12px 28px !important;
  line-height: 1.85 !important;
}

body.chapter-read-page .page-chapter-read .page-in.content-wrap {
  padding: 28px 28px 32px !important;
}

body.chapter-read-page .page-chapter-read .player-wrapper {
  margin-bottom: 24px !important;
}

body.chapter-read-page .page-chapter-read .player-select {
  appearance: none !important;
  -webkit-appearance: none !important;
  min-height: 40px !important;
  padding: 0 32px 0 12px !important;
  border: 1px solid var(--st-border, #e2e8f0) !important;
  border-radius: 10px !important;
  background-color: #fff !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  color: var(--st-text, #1e293b) !important;
  font-size: 13px !important;
  font-family: inherit !important;
  cursor: pointer !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
}

body.chapter-read-page .page-chapter-read .player-controls {
  gap: 12px !important;
}

body.chapter-read-page .page-chapter-read .btn-play-pause {
  width: 44px !important;
  height: 44px !important;
  flex-shrink: 0 !important;
}

body.chapter-read-page .page-chapter-read .chapternav {
  margin-top: 8px;
}

@media (max-width: 640px) {
  body.chapter-read-page .bottom-bar .bar-control-left b,
  body.chapter-read-page .bottom-bar .bar-control b:not(:empty),
  body.chapter-read-page .bottom-bar .bar-control-right .btn-bar-scroll-top b {
    display: none !important;
  }

  body.chapter-read-page .bottom-bar .bottom-bar-status {
    padding: 8px 10px !important;
  }

  body.chapter-read-page .page-chapter-read .page-in.content-wrap {
    padding: 22px 18px 28px !important;
  }

  body.chapter-read-page .page-chapter-read.is-novel .chapter-content {
    padding: 4px 4px 20px !important;
  }
}

body.chapter-read-page .list-chapter-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  border: 0;
  background: rgba(15, 23, 42, 0.35);
}

/* Reader safety overrides (theme mobile CSS sets display:none without is-open) */
body.chapter-read-page {
  --cr-bottom-bar-height: calc(56px + env(safe-area-inset-bottom, 0px));
}

body.chapter-read-page .control-action.is-open {
  display: flex !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: 3000 !important;
  background: transparent !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 16px !important;
  box-sizing: border-box !important;
}

body.chapter-read-page .control-action .action-items {
  position: relative !important;
  z-index: 1 !important;
  margin: 0 !important;
  width: min(400px, 100%) !important;
  max-width: 100% !important;
  flex-shrink: 0 !important;
}

body.chapter-read-page .control-action-backdrop {
  position: fixed !important;
  inset: 0 !important;
  z-index: 0 !important;
}

.bottom-bar.list-open {
  display: block !important;
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 120 !important;
}

body.chapter-read-page .bottom-bar .bottom-bar-list-chapter,
body.chapter-read-page .bottom-bar .bottom-bar-list-chapter.is-open {
  display: none;
  position: fixed !important;
  left: 50% !important;
  right: auto !important;
  top: auto !important;
  bottom: calc(var(--cr-bottom-bar-height) + 8px) !important;
  transform: translateX(-50%) !important;
  width: min(900px, calc(100vw - 24px)) !important;
  max-height: min(60vh, 520px) !important;
  margin: 0 !important;
  padding: 12px !important;
  background: var(--st-surface, #fff) !important;
  border: 1px solid var(--st-border, #e2e8f0) !important;
  border-radius: 16px !important;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18) !important;
  overflow: hidden auto !important;
  z-index: 140 !important;
  box-sizing: border-box !important;
}

body.chapter-read-page .bottom-bar .bottom-bar-list-chapter.is-open,
body.chapter-read-page .bottom-bar.list-open .bottom-bar-list-chapter {
  display: block !important;
  visibility: visible !important;
}

@media (max-width: 640px) {
  body.chapter-read-page .control-action.is-open {
    justify-content: flex-end !important;
    align-items: stretch !important;
    padding: 0 !important;
  }

  body.chapter-read-page .control-action .action-items {
    width: 100% !important;
    border-radius: 16px 16px 0 0 !important;
  }

  body.chapter-read-page .bottom-bar .bottom-bar-list-chapter,
  body.chapter-read-page .bottom-bar .bottom-bar-list-chapter.is-open {
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    transform: none !important;
    bottom: calc(var(--cr-bottom-bar-height) + 6px) !important;
    max-height: 65vh !important;
  }
}

body.chapter-read-page .page-chapter-read .reader-images {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  background: transparent;
  margin: 0;
  padding: 0;
}

body.chapter-read-page .page-chapter-read .reader-images .empty-state {
  font-size: 14px !important;
  line-height: 1.5 !important;
  padding: 24px 16px !important;
  width: 100%;
  text-align: center;
}

/* Detail chapter filters sort button */
.page-manga-detail #chpagedlist .filters .pagenav .button,
.page-manga-detail #chapter-list-page .filters .pagenav > .button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 14px !important;
  border-radius: 10px !important;
  border: 1px solid rgba(13, 148, 136, 0.35) !important;
  background: rgba(13, 148, 136, 0.1) !important;
  background-image: none !important;
  color: #0f766e !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  box-shadow: none !important;
  cursor: pointer !important;
}

.page-manga-detail #chpagedlist .filters .pagenav .button:hover,
.page-manga-detail #chapter-list-page .filters .pagenav > .button:hover {
  background: rgba(13, 148, 136, 0.18) !important;
  color: #0f766e !important;
}

/* =========================================================
   Typography + scale locks (last-wins)
   ========================================================= */
@media (min-width: 768px) {
  html {
    font-size: 14px !important;
  }
}

body.site-theme {
  font-family: "Nunito Sans", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--st-text, #1e293b);
  background: var(--bg-color, #eaeaea);
  line-height: 1.5;
}

body.site-theme .section-header h1,
body.site-theme .section-header h2 {
  font-size: 18px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  color: var(--st-text, #1e293b) !important;
}

/* Home widget titles share one size */
body.site-theme .home-widgets .section-header h1,
body.site-theme .home-translators-strip .section-header h1,
body.site-theme .home-panel .section-header h1 {
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
}

body.site-theme .novel-list .novel-title,
body.site-theme .novel-list .novel-item .novel-title {
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  margin: 0 0 4px !important;
  color: var(--st-text, #1e293b) !important;
}

body.site-theme .novel-stats,
body.site-theme .novel-list .novel-item .novel-stats {
  font-size: 12px !important;
  line-height: 1.45 !important;
  color: var(--st-text-muted, #64748b) !important;
}

body.site-theme .page-desc {
  font-size: 14px !important;
  line-height: 1.5 !important;
}

/* =========================================================
   Homepage ranking — readable sizes + desktop 3 columns
   ========================================================= */
@media (min-width: 768px) {
  body.site-theme .index-rank,
  body.site-theme #popular-novel-section .index-rank {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 16px !important;
    margin: 0 !important;
    width: 100% !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    min-height: 0 !important;
  }

  body.site-theme #popular-novel-section,
  body.site-theme #popular-novel-section .section-body {
    width: 100% !important;
  }

  body.site-theme .index-rank > input[type="radio"],
  body.site-theme .index-rank > label {
    display: none !important;
  }

  body.site-theme .index-rank .rank-container {
    position: relative !important;
    flex: 1 1 0 !important;
    width: auto !important;
    left: auto !important;
    opacity: 1 !important;
    z-index: 1 !important;
    transform: none !important;
    margin-top: 0 !important;
    margin-right: 0 !important;
    overflow: visible !important;
  }

  body.site-theme .index-rank .rank-container h3 {
    display: block !important;
    margin-bottom: 16px !important;
  }

  body.site-theme .index-rank .rank-container h3 span {
    font-size: 16px !important;
    font-weight: 700 !important;
    height: auto !important;
    padding: 8px 18px !important;
  }

  body.site-theme .index-rank .rank-container ul {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  body.site-theme .index-rank .rank-container ul .novel-item {
    width: 100% !important;
    height: auto !important;
    min-height: 64px !important;
    margin: 0 0 14px !important;
    padding-left: 56px !important;
    position: relative !important;
  }

  body.site-theme .index-rank .rank-container ul .novel-item .item-cover {
    width: 48px !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
  }

  body.site-theme .index-rank .rank-container ul .novel-item .item-cover .novel-cover {
    width: 48px !important;
    height: 68px !important;
    padding-top: 0 !important;
    margin: 0 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    position: relative !important;
  }

  body.site-theme .index-rank .rank-container ul .novel-item .item-cover .novel-cover img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    max-width: none !important;
  }

  body.site-theme .index-rank .rank-container ul .novel-item .item-body {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    min-width: 0 !important;
    padding: 2px 0 !important;
  }

  body.site-theme .index-rank .rank-container ul .novel-item .novel-title,
  body.site-theme .index-rank .rank-container ul .novel-item .novel-title a {
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    color: var(--st-text, #1e293b) !important;
  }

  body.site-theme .index-rank .rank-container ul .novel-item .item-body span,
  body.site-theme .index-rank .rank-container ul .novel-item .novel-stats,
  body.site-theme .index-rank .rank-container ul .novel-item .novel-stats a {
    font-size: 12px !important;
    line-height: 1.4 !important;
    color: var(--st-text-muted, #64748b) !important;
  }
}

@media (max-width: 767px) {
  body.site-theme .index-rank .rank-container ul .novel-item .novel-title,
  body.site-theme .index-rank .rank-container ul .novel-item .novel-title a {
    font-size: 13px !important;
    font-weight: 700 !important;
  }

  body.site-theme .index-rank .rank-container ul .novel-item .item-body span,
  body.site-theme .index-rank .rank-container ul .novel-item .novel-stats {
    font-size: 11px !important;
  }
}

/* =========================================================
   Auth modal (#myModal / panel-login)
   ========================================================= */
#myModal.modal {
  display: block !important;
  position: fixed;
  inset: 0;
  z-index: 1050;
  overflow-x: hidden;
  overflow-y: auto;
  background: rgba(15, 23, 42, 0.45);
}

#myModal .modal-dialog {
  width: 100%;
  max-width: 420px;
  margin: 48px auto;
  padding: 0 12px;
}

#myModal .modal-contents {
  background: transparent;
  border: 0;
  box-shadow: none;
}

#myModal .modal-body {
  max-height: none !important;
  overflow: visible !important;
  padding: 0;
  font-size: 14px !important;
}

#myModal .auth-modal-x {
  position: absolute;
  top: 8px;
  right: 14px;
  z-index: 2;
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  color: #94a3b8;
  cursor: pointer;
}

#myModal .panel-login {
  position: relative;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
  padding: 18px 18px 22px;
}

#myModal .panel-login .panel-heading {
  text-align: center;
  padding: 4px 28px 0 0;
}

#myModal .panel-login .panel-heading .row {
  display: flex;
  margin: 0;
}

#myModal .panel-login .panel-heading .col-xs-6 {
  width: 50%;
  float: none;
  padding: 0;
}

#myModal .panel-login .panel-heading a {
  display: block;
  padding: 10px 8px 12px;
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #64748b !important;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

#myModal .panel-login .panel-heading a.active {
  color: var(--st-accent, #0d9488) !important;
  font-size: 17px !important;
  border-bottom-color: var(--st-accent, #0d9488);
}

#myModal .panel-login .panel-heading .row {
  border-bottom: 1px solid #e2e8f0;
}

#myModal .panel-login .panel-heading hr {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  background: none !important;
}

#myModal .panel-login .form-group {
  margin-bottom: 12px;
}

#myModal .panel-login .form-control {
  height: 44px !important;
  font-size: 14px !important;
  border-radius: 8px !important;
  border: 1px solid #e2e8f0 !important;
  background: #f8fafc !important;
  background-image: none !important;
  box-shadow: none !important;
  padding: 0 12px !important;
}

#myModal .panel-login .form-control::-webkit-credentials-auto-fill-button,
#myModal .panel-login .form-control::-webkit-contacts-auto-fill-button {
  visibility: hidden !important;
  display: none !important;
  pointer-events: none !important;
}

#myModal .recaptcha-field,
#myModal .recaptcha-wrap {
  margin: 4px 0 8px;
}

#myModal .recaptcha-dev-note {
  margin: 0;
  font-size: 12px;
  color: #94a3b8;
}

#myModal .panel-login .btn-login,
#myModal .panel-login .btn-register,
#myModal .panel-login input[type="submit"] {
  width: 100% !important;
  height: 44px !important;
  margin-top: 4px;
  border: 0 !important;
  border-radius: 999px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  text-transform: none !important;
  color: #fff !important;
  background-image: var(--button-bg, linear-gradient(135deg, #0d9488, #6366f1)) !important;
  box-shadow: var(--button-shadow, 0 4px 14px rgba(13, 148, 136, 0.28)) !important;
  cursor: pointer;
}

#myModal .auth-divider {
  position: relative;
  margin: 16px 0 12px;
  text-align: center;
}

#myModal .auth-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px solid rgba(148, 163, 184, 0.35);
}

#myModal .auth-divider span {
  position: relative;
  z-index: 1;
  display: inline-block;
  padding: 0 10px;
  font-size: 12px;
  color: #94a3b8;
  background: var(--st-surface, #fff);
}

html[color-mode="dark"] #myModal .auth-divider span,
html.dark #myModal .auth-divider span {
  background: var(--st-surface, #1e293b);
  color: #94a3b8;
}

html[color-mode="dark"] #myModal .panel-login .btn-google,
html.dark #myModal .panel-login .btn-google {
  color: #e2e8f0 !important;
  background: rgba(15, 23, 42, 0.65) !important;
  border-color: rgba(148, 163, 184, 0.35) !important;
}

#myModal .panel-login .btn-google {
  width: 100% !important;
  height: 44px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 0 4px !important;
  border: 1px solid rgba(148, 163, 184, 0.45) !important;
  border-radius: 999px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  text-transform: none !important;
  color: #0f172a !important;
  background: #fff !important;
  box-shadow: none !important;
  cursor: pointer;
}

#myModal .panel-login .btn-google:hover {
  background: #f8fafc !important;
  border-color: rgba(100, 116, 139, 0.55) !important;
}

#myModal .panel-login .btn-google:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#myModal .panel-login .col-sm-6.col-sm-offset-3 {
  width: 100%;
  margin: 0;
  padding: 0;
  float: none;
}

#myModal .auth-modal-note {
  margin: 14px 0 0;
  font-size: 12px !important;
  line-height: 1.45;
  color: #64748b;
  text-align: center;
}

#myModal .auth-modal-note a {
  color: var(--st-accent, #0d9488);
  text-decoration: underline;
}

#myModal #message-alert.error,
#myModal .error {
  color: #dc2626;
  margin-top: 10px;
  font-size: 13px;
  text-align: center;
}

/* =========================================================
   Ranking page list
   ========================================================= */
.rank-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 8px 0 24px;
}

.rank-item {
  display: grid;
  grid-template-columns: 44px 64px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--st-border, #e2e8f0);
  border-radius: 12px;
  background: #fff;
  color: inherit;
  text-decoration: none;
}

.rank-item .rank-num {
  font-size: 18px;
  font-weight: 800;
}

.rank-item .rank-cover {
  width: 64px;
  height: 90px;
  border-radius: 8px;
  overflow: hidden;
}

.rank-item .rank-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-width: none;
}

.rank-item .card-title {
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.35;
}

.rank-item .card-meta {
  font-size: 13px !important;
  margin-top: 4px;
}

/* =========================================================
   HOMEPAGE: widgets (Đang đọc + Bình luận + Nhóm dịch)
   ========================================================= */
.home-widgets {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.home-reading-comments {
  --home-cover-w: 118px;
  --home-cover-h: calc(var(--home-cover-w) * 1.42);
  /* header + cover + title + chapter — khung cao, chữ vẫn hiện */
  --home-reading-meta-h: 44px;
  --home-panel-height: max(340px, calc(56px + var(--home-cover-h) + var(--home-reading-meta-h)));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  margin-bottom: 0;
}

.home-reading-comments > :only-child {
  grid-column: 1 / -1;
  max-width: 100%;
}

@media (max-width: 900px) {
  .home-reading-comments {
    grid-template-columns: 1fr;
    --home-cover-w: 104px;
    --home-panel-height: max(300px, calc(56px + var(--home-cover-h) + var(--home-reading-meta-h)));
  }
}

/* Mobile: đang đọc — ~2 card trong viewport, scroll ngang */
@media (max-width: 767px) {
  .home-reading-comments {
    --home-cover-w: calc((100% - 10px) / 2);
    --home-cover-h: auto;
    --home-panel-height: auto;
  }

  .home-reading.home-panel,
  .home-reading-comments > .home-panel {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }

  .home-reading .reading-scroll {
    display: flex !important;
    flex-wrap: nowrap !important;
    grid-template-columns: none !important;
    scroll-snap-type: x mandatory;
    gap: 10px !important;
    padding-bottom: 4px !important;
  }

  .home-reading .reading-scroll .novel-item {
    flex: 0 0 calc((100% - 10px) / 2) !important;
    width: calc((100% - 10px) / 2) !important;
    max-width: calc((100% - 10px) / 2) !important;
    scroll-snap-align: start;
  }

  .home-reading .reading-scroll .novel-cover {
    height: 0 !important;
    padding-top: 140% !important;
    flex: none !important;
  }
}

.home-panel {
  border: 1px solid var(--st-border, #e2e8f0);
  border-radius: 10px;
  background: var(--st-surface, #fff);
  padding: 10px 12px 12px;
  box-shadow: none;
  height: var(--home-panel-height);
  min-height: var(--home-panel-height);
  max-height: var(--home-panel-height);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}

.home-reading-comments > :only-child.home-comments {
  height: var(--home-panel-height);
  min-height: var(--home-panel-height);
  max-height: var(--home-panel-height);
}

.home-panel-empty {
  flex: 1;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1rem 0.75rem;
  font-size: 13px;
  line-height: 1.45;
  color: var(--st-text-muted, #64748b);
}

.home-panel-empty a {
  color: var(--st-accent, #0d9488);
  font-weight: 600;
}

.home-writer-card-avatar,
.writer-avatar {
  background: linear-gradient(135deg, #0f766e, #0369a1) !important;
}

.home-panel .section-header {
  margin: 0 0 8px !important;
  padding: 0 0 8px !important;
  border-bottom: 1px solid var(--st-border, #e2e8f0);
  flex: 0 0 auto;
  min-height: 28px;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  box-sizing: border-box;
}

.home-panel .section-header h1 {
  font-size: 15px !important;
  font-weight: 700 !important;
  margin: 0 !important;
  line-height: 1.25 !important;
}

.home-panel .section-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Đang đọc — cover + tên + chương luôn thấy */
.home-reading .reading-scroll {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: flex-start !important;
  gap: 10px !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  margin: 0 !important;
  margin-left: 0 !important;
  padding: 0 0 2px !important;
  list-style: none !important;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  height: auto !important;
  max-height: none !important;
  flex: 0 0 auto !important;
  scrollbar-width: thin;
}

.home-reading .reading-scroll .novel-item {
  flex: 0 0 var(--home-cover-w) !important;
  width: var(--home-cover-w) !important;
  max-width: var(--home-cover-w) !important;
  margin: 0 !important;
  margin-left: 0 !important;
  margin-bottom: 0 !important;
  scroll-snap-align: start;
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
}

.home-reading .reading-scroll .novel-item > a {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
}

.home-reading .reading-scroll .novel-cover {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  margin: 0 0 6px !important;
  padding-top: 0 !important;
  height: var(--home-cover-h) !important;
  flex: 0 0 var(--home-cover-h) !important;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: none;
  background: #f1f5f9;
}

.home-reading .reading-scroll .novel-cover img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover !important;
  object-position: top center !important;
  display: block !important;
}

.home-reading .reading-scroll .novel-title,
body.site-theme .home-reading .reading-scroll .novel-title,
body.site-theme .home-reading .reading-scroll .novel-item .novel-title {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  margin: 0 !important;
  padding: 0 !important;
  height: auto !important;
  max-height: none !important;
  min-height: 16px !important;
  color: var(--st-text, #1e293b) !important;
}

.home-reading .reading-scroll .novel-stats,
.home-reading .reading-scroll .novel-stats--card {
  display: block !important;
  visibility: visible !important;
  margin: 2px 0 0 !important;
  padding: 0 !important;
  height: auto !important;
  max-height: none !important;
  min-height: 15px !important;
  overflow: hidden !important;
}

.home-reading .reading-scroll .rating-star,
.home-reading .reading-scroll .novel-stats-row-top,
.home-reading .reading-scroll .novel-view-stat {
  display: none !important;
}

.home-reading .reading-scroll .novel-stats-row-chapter {
  display: block !important;
  margin-top: 0 !important;
  font-size: 11px !important;
  line-height: 1.35 !important;
  height: auto !important;
  max-height: none !important;
  min-height: 14px !important;
  overflow: hidden !important;
}

.home-reading .reading-scroll .novel-stats-row-chapter a {
  display: block;
  max-width: 100%;
  padding: 0 !important;
  border-radius: 0;
  background: transparent !important;
  color: var(--st-accent-dark, #0f766e) !important;
  font-weight: 600 !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Comments — same panel height, scroll inside */
.home-comments .section-body,
.home-panel.home-comments .section-body {
  min-height: 0;
}

.home-comments .home-comment-list,
.home-panel.home-comments .home-comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.home-comment-item {
  display: flex;
  gap: 7px;
  align-items: flex-start;
  padding: 5px 2px;
  border-radius: 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--st-border, #e2e8f0);
  flex-shrink: 0;
}

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

.home-comment-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #0d9488, #6366f1);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.home-comment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-comment-body {
  min-width: 0;
  flex: 1;
}

.home-comment-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 1px;
}

.home-comment-meta strong {
  font-size: 11px;
  font-weight: 700;
  color: var(--st-text, #1e293b);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-comment-meta time {
  font-size: 9px;
  color: var(--st-text-muted, #94a3b8);
  white-space: nowrap;
  flex-shrink: 0;
}

.home-comment-text {
  margin: 0 0 1px;
  font-size: 11px;
  line-height: 1.3;
  color: var(--st-text-sub, #475569);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-comment-work {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 600;
  color: var(--st-accent, #0d9488);
}

.home-comment-work:hover {
  color: var(--st-accent-dark, #0f766e);
}

/* Nhóm dịch — horizontal strip */
.home-translators-strip {
  border: 1px solid var(--st-border, #e2e8f0);
  border-radius: 14px;
  background: var(--st-surface, #fff);
  padding: 14px 16px 16px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.home-translators-strip .section-header {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--st-border, #e2e8f0);
}

.home-translators-strip .section-header h1 {
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
}

.home-translator-scroll-wrap {
  overflow: hidden;
}

.home-translator-scroll {
  list-style: none;
  margin: 0;
  padding: 2px 2px 8px;
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.home-translator-scroll > li {
  flex: 0 0 108px;
  scroll-snap-align: start;
}

.home-translator-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 12px 10px;
  border-radius: 12px;
  border: 1px solid var(--st-border, #e2e8f0);
  background: var(--st-bg-subtle, #f8fafc);
  color: inherit;
  position: relative;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.home-translator-card:hover {
  border-color: rgba(13, 148, 136, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.home-translator-card-rank {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.65);
  color: #fff;
}

.home-translator-card-avatar {
  width: 52px;
  height: 52px;
  margin: 0 0 8px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #0d9488, #6366f1);
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

.home-translator-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-translator-card h4 {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--st-text, #1e293b);
  width: 100%;
}

.home-translator-card p {
  margin: 0;
  font-size: 11px;
  color: var(--st-text-muted, #64748b);
}

@media (min-width: 768px) {
  .home-translator-scroll > li {
    flex-basis: 120px;
  }
}

/* Search keyword bar (tim-kiem) */
.search-keyword-bar {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid var(--st-border, #e2e8f0);
  border-radius: 12px;
  background: var(--st-surface, #fff);
}

.search-keyword-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.search-keyword-field input {
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--st-border, #e2e8f0);
  border-radius: 8px;
  font: inherit;
  background: #fff;
}

#explore .novel-list.category-cards.col5 {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 14px 10px;
}

@media (min-width: 768px) {
  #explore .novel-list.category-cards.col5 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 16px 12px;
  }
}

@media (min-width: 1024px) {
  #explore .novel-list.category-cards.col5 {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 18px 14px;
  }
}

/* =========================================================
   DETAIL: content type tag on cover + continue reading
   ========================================================= */
/* Soften legacy black glass overlay on detail banner */
body.site-theme .page-manga-detail .novel-header-v2 .glass-background .glass-shade,
.page-manga-detail .novel-header-v2 .glass-background .glass-shade {
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.45) 0%, rgba(30, 27, 75, 0.72) 100%) !important;
  opacity: 1 !important;
}

/* Kill legacy blur(40px) full-bleed — causes heavy jank when detail paints after skeleton */
body.site-theme .page-manga-detail .novel-header-v2 .glass-background img,
.page-manga-detail .novel-header-v2 .glass-background img {
  filter: none !important;
  -webkit-filter: none !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  object-fit: cover;
  transform: scale(1.08);
  opacity: 0.4;
  will-change: auto;
}

body.site-theme .page-manga-detail .novel-header-v2,
.page-manga-detail .novel-header,
.page-manga-detail .novel-header-v2 {
  /* Legacy media-*.css locks height:426/510px → tags + Giới thiệu đè lên nhau */
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  padding-top: 28px !important;
  padding-bottom: 28px !important;
  box-sizing: border-box;
}

.page-manga-detail .novel-header-v2 .header-body {
  height: auto !important;
  align-items: flex-start !important;
}

.page-manga-detail .novel-body.container,
.page-manga-detail .novel-body {
  position: relative;
  z-index: 2;
  margin-top: 20px !important;
  clear: both;
}

.page-manga-detail .novel-header-v2 .cover {
  position: relative;
}

.page-manga-detail .work-type-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  pointer-events: none;
}

.page-manga-detail .work-type-tag--novel::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5eead4;
  flex-shrink: 0;
}

.page-manga-detail .work-type-tag--comic::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fbbf24;
  flex-shrink: 0;
}

.page-manga-detail .btn-read-continue {
  display: inline-flex !important;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  text-align: left;
  padding: 6px 20px 6px 6px !important;
  min-height: 52px !important;
}

.page-manga-detail .novel-header-v2 .novel-info .links {
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 8px !important;
}

.page-manga-detail .btn-continue-reading {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
  max-width: min(320px, 70vw);
  min-height: 44px !important;
  height: 44px !important;
  padding: 0 16px !important;
  border-radius: 10px !important;
  background: linear-gradient(135deg, var(--md-accent, #0d9488) 0%, var(--md-violet, #6366f1) 100%) !important;
  color: #fff !important;
  text-decoration: none !important;
  border: 0 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box !important;
}

.page-manga-detail .btn-continue-reading span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

.page-manga-detail .btn-continue-reading img,
.page-manga-detail .btn-continue-reading .continue-cover,
.page-manga-detail .btn-continue-reading figure {
  display: none !important;
}

.page-manga-detail .btn-continue-reading:hover {
  opacity: 0.92;
  color: #fff !important;
}

.page-manga-detail .continue-reading-card,
.page-manga-detail .continue-reading-cover,
.page-manga-detail .continue-reading-text,
.page-manga-detail .continue-reading-arrow {
  display: none !important;
}

.page-manga-detail .btn-read-from-start {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 44px !important;
  height: 44px !important;
  padding: 0 16px !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, 0.12) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  box-sizing: border-box !important;
}

.page-manga-detail .novel-header-v2 .novel-info .links > a.btn-read-now {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 44px !important;
  height: 44px !important;
  padding: 0 16px !important;
  border-radius: 10px !important;
  box-sizing: border-box !important;
  line-height: 1.2 !important;
}

.page-manga-detail .btn-read-continue .continue-cover {
  width: 40px;
  height: 54px;
  margin: 0;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  background: rgba(255, 255, 255, 0.15);
}

.page-manga-detail .btn-read-continue .continue-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-manga-detail .btn-read-continue > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  line-height: 1.3;
}

.page-manga-detail .btn-read-continue > span small {
  font-size: 12px;
  font-weight: 500;
  opacity: 0.88;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* =========================================================
   PAGE: Lịch sử đọc
   ========================================================= */
.page-history .header-novel {
  text-align: center;
  margin-bottom: 20px;
}

.page-history .header-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 auto 10px;
  padding: 14px 24px;
  font-size: 20px;
  font-weight: 700;
  border: 1px solid var(--st-border, #e2e8f0);
  border-radius: 12px;
  background: var(--st-surface, #fff);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
}

.page-history .desc-content-column {
  display: block;
  max-width: 560px;
  margin: 0 auto;
  font-size: 13px;
  line-height: 1.55;
  color: var(--st-text-muted, #64748b);
}

.page-history .history-login-link {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--st-accent, #0d9488);
  font-weight: 700;
  cursor: pointer;
}

.page-history .history-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.page-history .history-clear-btn {
  font-size: 13px;
}

.page-history .history-error {
  margin-bottom: 12px;
}

.page-history .history-section-title {
  margin: 0 0 14px;
  padding-left: 10px;
  border-left: 3px solid #e74c3c;
  font-size: 15px;
  font-weight: 700;
  color: var(--st-text, #1e293b);
}

/* =========================================================
   PAGE: Tìm kiếm / Đang hot
   ========================================================= */
#search-section .search-container {
  width: 100%;
}

#search-section .filter-bar {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) repeat(3, minmax(120px, 1fr)) auto;
  gap: 10px 12px;
  align-items: end;
  margin-bottom: 22px;
}

#search-section .filter-bar .filter-field {
  min-width: 0;
}

#search-section .filter-bar .filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  white-space: nowrap;
}

#search-section .popular-novels > h1 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
  color: var(--st-text, #1e293b);
}

#search-section .search-desc {
  margin: 0 0 18px;
  font-size: 14px;
  color: var(--st-text-muted, #64748b);
}

#search-section nav.paging {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin: 22px 0 8px;
}

#search-section nav.paging a,
#search-section nav.paging .active,
#search-section nav.paging .paging-ellipsis {
  min-width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--st-border, #e2e8f0);
  background: var(--st-surface, #fff);
  font-weight: 600;
  font-size: 14px;
  color: var(--st-text, #1e293b);
}

#search-section nav.paging .active {
  background: var(--st-accent, #0d9488);
  border-color: var(--st-accent, #0d9488);
  color: #fff;
}

#search-section nav.paging .paging-ellipsis {
  border: 0;
  background: transparent;
}

@media (max-width: 900px) {
  #search-section .filter-bar {
    grid-template-columns: 1fr 1fr;
  }

  #search-section .filter-bar .filter-field.grow {
    grid-column: 1 / -1;
  }

  #search-section .filter-bar .filter-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  #search-section .filter-bar {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   EXPLORE FILTERS — override legacy media-mobile #explore rules
   ========================================================= */
body.site-theme #explore nav.filters .scroll-wrapper {
  overflow: visible !important;
  padding-top: 0 !important;
  margin-bottom: 0 !important;
  height: auto !important;
}

body.site-theme #explore nav.filters .scroll-wrapper .proplist,
body.site-theme #explore nav.filters ul.proplist {
  width: 100% !important;
  font-size: inherit !important;
  height: auto !important;
}

body.site-theme #explore nav.filters ul.proplist li {
  display: block !important;
  float: none !important;
}

body.site-theme #explore nav.filters .filter-block-row.filter-block-row--triple {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 18px !important;
  align-items: start !important;
}

body.site-theme #explore nav.filters .filter-block-row.filter-block-row--triple .filter-block {
  margin: 0 !important;
  padding: 0 !important;
  border-bottom: none !important;
  min-width: 0;
}

body.site-theme #explore nav.filters .filter-block-row.filter-block-row--triple .filter-block .proplist {
  align-content: flex-start;
}

body.site-theme #explore nav.filters .filter-block--translator ul.proplist {
  max-height: none !important;
  overflow: visible !important;
  padding-right: 0 !important;
}

body.site-theme #explore nav.filters #categorylist .proplist li.proplist-quick a {
  font-weight: 600;
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412 !important;
}

body.site-theme #explore nav.filters #categorylist .proplist li.proplist-quick a.active {
  background: #ea580c;
  border-color: #ea580c;
  color: #fff !important;
}

html[color-mode="dark"] body.site-theme #explore nav.filters #categorylist .proplist li.proplist-quick a,
body.dark.site-theme #explore nav.filters #categorylist .proplist li.proplist-quick a {
  background: rgba(234, 88, 12, 0.15);
  border-color: rgba(251, 146, 60, 0.45);
  color: #fdba74 !important;
}

@media (max-width: 900px) {
  body.site-theme #explore nav.filters .filter-block-row.filter-block-row--triple {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  body.site-theme #explore nav.filters .filter-block-row.filter-block-row--triple .filter-block {
    padding-bottom: 0 !important;
  }
}

/* =========================================================
   Detail: follow button, hearts, related, comment badge
   ========================================================= */
.page-manga-detail .novel-header-v2 .novel-info .links button.btn-follow,
.page-manga-detail .novel-header-v2 .novel-info .links .btn-follow {
  background: rgba(255, 255, 255, 0.14) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  backdrop-filter: blur(4px);
  border-radius: 10px !important;
  min-height: 44px;
  padding: 0 16px !important;
  font-weight: 600 !important;
  cursor: pointer;
}

.page-manga-detail .novel-header-v2 .novel-info .links button.btn-follow:hover,
.page-manga-detail .novel-header-v2 .novel-info .links .btn-follow:hover {
  background: rgba(255, 255, 255, 0.22) !important;
  color: #fff !important;
}

.page-manga-detail .novel-header-v2 .novel-info .links button.btn-follow.active,
.page-manga-detail .novel-header-v2 .novel-info .links button.btn-follow.add-bookmarked-manga {
  color: var(--md-amber, #f59e0b) !important;
  background: rgba(245, 158, 11, 0.18) !important;
  border-color: rgba(245, 158, 11, 0.45) !important;
}

.page-manga-detail .rating,
.page-manga-detail .detail-rating {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  margin: 12px 0 16px !important;
  padding: 10px 14px !important;
  border-radius: 12px !important;
  background: rgba(15, 23, 42, 0.35) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
}

.page-manga-detail .detail-star-rating,
.page-manga-detail .detail-star-rating.rating-star {
  margin: 0 !important;
}

.page-manga-detail .detail-star-rating p {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  margin: 0 !important;
}

.page-manga-detail .detail-star-rating .star-wrap {
  gap: 4px !important;
}

.page-manga-detail .detail-star-rating .star-box .star {
  color: rgba(255, 255, 255, 0.35) !important;
}

.page-manga-detail .detail-star-rating .star-box .star.star-on {
  color: #fbbf24 !important;
}

.page-manga-detail .detail-star-rating .rating-star-value {
  font-size: 15px !important;
  font-weight: 750 !important;
  color: #fff !important;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

/* legacy hearts unused */
.page-manga-detail .area-heart {
  display: none !important;
}

/* Detail hero / intro spacing — undo cramped margin:0 locks */
.page-manga-detail .novel-header-v2 .novel-info .links {
  margin: 0 0 16px !important;
  gap: 10px !important;
}

.page-manga-detail .novel-header-v2 .novel-info .header-stats,
.page-manga-detail .novel-header-v2 .header-stats {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px !important;
  margin: 0 0 18px !important;
}

.page-manga-detail .novel-header-v2 .header-stats span {
  padding: 14px 16px !important;
  min-height: 64px !important;
  gap: 6px !important;
  box-sizing: border-box;
}

.page-manga-detail .novel-header-v2 .header-stats span strong {
  line-height: 1.35 !important;
}

.page-manga-detail .novel-header-v2 .header-stats span small {
  margin-top: 0 !important;
  line-height: 1.3 !important;
}

.page-manga-detail .novel-header-v2 .novel-info .categories,
.page-manga-detail .novel-header-v2 .categories {
  margin: 0 0 8px !important;
  padding-top: 2px;
}

.page-manga-detail .novel-header-v2 .categories h4 {
  margin: 0 0 12px !important;
  letter-spacing: 0.05em;
}

.page-manga-detail .novel-header-v2 .categories ul {
  gap: 10px !important;
  margin: 0 !important;
  padding: 0 !important;
}

.page-manga-detail .novel-header-v2 .categories ul li {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.page-manga-detail .novel-header-v2 .categories ul li a,
.page-manga-detail .novel-header-v2 .categories ul li .property-item {
  padding: 8px 16px !important;
  line-height: 1.3 !important;
}

.page-manga-detail .novel-header-v2 .author {
  margin: 0 !important;
}

.page-manga-detail .novel-header-v2 .novel-title {
  margin: 0 0 8px !important;
}

.page-manga-detail .novel-header-v2 .alternative-title {
  margin: 0 0 10px !important;
}

.page-manga-detail .novel-body {
  margin-top: 18px !important;
  padding: 28px 26px 36px !important;
}

.page-manga-detail .novel-body .summary {
  margin-bottom: 20px !important;
}

.page-manga-detail .novel-body .summary h4.lined,
.page-manga-detail .novel-body h4.lined {
  margin: 0 0 16px !important;
  padding-bottom: 12px !important;
}

.page-manga-detail .novel-body .summary .description {
  padding: 16px 18px !important;
  line-height: 1.75 !important;
  border: 1px solid var(--st-border, #e2e8f0);
  border-radius: 12px;
  background: var(--st-bg-subtle, #f8fafc);
  box-sizing: border-box;
}

.page-manga-detail .content-nav {
  gap: 14px !important;
  margin: 8px 0 28px !important;
}

.page-manga-detail .content-nav .grdbtn,
.page-manga-detail .content-nav .chapter-latest-container {
  padding: 16px 18px !important;
  min-height: 72px !important;
  gap: 12px !important;
}

.page-manga-detail .content-nav .grdbtn .body {
  padding-right: 14px !important;
}

.page-manga-detail .content-nav .grdbtn h4 {
  margin: 0 0 6px !important;
}

.page-manga-detail .content-nav .grdbtn .latest,
.page-manga-detail .content-nav .grdbtn .update {
  margin: 0 !important;
  line-height: 1.4 !important;
}

@media (max-width: 767px) {
  .page-manga-detail .novel-header-v2 .novel-info .header-stats,
  .page-manga-detail .novel-header-v2 .header-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .page-manga-detail .novel-header-v2 .header-stats span {
    padding: 12px 14px !important;
    min-height: 58px !important;
  }

  .page-manga-detail .novel-body {
    padding: 20px 16px 28px !important;
  }

  .page-manga-detail .novel-body .summary .description {
    padding: 14px !important;
  }

  .page-manga-detail .content-nav {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .page-manga-detail .content-nav .grdbtn,
  .page-manga-detail .content-nav .chapter-latest-container {
    padding: 14px 16px !important;
    min-height: 64px !important;
  }
}

.novel-stats--card .star-wrap {
  gap: 3px !important;
}

.novel-stats--card .rating-star p {
  margin: 0 !important;
}

.comment-chapter-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(13, 148, 136, 0.1);
  color: var(--st-accent-dark, #0f766e);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-manga-detail section.related {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--st-border, #e2e8f0);
  width: 100%;
  max-width: 100%;
  overflow: visible;
}

.page-manga-detail section.related h4 {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 700;
}

.page-manga-detail section.related .section-body {
  width: 100% !important;
  max-width: 100% !important;
  overflow: visible !important;
}

body.site-theme .page-manga-detail section.related .novel-list.related-list,
.page-manga-detail section.related .novel-list.related-list,
.page-manga-detail section.related .novel-list {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 14px 10px !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  margin-left: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  float: none !important;
}

body.site-theme .page-manga-detail section.related .novel-list.related-list .novel-item,
.page-manga-detail section.related .novel-list.related-list .novel-item,
.page-manga-detail section.related .novel-list .novel-item {
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  margin-left: 0 !important;
  margin-bottom: 0 !important;
  padding: 0 !important;
  float: none !important;
  box-sizing: border-box !important;
}

.page-manga-detail section.related .novel-list .novel-item > a {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  color: inherit !important;
  text-decoration: none !important;
}

body.site-theme .page-manga-detail section.related .novel-list .novel-item .novel-cover,
.page-manga-detail section.related .novel-list .novel-item .novel-cover {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 0 !important;
  margin: 0 0 8px !important;
  padding-top: 140% !important;
  aspect-ratio: auto !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  background: #f1f5f9 !important;
}

.page-manga-detail section.related .novel-list .novel-item .novel-cover img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover !important;
  object-position: top center !important;
  display: block !important;
}

.page-manga-detail section.related .novel-list .novel-item .novel-title,
.page-manga-detail section.related .novel-list .novel-item h4.novel-title,
.page-manga-detail section.related .novel-list .novel-item h5.novel-title {
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  margin: 0 0 4px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  color: var(--st-text, #1e293b) !important;
  overflow: hidden !important;
}

.page-manga-detail section.related .novel-stats {
  display: block !important;
  font-size: 11px !important;
  color: var(--st-text-muted, #64748b) !important;
}

@media (min-width: 768px) {
  body.site-theme .page-manga-detail section.related .novel-list.related-list,
  .page-manga-detail section.related .novel-list.related-list,
  .page-manga-detail section.related .novel-list {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 16px 12px !important;
  }
}

@media (min-width: 1024px) {
  body.site-theme .page-manga-detail section.related .novel-list.related-list,
  .page-manga-detail section.related .novel-list.related-list,
  .page-manga-detail section.related .novel-list {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 14px 10px !important;
  }
}

.page-chapter-read .comment-thread {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--st-border, #e2e8f0);
}

/* Category page polish */
.page-category#explore nav.filters {
  margin-bottom: 20px;
  padding: 16px 18px;
  border: 1px solid var(--st-border, #e2e8f0);
  border-radius: 14px;
  background: var(--st-surface, #fff);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.page-category#explore header#Result,
.page-category#explore header.category-result-head {
  display: block !important;
  margin: 0 0 16px !important;
  padding: 0 0 12px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--st-border, #e2e8f0) !important;
  background: transparent !important;
  box-shadow: none !important;
  width: 100% !important;
  max-width: none !important;
  position: relative !important;
}

.page-category#explore header#Result::after,
.page-category#explore header.category-result-head::after {
  display: none !important;
  content: none !important;
}

.page-category#explore .category-result-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.page-category#explore header#Result h1,
.page-category#explore .category-result-title h1 {
  margin: 0 !important;
  font-size: 22px !important;
  font-weight: 700 !important;
  color: var(--st-text, #1e293b) !important;
}

.page-category#explore .category-result-count {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(13, 148, 136, 0.1);
  color: var(--st-accent-dark, #0f766e);
  font-size: 12px;
  font-weight: 700;
}

.page-category#explore .category-result-desc,
.page-category#explore .category-result-meta,
.page-category#explore header#Result .description {
  margin: 8px 0 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  font-size: 13px !important;
  color: var(--st-text-muted, #64748b) !important;
  line-height: 1.5 !important;
  width: auto !important;
  max-width: none !important;
}

body.site-theme #explore nav.filters .filter-block {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--st-border, #e2e8f0);
}

body.site-theme #explore nav.filters .filter-block:last-child,
body.site-theme #explore nav.filters .filter-block-row.filter-block-row--triple {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

body.site-theme #explore nav.filters .proptitle {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--st-text-muted, #64748b);
}

body.site-theme #explore nav.filters ul.proplist {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

body.site-theme #explore nav.filters ul.proplist li {
  margin: 0 !important;
}

body.site-theme #explore nav.filters ul.proplist a {
  display: inline-flex !important;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px !important;
  border-radius: 999px !important;
  border: 1px solid var(--st-border, #e2e8f0) !important;
  background: var(--st-bg-subtle, #f8fafc) !important;
  color: var(--st-text, #1e293b) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  white-space: nowrap;
}

body.site-theme #explore nav.filters ul.proplist a.active {
  background: var(--st-accent, #0d9488) !important;
  border-color: var(--st-accent, #0d9488) !important;
  color: #fff !important;
  font-weight: 600 !important;
}

/* =========================================================
   Search autocomplete (header)
   ========================================================= */
.main-header #novelSearchForm {
  position: relative !important;
}

.main-header .search-suggest {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 1400;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--st-border, #e2e8f0);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
  min-width: 260px;
}

.main-header .search-suggest li + li {
  margin-top: 2px;
}

.main-header .search-suggest a {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 8px;
  text-decoration: none !important;
  color: inherit !important;
  height: auto !important;
  line-height: 1.3 !important;
}

.main-header .search-suggest a:hover {
  background: var(--st-bg-subtle, #f8fafc);
}

.main-header .search-suggest-cover {
  width: 36px;
  height: 50px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  background: #f1f5f9;
  position: relative;
}

.main-header .search-suggest-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.main-header .search-suggest-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.main-header .search-suggest-meta strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--st-text, #1e293b);
}

.main-header .search-suggest-meta em {
  font-size: 11px;
  font-style: normal;
  color: var(--st-text-muted, #64748b);
}

/* Bottom bar icon color consistency + report */
body.chapter-read-page .bottom-bar .bar-control-right {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

body.chapter-read-page .bottom-bar .btn-bar-report,
body.chapter-read-page .bottom-bar .btn-bar-scroll-top {
  color: inherit !important;
}

body.chapter-read-page .bottom-bar .btn-bar-report i,
body.chapter-read-page .bottom-bar .btn-bar-scroll-top i,
body.chapter-read-page .bottom-bar .bar-control-right a i {
  color: var(--cr-accent, #0d9488) !important;
}

body.chapter-read-page .bottom-bar .btn-bar-report b,
body.chapter-read-page .bottom-bar .btn-bar-scroll-top b {
  color: var(--st-text-muted, #64748b) !important;
}

/* Reader report modal */
.reader-report-modal.is-open {
  position: fixed;
  inset: 0;
  z-index: 3100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
}

.reader-report-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 23, 42, 0.5);
  cursor: pointer;
}

.reader-report-panel {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  max-height: min(90vh, 720px);
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--st-surface, #fff);
  border: 1px solid var(--st-border, #e2e8f0);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
  padding: 18px 18px 16px;
  color: var(--st-text, #1e293b);
  -webkit-overflow-scrolling: touch;
}

.reader-report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--st-border, #e2e8f0);
}

.reader-report-head strong {
  flex: 1;
  min-width: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--st-text, #0f172a);
}

.reader-report-close {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: var(--st-bg-subtle, #f1f5f9);
  color: var(--st-text-muted, #64748b);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.reader-report-close:hover {
  background: #e2e8f0;
  color: var(--st-text, #0f172a);
}

.reader-report-meta {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--st-text-muted, #64748b);
}

.reader-report-label {
  display: block;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--st-text-muted, #64748b);
}

.reader-report-label select,
.reader-report-label textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  border: 1px solid var(--st-border, #e2e8f0);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  color: var(--st-text, #1e293b);
  background: var(--st-surface, #fff);
  box-sizing: border-box;
  resize: vertical;
}

.reader-report-label select:focus,
.reader-report-label textarea:focus {
  outline: none;
  border-color: var(--st-accent, #0d9488);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.reader-report-captcha {
  margin: 4px 0 4px;
  overflow: hidden;
}

.reader-report-captcha .recaptcha-wrap,
.reader-report-captcha .recaptcha-dev-note {
  margin: 0;
}

.reader-report-captcha .recaptcha-wrap > div {
  transform-origin: left top;
}

.reader-report-msg {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--st-accent, #0d9488);
}

.reader-report-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--st-border, #e2e8f0);
}

.reader-report-actions .btn {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  font-weight: 700;
}

.reader-report-actions .btn-ghost {
  color: var(--st-text-muted, #64748b);
  background: transparent;
  border: 0;
}

.reader-report-actions .btn-ghost:hover {
  color: var(--st-text, #0f172a);
  background: var(--st-bg-subtle, #f1f5f9);
}

html[color-mode="dark"] .reader-report-panel,
html.dark .reader-report-panel {
  background: #0f172a;
  border-color: rgba(148, 163, 184, 0.22);
  color: #e2e8f0;
}

html[color-mode="dark"] .reader-report-head,
html.dark .reader-report-head,
html[color-mode="dark"] .reader-report-actions,
html.dark .reader-report-actions {
  border-color: rgba(148, 163, 184, 0.18);
}

html[color-mode="dark"] .reader-report-head strong,
html.dark .reader-report-head strong {
  color: #f8fafc;
}

html[color-mode="dark"] .reader-report-close,
html.dark .reader-report-close {
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
}

html[color-mode="dark"] .reader-report-close:hover,
html.dark .reader-report-close:hover {
  background: rgba(148, 163, 184, 0.22);
  color: #f8fafc;
}

html[color-mode="dark"] .reader-report-label select,
html[color-mode="dark"] .reader-report-label textarea,
html.dark .reader-report-label select,
html.dark .reader-report-label textarea {
  background: #1e293b;
  border-color: rgba(148, 163, 184, 0.25);
  color: #e2e8f0;
}

@media (max-width: 420px) {
  .reader-report-panel {
    width: 100%;
    padding: 16px 14px 14px;
  }

  .reader-report-captcha .recaptcha-wrap {
    transform: scale(0.92);
    transform-origin: left top;
    height: 72px;
  }
}

@media (max-width: 640px) {
  body.chapter-read-page .bottom-bar .btn-bar-report b {
    display: none !important;
  }
}

/* =========================================================
   Member avatar + danh hiệu + comments
   ========================================================= */
.member-avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.member-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: cover;
  background: #e2e8f0;
  display: block;
}

.member-avatar--xs { width: 32px; height: 32px; }
.member-avatar--sm { width: 36px; height: 36px; }
.member-avatar--md { width: 42px; height: 42px; }
.member-avatar--lg { width: 88px; height: 88px; }
.member-avatar.has-badge { margin-bottom: 14px; }

.member-avatar-badge {
  position: absolute;
  left: 50%;
  bottom: -10px;
  transform: translateX(-50%);
  z-index: 2;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--membership-accent, #0d9488) 45%, #fff);
  background: color-mix(in srgb, var(--membership-accent, #0d9488) 16%, #fff);
  color: var(--membership-accent, #0d9488);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.comment-compose-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.comment-compose-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--st-text, #1e293b);
}

.comment-membership-pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--membership-accent, #0d9488) 40%, transparent);
  background: color-mix(in srgb, var(--membership-accent, #0d9488) 12%, transparent);
  color: var(--membership-accent, #0d9488);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.comment-reply-banner {
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--st-text-muted, #64748b);
}

.comment-replies {
  list-style: none;
  margin: 12px 0 0;
  padding: 0 0 0 8px;
  border-left: 2px solid var(--st-border, #e2e8f0);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comment-reply-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.comment-reply-body {
  flex: 1 1 auto;
  min-width: 0;
}

.comment-reply-item p {
  margin: 4px 0 0;
  line-height: 1.5;
  word-break: break-word;
}

.comment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  align-items: center;
}

.member-profile-top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.member-profile-name {
  margin: 0 0 4px;
  font-size: 1.25rem;
}

.member-profile-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.member-title-buy {
  margin-top: 14px;
}

.membership-ladder h3 {
  margin: 0 0 6px;
}

.membership-rank-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.membership-rank-list li {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--st-border, #e2e8f0);
  background: #fff;
}

.membership-rank-list li.is-active {
  border-color: color-mix(in srgb, var(--membership-accent, #0d9488) 50%, #fff);
  background: color-mix(in srgb, var(--membership-accent, #0d9488) 8%, #fff);
}

.membership-rank-list .rank-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--membership-accent, #94a3b8);
}

.membership-rank-list span:last-child {
  font-size: 12px;
  color: var(--st-text-muted, #64748b);
}

/* =========================================================
   MOBILE RESPONSIVE — lists, filters, home widgets
   ========================================================= */
@media (max-width: 767px) {
  body.site-theme .container,
  .container {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .page-category#explore #Result h1,
  #search-section .header-novel h1,
  #explore #Result h1 {
    font-size: 1.25rem !important;
    line-height: 1.3 !important;
  }

  .page-category#explore #Result .description,
  #search-section .header-novel p,
  #explore #Result .description {
    font-size: 13px !important;
  }

  .search-keyword-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }

  .search-keyword-bar .btn {
    width: 100%;
    min-height: 40px;
  }

  .page-category#explore .novel-list.category-cards .novel-title,
  #explore .novel-list.category-cards .novel-title,
  #search-section .novel-list .novel-title,
  body.site-theme .novel-list:not(.horizontal):not(.reading-scroll) .novel-title {
    font-size: 13px !important;
    line-height: 1.35 !important;
  }

  .home-widgets {
    gap: 12px;
  }

  .home-translators-strip {
    padding: 12px !important;
    border-radius: 12px !important;
  }

  body.site-theme #explore nav.filters .filter-block h4,
  #explore nav.filters .filter-block h4 {
    font-size: 13px !important;
    margin-bottom: 8px !important;
  }

  body.site-theme #explore nav.filters ul.proplist {
    gap: 6px !important;
  }

  body.site-theme #explore nav.filters ul.proplist li a {
    font-size: 12px !important;
    padding: 6px 10px !important;
  }

  .page-manga-detail .novel-header-v2 .novel-info .links {
    width: 100%;
  }

  .page-manga-detail .btn-continue-reading,
  .page-manga-detail .novel-header-v2 .novel-info .links > a.btn-read-now,
  .page-manga-detail .btn-read-from-start {
    max-width: 100% !important;
    flex: 1 1 auto;
  }
}

@media (max-width: 479px) {
  .page-category .category-grid {
    grid-template-columns: 1fr !important;
  }
}

/* =========================================================
   PAGE SKELETONS
   ========================================================= */
.page-skeleton {
  padding: 16px 0 32px;
  min-height: 60vh;
  animation: sk-pulse 1.4s ease-in-out infinite;
}

@keyframes sk-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.72;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-skeleton {
    animation: none;
  }
}

.page-skeleton--detail,
.page-skeleton--reader {
  padding: 0 0 32px;
  min-height: 70vh;
}

.page-skeleton.page-skeleton--comments,
.page-skeleton.page-skeleton--notifs,
.page-skeleton.page-skeleton--horizontal,
.page-skeleton.page-skeleton--widgets,
.page-skeleton.page-skeleton--chapters {
  min-height: 0;
  padding: 8px 0 12px;
}

.notif-empty--sk {
  list-style: none !important;
  padding: 0 !important;
}

.notif-empty--sk .page-skeleton {
  min-height: 0;
  padding: 4px 0;
}

.sk-block,
.sk-line,
.sk-btn,
.sk-chip,
.sk-novel-cover-fill,
.sk-avatar,
.sk-stat,
.sk-notif-thumb,
.sk-reading-cover,
.sk-horizontal-cover,
.sk-detail-cover,
.sk-nav-card,
.sk-chapter-search,
.sk-reader-gear {
  background: #e2e8f0;
  border-radius: 8px;
}

.sk-line {
  height: 12px;
  margin-bottom: 8px;
  width: 100%;
}

.sk-line--xl {
  height: 26px;
  width: min(420px, 70%);
  margin-bottom: 12px;
}

.sk-line--lg {
  height: 20px;
  width: 55%;
}

.sk-line--md {
  height: 14px;
  width: 48%;
}

.sk-line--sm {
  height: 10px;
  width: 38%;
}

.sk-result-head {
  margin: 8px 0 18px;
}

.sk-result-head .sk-line--sm {
  margin-bottom: 0;
}

/* Explore filters skeleton */
.sk-explore-filters {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
  padding: 16px;
  border: 1px solid var(--st-border, #e2e8f0);
  border-radius: 14px;
  background: var(--st-surface, #fff);
}

.sk-filter-block {
  min-width: 0;
}

.sk-filter-title {
  width: 96px;
  height: 14px;
  margin-bottom: 10px;
}

.sk-filter-triple {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 900px) {
  .sk-filter-triple {
    grid-template-columns: 1fr;
  }
}

.sk-chip-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow: hidden;
}

.sk-chip-row--wrap {
  flex-wrap: wrap;
}

.sk-chip {
  display: inline-block;
  height: 32px;
  width: 84px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.sk-chip--wide {
  width: 118px;
}

.sk-chip--sm {
  height: 28px;
  width: 72px;
}

.sk-chip--tiny {
  height: 24px;
  width: 28px;
  border-radius: 8px;
}

.sk-chip--pill {
  height: 30px;
  width: 92px;
}

.sk-chip--btn {
  height: 38px;
  width: 100px;
  border-radius: 10px;
}

/* Novel grid — match real 2/3/6 columns */
.sk-novel-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 12px;
}

@media (min-width: 768px) {
  .sk-novel-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px 14px;
  }
}

@media (min-width: 1024px) {
  .sk-novel-list {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.sk-novel-item {
  min-width: 0;
}

.sk-novel-cover {
  position: relative;
  width: 100%;
  padding-top: 140%;
  margin-bottom: 8px;
  border-radius: 8px;
  overflow: hidden;
  background: #e2e8f0;
}

.sk-novel-cover-fill {
  position: absolute;
  inset: 0;
  border-radius: 0;
  width: 100%;
  height: 100%;
}

.sk-novel-title {
  height: 13px;
  width: 92%;
  margin-bottom: 6px;
}

.sk-novel-meta {
  height: 10px;
  width: 64%;
  margin-bottom: 0;
}

.sk-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
}

.sk-hero {
  width: 100%;
  height: clamp(180px, 28vw, 280px);
  margin-bottom: 20px;
  border-radius: 12px;
}

.sk-section {
  margin-bottom: 22px;
}

.sk-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.sk-section-head .sk-line {
  margin-bottom: 0;
}

.sk-home-widgets {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  margin: 8px 0 20px;
}

@media (max-width: 900px) {
  .sk-home-widgets {
    grid-template-columns: 1fr;
  }
}

.sk-panel,
.sk-panel-frame {
  min-height: 176px;
  border-radius: 10px;
}

.sk-panel-frame {
  border: 1px solid var(--st-border, #e2e8f0);
  background: var(--st-surface, #fff);
  padding: 8px 10px 10px;
  overflow: hidden;
}

.sk-reading-row {
  display: flex;
  gap: 8px;
  overflow: hidden;
}

.sk-reading-item {
  flex: 0 0 70px;
  width: 70px;
}

.sk-reading-cover {
  width: 100%;
  height: 98px;
  margin-bottom: 4px;
  border-radius: 6px;
}

/* Detail hero — same shell as real header; no negative pull on body */
.page-skeleton--detail {
  padding: 0 0 32px !important;
  animation: none; /* pulse làm cảm giác khung dưới nhảy */
}

.page-skeleton--detail .sk-detail-hero.novel-header-v2 {
  min-height: 0;
  /* Khớp padding thật — tránh hero skeleton thấp hơn → body nhảy lên */
  padding-top: 28px !important;
  padding-bottom: 28px !important;
}

.page-skeleton--detail .sk-detail-cover {
  width: 132px;
  height: 188px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.22);
}

@media (min-width: 768px) {
  .page-skeleton--detail .sk-detail-cover {
    width: 180px;
    height: 257px;
  }
}

@media (min-width: 1024px) {
  .page-skeleton--detail .sk-detail-cover {
    width: 200px;
    height: 286px;
  }
}

.page-skeleton--detail .sk-detail-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 0;
  min-width: 0;
  flex: 1 1 auto;
}

.page-skeleton--detail .sk-actions {
  margin: 0;
}

.page-skeleton--detail .sk-stats-row {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

@media (max-width: 767px) {
  .page-skeleton--detail .sk-stats-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .page-skeleton--detail .novel-body.sk-detail-body,
  .page-skeleton--detail .sk-detail-body {
    margin-top: 12px !important;
    padding: 20px 14px 28px !important;
  }
}

.page-skeleton--detail .sk-stat {
  height: 64px;
  min-height: 64px;
}

.page-skeleton--detail .sk-chip-row {
  margin-top: 0 !important;
}

/* Body skeleton = cùng chỗ với .novel-body thật (không margin âm) */
.page-skeleton--detail .novel-body.sk-detail-body,
.page-skeleton--detail .sk-detail-body {
  margin-top: 20px !important;
  padding: 28px 26px 36px !important;
  background: var(--st-surface, #fff);
  border-radius: 14px;
  position: relative;
  z-index: 2;
  min-height: 420px;
}

.sk-detail-meta .sk-line {
  background: rgba(255, 255, 255, 0.32);
}

.sk-detail-meta .sk-btn,
.sk-detail-meta .sk-stat,
.sk-detail-meta .sk-chip {
  background: rgba(255, 255, 255, 0.32);
}

.sk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 16px;
}

.sk-btn {
  display: inline-block;
  height: 44px;
  width: 132px;
  border-radius: 10px;
}

.sk-btn--wide {
  width: 168px;
}

.sk-btn--ghost {
  opacity: 0.7;
}

.sk-stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 767px) {
  .sk-stats-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

.sk-stat {
  height: 64px;
  border-radius: 10px;
}

.sk-desc {
  height: 110px;
  width: 100%;
  margin: 12px 0 20px;
  border-radius: 12px;
}

.sk-content-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 0 0 24px;
}

@media (max-width: 767px) {
  .sk-content-nav {
    grid-template-columns: 1fr;
  }
}

.sk-nav-card {
  height: 72px;
  border-radius: 12px;
}

/* Chapter list */
.sk-chapters-panel {
  border: 1px solid var(--st-border, #e2e8f0);
  border-radius: 12px;
  padding: 14px;
  background: #fff;
}

.sk-chapter-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.sk-chapter-search {
  flex: 1;
  height: 40px;
  border-radius: 10px;
}

.sk-chapter-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 420px;
  overflow: hidden;
}

.sk-chapter-li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--st-bg-subtle, #f8fafc);
  border: 1px solid transparent;
}

.sk-chapter-li-main {
  flex: 1;
  min-width: 0;
}

.sk-chapter-name {
  height: 13px;
  width: 58%;
  margin-bottom: 7px;
}

.sk-chapter-sub {
  height: 10px;
  width: 28%;
  margin-bottom: 0;
}

/* Reader */
.sk-reader-shell {
  max-width: 860px;
  margin: 0 auto;
  padding: 18px 16px 80px;
}

.sk-reader-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.sk-reader-titles {
  flex: 1;
  min-width: 0;
}

.sk-reader-book {
  width: min(360px, 70%);
  height: 18px;
  margin-bottom: 8px;
}

.sk-reader-chap {
  width: min(220px, 45%);
  height: 14px;
  margin-bottom: 0;
}

.sk-reader-gear {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sk-reader-chapnav {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
}

.sk-reader-pages {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sk-reader-page {
  width: 100%;
  height: min(72vh, 640px);
  border-radius: 4px;
}

.sk-reader-bottom {
  position: sticky;
  bottom: 12px;
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--st-border, #e2e8f0);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.sk-comment-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sk-comment-list--compact {
  gap: 8px;
}

.sk-comment-item,
.sk-notif-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.sk-comment-body {
  flex: 1;
  min-width: 0;
}

.sk-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sk-avatar--sm {
  width: 24px;
  height: 24px;
}

.sk-avatar--lg {
  width: 72px;
  height: 72px;
}

.sk-notif-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sk-notif-thumb {
  width: 48px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 6px;
}

.sk-profile {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.sk-horizontal {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sk-horizontal-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px;
  border: 1px solid var(--st-border, #e2e8f0);
  border-radius: 12px;
  background: #fff;
}

.sk-horizontal-cover {
  width: 72px;
  height: 96px;
  flex-shrink: 0;
  border-radius: 8px;
}

@keyframes sk-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

html[color-mode="dark"] .sk-block,
html[color-mode="dark"] .sk-line,
html[color-mode="dark"] .sk-btn,
html[color-mode="dark"] .sk-chip,
html[color-mode="dark"] .sk-novel-cover-fill,
html[color-mode="dark"] .sk-avatar,
html[color-mode="dark"] .sk-stat,
html[color-mode="dark"] .sk-notif-thumb,
html[color-mode="dark"] .sk-reading-cover,
html[color-mode="dark"] .sk-horizontal-cover,
html[color-mode="dark"] .sk-nav-card,
html[color-mode="dark"] .sk-chapter-search,
html[color-mode="dark"] .sk-reader-gear,
body.dark .sk-block,
body.dark .sk-line,
body.dark .sk-btn,
body.dark .sk-chip,
body.dark .sk-novel-cover-fill,
body.dark .sk-avatar,
body.dark .sk-stat,
body.dark .sk-notif-thumb,
body.dark .sk-reading-cover,
body.dark .sk-horizontal-cover,
body.dark .sk-nav-card,
body.dark .sk-chapter-search,
body.dark .sk-reader-gear {
  background: #1e293b;
}

html[color-mode="dark"] .sk-explore-filters,
html[color-mode="dark"] .sk-chapters-panel,
html[color-mode="dark"] .sk-panel-frame,
html[color-mode="dark"] .sk-horizontal-item,
html[color-mode="dark"] .sk-reader-bottom,
html[color-mode="dark"] .sk-detail-body,
body.dark .sk-explore-filters,
body.dark .sk-chapters-panel,
body.dark .sk-panel-frame,
body.dark .sk-horizontal-item,
body.dark .sk-reader-bottom,
body.dark .sk-detail-body {
  background: #0f172a;
  border-color: #334155;
}

html[color-mode="dark"] .sk-chapter-li,
body.dark .sk-chapter-li {
  background: #1e293b;
}

/* Detail hero skeleton stays teal (not slate) in both themes */
html[color-mode="dark"] .sk-detail-hero,
body.dark .sk-detail-hero {
  background: linear-gradient(135deg, #0f766e 0%, #1e3a5f 55%, #312e81 100%);
}

html[color-mode="dark"] .sk-detail-hero .sk-block,
html[color-mode="dark"] .sk-detail-hero .sk-line,
html[color-mode="dark"] .sk-detail-hero .sk-btn,
html[color-mode="dark"] .sk-detail-hero .sk-stat,
html[color-mode="dark"] .sk-detail-hero .sk-chip,
body.dark .sk-detail-hero .sk-block,
body.dark .sk-detail-hero .sk-line,
body.dark .sk-detail-hero .sk-btn,
body.dark .sk-detail-hero .sk-stat,
body.dark .sk-detail-hero .sk-chip {
  background: rgba(255, 255, 255, 0.28);
}

html[color-mode="dark"] .sk-detail-body,
body.dark .sk-detail-body {
  background: var(--st-surface, #1e293b);
}

/* =========================================================
   Header account chip + dropdown
   ========================================================= */
.main-header .header-account {
  position: relative;
  display: flex;
  align-items: center;
}

.main-header .header-account-toggle {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  max-width: 240px;
  height: 44px !important;
  padding: 0 10px 0 4px !important;
  border: 1px solid var(--st-border, #e2e8f0) !important;
  border-radius: 999px !important;
  background: #fff !important;
  color: var(--st-text, #1e293b) !important;
  cursor: pointer !important;
  box-shadow: none !important;
}

.main-header .header-account-toggle:hover,
.main-header .header-account.is-open .header-account-toggle {
  border-color: #99f6e4 !important;
  background: rgba(13, 148, 136, 0.06) !important;
}

.main-header .header-account-toggle .member-avatar {
  flex-shrink: 0;
}

.main-header .header-account-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  line-height: 1.15;
  text-align: left;
}

.main-header .header-account-meta strong {
  font-size: 12px;
  font-weight: 700;
  max-width: 140px;
}

.main-header .header-account-rank {
  display: block;
  max-width: 140px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.main-header .header-account-meta em {
  font-style: normal;
  font-size: 11px;
  color: var(--st-text-muted, #64748b);
}

.main-header .header-account-toggle > .fa-caret-down {
  font-size: 11px;
  opacity: 0.65;
  margin-left: 2px;
}

.main-header .header-account-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 240px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid var(--st-border, #e2e8f0);
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
  z-index: 1300;
}

.main-header .header-account.is-open .header-account-menu,
.main-header .header-account:hover .header-account-menu {
  display: block;
}

.main-header .header-account-menu::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 12px;
}

.main-header .header-account-card {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px;
  margin-bottom: 6px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.08), rgba(79, 70, 229, 0.06));
}

.main-header .header-account-card strong {
  display: block;
  font-size: 13px;
  color: var(--st-text, #1e293b);
}

.main-header .header-account-card span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  margin-top: 2px;
}

.main-header .header-account-menu a,
.main-header .header-account-menu button {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
  padding: 10px 12px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: var(--st-text, #1e293b) !important;
  font: inherit !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  text-align: left !important;
  text-decoration: none !important;
  cursor: pointer !important;
  box-shadow: none !important;
  min-height: 0 !important;
  height: auto !important;
}

.main-header .header-account-menu a:hover,
.main-header .header-account-menu button:hover {
  background: rgba(13, 148, 136, 0.1) !important;
  color: #0f766e !important;
}

.main-header .header-account-menu a i,
.main-header .header-account-menu button i {
  width: 16px;
  text-align: center;
  opacity: 0.8;
}

.main-header .header-account-menu button.is-danger {
  color: #be123c !important;
  margin-top: 4px;
  border-top: 1px solid var(--st-border, #e2e8f0) !important;
  border-radius: 0 0 8px 8px !important;
}

.main-header .header-account-menu button.is-danger:hover {
  background: rgba(190, 18, 60, 0.08) !important;
  color: #9f1239 !important;
}

@media (max-width: 1023px) {
  .main-header .header-account-meta {
    display: none;
  }

  .main-header .header-account-toggle {
    width: 40px;
    max-width: 40px;
    padding: 0 !important;
    justify-content: center !important;
  }

  .main-header .header-account-toggle > .fa-caret-down {
    display: none;
  }
}

/* =========================================================
   Member profile page
   ========================================================= */
.member-file-input {
  display: none !important;
}

/* Bootstrap .container clearfix ::before/::after become grid/flex items and break layout */
.member-layout::before,
.member-layout::after,
.container.member-layout::before,
.container.member-layout::after {
  content: none !important;
  display: none !important;
}

.member-layout {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: flex-start !important;
  gap: 22px !important;
  padding: 24px 0 48px !important;
  width: 100% !important;
  max-width: 970px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}

.member-layout > .member-sidebar {
  flex: 0 0 248px !important;
  width: 248px !important;
  max-width: 248px !important;
}

.member-layout > .member-main {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  width: auto !important;
}

.member-guest {
  padding: 48px 0 !important;
  display: flex !important;
  justify-content: center !important;
}

.member-panel--guest {
  max-width: 420px !important;
  text-align: center !important;
}

.member-guest-mark {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 22px;
  color: #fff;
  background: linear-gradient(135deg, #0d9488, #4f46e5);
}

.member-guest-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.member-sidebar {
  position: sticky !important;
  top: 80px !important;
  background: #fff !important;
  border: 1px solid var(--st-border, #e2e8f0) !important;
  border-radius: 16px !important;
  padding: 16px 12px !important;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05) !important;
}

.member-sidebar-head {
  display: flex !important;
  gap: 12px !important;
  align-items: center !important;
  padding: 4px 8px 14px !important;
  margin-bottom: 8px !important;
  border-bottom: 1px solid var(--st-border, #e2e8f0) !important;
}

.member-sidebar-copy {
  min-width: 0;
}

.member-sidebar-copy strong {
  display: block;
  font-size: 14px;
  color: var(--st-text, #1e293b);
}

.member-sidebar-title {
  display: block;
  font-size: 11px;
  font-weight: 700;
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.member-sidebar-copy em {
  display: block;
  font-style: normal;
  font-size: 12px;
  color: var(--st-text-muted, #64748b);
  margin-top: 3px;
}

.member-side-nav {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

.member-side-nav button,
.member-side-nav a {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
  text-align: left !important;
  border: 0 !important;
  background: transparent !important;
  padding: 10px 12px !important;
  border-radius: 10px !important;
  font: inherit !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--st-text, #1e293b) !important;
  cursor: pointer !important;
  text-decoration: none !important;
}

.member-side-nav button i,
.member-side-nav a i {
  width: 16px;
  text-align: center;
  color: #94a3b8;
}

.member-side-nav button:hover,
.member-side-nav a:hover,
.member-side-nav button.is-active,
.member-side-nav a.is-active {
  background: rgba(13, 148, 136, 0.1) !important;
  color: #0f766e !important;
}

.member-side-nav button.is-active i,
.member-side-nav a.is-active i,
.member-side-nav button:hover i,
.member-side-nav a:hover i {
  color: #0d9488;
}

.member-side-sep {
  height: 1px;
  margin: 8px 8px;
  background: var(--st-border, #e2e8f0);
}

.member-side-logout {
  margin-top: 4px !important;
  color: #be123c !important;
}

.member-side-logout i {
  color: #fb7185 !important;
}

.member-main {
  min-width: 0 !important;
}

.member-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.member-page-head h1 {
  margin: 0 0 4px;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--st-text, #1e293b);
}

.member-page-desc {
  font-size: 14px;
  color: var(--st-text-muted, #64748b);
  line-height: 1.45;
}

.member-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
}

.member-sidebar-head--guest {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.member-sidebar-head--guest strong {
  font-size: 15px;
}

.member-sidebar-head--guest em {
  font-style: normal;
  font-size: 12px;
  color: #64748b;
}

.member-panel {
  background: #fff !important;
  border: 1px solid var(--st-border, #e2e8f0) !important;
  border-radius: 16px !important;
  padding: 24px !important;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05) !important;
}

/* Notifications */
.member-panel--notifs {
  padding: 12px !important;
}

.notif-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

.notif-card {
  display: flex !important;
  gap: 14px !important;
  padding: 12px 14px !important;
  border: 1px solid var(--st-border, #e2e8f0) !important;
  border-radius: 12px !important;
  background: #fff !important;
  text-decoration: none !important;
  color: inherit !important;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.notif-card:hover {
  border-color: #99f6e4 !important;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.notif-card.is-unread {
  background: linear-gradient(90deg, rgba(13, 148, 136, 0.07), #fff 48%) !important;
  border-color: rgba(13, 148, 136, 0.28) !important;
}

.notif-card.is-read {
  opacity: 0.88;
}

.notif-card-cover {
  width: 52px !important;
  height: 72px !important;
  border-radius: 8px !important;
  object-fit: cover !important;
  background: #f1f5f9 !important;
  flex-shrink: 0 !important;
}

.notif-card-cover.placeholder {
  display: grid !important;
  place-items: center !important;
  color: #94a3b8;
  font-size: 18px;
}

.notif-card-body {
  min-width: 0;
  flex: 1;
}

.notif-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.notif-card-title {
  margin: 0 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  color: var(--st-text, #1e293b) !important;
}

.notif-card-content {
  margin: 4px 0 0 !important;
  font-size: 14px !important;
  line-height: 1.45 !important;
  color: #334155 !important;
}

.notif-card-meta {
  display: flex !important;
  gap: 10px !important;
  align-items: center !important;
  margin-top: 8px !important;
  font-size: 12px !important;
  color: #94a3b8 !important;
}

.tag-new,
.tag-read {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
}

.tag-new {
  color: #0f766e;
  background: rgba(13, 148, 136, 0.12);
}

.tag-read {
  color: #64748b;
  background: #f1f5f9;
}

.notif-more {
  display: flex;
  justify-content: center;
  padding: 12px 0 4px;
}

/* Bookmark / history grids inside member panel */
.member-panel.page-bookmark,
.member-panel.page-history {
  overflow: visible;
}

.member-panel .novel-list,
.member-panel .bookmark-cards {
  display: flex !important;
  flex-wrap: wrap !important;
  margin: 0 0 0 -14px !important;
  padding: 0 !important;
  list-style: none !important;
  width: calc(100% + 14px) !important;
}

.member-panel .novel-list .novel-item,
.member-panel .bookmark-cards .novel-item {
  position: relative !important;
  width: calc((100% / 6) - 14px) !important;
  margin: 0 0 18px 14px !important;
  list-style: none !important;
}

.member-panel .novel-item.has-remove .close-bookmark,
.member-panel .bookmark-cards .close-bookmark {
  position: absolute !important;
  top: 6px !important;
  right: 6px !important;
  z-index: 3 !important;
  width: 28px !important;
  height: 28px !important;
  min-height: 28px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: rgba(15, 23, 42, 0.72) !important;
  color: #fff !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  padding: 0 !important;
  font-size: 12px !important;
  line-height: 1 !important;
}

.member-panel .novel-item.has-remove .close-bookmark:hover {
  background: #dc2626 !important;
}

.bookmark-empty {
  text-align: center;
  padding: 28px 12px;
  color: #64748b;
  font-size: 14px;
}

@media (max-width: 1100px) {
  .member-panel .novel-list .novel-item,
  .member-panel .bookmark-cards .novel-item {
    width: calc((100% / 4) - 14px) !important;
  }
}

@media (max-width: 767px) {
  .member-panel .novel-list,
  .member-panel .bookmark-cards {
    margin-left: -10px !important;
    width: calc(100% + 10px) !important;
  }

  .member-panel .novel-list .novel-item,
  .member-panel .bookmark-cards .novel-item {
    width: calc((100% / 2) - 10px) !important;
    margin-left: 10px !important;
    margin-bottom: 14px !important;
  }

  .member-page-head {
    flex-direction: column;
  }

  .notif-card {
    gap: 10px !important;
    padding: 10px !important;
  }
}

.member-panel-head {
  margin-bottom: 20px !important;
}

.member-panel-head h1 {
  margin: 0 0 6px !important;
  font-size: 1.4rem !important;
  font-weight: 800 !important;
  color: var(--st-text, #1e293b) !important;
}

.member-panel-head p {
  margin: 0 !important;
  color: var(--st-text-muted, #64748b) !important;
  font-size: 14px !important;
}

.member-hero {
  display: grid !important;
  grid-template-columns: 120px minmax(0, 1fr) !important;
  gap: 22px !important;
  align-items: center !important;
  padding: 8px 4px 8px !important;
}

.member-hero-avatar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.member-avatar-edit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: rgba(13, 148, 136, 0.1);
  color: #0f766e;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.member-avatar-edit:hover {
  background: rgba(13, 148, 136, 0.16);
}

.member-avatar-edit:disabled {
  opacity: 0.6;
  cursor: wait;
}

.member-hero-kicker {
  margin: 0 0 4px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  color: #94a3b8 !important;
}

.member-hero-copy h1 {
  margin: 0 !important;
  font-size: 1.6rem !important;
  font-weight: 800 !important;
  color: var(--st-text, #1e293b) !important;
}

.member-hero-title {
  margin: 6px 0 0 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

.member-stat-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.member-stat {
  padding: 12px 14px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
}

.member-stat span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.member-stat strong {
  display: block;
  margin-top: 4px;
  font-size: 15px;
  color: var(--st-text, #1e293b);
}

.member-info-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.member-info-cards > div {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--st-border, #e2e8f0);
  background: #fff;
}

.member-info-cards span {
  display: block;
  font-size: 12px;
  color: #94a3b8;
  font-weight: 600;
}

.member-info-cards strong {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  color: var(--st-text, #1e293b);
  word-break: break-word;
}

.member-avatar-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.member-avatar-block--inline {
  flex-direction: row;
  text-align: left;
  margin-bottom: 20px;
  gap: 16px;
  align-items: center;
}

.member-upload-hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: #94a3b8;
}

.member-form {
  display: grid;
  gap: 14px;
  max-width: 460px;
}

.member-form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
}

.member-form input {
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--st-border, #e2e8f0);
  border-radius: 12px;
  font: inherit;
  color: var(--st-text, #1e293b);
  background: #fff;
}

.member-form input:focus {
  outline: 2px solid rgba(13, 148, 136, 0.28);
  border-color: #14b8a6;
}

.member-ok {
  margin: 8px 0 0;
  color: #059669;
  font-size: 13px;
}

.member-err {
  margin: 8px 0 0;
  color: #dc2626;
  font-size: 13px;
}

.member-hint {
  margin: 16px 0 0 !important;
  font-size: 13px !important;
  color: #64748b !important;
  line-height: 1.55 !important;
}

.member-rank-progress {
  margin: 18px 0 0 !important;
  padding: 14px 16px !important;
  border-radius: 14px !important;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.07), rgba(79, 70, 229, 0.05)) !important;
  border: 1px solid var(--st-border, #e2e8f0) !important;
}

.member-rank-progress-head {
  display: flex !important;
  justify-content: space-between !important;
  gap: 12px !important;
  align-items: baseline !important;
  margin-bottom: 10px !important;
  font-size: 13px !important;
}

.member-rank-progress-head span {
  color: #64748b !important;
}

.member-rank-bar {
  height: 10px !important;
  border-radius: 999px !important;
  background: #e2e8f0 !important;
  overflow: hidden !important;
}

.member-rank-bar i {
  display: block !important;
  height: 100% !important;
  border-radius: inherit !important;
}

.member-rank-next {
  margin: 10px 0 0 !important;
  font-size: 13px !important;
  color: #64748b !important;
}

.membership-track {
  list-style: none !important;
  margin: 16px 0 0 !important;
  padding: 0 !important;
  display: grid !important;
  gap: 8px !important;
}

.membership-track li {
  display: grid !important;
  grid-template-columns: 14px minmax(0, 1fr) auto !important;
  gap: 12px !important;
  align-items: center !important;
  padding: 12px 14px !important;
  border-radius: 12px !important;
  border: 1px solid var(--st-border, #e2e8f0) !important;
  background: #fff !important;
  opacity: 0.7;
}

.membership-track li.is-unlocked {
  opacity: 1;
}

.membership-track li.is-current {
  border-color: color-mix(in srgb, var(--membership-accent, #0d9488) 50%, #e2e8f0) !important;
  box-shadow: inset 3px 0 0 var(--membership-accent, #0d9488) !important;
  background: color-mix(in srgb, var(--membership-accent, #0d9488) 8%, #fff) !important;
}

.membership-track .rank-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--membership-accent, #94a3b8);
}

.membership-track strong {
  display: block;
  font-size: 14px;
}

.membership-track em {
  display: block;
  font-style: normal;
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

.membership-track .rank-state {
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
}

.membership-track li.is-current .rank-state {
  color: var(--membership-accent, #0d9488);
}

@media (max-width: 900px) {
  .member-layout {
    flex-direction: column !important;
  }

  .member-layout > .member-sidebar {
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: none !important;
  }

  .member-sidebar {
    position: static !important;
  }

  .member-side-nav {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .member-side-sep {
    display: none;
  }

  .member-hero {
    grid-template-columns: 1fr !important;
    text-align: center;
  }

  .member-stat-row,
  .member-info-cards {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 560px) {
  .member-side-nav {
    grid-template-columns: 1fr !important;
  }

  .member-panel {
    padding: 16px !important;
  }
}


/* Footer intro + chapter notice */
footer .footer-intro {
  margin: 8px 0 6px;
  max-width: 320px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--st-text-muted, #64748b);
}

.chapter-site-notice {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(13, 148, 136, 0.25);
  background: rgba(13, 148, 136, 0.08);
  font-size: 13px;
  line-height: 1.45;
  color: var(--st-text, #0f172a);
}

.rich-html {
  line-height: 1.6;
  word-break: break-word;
}
.rich-html p { margin: 0 0 0.75em; }
.rich-html p:last-child { margin-bottom: 0; }
.rich-html ul,
.rich-html ol { margin: 0 0 0.75em; padding-left: 1.25em; }
.rich-html a { color: var(--st-accent, #0d9488); text-decoration: underline; }
.rich-html img { max-width: 100%; height: auto; }
.novel-body .description.rich-html,
.summary .description.rich-html {
  white-space: normal;
}
.page-desc .rich-html { display: inline; }
.page-desc .rich-html p { display: inline; margin: 0; }

/* ========== Reader comic frameless + settings (vitruyen rules) ========== */
body.chapter-read-page .chapter-read-layout.is-comic {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 0 72px !important;
}

body.chapter-read-page .page-chapter-read.is-comic {
  max-width: none !important;
  width: 100% !important;
  margin: 0 auto 24px !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
}

body.chapter-read-page .page-chapter-read.is-comic .page-in.content-wrap {
  padding: 12px 0 20px !important;
  max-width: none !important;
}

body.chapter-read-page .page-chapter-read.is-comic .titles,
body.chapter-read-page .page-chapter-read.is-comic .chapternav,
body.chapter-read-page .page-chapter-read.is-comic .player-wrapper,
body.chapter-read-page .page-chapter-read.is-comic .lock-screen,
body.chapter-read-page .page-chapter-read.is-comic .container-notification,
body.chapter-read-page .page-chapter-read.is-comic .chapter-site-notice,
body.chapter-read-page .page-chapter-read.is-comic #comments,
body.chapter-read-page .chapter-read-layout.is-comic .novel-body.container {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
  box-sizing: border-box;
}

body.chapter-read-page .page-chapter-read.is-comic .titles {
  border-bottom-color: transparent;
  margin-bottom: 12px;
  padding-bottom: 8px;
}

body.chapter-read-page .page-chapter-read.is-comic .chapter-content.reader-images {
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  max-width: none !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 0 !important;
}

/* Ảnh comic: raw — chỉ kích thước tự nhiên (+ max-width để không tràn viewport) */
body.chapter-read-page .page-chapter-read.is-comic .reader-images > img {
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  object-fit: unset !important;
  filter: none !important;
  transform: none !important;
  max-height: none !important;
}

body.chapter-read-page .page-chapter-read.is-comic .reader-images > img.is-broken {
  display: none !important;
}

body.chapter-read-page .page-chapter-read.is-comic .reader-images .empty-state {
  font-size: 14px !important;
  line-height: 1.5 !important;
  padding: 28px 16px !important;
}

@media (max-width: 768px) {
  body.chapter-read-page .page-chapter-read.is-comic .page-in.content-wrap {
    padding: 8px 0 16px !important;
  }

  body.chapter-read-page .page-chapter-read.is-comic .titles,
  body.chapter-read-page .page-chapter-read.is-comic .chapternav,
  body.chapter-read-page .page-chapter-read.is-comic .player-wrapper,
  body.chapter-read-page .page-chapter-read.is-comic .lock-screen {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* Novel keeps framed panel */
body.chapter-read-page .page-chapter-read.is-novel .chapter-content {
  padding: 8px 12px 28px !important;
}

/* Settings extras */
body.chapter-read-page .control-action .reader-setting-select,
body.chapter-read-page .control-action .reader-setting-range {
  width: 100%;
  margin-top: 8px;
  box-sizing: border-box;
}

body.chapter-read-page .control-action .reader-setting-select {
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--st-border, #e2e8f0);
  padding: 0 12px;
  background: #fff;
  color: var(--st-text, #1e293b);
}

body.chapter-read-page .control-action .reader-setting-range {
  accent-color: var(--st-accent, #0d9488);
}

/* Bottom bar — larger blue + hover */
body.chapter-read-page .bottom-bar .bottom-bar-status {
  min-height: 60px !important;
}

body.chapter-read-page .bottom-bar .bar-control-left a,
body.chapter-read-page .bottom-bar .bar-control a,
body.chapter-read-page .bottom-bar .bar-control-right a {
  color: var(--st-accent, #0d9488) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  border-radius: 10px !important;
  padding: 8px 10px !important;
  transition: color 0.15s ease, background 0.15s ease, transform 0.15s ease !important;
}

body.chapter-read-page .bottom-bar .bottom-bar-status i {
  color: var(--st-accent, #0d9488) !important;
  font-size: 20px !important;
}

body.chapter-read-page .bottom-bar .bar-control .show-list-chap {
  background: rgba(13, 148, 136, 0.12) !important;
  color: var(--st-accent, #0d9488) !important;
  border: 1px solid rgba(13, 148, 136, 0.28) !important;
}

body.chapter-read-page .bottom-bar .bar-control-left a:hover,
body.chapter-read-page .bottom-bar .bar-control a:hover,
body.chapter-read-page .bottom-bar .bar-control-right a:hover {
  color: var(--st-accent-dark, #0f766e) !important;
  background: rgba(13, 148, 136, 0.14) !important;
  transform: translateY(-1px);
}

body.chapter-read-page .bottom-bar .bar-control .show-list-chap:hover {
  background: rgba(13, 148, 136, 0.22) !important;
  border-color: rgba(13, 148, 136, 0.45) !important;
}

body.chapter-read-page .bottom-bar .btn-bar-back,
body.chapter-read-page .bottom-bar .btn-bar-back b,
body.chapter-read-page .bottom-bar .btn-bar-back i {
  color: var(--st-accent, #0d9488) !important;
}

body.chapter-read-page .bottom-bar .btn-bar-back:hover,
body.chapter-read-page .bottom-bar .btn-bar-back:hover b,
body.chapter-read-page .bottom-bar .btn-bar-back:hover i {
  color: var(--st-accent-dark, #0f766e) !important;
}

html[color-mode="dark"] body.chapter-read-page .bottom-bar .bar-control-left a,
html[color-mode="dark"] body.chapter-read-page .bottom-bar .bar-control a,
html[color-mode="dark"] body.chapter-read-page .bottom-bar .bar-control-right a,
body.dark body.chapter-read-page .bottom-bar .bar-control-left a,
body.dark body.chapter-read-page .bottom-bar .bar-control a,
body.dark body.chapter-read-page .bottom-bar .bar-control-right a {
  color: var(--st-accent, #2dd4bf) !important;
}

html[color-mode="dark"] body.chapter-read-page .bottom-bar .bottom-bar-status i,
body.dark body.chapter-read-page .bottom-bar .bottom-bar-status i {
  color: var(--st-accent, #2dd4bf) !important;
}

html[color-mode="dark"] body.chapter-read-page .bottom-bar .bar-control .show-list-chap,
body.dark body.chapter-read-page .bottom-bar .bar-control .show-list-chap {
  background: rgba(45, 212, 191, 0.16) !important;
  color: #5eead4 !important;
  border-color: rgba(45, 212, 191, 0.35) !important;
}

html[color-mode="dark"] body.chapter-read-page .bottom-bar .bar-control-left a:hover,
html[color-mode="dark"] body.chapter-read-page .bottom-bar .bar-control a:hover,
html[color-mode="dark"] body.chapter-read-page .bottom-bar .bar-control-right a:hover,
body.dark body.chapter-read-page .bottom-bar .bar-control-left a:hover,
body.dark body.chapter-read-page .bottom-bar .bar-control a:hover,
body.dark body.chapter-read-page .bottom-bar .bar-control-right a:hover {
  color: #5eead4 !important;
  background: rgba(45, 212, 191, 0.18) !important;
}

/* Reader chapter list popup items */
body.chapter-read-page .bottom-bar .bottom-bar-list-chapter .list-chapter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

body.chapter-read-page .bottom-bar .bottom-bar-list-chapter .list-chapter-head h4 {
  margin: 0 !important;
}

body.chapter-read-page .bottom-bar .bottom-bar-list-chapter .list-chapter-head h4 span {
  font-weight: 500;
  color: var(--st-text-muted, #64748b);
}

body.chapter-read-page .bottom-bar .bottom-bar-list-chapter .list-chapter-close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: rgba(13, 148, 136, 0.1);
  color: var(--st-accent, #0d9488);
  cursor: pointer;
}

body.chapter-read-page .bottom-bar .bottom-bar-list-chapter .list-chapter {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

body.chapter-read-page .bottom-bar .bottom-bar-list-chapter .list-chapter li + li {
  margin: 0;
  border: 0;
}

body.chapter-read-page .bottom-bar .bottom-bar-list-chapter .reader-chapter-item a {
  display: flex !important;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px !important;
  border-radius: 12px !important;
  border: 1px solid var(--st-border, #e2e8f0) !important;
  background: var(--st-bg, #f8fafc) !important;
  color: var(--st-text, #1e293b) !important;
  text-decoration: none !important;
  transition: background 0.15s ease, border-color 0.15s ease;
}

body.chapter-read-page .bottom-bar .bottom-bar-list-chapter .reader-chapter-item a:hover {
  background: rgba(13, 148, 136, 0.08) !important;
  border-color: rgba(13, 148, 136, 0.35) !important;
}

body.chapter-read-page .bottom-bar .bottom-bar-list-chapter .reader-chapter-item.is-current a {
  background: rgba(13, 148, 136, 0.14) !important;
  border-color: rgba(13, 148, 136, 0.45) !important;
}

body.chapter-read-page .bottom-bar .bottom-bar-list-chapter .reader-chapter-item-main {
  min-width: 0;
  flex: 1;
}

body.chapter-read-page .bottom-bar .bottom-bar-list-chapter .reader-chapter-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

body.chapter-read-page .bottom-bar .bottom-bar-list-chapter .reader-chapter-item-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.chapter-read-page .bottom-bar .bottom-bar-list-chapter .reader-chapter-item-date {
  flex-shrink: 0;
  font-size: 10px;
  color: var(--st-text-muted, #64748b);
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
}

body.chapter-read-page .bottom-bar .bottom-bar-list-chapter .reader-chapter-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 6px;
  font-size: 11px;
  color: var(--st-text-muted, #64748b);
}

body.chapter-read-page .bottom-bar .bottom-bar-list-chapter .reader-chapter-item-meta .is-locked {
  color: #d97706;
}

body.chapter-read-page .bottom-bar .bottom-bar-list-chapter .reader-chapter-item-meta .is-unlocked {
  color: #059669;
}

body.chapter-read-page .bottom-bar .bottom-bar-list-chapter .reader-chapter-item-check {
  color: var(--st-accent, #0d9488);
  margin-top: 2px;
}

body.chapter-read-page .bottom-bar .bottom-bar-list-chapter .list-chapter-empty {
  padding: 16px;
  text-align: center;
  color: var(--st-text-muted, #64748b);
  font-size: 13px;
}

/* Detail page chapter list chips (vitruyen-like) */
.page-manga-detail #chapter-list-page .chapter-row-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.page-manga-detail #chapter-list-page .chapter-date {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--st-text-muted, #64748b);
  font-variant-numeric: tabular-nums;
}

.page-manga-detail #chapter-list-page .chapter-meta-chips {
  display: flex !important;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.page-manga-detail #chapter-list-page .chapter-meta-chips .chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--st-border, #e2e8f0);
  background: rgba(148, 163, 184, 0.1);
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  color: var(--st-text-muted, #64748b);
}

.page-manga-detail #chapter-list-page .chapter-meta-chips .chip-free {
  border-color: rgba(13, 148, 136, 0.3);
  background: rgba(13, 148, 136, 0.08);
  color: var(--st-accent, #0d9488);
}

.page-manga-detail #chapter-list-page .chapter-meta-chips .chip-price {
  border-color: rgba(217, 119, 6, 0.35);
  background: rgba(251, 191, 36, 0.12);
  color: #b45309;
}

.page-manga-detail #chapter-list-page .chapter-meta-chips .chip-locked {
  border-color: rgba(217, 119, 6, 0.4);
  background: rgba(251, 191, 36, 0.14);
  color: #d97706;
}

.page-manga-detail #chapter-list-page .chapter-meta-chips .chip-unlocked {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}

.page-manga-detail #chapter-list-page .chapter-meta-chips .chip-free-at {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.1);
  color: #047857;
}

.page-manga-detail #chapter-list-page .chapter-list li:hover {
  border-color: rgba(13, 148, 136, 0.4);
  background: rgba(13, 148, 136, 0.06);
}

/* ========== Reader style polish v2 ========== */
body.chapter-read-page {
  --reader-blue: var(--st-accent, #0d9488);
  --reader-blue-dark: var(--st-accent-dark, #0f766e);
  --reader-blue-soft: var(--st-accent-soft, rgba(13, 148, 136, 0.14));
  --cr-bottom-bar-height: calc(62px + env(safe-area-inset-bottom, 0px));
}

/* Comic title strip — nhẹ, không khung */
body.chapter-read-page .page-chapter-read.is-comic .titles {
  background: transparent !important;
  border: 0 !important;
  margin-bottom: 10px !important;
  padding-top: 8px !important;
  padding-bottom: 4px !important;
}

body.chapter-read-page .page-chapter-read.is-comic .titles h1 {
  font-size: 1.15rem !important;
}

body.chapter-read-page .page-chapter-read.is-comic .chapternav {
  margin-bottom: 12px !important;
}

body.chapter-read-page .page-chapter-read.is-comic .control-action-btn button,
body.chapter-read-page .page-chapter-read.is-comic .control-action-btn a {
  width: 40px !important;
  height: 40px !important;
  border-radius: 12px !important;
  background: #fff !important;
  border: 1px solid rgba(13, 148, 136, 0.2) !important;
  color: var(--reader-blue) !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

body.chapter-read-page .page-chapter-read.is-comic .control-action-btn button:hover,
body.chapter-read-page .page-chapter-read.is-comic .control-action-btn a:hover {
  background: var(--reader-blue-soft) !important;
  border-color: rgba(13, 148, 136, 0.4) !important;
}

/* Settings modal polish */
body.chapter-read-page .control-action .action-items {
  padding: 18px 18px 16px !important;
  border-radius: 18px !important;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28) !important;
}

body.chapter-read-page .control-action .action-head {
  margin-bottom: 14px !important;
  padding-bottom: 10px !important;
}

body.chapter-read-page .control-action .action-head strong {
  font-size: 17px !important;
  letter-spacing: -0.01em;
}

body.chapter-read-page .control-action .font-select {
  margin-bottom: 16px !important;
  padding: 12px 12px 10px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

body.chapter-read-page .control-action .setting-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  font-weight: 650;
  color: #475569;
}

body.chapter-read-page .control-action .setting-label em {
  font-style: normal;
  font-variant-numeric: tabular-nums;
  color: var(--reader-blue);
  font-weight: 750;
}

body.chapter-read-page .control-action .reader-setting-range {
  width: 100%;
  margin: 12px 0 4px;
  height: 28px;
  accent-color: var(--reader-blue);
  cursor: pointer;
}

body.chapter-read-page .control-action .setting-stepper {
  margin-top: 6px !important;
}

body.chapter-read-page .control-action .setting-stepper button {
  width: 44px !important;
  height: 40px !important;
  border-radius: 12px !important;
  border: 1px solid #dbe3f0 !important;
  background: #fff !important;
  color: var(--reader-blue) !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

body.chapter-read-page .control-action .setting-stepper button:hover {
  background: var(--reader-blue-soft) !important;
  border-color: rgba(13, 148, 136, 0.35) !important;
  transform: translateY(-1px);
}

body.chapter-read-page .control-action .setting-stepper span {
  font-size: 16px !important;
  font-weight: 750 !important;
  color: #0f172a !important;
  font-variant-numeric: tabular-nums;
}

body.chapter-read-page .control-action .setting-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}

body.chapter-read-page .control-action .setting-pills button {
  height: 38px;
  border-radius: 999px;
  border: 1px solid #dbe3f0;
  background: #fff;
  color: #475569;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

body.chapter-read-page .control-action .setting-pills button:hover {
  border-color: rgba(13, 148, 136, 0.35);
  color: var(--reader-blue);
  background: var(--reader-blue-soft);
  transform: translateY(-1px);
}

body.chapter-read-page .control-action .setting-pills button.is-active {
  border-color: transparent;
  background: var(--reader-blue);
  color: #fff;
  box-shadow: 0 6px 16px rgba(13, 148, 136, 0.28);
}

body.chapter-read-page .control-action .action-hint {
  margin: 2px 0 12px !important;
  font-size: 12px !important;
  color: #94a3b8 !important;
  text-align: center;
}

body.chapter-read-page .control-action .reader-setting-done {
  width: 100% !important;
  height: 44px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: var(--button-bg, var(--st-gradient, linear-gradient(135deg, #0d9488 0%, #6366f1 100%))) !important;
  background-image: var(--button-bg, var(--st-gradient, linear-gradient(135deg, #0d9488 0%, #6366f1 100%))) !important;
  color: #fff !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  box-shadow: var(--button-shadow, 0 8px 20px rgba(13, 148, 136, 0.28)) !important;
}

body.chapter-read-page .control-action .reader-setting-done:hover {
  filter: brightness(1.04);
}

html[color-mode="dark"] body.chapter-read-page .control-action .font-select,
body.dark body.chapter-read-page .control-action .font-select {
  background: rgba(15, 23, 42, 0.55);
  border-color: #334155;
}

html[color-mode="dark"] body.chapter-read-page .control-action .setting-label,
body.dark body.chapter-read-page .control-action .setting-label {
  color: #94a3b8;
}

html[color-mode="dark"] body.chapter-read-page .control-action .setting-stepper button,
html[color-mode="dark"] body.chapter-read-page .control-action .setting-pills button,
body.dark body.chapter-read-page .control-action .setting-stepper button,
body.dark body.chapter-read-page .control-action .setting-pills button {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #5eead4 !important;
}

html[color-mode="dark"] body.chapter-read-page .control-action .setting-pills button.is-active,
body.dark body.chapter-read-page .control-action .setting-pills button.is-active {
  background: var(--st-accent, #0d9488) !important;
  color: #fff !important;
  border-color: transparent !important;
}

/* Bottom bar — lớn hơn, xanh rõ, hover rõ */
body.chapter-read-page .bottom-bar .bottom-bar-status {
  min-height: 62px !important;
  padding: 8px 12px !important;
  backdrop-filter: blur(10px);
}

body.chapter-read-page .bottom-bar .bar-control-left a,
body.chapter-read-page .bottom-bar .bar-control a,
body.chapter-read-page .bottom-bar .bar-control-right a {
  gap: 6px !important;
  min-height: 42px !important;
  padding: 8px 12px !important;
  border-radius: 12px !important;
  color: var(--reader-blue) !important;
  font-size: 14.5px !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em;
}

body.chapter-read-page .bottom-bar .bar-control-left b,
body.chapter-read-page .bottom-bar .bar-control b,
body.chapter-read-page .bottom-bar .bar-control-right b {
  font-size: 14.5px !important;
  font-weight: 700 !important;
}

body.chapter-read-page .bottom-bar .bottom-bar-status i {
  font-size: 18px !important;
  color: var(--reader-blue) !important;
}

body.chapter-read-page .bottom-bar .bar-control .show-list-chap {
  width: 46px !important;
  height: 46px !important;
  margin: 0 8px !important;
  padding: 0 !important;
  border-radius: 14px !important;
  background: var(--reader-blue) !important;
  border: 0 !important;
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(13, 148, 136, 0.28);
}

body.chapter-read-page .bottom-bar .bar-control .show-list-chap i {
  color: #fff !important;
  font-size: 18px !important;
  padding: 0 !important;
}

body.chapter-read-page .bottom-bar .bar-control .show-list-chap:hover {
  background: var(--reader-blue-dark) !important;
  transform: translateY(-1px) scale(1.03);
}

body.chapter-read-page .bottom-bar .bar-control-left a:hover,
body.chapter-read-page .bottom-bar .bar-control a:hover,
body.chapter-read-page .bottom-bar .bar-control-right a:hover {
  color: var(--reader-blue-dark) !important;
  background: var(--reader-blue-soft) !important;
  transform: translateY(-1px);
}

html[color-mode="dark"] body.chapter-read-page .bottom-bar .bar-control .show-list-chap,
body.dark body.chapter-read-page .bottom-bar .bar-control .show-list-chap {
  background: #14b8a6 !important;
  color: #fff !important;
}

html[color-mode="dark"] body.chapter-read-page .bottom-bar .bar-control .show-list-chap i,
body.dark body.chapter-read-page .bottom-bar .bar-control .show-list-chap i {
  color: #fff !important;
}

@media (max-width: 640px) {
  body.chapter-read-page .bottom-bar .bar-control-left a,
  body.chapter-read-page .bottom-bar .bar-control a,
  body.chapter-read-page .bottom-bar .bar-control-right a {
    font-size: 12.5px !important;
    padding: 8px 8px !important;
  }

  body.chapter-read-page .bottom-bar .bar-control .show-list-chap {
    width: 42px !important;
    height: 42px !important;
    margin: 0 4px !important;
  }
}

/* ========== Skeleton variants: rank / people / category / suggest / captcha ========== */
.page-skeleton--rank,
.page-skeleton--people,
.page-skeleton--category {
  min-height: 60vh;
}

.sk-rank-filters {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid var(--st-border, #e2e8f0);
  border-radius: 14px;
  background: var(--st-surface, #fff);
}

.sk-rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sk-rank-item {
  display: grid;
  grid-template-columns: 36px 56px minmax(0, 1fr) 72px;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--st-border, #e2e8f0);
  border-radius: 12px;
  background: var(--st-surface, #fff);
  min-height: 76px;
}

.sk-rank-num {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #e2e8f0;
}

.sk-rank-cover {
  width: 56px;
  height: 74px;
  border-radius: 8px;
}

.sk-people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.sk-people-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 84px;
  padding: 12px 14px;
  border: 1px solid var(--st-border, #e2e8f0);
  border-radius: 14px;
  background: var(--st-surface, #fff);
}

.sk-avatar--md {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
}

.sk-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.sk-category-card {
  min-height: 110px;
  padding: 16px;
  border: 1px solid var(--st-border, #e2e8f0);
  border-radius: 14px;
  background: var(--st-surface, #fff);
}

.sk-search-suggest {
  display: block !important;
  min-height: 168px;
  padding: 8px !important;
  margin: 0 !important;
  list-style: none;
}

.sk-suggest-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  min-height: 52px;
}

.sk-suggest-cover {
  width: 36px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 6px;
  overflow: hidden;
}

.sk-suggest-cover-fill {
  width: 100%;
  height: 100%;
  border-radius: 6px;
}

.sk-suggest-meta {
  flex: 1;
  min-width: 0;
}

.sk-captcha {
  min-height: 78px;
  display: flex;
  align-items: center;
}

.sk-captcha-box {
  width: 304px;
  max-width: 100%;
  height: 78px;
  border-radius: 4px;
}

/* Cover loading shimmer (no wrapper — keep img selectors working) */
img.cover-img-loading {
  background: linear-gradient(90deg, #e2e8f0 0%, #f8fafc 45%, #e2e8f0 100%);
  background-size: 200% 100%;
  animation: sk-shimmer 1.15s ease-in-out infinite;
}

html[color-mode="dark"] img.cover-img-loading,
body.dark img.cover-img-loading {
  background: linear-gradient(90deg, #334155 0%, #475569 45%, #334155 100%);
  background-size: 200% 100%;
}

.cover-image-wrap {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.cover-image-wrap.is-loading::before {
  content: none;
}

.main-header .search-suggest-cover .cover-image-wrap,
.novel-cover .cover-image-wrap,
.rank-cover .cover-image-wrap,
.item-cover .cover-image-wrap,
.reading-scroll .novel-cover .cover-image-wrap {
  width: 100%;
  height: 100%;
}

@media (max-width: 640px) {
  .sk-rank-item {
    grid-template-columns: 28px 48px minmax(0, 1fr);
  }

  .sk-rank-item .sk-chip {
    display: none;
  }
}

/* Cover wrap + suggest sk + detail CTA placeholder */
.main-header .search-suggest.sk-search-suggest {
  display: block !important;
}

.main-header .search-suggest-cover .cover-image-wrap,
.novel-cover .cover-image-wrap,
.rank-cover .cover-image-wrap,
.item-cover .cover-image-wrap,
.reading-scroll .novel-cover .cover-image-wrap {
  width: 100%;
  height: 100%;
}

.page-manga-detail .links .btn-read-placeholder,
.page-manga-detail .links .sk-btn--wide {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  height: 42px;
  border-radius: 999px;
}

.page-skeleton--chapters .sk-chapters-panel {
  margin-top: 8px;
}

.nav-dropdown-sk {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 12px 12px;
  width: 100%;
  list-style: none;
}

.nav-dropdown-sk .sk-line {
  height: 14px;
  margin: 0;
  border-radius: 6px;
  background: linear-gradient(90deg, #e2e8f0 0%, #f8fafc 45%, #e2e8f0 100%);
  background-size: 200% 100%;
  animation: sk-shimmer 1.15s ease-in-out infinite;
}

html[color-mode="dark"] .sk-rank-item,
html[color-mode="dark"] .sk-people-card,
html[color-mode="dark"] .sk-category-card,
html[color-mode="dark"] .sk-rank-filters,
body.dark .sk-rank-item,
body.dark .sk-people-card,
body.dark .sk-category-card,
body.dark .sk-rank-filters {
  background: var(--st-surface, #1e293b);
  border-color: var(--st-border, #334155);
}

html[color-mode="dark"] .sk-rank-num,
html[color-mode="dark"] .nav-dropdown-sk .sk-line,
body.dark .sk-rank-num,
body.dark .nav-dropdown-sk .sk-line {
  background: linear-gradient(90deg, #334155 0%, #475569 45%, #334155 100%);
  background-size: 200% 100%;
}

/* ========== Home spacing tighten + release schedule ========== */
/* Chỉ #index — page khác giữ padding mặc định */
body.site-theme #index .container.vspace,
#index .container.vspace {
  padding-top: 16px !important;
  padding-bottom: 16px !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

body.site-theme #index .section-header,
#index .section-header {
  margin-bottom: 12px !important;
  padding-bottom: 10px !important;
}

body.site-theme #index .novel-list,
#index .novel-list {
  margin-bottom: 0.5rem !important;
}

body.site-theme #index .home-widgets,
#index .home-widgets {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  gap: 14px !important;
}

body.site-theme #index .top-home-hot.container.vspace,
#index .top-home-hot.container.vspace {
  padding-bottom: 16px !important;
}

body.site-theme #index .release-schedule-section,
#index .release-schedule-section {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

body.site-theme #index .home-reading-comments,
#index .home-reading-comments {
  margin-bottom: 0 !important;
}

.release-schedule-section {
  margin-top: 0 !important;
}

.release-schedule-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.release-schedule-tab {
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--st-border, #e2e8f0);
  background: var(--st-surface, #fff);
  color: var(--st-text-muted, #64748b);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.release-schedule-tab:hover {
  border-color: rgba(13, 148, 136, 0.4);
  color: var(--st-accent, #0d9488);
  background: rgba(13, 148, 136, 0.08);
  transform: translateY(-1px);
}

.release-schedule-tab.is-active {
  border-color: transparent;
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
  color: #fff;
  box-shadow: 0 6px 14px rgba(13, 148, 136, 0.25);
}

.release-schedule-footer,
.release-schedule-more {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

.release-schedule.is-compact .release-schedule-footer {
  margin-top: 8px;
}

.page-manga-detail .schedule-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.page-manga-detail .schedule-link:hover {
  color: var(--st-accent, #0d9488);
}

.page-skeleton--schedule:not(.sk-schedule-home):not(.sk-schedule-page) {
  min-height: 60vh;
}

.release-schedule-body {
  min-height: 220px;
}

.release-schedule-empty {
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

html[color-mode="dark"] .release-schedule-tab,
body.dark .release-schedule-tab {
  background: var(--st-surface, #1e293b);
  border-color: var(--st-border, #334155);
  color: #94a3b8;
}

html[color-mode="dark"] .release-schedule-tab.is-active,
body.dark .release-schedule-tab.is-active {
  background: linear-gradient(135deg, #2dd4bf 0%, #0d9488 100%);
  color: #042f2e;
}

/* Home schedule: lock to 1 row (cards + skeleton cùng grid) */
.release-schedule.is-home .novel-list.release-schedule-row,
.release-schedule.is-home .sk-schedule-home .sk-novel-list {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin: 0 !important;
}

.release-schedule.is-home .novel-list.release-schedule-row > .novel-item:nth-child(n + 7),
.release-schedule.is-home .sk-schedule-home .sk-novel-list > .sk-novel-item:nth-child(n + 7) {
  display: none !important;
}

.release-schedule.is-home .release-schedule-body {
  min-height: 260px;
}

@media (max-width: 1100px) {
  .release-schedule.is-home .novel-list.release-schedule-row,
  .release-schedule.is-home .sk-schedule-home .sk-novel-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .release-schedule.is-home .novel-list.release-schedule-row > .novel-item:nth-child(n + 5),
  .release-schedule.is-home .sk-schedule-home .sk-novel-list > .sk-novel-item:nth-child(n + 5) {
    display: none !important;
  }
}

/* Mobile: 2 card / hàng (đồng bộ toàn site) */
@media (max-width: 767px) {
  .release-schedule.is-home .novel-list.release-schedule-row,
  .release-schedule.is-home .sk-schedule-home .sk-novel-list {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px 10px !important;
  }

  .release-schedule.is-home .novel-list.release-schedule-row > .novel-item,
  .release-schedule.is-home .sk-schedule-home .sk-novel-list > .sk-novel-item {
    display: block !important;
    width: auto !important;
    margin: 0 !important;
  }

  .release-schedule.is-home .novel-list.release-schedule-row > .novel-item:nth-child(n + 5),
  .release-schedule.is-home .sk-schedule-home .sk-novel-list > .sk-novel-item:nth-child(n + 5) {
    display: none !important;
  }

  .release-schedule.is-home .release-schedule-body {
    min-height: 220px;
  }
}

/* ========== Brand sync: login button accent sitewide ========== */
body.site-theme .btn-primary,
body.site-theme .btn.btn-primary,
.filter-bar .btn-primary,
.member-page-actions .btn-primary {
  background: var(--button-bg, var(--st-gradient, linear-gradient(135deg, #0d9488 0%, #6366f1 100%))) !important;
  background-image: var(--button-bg, var(--st-gradient, linear-gradient(135deg, #0d9488 0%, #6366f1 100%))) !important;
  background-color: transparent !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: var(--button-shadow, 0 4px 14px rgba(13, 148, 136, 0.28)) !important;
}

/* Filter bar — cùng hàng, cùng cao với select */
.filter-bar {
  align-items: flex-end !important;
}

.filter-bar .filter-field {
  justify-content: flex-end;
}

.filter-bar input,
.filter-bar select {
  height: 40px !important;
  box-sizing: border-box;
}

.filter-bar .filter-actions {
  display: flex !important;
  align-items: center !important;
  align-self: flex-end !important;
  height: 40px !important;
  gap: 8px !important;
  margin: 0 !important;
}

.filter-bar .filter-actions .btn {
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 18px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  box-sizing: border-box !important;
}

/* Card grid: title cố định 2 dòng → stats thẳng hàng */
body.site-theme .novel-list:not(.horizontal):not(.reading-scroll) .novel-item {
  display: flex !important;
  flex-direction: column !important;
}

body.site-theme .novel-list:not(.horizontal):not(.reading-scroll) .novel-item > a {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
}

body.site-theme .novel-list:not(.horizontal):not(.reading-scroll) .novel-item .novel-title.text2row {
  min-height: calc(1.35em * 2) !important;
  margin-bottom: 6px !important;
}

body.site-theme .novel-list:not(.horizontal):not(.reading-scroll) .novel-item .novel-stats--card {
  margin-top: auto;
}

body.site-theme .novel-list .novel-item .novel-stats-row-top .rating-star {
  overflow: visible !important;
}

body.site-theme .novel-list .novel-item .star-box .star {
  fill: #94a3b8 !important;
}

body.site-theme .novel-list .novel-item .star-box .star.star-on {
  fill: #f59e0b !important;
}

/* Member nav active = accent (đồng bộ login) */
.member-side-nav a.is-active,
.member-side-nav button.is-active {
  background: rgba(13, 148, 136, 0.12) !important;
  color: var(--st-accent-dark, #0f766e) !important;
  box-shadow: inset 3px 0 0 var(--st-accent, #0d9488) !important;
}

.member-side-nav a.is-active i,
.member-side-nav button.is-active i {
  color: var(--st-accent, #0d9488) !important;
}

/* Rank row: sao + chapter thẳng hàng */
.rank-info-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.rank-info-meta .rating-star p {
  margin: 0 !important;
}

.rank-views {
  align-self: center;
  white-space: nowrap;
  color: var(--st-text-muted, #64748b);
  font-size: 13px;
  font-weight: 600;
}

/* Reader settings: A− / px / A+ cùng baseline */
body.chapter-read-page .control-action .font-controls {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  margin-top: 10px !important;
}

body.chapter-read-page .control-action .font-controls button {
  width: 44px !important;
  height: 40px !important;
  flex-shrink: 0 !important;
  border-radius: 12px !important;
  border: 1px solid var(--st-border, #e2e8f0) !important;
  background: #fff !important;
  color: var(--st-accent, #0d9488) !important;
  font-weight: 700 !important;
}

body.chapter-read-page .control-action .font-controls span {
  flex: 1 1 auto !important;
  text-align: center !important;
  font-variant-numeric: tabular-nums !important;
  line-height: 40px !important;
  height: 40px !important;
}

/* Bottom bar: căn giữa hàng nút */
body.chapter-read-page .bottom-bar .bottom-bar-status {
  align-items: center !important;
}

body.chapter-read-page .bottom-bar .bar-control-left,
body.chapter-read-page .bottom-bar .bar-control,
body.chapter-read-page .bottom-bar .bar-control-right {
  align-items: center !important;
}

body.chapter-read-page .bottom-bar .bar-control-left a,
body.chapter-read-page .bottom-bar .bar-control a,
body.chapter-read-page .bottom-bar .bar-control-right a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* ========== Library pages (history / bookmark) — no profile sidebar ========== */
.library-page {
  padding-top: 12px;
  padding-bottom: 28px;
}

.library-page-head {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 16px !important;
  flex-wrap: wrap !important;
  margin-bottom: 16px !important;
}

.library-page-head h1 {
  margin: 0 0 6px !important;
}

.library-page-head .page-desc {
  margin: 0 !important;
}

.library-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.library-page-body {
  min-height: 280px;
}

.library-page .star-box .star {
  color: #94a3b8 !important;
}

.library-page .star-box .star.star-on {
  color: #f59e0b !important;
}

/* Detail meta rows — đều padding */
.page-manga-detail .novel-header-v2 .author.author-meta-row,
.page-manga-detail .novel-header-v2 .author-meta-row {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: baseline !important;
  gap: 6px 10px !important;
  margin: 0 !important;
  padding: 10px 0 !important;
  line-height: 1.45 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.page-manga-detail .novel-header-v2 .author-meta-row:has(+ .rating),
.page-manga-detail .novel-header-v2 .author-meta-row:has(+ .detail-rating),
.page-manga-detail .novel-header-v2 .author-meta-row:last-child {
  margin-bottom: 4px !important;
  border-bottom: 0 !important;
}

.page-manga-detail .novel-header-v2 .author-label {
  flex: 0 0 auto;
  min-width: 7.5rem;
  opacity: 0.78;
  font-weight: 600;
  font-size: 0.92rem;
}

.page-manga-detail .novel-header-v2 .author-meta-row .property-item,
.page-manga-detail .novel-header-v2 .author-meta-row .alternative-title-text {
  font-weight: 650;
  color: #5eead4;
}

.page-manga-detail .novel-header-v2 .author-meta-row a.property-item:hover {
  text-decoration: underline;
}

/* Skeleton: detail + reader giữ chỗ, giảm giật */
.page-skeleton--detail {
  min-height: 100vh;
}

.page-skeleton--reader {
  min-height: calc(100vh - 80px);
}

.page-skeleton--reader .sk-reader-shell {
  min-height: 70vh;
}

.page-skeleton--reader .sk-reader-pages {
  min-height: 48vh;
}

body.site-theme .novel-list .novel-item .star-box .star {
  color: #94a3b8 !important;
  fill: currentColor !important;
}

body.site-theme .novel-list .novel-item .star-box .star.star-on {
  color: #f59e0b !important;
  fill: currentColor !important;
}

.page-skeleton--detail .sk-detail-meta-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0 16px;
}

.page-skeleton--detail .sk-detail-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 20px;
}

/* ========== Card stats: tránh đè sao / view, padding chuẩn ========== */
body.site-theme .novel-list .novel-item .novel-stats--card,
body.site-theme .novel-list:not(.horizontal):not(.reading-scroll) .novel-item .novel-stats--card {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  margin-top: 8px !important;
  min-width: 0 !important;
}

body.site-theme .novel-list .novel-item .novel-stats-row-top {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  min-width: 0 !important;
  min-height: 18px;
}

body.site-theme .novel-list .novel-item .novel-stats-row-top .rating-star {
  flex: 0 1 auto !important;
  min-width: 0 !important;
  max-width: calc(100% - 72px);
  overflow: hidden !important;
}

body.site-theme .novel-list .novel-item .novel-stats-row-top .rating-star p {
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
}

body.site-theme .novel-list .novel-item .novel-stats-row-top .star-wrap {
  display: inline-flex !important;
  flex-wrap: nowrap !important;
  gap: 2px !important;
}

body.site-theme .novel-list .novel-item .novel-stats-row-top .novel-view-stat {
  flex: 0 0 auto !important;
  margin-left: auto !important;
  padding-left: 4px;
  white-space: nowrap !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
  color: var(--st-text-muted, #64748b) !important;
}

body.site-theme .novel-list .novel-item .novel-stats-row-chapter {
  margin-top: 2px !important;
  line-height: 1.35 !important;
}

body.site-theme .novel-list:not(.horizontal):not(.reading-scroll) .novel-item .novel-title.text2row {
  min-height: calc(1.35em * 2) !important;
  margin: 0 0 8px !important;
  padding: 0 !important;
}

/* Library head: căn giữa hàng title + actions */
.library-page-head {
  align-items: center !important;
  margin-bottom: 20px !important;
  padding-bottom: 14px !important;
  border-bottom: 1px solid var(--st-border, #e2e8f0);
}

.library-page-head-copy {
  min-width: 0;
  flex: 1 1 220px;
}

.library-page-actions {
  flex: 0 0 auto;
  align-self: center;
}

.library-page-body {
  padding-top: 4px;
  min-height: 320px;
}

/* Detail meta: tách rõ từng dòng, không dính */
.page-manga-detail .novel-header-v2 .main-head {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.page-manga-detail .novel-header-v2 .novel-title {
  margin: 0 0 10px !important;
}

.page-manga-detail .novel-header-v2 .author-meta-row {
  padding: 10px 0 !important;
}

.page-manga-detail .novel-header-v2 .author-label {
  min-width: 8.25rem;
}

@media (max-width: 640px) {
  body.site-theme .novel-list .novel-item .novel-stats-row-top {
    flex-wrap: wrap;
    gap: 4px 8px !important;
  }

  body.site-theme .novel-list .novel-item .novel-stats-row-top .rating-star {
    max-width: 100%;
  }

  .page-manga-detail .novel-header-v2 .author-label {
    min-width: 6.5rem;
  }

  .library-page-head {
    align-items: flex-start !important;
  }
}

/* ========== Footer links grid + site scroll-top ========== */
body.site-theme footer .wrapper .col.links,
footer .wrapper .col.links {
  flex: 1 1 280px !important;
  min-width: min(100%, 260px) !important;
  max-width: 100%;
}

footer .links ul.footer-links-grid,
body.site-theme footer .links ul.footer-links-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 18px;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100%;
}

footer .links ul.footer-links-grid > li,
body.site-theme footer .links ul.footer-links-grid > li {
  margin: 0 !important;
  padding: 0 !important;
  min-width: 0;
}

footer .links ul.footer-links-grid > li:before,
body.site-theme footer .links ul.footer-links-grid > li:before {
  display: none !important;
  content: none !important;
}

footer .links ul.footer-links-grid a,
body.site-theme footer .links ul.footer-links-grid a {
  display: block;
  padding: 4px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  line-height: 1.4;
}

@media (max-width: 900px) {
  footer .links ul.footer-links-grid,
  body.site-theme footer .links ul.footer-links-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 14px;
  }
}

@media (max-width: 520px) {
  body.site-theme footer .wrapper,
  footer .wrapper {
    flex-direction: column;
    gap: 20px;
  }

  footer .links ul.footer-links-grid,
  body.site-theme footer .links ul.footer-links-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Global scroll-to-top (ẩn trên chapter-read-page) */
.site-scroll-top {
  position: fixed;
  right: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 90;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  background: var(--button-bg, var(--st-gradient, linear-gradient(135deg, #0d9488 0%, #6366f1 100%)));
  background-image: var(--button-bg, var(--st-gradient, linear-gradient(135deg, #0d9488 0%, #6366f1 100%)));
  box-shadow: var(--button-shadow, 0 8px 20px rgba(13, 148, 136, 0.28));
  transition: transform 0.15s ease, opacity 0.15s ease, filter 0.15s ease;
}

.site-scroll-top i {
  font-size: 18px;
  line-height: 1;
}

.site-scroll-top:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

body.chapter-read-page .site-scroll-top {
  display: none !important;
}

@media (max-width: 640px) {
  .site-scroll-top {
    right: 12px;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    width: 42px;
    height: 42px;
  }
}

/* ========== Comic pages: ảnh raw (không all:unset) ========== */
body.chapter-read-page .page-chapter-read.is-comic #showContent.reader-images,
body.chapter-read-page .page-chapter-read.is-comic .chapter-content.reader-images {
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 0 !important;
}

body.chapter-read-page .page-chapter-read.is-comic #showContent.reader-images > img,
body.chapter-read-page .page-chapter-read.is-comic .chapter-content.reader-images > img {
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: none !important;
  object-fit: unset !important;
}

body.chapter-read-page .page-chapter-read.is-comic .reader-images > img.is-broken {
  display: none !important;
}

/* ========== Library bookmark: novel-list chuẩn, hủy layout 2-cột cũ ========== */
.library-page.page-bookmark {
  max-width: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  padding-top: 12px !important;
  padding-bottom: 28px !important;
}

.library-page .novel-item.has-remove {
  position: relative !important;
}

.library-page .novel-item.has-remove .close-bookmark {
  position: absolute !important;
  top: 6px !important;
  right: 6px !important;
  z-index: 3 !important;
  width: 28px !important;
  height: 28px !important;
  min-height: 28px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: rgba(15, 23, 42, 0.72) !important;
  color: #fff !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  padding: 0 !important;
  font-size: 12px !important;
  line-height: 1 !important;
}

.library-page .novel-item.has-remove .close-bookmark:hover {
  background: #dc2626 !important;
}

/* Library shell: đồng bộ 2-col mobile, không lệch với bookmark-ui cũ */
.library-page .novel-list.col5,
.library-page .novel-list {
  display: flex !important;
  flex-wrap: wrap !important;
  grid-template-columns: unset !important;
  gap: unset !important;
  margin-left: -12px !important;
}

@media (max-width: 767px) {
  body.site-theme .library-page .novel-list.col5,
  body.site-theme .library-page .novel-list,
  .library-page .novel-list.col5,
  .library-page .novel-list {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px 10px !important;
    margin-left: 0 !important;
    width: 100% !important;
  }

  body.site-theme .library-page .novel-list.col5 .novel-item,
  body.site-theme .library-page .novel-list .novel-item,
  .library-page .novel-list.col5 .novel-item,
  .library-page .novel-list .novel-item {
    width: 100% !important;
    margin: 0 !important;
    margin-left: 0 !important;
    margin-bottom: 0 !important;
  }
}

/* ========== Mobile polish: type scale + layout ========== */
@media (max-width: 767px) {
  html,
  body.site-theme {
    overflow-x: hidden !important;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  body.site-theme {
    font-size: 14px !important;
    line-height: 1.5 !important;
  }

  body.site-theme .container,
  .container,
  body.site-theme #index,
  #index,
  body.site-theme main,
  main,
  body.site-theme .site-main,
  .site-main {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  body.site-theme img,
  body.site-theme .novel-cover,
  body.site-theme .novel-item {
    max-width: 100%;
  }

  /* —— Type scale —— */
  body.site-theme .section-header h1,
  body.site-theme .section-header h2,
  body.site-theme #index .section-header h1,
  #index .section-header h1 {
    font-size: 16px !important;
    line-height: 1.3 !important;
    font-weight: 700 !important;
  }

  body.site-theme .home-widgets .section-header h1,
  body.site-theme .home-translators-strip .section-header h1,
  body.site-theme .home-panel .section-header h1 {
    font-size: 15px !important;
    line-height: 1.3 !important;
  }

  body.site-theme .page-desc,
  .page-desc,
  .library-page-head .page-desc {
    font-size: 13px !important;
    line-height: 1.45 !important;
  }

  .library-page-head h1,
  .member-panel-head h1,
  .page-category#explore #Result h1,
  #search-section .header-novel h1,
  #explore #Result h1 {
    font-size: 20px !important;
    line-height: 1.25 !important;
  }

  body.site-theme .novel-list .novel-title,
  body.site-theme .novel-list .novel-item .novel-title,
  body.site-theme .novel-list:not(.horizontal) .novel-title,
  .novel-list:not(.horizontal) .novel-title,
  .page-category#explore .novel-list.category-cards .novel-title,
  #explore .novel-list.category-cards .novel-title,
  #search-section .novel-list .novel-title,
  .page-manga-detail section.related .novel-list .novel-item .novel-title,
  .page-manga-detail section.related .novel-list .novel-item h5.novel-title {
    font-size: 13px !important;
    line-height: 1.35 !important;
    font-weight: 700 !important;
  }

  body.site-theme .novel-stats,
  body.site-theme .novel-list .novel-item .novel-stats,
  body.site-theme .novel-list .novel-item .novel-stats--card,
  body.site-theme .novel-list .novel-item .novel-stats-row-top .novel-view-stat,
  .page-manga-detail section.related .novel-stats {
    font-size: 11px !important;
    line-height: 1.4 !important;
  }

  body.site-theme .home-reading .reading-scroll .novel-title,
  .home-reading .reading-scroll .novel-title {
    font-size: 12px !important;
    line-height: 1.35 !important;
  }

  body.site-theme .home-reading .reading-scroll .novel-stats-row-chapter,
  .home-reading .reading-scroll .novel-stats-row-chapter,
  .home-reading .reading-scroll .novel-stats-row-chapter a {
    font-size: 11px !important;
  }

  body.site-theme .index-rank .rank-container h3 span {
    font-size: 13px !important;
    padding: 6px 12px !important;
  }

  body.site-theme .index-rank .rank-container ul .novel-item .novel-title,
  body.site-theme .index-rank .rank-container ul .novel-item .novel-title a {
    font-size: 13px !important;
    line-height: 1.35 !important;
  }

  body.site-theme .index-rank .rank-container ul .novel-item .item-body span,
  body.site-theme .index-rank .rank-container ul .novel-item .novel-stats {
    font-size: 11px !important;
  }

  .page-manga-detail .novel-header-v2 .novel-title {
    font-size: 1.25rem !important;
    line-height: 1.3 !important;
  }

  .page-manga-detail .novel-header-v2 .alternative-title,
  .page-manga-detail .novel-header-v2 .author,
  .page-manga-detail .author-meta-row {
    font-size: 13px !important;
    line-height: 1.45 !important;
  }

  .page-manga-detail .novel-body .summary h4.lined,
  .page-manga-detail .novel-body h4.lined {
    font-size: 15px !important;
  }

  .page-manga-detail .novel-body .summary .description {
    font-size: 14px !important;
    line-height: 1.65 !important;
    padding: 12px 14px !important;
  }

  .page-manga-detail .novel-body {
    padding: 18px 14px 28px !important;
  }

  footer .footer-intro,
  body.site-theme footer .footer-intro {
    font-size: 13px !important;
    line-height: 1.5 !important;
  }

  footer .links ul.footer-links-grid a,
  body.site-theme footer .links ul.footer-links-grid a {
    font-size: 13px !important;
  }

  .release-schedule-tab {
    flex: 0 0 auto !important;
    height: 34px !important;
    padding: 0 12px !important;
    font-size: 12px !important;
    white-space: nowrap;
  }

  .filter-bar .filter-label {
    font-size: 12px !important;
  }

  .filter-bar input,
  .filter-bar select,
  .filter-bar .btn {
    font-size: 14px !important;
  }

  /* Schedule tabs: scroll ngang */
  .release-schedule-tabs {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    gap: 8px !important;
    margin: 0 0 12px !important;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .release-schedule-tabs::-webkit-scrollbar {
    display: none;
  }

  /* Filter / search bar full width */
  .filter-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 12px !important;
  }

  .filter-bar .filter-field,
  .filter-bar .filter-field.grow,
  .filter-bar .filter-actions {
    width: 100% !important;
    min-width: 0 !important;
    flex: none !important;
  }

  .filter-bar .filter-actions {
    display: flex !important;
    gap: 8px !important;
  }

  .filter-bar .filter-actions .btn {
    flex: 1 1 0 !important;
    min-height: 40px !important;
  }

  body.site-theme .novel-list:not(.horizontal) .novel-title,
  .novel-list:not(.horizontal) .novel-title {
    max-width: 100% !important;
    overflow: hidden !important;
    word-break: break-word !important;
  }

  body.site-theme .novel-list:not(.horizontal) .novel-stats--card,
  .novel-list:not(.horizontal) .novel-stats--card {
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .library-page-head {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }

  body.site-theme #index .section-header,
  #index .section-header {
    gap: 8px !important;
    margin-bottom: 10px !important;
  }

  .top-slide-dots-compact {
    margin-top: 10px !important;
    gap: 6px !important;
  }

  body.site-theme .page-manga-detail section.related .novel-list.related-list,
  .page-manga-detail section.related .novel-list.related-list,
  .page-manga-detail section.related .novel-list {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px 10px !important;
  }

  body.site-theme .index-rank .rank-container ul.novel-list.horizontal {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px 10px !important;
  }

  /* Header mobile: tránh chữ/nav đè */
  body.site-theme .main-header .nav-logo img,
  .main-header .nav-logo img {
    max-height: 36px !important;
  }

  .empty-state,
  .empty-state.compact {
    font-size: 14px !important;
    padding: 20px 12px !important;
  }
}
