/*
Theme Name: WebcomicYo
Theme URI: https://example.com/webcomicyo
Author: Codex
Author URI: https://example.com
Description: A webcomic-focused WordPress theme inspired by Honeytoon-like layouts.
Version: 1.2.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
Text Domain: honeypress
*/

:root {
  --hp-bg: #f2f2f2;
  --hp-surface: #ffffff;
  --hp-black: #050505;
  --hp-charcoal: #101010;
  --hp-red: #c41111;
  --hp-red-deep: #710909;
  --hp-red-glow: #ff3d3d;
  --hp-yellow: #c41111;
  --hp-text: #161616;
  --hp-muted: #707070;
  --hp-line: #d8d8d8;
  --hp-radius: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  background: var(--hp-bg);
  color: var(--hp-text);
  line-height: 1.45;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.hp-wrap {
  width: min(1120px, 94vw);
  margin: 0 auto;
}

.hp-main {
  min-height: calc(100vh - 88px);
}

.panel {
  background: var(--hp-surface);
  border: 1px solid var(--hp-line);
  border-radius: 14px;
  padding: 1rem;
}

.hp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 2px solid #111;
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.78rem 1.22rem;
}

.hp-btn-yellow {
  background: var(--hp-yellow);
  border-color: #3a0606;
  color: #fff;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #000;
  border-bottom: 1px solid #1f1f1f;
}

.header-inner {
  min-height: 76px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.3rem;
  align-items: center;
}

.hp-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 900;
}

.hp-brand-with-logo {
  gap: 0;
}

.hp-brand-logo {
  display: block;
  width: auto;
  height: 44px;
  max-width: 240px;
  object-fit: contain;
}

.hp-brand-mark {
  width: 18px;
  height: 18px;
  border: 2px solid #111;
  border-radius: 3px;
  background: linear-gradient(140deg, #f14e4e, #8f0606);
}

.hp-brand-text {
  color: #fff;
  font-size: 1.55rem;
  letter-spacing: 0.01em;
}

.hp-footer-brand .hp-brand-logo {
  height: 52px;
  max-width: 260px;
}

.hp-nav {
  display: flex;
  gap: 0.95rem;
  align-items: center;
}

.hp-nav a {
  color: #f5f5f5;
  font-weight: 700;
  padding: 0.45rem 0.72rem;
  border-radius: 10px;
  border: 1px solid transparent;
}

.hp-nav a:hover,
.hp-nav a.is-active {
  border-color: #2a2a2a;
  background: #151515;
}

.hp-header-tools {
  display: flex;
  gap: 0.55rem;
  align-items: center;
}

.hp-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  border-radius: 999px;
  border: 1px solid #2c2c2c;
  background: linear-gradient(180deg, #ffffff, #f2f2f2);
  padding: 0.16rem;
}

.hp-search-icon {
  color: #656565;
  font-size: 0.95rem;
  margin-left: 0.55rem;
}

.hp-search input {
  width: clamp(78px, 8vw, 118px);
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: #1e1e1e;
  font-size: 0.82rem;
  padding: 0.34rem 0.1rem;
  outline: none;
}

.hp-search-btn {
  border: 0;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 0.34rem 0.52rem;
  cursor: pointer;
}

.hp-search:focus-within {
  border-color: #c31111;
  box-shadow: 0 0 0 2px rgba(195, 17, 17, 0.2);
}

.hp-account {
  border: 1px solid #fff;
  border-radius: 999px;
  background: #fff;
  color: #111;
  font-weight: 700;
  padding: 0.38rem 0.68rem;
}

.hp-auth-link {
  border: 1px solid #3a3a3a;
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  padding: 0.44rem 0.8rem;
}

.hp-home-hero-wrap {
  background: radial-gradient(circle at 18% 25%, rgba(196, 17, 17, 0.55), transparent 50%), #0b0b0b;
  padding: 0 0 1.2rem;
}

.hp-hero-shell {
  width: 100%;
  position: relative;
}

.hp-home-hero-stage {
  position: relative;
  min-height: 500px;
  overflow: hidden;
}

.hp-home-hero {
  min-height: 500px;
  border-radius: 0;
  border: 0;
  overflow: hidden;
  background: #191919 center/cover no-repeat;
  position: relative;
}

.hp-home-hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.02);
  transition: opacity 520ms ease, transform 720ms ease;
  pointer-events: none;
}

.hp-home-hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  pointer-events: auto;
}

.hp-home-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 64px;
  background: linear-gradient(180deg, rgba(6, 6, 6, 0), rgba(6, 6, 6, 0.36));
  pointer-events: none;
}

.hp-home-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.56), rgba(0, 0, 0, 0.14) 55%, rgba(0, 0, 0, 0.08));
}

.hp-home-content {
  position: relative;
  z-index: 2;
  color: #fff;
  width: min(540px, 90%);
  padding: 4.2rem 2rem;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}

.hp-tags {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.hp-tags span {
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  padding: 0.18rem 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.hp-home-content h1 {
  margin: 0 0 0.7rem;
  font-size: clamp(2rem, 5vw, 3.9rem);
  line-height: 0.97;
  text-transform: uppercase;
}

.hp-home-content p {
  margin: 0 0 1.25rem;
  max-width: 52ch;
  font-size: 1rem;
}

.hp-home-hero-slide {
  background-position: center center;
}

/* 18+ gate */
body.hp-age-gate-open,
body.hp-age-denied-open {
  overflow: hidden;
}

.hp-age-gate,
.hp-age-denied {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 20px;
}

.hp-age-gate[hidden],
.hp-age-denied[hidden] {
  display: none !important;
}

.hp-age-gate {
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(12px) saturate(0.7);
  -webkit-backdrop-filter: blur(12px) saturate(0.7);
}

.hp-age-gate-dialog {
  width: min(520px, 92vw);
  background: #101010;
  border: 1px solid #2d2d2d;
  border-radius: 18px;
  padding: 22px;
  color: #fff;
  text-align: center;
}

.hp-age-gate-dialog h2 {
  margin: 0 0 10px;
  font-size: clamp(28px, 3vw, 40px);
}

.hp-age-gate-dialog p {
  margin: 0;
  color: #d7d7d7;
}

.hp-age-gate-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.hp-age-denied {
  background: rgba(0, 0, 0, 0.94);
  backdrop-filter: blur(12px) saturate(0.7);
  -webkit-backdrop-filter: blur(12px) saturate(0.7);
}

.hp-age-denied-inner {
  width: min(560px, 92vw);
  background: #141414;
  border: 1px solid #2a2a2a;
  border-radius: 18px;
  padding: 24px;
  text-align: center;
  color: #fff;
}

.hp-age-denied-inner h2 {
  margin: 0 0 10px;
  font-size: clamp(28px, 3vw, 40px);
}

.hp-age-denied-inner p {
  margin: 0;
  color: #d0d0d0;
}

.hp-age-denied-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 18px;
  flex-wrap: wrap;
}

.hp-hero-arrow {
  width: 44px;
  height: 84px;
  border-radius: 10px;
  border: 1px solid #393939;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  color: #111;
  font-size: 1.8rem;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  transition: transform 200ms ease, background 200ms ease, box-shadow 200ms ease;
}

.hp-hero-arrow:hover,
.hp-hero-arrow:focus-visible {
  transform: translateY(-50%) scale(1.03);
  background: #fff;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
}

.hp-hero-arrow-prev {
  left: 1rem;
}

.hp-hero-arrow-next {
  right: 1rem;
}

.hp-hero-dots {
  display: flex;
  justify-content: center;
  gap: 0.42rem;
  margin-top: 0.75rem;
}

.hp-hero-dots button {
  width: 12px;
  height: 11px;
  border-radius: 999px;
  border: 1px solid #252525;
  background: #fff;
  cursor: pointer;
  padding: 0;
  transition: width 220ms ease, background 220ms ease, border-color 220ms ease;
}

.hp-hero-dots button.is-active {
  background: var(--hp-red);
  border-color: #9d0d0d;
  width: 24px;
}

.hp-hero-progress {
  width: min(1120px, 94vw);
  height: 3px;
  margin: 0.42rem auto 0;
  background: rgba(0, 0, 0, 0.16);
  border-radius: 999px;
  overflow: hidden;
}

.hp-hero-progress span {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: left center;
  transform: scaleX(0);
  background: linear-gradient(90deg, #960707, #ff1c1c);
}

.hp-hero-slider.is-single .hp-hero-arrow,
.hp-hero-slider.is-single .hp-hero-dots,
.hp-hero-slider.is-single .hp-hero-progress {
  display: none;
}

.hp-home-section {
  padding: 1.6rem 0;
}

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

.hp-home-section-panel {
  background: var(--hp-bg);
  padding-top: 0;
}

.hp-home-rising .hp-poster-grid,
.hp-home-new .hp-poster-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.hp-home-favorites .hp-poster-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.82rem;
}

.hp-section-title {
  margin: 0 0 0.85rem;
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1;
  text-transform: uppercase;
}

.hp-highlight-panel {
  background:
    radial-gradient(circle at center, rgba(198, 26, 26, 0.16), rgba(198, 26, 26, 0) 60%),
    repeating-linear-gradient(120deg, rgba(198, 26, 26, 0.06), rgba(198, 26, 26, 0.06) 2px, transparent 2px, transparent 22px),
    #f7f2f2;
  border-radius: 22px;
  border: 2px solid #dfd8d8;
  padding: 1.25rem;
}

.hp-highlight-panel .hp-section-title {
  color: #121212;
}

.hp-poster-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.72rem;
}

.hp-grid-catalog {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.hp-poster-grid-compact .hp-poster-thumb img {
  min-height: 170px;
}

.hp-poster-card {
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid #262626;
  background: #0d0d0d;
  color: #fff;
  position: relative;
}

.hp-poster-thumb img {
  width: 100%;
  height: 100%;
  min-height: 190px;
  aspect-ratio: 3/4;
  object-fit: cover;
}

.hp-card-status {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: #6f94af;
  color: #fff;
  font-size: 0.66rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.02em;
  padding: 0.3rem 0.38rem;
  text-transform: uppercase;
}

.hp-poster-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.92) 42%);
  padding: 2.1rem 0.48rem 0.48rem;
}

.hp-poster-meta h3 {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.15;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hp-poster-meta p {
  margin: 0.2rem 0 0;
  font-size: 0.72rem;
  color: #e0e0e0;
}

.hp-poster-rating {
  display: inline-flex;
  align-items: center;
  font-size: 0.73rem;
  padding: 0.14rem 0.34rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(0, 0, 0, 0.58);
}

.hp-poster-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.32rem;
}

.hp-poster-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.13rem 0.42rem;
  font-size: 0.67rem;
  font-weight: 800;
  line-height: 1;
}

.hp-genre-tag {
  color: #ff7ece;
}

.hp-language-tag {
  color: #9ef2c8;
}

.hp-poster-count {
  position: absolute;
  right: 0.45rem;
  bottom: 0.42rem;
  min-width: 1.6rem;
  text-align: center;
  border-radius: 4px;
  background: #e4c71b;
  color: #111;
  font-size: 0.8rem;
  font-weight: 900;
  line-height: 1;
  padding: 0.24rem 0.26rem;
}

.hp-catalog-page {
  padding: 1.4rem 0 2rem;
}

.hp-catalog-head h1 {
  margin: 0 0 0.9rem;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
}

.hp-genre-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
}

.hp-genre-pills a {
  border: 1px solid #222;
  background: #fff;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 0.36rem 0.72rem;
}

.hp-genre-pills a.is-active {
  background: var(--hp-red);
  color: #fff;
}

.hp-catalog-sort {
  display: flex;
  gap: 0.7rem;
  border-bottom: 1px solid #d2d2d2;
  margin-bottom: 0.8rem;
}

.hp-catalog-sort a {
  font-weight: 700;
  color: #707070;
  padding: 0.15rem 0 0.6rem;
}

.hp-catalog-sort a.is-active {
  color: #111;
}

.hp-catalog-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.9rem;
}

.hp-catalog-filterbar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 0.95rem;
}

.hp-catalog-filter {
  min-width: 180px;
  border: 1px solid #c9c9c9;
  border-radius: 999px;
  background: #fff;
  color: #111;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.54rem 0.82rem;
}

.hp-catalog-search input[type="search"] {
  flex: 1;
  min-width: 180px;
  border: 1px solid #cfcfcf;
  border-radius: 999px;
  background: #fff;
  padding: 0.62rem 0.92rem;
  font: inherit;
}

.hp-catalog-clear {
  font-weight: 700;
  color: #666;
}

.hp-series-page {
  padding: 1.2rem 0 2rem;
}

.hp-series-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.1rem;
}

.hp-series-left h1 {
  margin: 0.2rem 0 0.55rem;
  font-size: clamp(2rem, 4vw, 3.7rem);
  line-height: 1;
  text-transform: uppercase;
}

.hp-series-meta-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 0.5rem;
}

.hp-series-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 10px;
  background: #f1f194;
  color: #141414;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1;
  padding: 0.42rem 0.55rem;
}

.hp-series-pill:nth-child(2) {
  background: #6db4e0;
}

.hp-series-pill-status {
  background: #7f9fb8;
  color: #fff;
}

.hp-series-rating-text {
  font-size: clamp(1.15rem, 2vw, 2rem);
  font-weight: 900;
  line-height: 1;
  color: #111;
}

.hp-series-rating-text span {
  color: #f4cc12;
}

.hp-series-author {
  margin: 0 0 0.8rem;
  color: #4f4f4f;
}

.hp-series-desc {
  margin-bottom: 1rem;
  color: #4d4d4d;
  max-width: 60ch;
}

.hp-series-meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: -0.2rem 0 0.95rem;
}

.hp-series-meta-tags span {
  color: #666;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hp-series-cover img {
  border-radius: 24px;
  border: 3px solid #181818;
  width: clamp(220px, 30vw, 420px);
  aspect-ratio: 3/4;
  object-fit: cover;
}

.hp-series-grid-layout {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.1rem;
}

.hp-episodes-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
  border-bottom: 1px solid #cfcfcf;
  padding: 0.6rem 0;
}

.hp-episodes-head span {
  color: #666;
  font-weight: 700;
}

.hp-episode-list-modern {
  display: grid;
}

.hp-episode-item {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 1.2rem;
  align-items: center;
  border-bottom: 1px solid #d8d8d8;
  padding: 1.2rem 0;
}

.hp-episode-item.is-locked {
  opacity: 0.95;
}

.hp-episode-thumb {
  width: 250px;
  height: 150px;
  border-radius: 14px;
  overflow: hidden;
  border: 3px solid #191919;
  background: #ddd;
}

.hp-episode-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hp-episode-text {
  min-width: 0;
}

.hp-episode-kicker {
  margin: 0 0 0.24rem !important;
  color: #666;
  font-size: clamp(0.95rem, 1.15vw, 1.1rem) !important;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.hp-episode-item h3 {
  margin: 0 0 0.2rem;
  font-size: clamp(1.65rem, 2.1vw, 2.3rem);
  line-height: 1.04;
  font-weight: 900;
}

.hp-episode-date {
  margin: 0 !important;
  color: #9b9b9b !important;
  font-size: clamp(0.92rem, 1vw, 1.06rem);
  font-weight: 700;
}

.hp-reading-flag {
  display: none !important;
}

.hp-reading-flag.hp-free-flag {
  color: #50b31f;
}

.hp-reading-flag.hp-lock-flag {
  color: #9f0f0f;
}

.hp-reading-flag {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #666;
}

.hp-lock-flag {
  color: #b20f0f;
}

.hp-series-inline-paywall {
  margin: 0.7rem 0;
  border-radius: 10px;
  border: 2px solid #3d0909;
  background: linear-gradient(180deg, #c41414, #8f0c0c);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  padding: 0.55rem 0.65rem;
}

.hp-series-inline-paywall p {
  margin: 0;
  font-weight: 800;
  font-size: 0.88rem;
}

.hp-you-like h3 {
  margin: 0 0 0.65rem;
  font-size: 2rem;
  line-height: 1;
  text-transform: uppercase;
}

.hp-like-grid {
  display: grid;
  gap: 0.66rem;
}

.hp-poster-card-mini .hp-poster-thumb img {
  min-height: 150px;
}

.hp-poster-card-mini .hp-poster-meta {
  padding-top: 0.9rem;
}

.hp-membership-banner {
  margin-top: 1.1rem;
  border-radius: 24px;
  border: 2px solid #2c2c2c;
  background: radial-gradient(circle at 20% 10%, rgba(221, 26, 26, 0.45), transparent 45%), linear-gradient(110deg, #590808, #120606 55%, #8f0f0f);
  color: #fff;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: end;
  padding: 1.4rem;
  overflow: hidden;
}

.hp-membership-banner h3 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.6rem, 4vw, 3rem);
  line-height: 1;
  text-transform: uppercase;
}

.hp-membership-banner p {
  margin: 0 0 0.8rem;
}

.hp-membership-figures {
  display: flex;
  align-items: flex-end;
  gap: 0.55rem;
}

.hp-membership-figures span {
  display: block;
  border-radius: 80% 80% 0 0;
  background: linear-gradient(180deg, #ffd3d3, #aa1b1b);
  opacity: 0.92;
}

.hp-membership-figures span:nth-child(1) {
  width: 80px;
  height: 120px;
}

.hp-membership-figures span:nth-child(2) {
  width: 110px;
  height: 150px;
}

.hp-membership-figures span:nth-child(3) {
  width: 76px;
  height: 112px;
}

.hp-reader-page {
  padding: 1rem 0 2rem;
  background: #fff;
}

.reader-header,
.reader-images,
.reader-nav,
.hp-infinite-state,
#hp-infinite-sentinel {
  width: min(680px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.reader-header {
  border: 1px solid #dddddd;
  background: #ffffff;
  color: #181818;
  border-radius: 14px;
  padding: 0.95rem 1rem;
}

.reader-header h2,
.reader-header h1 {
  margin: 0.24rem 0 0;
  font-size: clamp(1.28rem, 2.7vw, 2rem);
  line-height: 1.05;
}

.series-meta {
  color: #666;
  font-size: 0.86rem;
}

.reader-images {
  margin-top: 0.8rem;
  border: 1px solid #e1e1e1;
  background: #fff;
  display: grid;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.reader-images img {
  margin: 0;
  border-radius: 0;
}

.reader-nav {
  margin-top: 0.75rem;
  display: flex;
  justify-content: space-between;
  gap: 0.55rem;
}

.reader-nav-top {
  margin-bottom: 0.7rem;
}

.reader-nav-bottom {
  margin-top: 1rem;
}

.reader-nav a,
.reader-nav span {
  min-width: 120px;
  text-align: center;
  border-radius: 999px;
  border: 1px solid #d2d2d2;
  padding: 0.6rem 0.95rem;
  font-weight: 700;
  background: #fff;
  color: #161616;
}

.reader-nav span {
  opacity: 0.42;
}

.hp-paywall {
  width: min(760px, 100%);
  margin-left: auto;
  margin-right: auto;
  margin-top: 0.55rem;
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(75, 12, 12, 0.7), rgba(16, 10, 10, 0.95));
  border: 1px solid #4a1b1b;
  color: #fff;
  text-align: center;
  padding: 1rem 1rem 1.1rem;
}

.hp-paywall h3 {
  margin: 0 0 0.32rem;
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  line-height: 1.04;
}

.hp-paywall p {
  margin: 0 0 0.75rem;
  color: #e3dddd;
  font-size: clamp(0.94rem, 1.5vw, 1.16rem);
}

.hp-paywall .hp-btn {
  min-height: 44px;
  min-width: 220px;
  border-radius: 999px;
  border: 0;
  font-size: 1rem;
  font-weight: 900;
  background: linear-gradient(90deg, #b91010, #ef1111);
}

.hp-episode-block.is-locked .reader-header {
  background: #0f1114;
  border-color: #2f323a;
}

.hp-episode-block.is-locked .reader-header h2 {
  font-size: clamp(1.15rem, 2.2vw, 1.6rem);
}

.hp-infinite-state {
  color: #bbb;
  text-align: center;
  margin-top: 0.8rem;
}

#hp-infinite-sentinel {
  display: flex;
  justify-content: center;
  gap: 0.3rem;
  margin-top: 0.4rem;
}

.hp-loader-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #777;
}

.hp-library-block {
  margin: 1rem 0;
}

.hp-library-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 2px solid #111;
  border-radius: 10px;
  overflow: hidden;
}

.hp-library-tabs span {
  text-align: center;
  font-weight: 800;
  padding: 0.72rem;
  background: #000;
  color: #fff;
}

.hp-library-tabs span.is-active {
  background: var(--hp-red);
  color: #fff;
}

.hp-library-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.hp-library-card {
  display: flex;
  flex-direction: column;
  border: 2px solid #111;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 0 #111;
}

.hp-library-card .hp-poster-thumb {
  display: block;
  height: 220px;
  overflow: hidden;
  border-bottom: 1px solid #e6e6e6;
  background: #111;
}

.hp-library-card .hp-poster-thumb img {
  width: 100%;
  height: 100% !important;
  min-height: 0;
  aspect-ratio: auto;
  object-fit: cover;
}

.hp-library-info {
  display: block;
  padding: 0.72rem 0.82rem 0.88rem;
}

.hp-library-genre {
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  border: 1px solid #9caecf;
  background: #d9e7ff;
  color: #1d3760;
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1;
  padding: 0.17rem 0.34rem;
  margin-bottom: 0.48rem;
}

.hp-library-info h3 {
  margin: 0 0 0.42rem;
  font-size: clamp(1.15rem, 1.8vw, 1.8rem);
  line-height: 1.06;
  text-transform: uppercase;
}

.hp-library-info h3 a {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hp-library-comic-name {
  margin: 0 0 0.38rem;
  font-size: 0.86rem;
  color: #3d3d3d;
  line-height: 1.3;
}

.hp-library-comic-name span {
  font-weight: 800;
  color: #1c1c1c;
}

.hp-library-attrs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.34rem;
  margin: 0 0 0.5rem;
}

.hp-library-attr {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #d3d3d3;
  background: #f5f5f5;
  color: #222;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  padding: 0.25rem 0.44rem;
}

.hp-library-next,
.hp-library-read-count {
  margin: 0;
  color: #5f5f5f;
  font-weight: 700;
  font-size: 0.9rem;
}

.hp-library-next {
  margin-bottom: 0.25rem;
}

.hp-library-next strong {
  color: #161616;
}

.hp-library-read-count {
  margin-bottom: 0.48rem;
}

.hp-progress {
  height: 12px;
  border-radius: 999px;
  background: #111;
  overflow: hidden;
  margin: 0.45rem 0 0.75rem;
}

.hp-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--hp-red), #ff4747);
}

.hp-library-info .hp-btn {
  width: 100%;
  min-height: 44px;
  border-radius: 999px;
  font-size: 1.02rem;
  font-weight: 900;
}

.hp-ranking-block {
  margin: 1rem 0;
}

.hp-ranking-tabs {
  display: flex;
  gap: 1.5rem;
  border-bottom: 1px solid #d5d5d5;
  margin-bottom: 1rem;
}

.hp-ranking-tabs span {
  font-weight: 900;
  font-size: 2rem;
  line-height: 1;
  padding-bottom: 0.45rem;
}

.hp-ranking-lead {
  border-radius: 24px;
  border: 2px solid #d6dfe8;
  background: radial-gradient(circle at 50% -20%, rgba(165, 198, 255, 0.8), rgba(219, 236, 240, 0.9));
  padding: 1.2rem;
  margin-bottom: 1rem;
}

.hp-ranking-lead .hp-section-title {
  margin-bottom: 0.9rem;
}

.hp-news-list {
  display: grid;
  gap: 0.85rem;
}

.hp-news-card h2 {
  margin: 0 0 0.4rem;
}

.hp-auth-wrap {
  margin: 1rem 0;
}

.hp-auth-shell {
  border-radius: 18px;
  border: 1px solid #d8d8d8;
  background: linear-gradient(180deg, #ffffff, #f6f6f6);
  padding: 1rem;
}

.hp-auth-intro {
  margin-bottom: 0.9rem;
}

.hp-auth-intro h2 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.4rem, 2vw, 2rem);
  line-height: 1;
}

.hp-auth-intro p {
  margin: 0;
  color: #555;
  max-width: 62ch;
}

.hp-auth-switch {
  margin-top: 0.75rem;
  display: inline-flex;
  border: 1px solid #cfcfcf;
  border-radius: 999px;
  overflow: hidden;
}

.hp-auth-switch a {
  padding: 0.44rem 0.8rem;
  font-weight: 700;
  color: #444;
  background: #fff;
}

.hp-auth-switch a.is-active {
  background: #111;
  color: #fff;
}

.hp-auth-notice {
  border: 1px solid #d1d1d1;
  border-radius: 10px;
  background: #fff;
  padding: 0.65rem 0.8rem;
  margin-bottom: 0.8rem;
}

.hp-auth-notice.is-error {
  border-color: #b51010;
  color: #8e0c0c;
  background: #ffeaea;
}

.hp-auth-notice.is-success {
  border-color: #1f7a2e;
  color: #1f7a2e;
  background: #eaf9ee;
}

.hp-auth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.hp-auth-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.8rem;
  line-height: 1;
}

.hp-auth-subtitle {
  margin: 0 0 0.7rem;
  color: #666;
  font-size: 0.9rem;
}

.hp-auth-card.is-active {
  border-color: #b31212;
  box-shadow: 0 10px 24px rgba(179, 18, 18, 0.08), 0 0 0 1px rgba(179, 18, 18, 0.15);
}

.hp-auth-card form {
  display: grid;
  gap: 0.65rem;
}

.hp-auth-card label {
  display: grid;
  gap: 0.3rem;
  font-weight: 700;
  font-size: 0.88rem;
}

.hp-auth-card input {
  border: 1px solid #cfcfcf;
  border-radius: 12px;
  background: #fff;
  padding: 0.66rem 0.74rem;
  font: inherit;
}

.hp-auth-card input:focus {
  outline: none;
  border-color: #c41111;
  box-shadow: 0 0 0 2px rgba(196, 17, 17, 0.12);
}

.hp-auth-inline {
  display: inline-flex !important;
  align-items: center;
  gap: 0.5rem;
}

.hp-auth-inline input {
  width: auto;
  margin: 0;
}

.hp-auth-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.hp-auth-modern {
  padding: 1rem 0 2rem;
}

.hp-auth-modern .hp-section-title {
  margin-bottom: 1.2rem;
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.hp-auth-modern .hp-auth-grid {
  grid-template-columns: minmax(280px, 520px);
  justify-content: center;
  gap: 1rem;
}

.hp-auth-modern .hp-auth-card {
  border: 1px solid #d8d8d8;
  border-radius: 16px;
  background: #fff;
  padding: 1.2rem 1.1rem;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.08);
}

.hp-auth-modern .hp-auth-card.is-active {
  border-color: #c41111;
  box-shadow: 0 10px 24px rgba(179, 18, 18, 0.12), 0 0 0 1px rgba(179, 18, 18, 0.15);
}

.hp-auth-modern .hp-auth-card h3 {
  margin-bottom: 0.9rem;
  text-align: center;
  font-size: clamp(2rem, 2.8vw, 3rem);
}

.hp-auth-modern .hp-auth-switch-card {
  width: 100%;
  margin: 0 0 1.15rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid #d9d9d9;
  background: #fff;
  border-radius: 18px;
  padding: 0.16rem;
}

.hp-auth-modern .hp-auth-switch-card a {
  text-align: center;
  border-radius: 14px;
  padding: 0.62rem 0.4rem;
  font-size: 1.05rem;
  color: #1c1c1c;
}

.hp-auth-modern .hp-auth-switch-card a.is-active {
  background: linear-gradient(90deg, #b50f0f, #de1010);
  color: #fff;
}

.hp-auth-modern .hp-auth-field span {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.hp-auth-modern .hp-auth-card input {
  border: 1px solid #d5d5d5;
  border-radius: 16px;
  padding: 0.74rem 0.9rem;
  font-size: 1rem;
}

.hp-auth-modern .hp-auth-card input::placeholder {
  color: #9d9d9d;
}

.hp-auth-modern .hp-auth-help {
  color: #9f0f0f;
  font-size: 0.95rem;
  margin-top: -0.2rem;
}

.hp-auth-modern .hp-auth-card .hp-btn-yellow {
  width: 100%;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(90deg, #b50f0f, #de1010);
  padding: 0.8rem 1rem;
  font-size: 1.15rem;
}

.hp-auth-modern .hp-auth-foot {
  margin: 0.75rem 0 0;
  text-align: center;
  color: #232323;
  font-size: 1rem;
}

.hp-auth-modern .hp-auth-foot a {
  color: #9f0f0f;
}

.hp-elementor-bridge {
  max-height: 0;
  overflow: hidden;
  opacity: 0.01;
  pointer-events: none;
}

.site-footer {
  margin-top: 2rem;
  border-radius: 24px 24px 0 0;
  background: #060606;
  color: #d6d6d6;
  border-top: 1px solid #222;
  padding: 1.7rem 0;
}

.hp-footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
}

.hp-footer-brand {
  margin-bottom: 0.9rem;
}

.hp-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.2rem;
  margin-bottom: 0.9rem;
}

.hp-footer-links a {
  font-size: 0.9rem;
}

.hp-footer-socials {
  display: flex;
  gap: 1rem;
}

.hp-footer-socials a {
  font-size: 0.88rem;
  color: #fff;
}

.hp-footer-right {
  text-align: right;
}

.hp-footer-right select {
  border: 1px solid #272727;
  border-radius: 999px;
  background: #fff;
  padding: 0.45rem 1rem;
  margin-bottom: 0.9rem;
}

.hp-footer-right p {
  margin: 0;
  color: #9f9f9f;
  font-size: 0.86rem;
}

.hp-prebuilt-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}

.hp-prebuilt-stats div {
  border: 1px solid var(--hp-line);
  border-radius: 10px;
  background: #fff;
  padding: 0.65rem;
}

.hp-prebuilt-stats strong {
  display: block;
  font-size: 1.25rem;
}

@media (max-width: 1120px) {
  .hp-poster-grid,
  .hp-grid-catalog {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .hp-wrap {
    width: min(1120px, 95vw);
  }

  .header-inner {
    grid-template-columns: 1fr;
    gap: 0.7rem;
    padding: 0.75rem 0;
  }

  .hp-nav,
  .hp-header-tools {
    justify-content: space-between;
  }

  .hp-nav {
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 0.2rem;
  }

  .hp-nav a {
    flex: 0 0 auto;
  }

  .hp-header-tools {
    width: 100%;
    gap: 0.42rem;
  }

  .hp-search {
    width: 100%;
  }

  .hp-search input {
    width: 100%;
    min-width: 0;
  }

  .hp-home-hero {
    min-height: 390px;
  }

  .hp-home-hero-stage {
    min-height: 390px;
  }

  .hp-series-top,
  .hp-series-grid-layout,
  .hp-footer-grid,
  .hp-library-grid {
    grid-template-columns: 1fr;
  }

  .hp-footer-right {
    text-align: left;
  }

  .hp-ranking-tabs span {
    font-size: 1.5rem;
  }

  .hp-poster-grid,
  .hp-grid-catalog {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hp-membership-banner {
    grid-template-columns: 1fr;
  }

  .hp-auth-grid {
    grid-template-columns: 1fr;
  }

  .hp-auth-modern .hp-auth-grid {
    grid-template-columns: minmax(0, 520px);
  }

  .hp-catalog-search {
    flex-wrap: wrap;
  }

  .hp-series-cover img {
    width: min(360px, 75vw);
    margin: 0 auto;
  }

  .hp-episode-item h3 {
    font-size: clamp(1.2rem, 1.9vw, 1.65rem);
  }
}

@media (max-width: 700px) {
  .hp-wrap {
    width: min(1120px, 96vw);
  }

  .hp-brand-text {
    font-size: 1.2rem;
  }

  .hp-nav {
    gap: 0.5rem;
  }

  .hp-nav a {
    font-size: 0.88rem;
    padding: 0.38rem 0.55rem;
  }

  .hp-header-tools {
    flex-wrap: wrap;
  }

  .hp-search {
    order: 1;
    width: 100%;
  }

  .hp-search-btn {
    display: none;
  }

  .hp-account,
  .hp-auth-link {
    order: 2;
    font-size: 0.84rem;
    padding: 0.38rem 0.62rem;
  }

  .hp-hero-shell {
    width: 100%;
  }

  .hp-hero-arrow {
    width: 36px;
    height: 68px;
  }

  .hp-hero-arrow-prev {
    left: 0.55rem;
  }

  .hp-hero-arrow-next {
    right: 0.55rem;
  }

  .hp-home-content {
    width: min(520px, 100%);
    padding: 2.7rem 1rem 2.2rem;
  }

  .hp-home-hero,
  .hp-home-hero-stage {
    min-height: 340px;
  }

  .hp-home-content h1 {
    font-size: clamp(1.5rem, 8vw, 2.2rem);
  }

  .hp-home-content p {
    font-size: 0.92rem;
  }

  .hp-episode-item {
    grid-template-columns: 84px 1fr;
    gap: 0.62rem;
  }

  .hp-episode-thumb {
    width: 84px;
    height: 112px;
  }

  .hp-reading-flag {
    display: none;
  }

  .hp-poster-grid,
  .hp-grid-catalog {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
  }

  .hp-poster-thumb img {
    min-height: 150px;
  }

  .hp-catalog-search input[type="search"] {
    width: 100%;
  }

  .hp-catalog-clear {
    margin-left: auto;
  }

  .reader-nav {
    flex-wrap: wrap;
  }

  .hp-series-inline-paywall {
    flex-direction: column;
    align-items: stretch;
  }

  .hp-membership-banner {
    padding: 1rem;
    border-radius: 16px;
  }

  .hp-auth-shell {
    padding: 0.8rem;
  }

  .hp-auth-modern .hp-auth-card {
    padding: 0.95rem 0.85rem;
  }

  .hp-auth-modern .hp-auth-card h3 {
    font-size: clamp(1.6rem, 8vw, 2rem);
  }

  .hp-auth-modern .hp-auth-switch-card a,
  .hp-auth-modern .hp-auth-card input,
  .hp-auth-modern .hp-auth-card .hp-btn-yellow {
    font-size: 1.05rem;
  }

  .hp-auth-modern .hp-auth-foot {
    font-size: 0.95rem;
  }

  .hp-section-title {
    font-size: clamp(1.4rem, 6vw, 2rem);
  }

  .site-footer {
    border-radius: 18px 18px 0 0;
    padding: 1.2rem 0;
  }

  .hp-footer-links {
    gap: 0.45rem 0.8rem;
  }

  .hp-footer-links a,
  .hp-footer-right p {
    font-size: 0.8rem;
  }
}

@media (max-width: 840px) {
  .header-inner {
    gap: 0.55rem;
    min-height: 64px;
  }

  .hp-brand-text {
    font-size: 1.06rem;
  }

  .hp-nav {
    gap: 0.42rem;
    scrollbar-width: none;
  }

  .hp-nav::-webkit-scrollbar {
    display: none;
  }

  .hp-nav a {
    padding: 0.36rem 0.52rem;
    font-size: 0.82rem;
  }

  .hp-search input {
    font-size: 0.86rem;
  }

  .hp-home-section {
    padding: 1.2rem 0;
  }

  .hp-home-hero,
  .hp-home-hero-stage {
    min-height: 320px;
  }

  .hp-home-content {
    padding: 2.1rem 0.9rem 1.8rem;
  }

  .hp-home-content h1 {
    font-size: clamp(1.35rem, 6vw, 2rem);
  }

  .hp-home-content p {
    font-size: 0.88rem;
    margin-bottom: 0.9rem;
  }

  .hp-poster-grid,
  .hp-grid-catalog,
  .hp-home-rising .hp-poster-grid,
  .hp-home-new .hp-poster-grid,
  .hp-home-favorites .hp-poster-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hp-catalog-sort {
    flex-wrap: wrap;
    gap: 0.55rem 1rem;
  }

  .hp-series-top {
    gap: 0.8rem;
  }

  .hp-series-cover img {
    width: min(300px, 82vw);
  }

  .hp-episodes-head {
    font-size: 0.86rem;
  }

  .hp-episode-item {
    grid-template-columns: 96px 1fr;
  }

  .hp-episode-thumb {
    width: 96px;
    height: 128px;
  }

  .hp-reading-flag {
    display: none;
  }

  .reader-nav a,
  .reader-nav span {
    flex: 1 1 120px;
    min-width: 0;
  }

  .hp-membership-figures {
    gap: 0.35rem;
  }

  .hp-membership-figures span:nth-child(1) {
    width: 56px;
    height: 86px;
  }

  .hp-membership-figures span:nth-child(2) {
    width: 74px;
    height: 104px;
  }

  .hp-membership-figures span:nth-child(3) {
    width: 52px;
    height: 78px;
  }
}

@media (max-width: 540px) {
  .hp-wrap {
    width: 94vw;
  }

  .site-header {
    position: static;
  }

  .header-inner {
    padding: 0.45rem 0 0.55rem;
    gap: 0.45rem;
  }

  .hp-brand {
    width: 100%;
  }

  .hp-brand-text {
    font-size: 1rem;
  }

  .hp-nav {
    width: 100%;
    justify-content: space-between;
    overflow-x: auto;
    gap: 0.32rem;
    padding-bottom: 0.12rem;
  }

  .hp-nav a {
    white-space: nowrap;
    border-radius: 999px;
    border-color: #1f1f1f;
    background: #0f0f0f;
    padding: 0.3rem 0.5rem;
    font-size: 0.76rem;
  }

  .hp-header-tools {
    width: 100%;
    align-items: center;
    gap: 0.35rem;
  }

  .hp-search {
    flex: 1 1 auto;
    padding: 0.12rem;
    min-width: 0;
  }

  .hp-search-icon {
    margin-left: 0.42rem;
    font-size: 0.84rem;
  }

  .hp-search input {
    width: 100%;
    padding: 0.38rem 0.1rem;
    font-size: 0.82rem;
  }

  .hp-account,
  .hp-auth-link {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 0.32rem 0.5rem;
    font-size: 0.78rem;
  }

  .hp-home-hero-wrap {
    padding-bottom: 0.55rem;
  }

  .hp-home-hero,
  .hp-home-hero-stage {
    min-height: 260px;
  }

  .hp-hero-arrow {
    display: none;
  }

  .hp-home-content {
    width: 100%;
    max-width: 280px;
    padding: 1.1rem 0.7rem 1.15rem;
  }

  .hp-home-content .hp-tags {
    gap: 0.3rem;
    margin-bottom: 0.45rem;
  }

  .hp-home-content .hp-tags span {
    font-size: 0.62rem;
  }

  .hp-home-content h1 {
    font-size: clamp(1.15rem, 7.4vw, 1.5rem);
    margin-bottom: 0.45rem;
  }

  .hp-home-content p {
    font-size: 0.77rem;
    margin-bottom: 0.7rem;
    line-height: 1.35;
  }

  .hp-hero-shell .hp-hero-dots {
    margin-top: 0.4rem;
  }

  .hp-hero-shell .hp-hero-dots button {
    width: 8px;
    height: 8px;
  }

  .hp-home-section {
    padding: 0.85rem 0;
  }

  .hp-section-title {
    margin-bottom: 0.6rem;
  }

  .hp-poster-grid,
  .hp-grid-catalog,
  .hp-home-rising .hp-poster-grid,
  .hp-home-new .hp-poster-grid,
  .hp-home-favorites .hp-poster-grid {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .hp-poster-card {
    border-radius: 12px;
  }

  .hp-poster-thumb img {
    min-height: 190px;
  }

  .hp-series-author,
  .hp-series-desc {
    font-size: 0.9rem;
  }

  .hp-episode-item {
    grid-template-columns: 74px 1fr;
    align-items: start;
    padding: 0.5rem 0;
  }

  .hp-episode-thumb {
    width: 74px;
    height: 100px;
  }

  .hp-episode-item h3 {
    font-size: 1.12rem;
  }

  .hp-episode-item p {
    font-size: 0.8rem;
  }

  .hp-auth-modern .hp-auth-card {
    padding: 0.82rem 0.72rem;
    border-radius: 12px;
  }

  .hp-auth-modern .hp-auth-switch-card {
    border-radius: 14px;
  }

  .hp-auth-modern .hp-auth-switch-card a {
    border-radius: 10px;
    padding: 0.5rem 0.3rem;
  }

  .site-footer {
    border-radius: 14px 14px 0 0;
    margin-top: 1.2rem;
    padding: 0.95rem 0;
  }

  .hp-footer-grid {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .hp-footer-right select {
    width: 100%;
    max-width: 180px;
    margin-bottom: 0.45rem;
  }

  .hp-footer-links {
    margin-bottom: 0.5rem;
  }
}

/* ---- UI/UX refinement pass (mobile/tablet + auth modernization) ---- */
.hp-main {
  overflow-x: clip;
}

.hp-auth-modern {
  position: relative;
  isolation: isolate;
  border-radius: 24px;
  padding: 1.2rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(245, 245, 245, 0.96)),
    radial-gradient(circle at 15% 12%, rgba(196, 17, 17, 0.18), transparent 48%);
  border: 1px solid #dfdfdf;
}

.hp-auth-modern::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background:
    linear-gradient(122deg, rgba(0, 0, 0, 0.82) 0 18%, transparent 18% 100%),
    linear-gradient(300deg, rgba(196, 17, 17, 0.19) 0 16%, transparent 16% 100%),
    repeating-linear-gradient(25deg, rgba(196, 17, 17, 0.08) 0 2px, transparent 2px 22px),
    radial-gradient(circle at 84% 22%, rgba(0, 0, 0, 0.08), transparent 34%),
    radial-gradient(circle at 12% 82%, rgba(196, 17, 17, 0.12), transparent 36%);
  opacity: 0.55;
  pointer-events: none;
}

.hp-auth-modern > * {
  position: relative;
  z-index: 1;
}

.hp-auth-modern .hp-section-title {
  margin-bottom: 0.9rem;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  letter-spacing: 0.01em;
}

.hp-auth-modern .hp-auth-grid {
  grid-template-columns: minmax(280px, 560px);
}

.hp-auth-modern .hp-auth-card {
  border: 1px solid #d5d5d5;
  border-radius: 18px;
  padding: 1rem;
  background: linear-gradient(180deg, #ffffff, #fbfbfb);
}

.hp-auth-modern .hp-auth-card h3 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 2vw, 2rem);
  text-align: left;
  line-height: 1.1;
}

.hp-auth-modern .hp-auth-switch-card {
  margin-bottom: 0.85rem;
}

.hp-auth-modern .hp-auth-switch-card a {
  font-size: 0.98rem;
  font-weight: 800;
  padding: 0.54rem 0.38rem;
}

.hp-auth-modern .hp-auth-card form {
  gap: 0.55rem;
}

.hp-auth-modern .hp-auth-card input {
  min-height: 44px;
  padding: 0.62rem 0.8rem;
  font-size: 0.96rem;
  border-radius: 13px;
}

.hp-auth-modern .hp-auth-help,
.hp-auth-modern .hp-auth-foot,
.hp-auth-modern .hp-auth-inline {
  font-size: 0.94rem;
}

.hp-auth-modern .hp-auth-card .hp-btn-yellow {
  min-height: 46px;
  padding: 0.72rem 1rem;
  font-size: 1rem;
  border-radius: 14px;
}

.hp-auth-modern .hp-auth-inline-remember {
  align-items: center;
  gap: 0.45rem;
}

.hp-auth-modern .hp-auth-inline-remember input {
  width: 16px;
  height: 16px;
}

.hp-auth-loggedin .hp-auth-grid {
  grid-template-columns: minmax(280px, 540px);
}

.hp-auth-loggedin .hp-auth-card {
  padding: 1.15rem 1rem;
}

.hp-auth-loggedin .hp-auth-card h3 {
  margin-bottom: 0.42rem;
}

.hp-auth-actions-stack {
  display: grid;
  gap: 0.58rem;
  margin-top: 0.9rem;
}

.hp-auth-actions-stack .hp-btn {
  width: 100%;
}

.hp-auth-actions-stack .hp-btn-secondary {
  background: linear-gradient(90deg, #8f0d0d, #c41111);
  color: #fff;
  border: 0;
}

.hp-auth-actions-stack .hp-btn-outline {
  background: #fff;
  color: #111;
  border: 1px solid #d0d0d0;
}

@media (max-width: 1024px) {
  .hp-wrap {
    width: min(1120px, 95vw);
  }

  .header-inner {
    grid-template-columns: 1fr;
    gap: 0.65rem;
    padding: 0.72rem 0;
  }

  .hp-nav,
  .hp-header-tools {
    width: 100%;
  }

  .hp-nav {
    gap: 0.45rem;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
  }

  .hp-nav::-webkit-scrollbar {
    display: none;
  }

  .hp-header-tools {
    gap: 0.4rem;
  }

  .hp-search {
    width: 100%;
  }

  .hp-search input {
    width: 100%;
    min-width: 0;
  }

  .hp-home-hero,
  .hp-home-hero-stage {
    min-height: 360px;
  }

  .hp-home-content {
    padding: 2.35rem 1rem 1.9rem;
  }

  .hp-home-content h1 {
    font-size: clamp(1.5rem, 6vw, 2.35rem);
  }

  .hp-poster-grid,
  .hp-grid-catalog,
  .hp-home-rising .hp-poster-grid,
  .hp-home-new .hp-poster-grid,
  .hp-home-favorites .hp-poster-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
  }

  .hp-poster-thumb img {
    min-height: 170px;
  }

  .hp-series-top,
  .hp-footer-grid {
    grid-template-columns: 1fr;
  }

  .hp-series-cover img {
    width: min(340px, 76vw);
    margin-inline: auto;
  }
}

@media (max-width: 840px) {
  .hp-brand-text {
    font-size: 1.08rem;
  }

  .hp-nav a {
    font-size: 0.82rem;
    padding: 0.34rem 0.5rem;
  }

  .hp-search {
    padding: 0.14rem;
  }

  .hp-search-icon {
    margin-left: 0.45rem;
    font-size: 0.84rem;
  }

  .hp-search input {
    font-size: 0.84rem;
    padding: 0.38rem 0.1rem;
  }

  .hp-home-hero,
  .hp-home-hero-stage {
    min-height: 320px;
  }

  .hp-hero-arrow {
    width: 34px;
    height: 58px;
    border-radius: 9px;
    font-size: 1.35rem;
  }

  .hp-section-title,
  .hp-catalog-head h1,
  .hp-series-left h1 {
    font-size: clamp(1.5rem, 5.8vw, 2rem);
  }

  .hp-episode-item {
    grid-template-columns: 86px 1fr;
  }

  .hp-episode-thumb {
    width: 86px;
    height: 116px;
  }

  .hp-reading-flag {
    display: none;
  }

  .hp-catalog-filterbar {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .hp-catalog-filter {
    min-width: 0;
    flex: 1 1 180px;
  }
}

@media (max-width: 700px) {
  .hp-wrap {
    width: 94vw;
  }

  .site-header {
    position: static;
  }

  .header-inner {
    padding: 0.45rem 0 0.52rem;
    gap: 0.4rem;
  }

  .hp-nav {
    justify-content: space-between;
    gap: 0.32rem;
    padding-bottom: 0.08rem;
  }

  .hp-nav a {
    border-radius: 999px;
    border: 1px solid #202020;
    background: #0f0f0f;
    font-size: 0.75rem;
    padding: 0.3rem 0.45rem;
  }

  .hp-header-tools {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 0.32rem;
  }

  .hp-search {
    grid-column: 1 / -1;
    order: 1;
  }

  .hp-search-btn {
    display: none;
  }

  .hp-auth-link,
  .hp-account {
    order: 2;
    font-size: 0.78rem;
    padding: 0.34rem 0.54rem;
  }

  .hp-home-hero,
  .hp-home-hero-stage {
    min-height: 300px;
  }

  .hp-home-content {
    width: min(320px, 100%);
    padding: 1rem 0.7rem 1.1rem;
  }

  .hp-home-content h1 {
    font-size: clamp(1.25rem, 6.2vw, 1.65rem);
    margin-bottom: 0.42rem;
  }

  .hp-home-content p {
    font-size: 0.78rem;
    line-height: 1.32;
    margin-bottom: 0.65rem;
  }

  .hp-home-content .hp-tags {
    margin-bottom: 0.45rem;
  }

  .hp-home-content .hp-tags span {
    font-size: 0.62rem;
    padding: 0.16rem 0.38rem;
  }

  .hp-hero-arrow-prev {
    left: 0.4rem;
  }

  .hp-hero-arrow-next {
    right: 0.4rem;
  }

  .hp-home-section {
    padding: 0.92rem 0;
  }

  .hp-section-title {
    margin-bottom: 0.58rem;
  }

  .hp-catalog-filterbar {
    margin-bottom: 0.68rem;
  }

  .hp-catalog-filter {
    width: 100%;
    flex: 1 1 100%;
    font-size: 0.84rem;
    padding: 0.5rem 0.72rem;
  }

  .hp-poster-grid,
  .hp-grid-catalog,
  .hp-home-rising .hp-poster-grid,
  .hp-home-new .hp-poster-grid,
  .hp-home-favorites .hp-poster-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .hp-poster-thumb img {
    min-height: 152px;
  }

  .hp-poster-meta {
    padding: 1.35rem 0.4rem 0.38rem;
  }

  .hp-poster-meta h3 {
    font-size: 0.82rem;
  }

  .hp-poster-meta p,
  .hp-poster-rating {
    font-size: 0.66rem;
  }

  .hp-highlight-panel {
    padding: 0.8rem;
    border-radius: 15px;
  }

  .hp-membership-banner {
    border-radius: 14px;
    padding: 0.9rem;
    gap: 0.7rem;
  }

  .hp-membership-banner h3 {
    font-size: clamp(1.3rem, 7vw, 1.75rem);
    margin-bottom: 0.32rem;
  }

  .hp-membership-banner p {
    font-size: 0.9rem;
    margin-bottom: 0.55rem;
  }

  .hp-membership-figures span:nth-child(1) {
    width: 38px;
    height: 56px;
  }

  .hp-membership-figures span:nth-child(2) {
    width: 52px;
    height: 72px;
  }

  .hp-membership-figures span:nth-child(3) {
    width: 34px;
    height: 50px;
  }

  .hp-auth-modern {
    border-radius: 14px;
    padding: 0.8rem;
  }

  .hp-auth-modern .hp-section-title {
    font-size: clamp(1.52rem, 8vw, 1.95rem);
    margin-bottom: 0.65rem;
  }

  .hp-auth-modern .hp-auth-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hp-auth-modern .hp-auth-card {
    padding: 0.78rem;
    border-radius: 12px;
  }

  .hp-auth-modern .hp-auth-card h3 {
    font-size: 1.28rem;
    margin-bottom: 0.58rem;
    text-align: left;
  }

  .hp-auth-actions-stack {
    gap: 0.5rem;
    margin-top: 0.72rem;
  }

  .hp-auth-modern .hp-auth-switch-card a,
  .hp-auth-modern .hp-auth-card input,
  .hp-auth-modern .hp-auth-card .hp-btn-yellow {
    font-size: 0.95rem;
  }

  .site-footer {
    border-radius: 14px 14px 0 0;
    margin-top: 1rem;
    padding: 0.95rem 0;
  }

  .hp-footer-grid {
    gap: 0.58rem;
  }

  .hp-footer-links a,
  .hp-footer-right p {
    font-size: 0.78rem;
  }
}

@media (max-width: 420px) {
  .hp-poster-grid,
  .hp-grid-catalog,
  .hp-home-rising .hp-poster-grid,
  .hp-home-new .hp-poster-grid,
  .hp-home-favorites .hp-poster-grid {
    grid-template-columns: 1fr;
  }

  .hp-hero-arrow {
    width: 30px;
    height: 52px;
    font-size: 1.2rem;
  }

  .hp-auth-link,
  .hp-account {
    padding: 0.3rem 0.46rem;
    font-size: 0.74rem;
  }
}

@media (max-width: 700px) {
  body.home {
    overflow-x: hidden;
  }

  .hp-home-hero-wrap {
    overflow: hidden;
  }

  .header-inner {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .hp-brand {
    grid-column: 1 / 2;
    justify-content: flex-start;
  }

  .hp-brand-text {
    font-size: 1.04rem;
    font-weight: 900;
  }

  .hp-header-tools {
    grid-column: 2 / 3;
    display: flex;
    align-items: center;
    gap: 0.28rem;
    width: auto;
  }

  .hp-search {
    display: none;
  }

  .hp-auth-link {
    display: none;
  }

  .hp-account {
    border: 1px solid #4a4a4a;
    background: #111;
    color: #fff;
    width: auto;
    height: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.28rem 0.52rem;
    font-size: 0.74rem;
    line-height: 1;
    white-space: nowrap;
  }

  .hp-account::before {
    content: none;
  }

  .hp-nav {
    grid-column: 1 / -1;
    margin-top: 0.1rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.08rem;
    border-top: 1px solid #1f1f1f;
    border-bottom: 1px solid #1f1f1f;
    padding: 0.16rem 0;
  }

  .hp-nav a {
    border: 0;
    background: transparent;
    border-radius: 0;
    color: #f3f3f3;
    text-align: center;
    font-size: 0.7rem;
    padding: 0.24rem 0.08rem;
    min-width: 0;
  }

  .hp-nav a::before {
    display: block;
    font-size: 0.8rem;
    line-height: 1;
    margin-bottom: 0.16rem;
    color: #e0be26;
  }

  .hp-nav a:nth-child(1)::before {
    content: "\1F4DA";
  }

  .hp-nav a:nth-child(2)::before {
    content: "\1F5C2";
  }

  .hp-nav a:nth-child(3)::before {
    content: "\1F3C6";
  }

  .hp-home-hero-wrap .hp-wrap {
    width: 100%;
  }

  .hp-home-hero,
  .hp-home-hero-stage {
    min-height: 420px;
  }

  .hp-home-content {
    max-width: 250px;
    padding: 1.2rem 0.7rem 1.2rem;
  }

  .hp-home-content h1 {
    font-size: clamp(1.2rem, 6vw, 1.55rem);
  }

  .hp-home-content p {
    font-size: 0.79rem;
  }

  .hp-home-rising .hp-poster-grid,
  .hp-home-favorites .hp-poster-grid,
  .hp-home-new .hp-poster-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 37vw;
    gap: 0.5rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.2rem;
  }

  .hp-home-rising .hp-poster-card,
  .hp-home-favorites .hp-poster-card,
  .hp-home-new .hp-poster-card {
    width: auto;
    scroll-snap-align: start;
  }

  .hp-home-rising .hp-poster-thumb img,
  .hp-home-favorites .hp-poster-thumb img,
  .hp-home-new .hp-poster-thumb img {
    min-height: 188px;
  }

  .hp-footer-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
  }

  .hp-footer-links a {
    font-size: 0.95rem;
  }

  .hp-footer-socials {
    margin-top: 0.45rem;
    gap: 1rem;
  }

  .hp-footer-socials a {
    font-size: 1rem;
  }

  .hp-footer-right {
    text-align: left;
  }

  .hp-footer-right select {
    width: 138px;
  }
}

/* Final mobile navbar + 3-card row overrides */
.hp-mobile-icon-btn,
.hp-mobile-drawer,
.hp-mobile-search-box {
  display: none;
}

@media (max-width: 700px) {
  .hp-header-tools {
    gap: 0.34rem;
  }

  .hp-mobile-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid #2e2e2e;
    border-radius: 9px;
    background: #111;
    color: #fff;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
  }

  .hp-mobile-search-toggle,
  .hp-mobile-menu-toggle {
    order: 2;
  }

  .hp-account {
    order: 2;
    padding: 0.34rem 0.56rem;
    font-size: 0.74rem;
  }

  .hp-mobile-search-box {
    display: block;
    grid-column: 1 / -1;
    width: 100%;
    margin-top: 0.22rem;
  }

  .hp-search-mobile {
    width: 100%;
    display: flex;
  }

  .hp-search-mobile input {
    width: 100%;
    min-width: 0;
  }

  .hp-mobile-drawer {
    display: block;
    grid-column: 1 / -1;
    width: 100%;
    margin-top: 0.28rem;
    border: 1px solid #232323;
    border-radius: 12px;
    background: #0f0f0f;
    overflow: hidden;
  }

  .hp-mobile-menu {
    display: grid;
  }

  .hp-mobile-menu a {
    color: #f2f2f2;
    font-size: 0.88rem;
    font-weight: 700;
    padding: 0.66rem 0.72rem;
    border-bottom: 1px solid #1e1e1e;
  }

  .hp-mobile-menu a:last-child {
    border-bottom: 0;
  }

  .hp-poster-grid,
  .hp-grid-catalog,
  .hp-home-rising .hp-poster-grid,
  .hp-home-new .hp-poster-grid,
  .hp-home-favorites .hp-poster-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.42rem;
    overflow: visible;
  }

  .hp-poster-thumb img {
    min-height: 128px;
  }

  .hp-card-status {
    top: 6px;
    left: 6px;
    border-radius: 10px;
    font-size: 0.62rem;
    padding: 0.26rem 0.36rem;
  }

  .hp-poster-meta {
    padding: 1.6rem 0.44rem 0.42rem;
  }

  .hp-poster-rating {
    font-size: 0.62rem;
    padding: 0.14rem 0.32rem;
    margin-bottom: 0.18rem;
  }

  .hp-poster-meta h3 {
    font-size: 0.78rem;
    line-height: 1.08;
    -webkit-line-clamp: 1;
    margin-bottom: 0.18rem;
  }

  .hp-poster-tags {
    gap: 0.28rem;
    margin-top: 0;
    padding-right: 2rem;
    align-items: center;
  }

  .hp-poster-tags span {
    padding: 0;
    font-size: 0.68rem;
    line-height: 1;
  }

  .hp-poster-count {
    right: 0.34rem;
    bottom: 0.34rem;
    min-width: 1.46rem;
    font-size: 0.72rem;
    padding: 0.2rem 0.22rem;
  }
}

/* Account UI polish (final override) */
.hp-auth-modern {
  border-radius: 22px;
  border: 1px solid #d7d7d7;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(246, 246, 246, 0.97)),
    repeating-linear-gradient(28deg, rgba(196, 17, 17, 0.05) 0 1px, transparent 1px 18px);
  padding: 1.35rem;
}

/* Mobile navbar fix: single clean header + drawer nav only */
@media (max-width: 700px) {
  .header-inner {
    grid-template-columns: auto 1fr auto !important;
    align-items: center;
    gap: 0.42rem;
    padding: 0.5rem 0 0.6rem;
  }

  .hp-mobile-search-toggle {
    grid-column: 1 / 2;
    justify-self: start;
    display: inline-flex !important;
  }

  .hp-brand {
    grid-column: 2 / 3;
    width: auto;
    min-width: 0;
    justify-self: center;
  }

  .hp-brand-text {
    font-size: 0.84rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .site-header .hp-nav {
    display: none !important;
  }

  .hp-mobile-menu-toggle {
    grid-column: 3 / 4;
    justify-self: end;
    display: inline-flex !important;
  }

  .hp-header-tools {
    display: none !important;
  }

  .hp-mobile-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 0.95rem;
  }

  .hp-mobile-search-box {
    grid-column: 1 / -1;
    margin-top: 0.3rem;
  }

  .hp-mobile-drawer {
    grid-column: 1 / -1;
    margin-top: 0.34rem;
    border-radius: 10px;
  }

  .hp-mobile-menu a {
    font-size: 0.9rem;
    padding: 0.62rem 0.68rem;
  }
}

/* Standard mobile hamburger behavior (authoritative override) */
@media (max-width: 700px) {
  .header-inner {
    position: relative;
    grid-template-columns: auto 1fr auto !important;
    align-items: center;
    gap: 0.42rem;
  }

  .site-header .hp-nav,
  .site-header .hp-header-tools {
    display: none !important;
  }

  .hp-mobile-search-toggle,
  .hp-mobile-menu-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid #2e2e2e;
    border-radius: 8px;
    background: #111;
    color: #fff;
    line-height: 1;
  }

  .hp-mobile-search-toggle {
    grid-column: 1 / 2;
    justify-self: start;
  }

  .hp-brand {
    grid-column: 2 / 3;
    justify-self: center;
  }

  .hp-mobile-menu-toggle {
    grid-column: 3 / 4;
    justify-self: end;
  }

  .hp-mobile-search-box[hidden],
  .hp-mobile-drawer[hidden] {
    display: none !important;
  }

  .hp-mobile-search-box:not([hidden]) {
    display: block !important;
    grid-column: 1 / -1;
    margin-top: 0.28rem;
  }

  .hp-mobile-drawer:not([hidden]) {
    display: block !important;
    grid-column: 1 / -1;
    margin-top: 0.32rem;
    border: 1px solid #232323;
    border-radius: 10px;
    background: #0f0f0f;
    overflow: hidden;
  }

  .hp-mobile-menu a {
    display: block;
    border-bottom: 1px solid #1f1f1f;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.66rem 0.72rem;
  }

  .hp-mobile-menu a:last-child {
    border-bottom: 0;
  }
}

.hp-auth-modern::before {
  opacity: 0.35;
  background:
    linear-gradient(124deg, rgba(30, 30, 30, 0.36) 0 18%, transparent 18% 100%),
    linear-gradient(300deg, rgba(196, 17, 17, 0.1) 0 16%, transparent 16% 100%);
}

.hp-auth-modern .hp-section-title {
  font-size: clamp(2rem, 3.2vw, 3rem);
  margin-bottom: 1rem;
  letter-spacing: 0.01em;
}

.hp-auth-modern .hp-auth-grid {
  grid-template-columns: minmax(320px, 700px);
}

.hp-auth-modern .hp-auth-card {
  border: 1px solid #de3d3d;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff, #fcfcfc);
  padding: 1.25rem 1.25rem 1.05rem;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.08), 0 1px 0 rgba(255, 255, 255, 0.75) inset;
}

.hp-auth-modern .hp-auth-card h3 {
  font-size: clamp(2rem, 2.6vw, 2.6rem);
  margin-bottom: 0.7rem;
  line-height: 1;
}

.hp-auth-modern .hp-auth-switch-card {
  border-radius: 20px;
  border: 1px solid #d2d2d2;
  padding: 0.18rem;
  margin-bottom: 0.95rem;
}

.hp-auth-modern .hp-auth-switch-card a {
  border-radius: 14px;
  font-size: 1.05rem;
  font-weight: 800;
  padding: 0.66rem 0.4rem;
}

.hp-auth-modern .hp-auth-switch-card a.is-active {
  background: linear-gradient(90deg, #c41010, #ef1111);
}

.hp-auth-modern .hp-auth-card form {
  gap: 0.62rem;
}

.hp-auth-modern .hp-auth-card input {
  min-height: 52px;
  border-radius: 16px;
  padding: 0.8rem 0.95rem;
  font-size: 1.02rem;
  border: 1px solid #d0d0d0;
  background: #fff;
}

.hp-auth-modern .hp-auth-card input:focus {
  border-color: #c41111;
  box-shadow: 0 0 0 3px rgba(196, 17, 17, 0.13);
}

.hp-auth-modern .hp-auth-help {
  font-size: 1.02rem;
  color: #a30e0e;
  margin-top: -0.1rem;
}

.hp-auth-modern .hp-auth-inline {
  font-size: 1rem;
}

.hp-auth-modern .hp-auth-card .hp-btn-yellow {
  min-height: 54px;
  border-radius: 18px;
  font-size: 1.1rem;
  font-weight: 900;
  background: linear-gradient(90deg, #b90f0f, #ef1111);
}

.hp-auth-modern .hp-auth-foot {
  margin-top: 0.9rem;
  font-size: 1.02rem;
}

@media (max-width: 980px) {
  .hp-auth-modern {
    border-radius: 16px;
    padding: 1rem;
  }

  .hp-auth-modern .hp-section-title {
    font-size: clamp(1.55rem, 7vw, 2.2rem);
  }

  .hp-auth-modern .hp-auth-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hp-auth-modern .hp-auth-card {
    border-radius: 16px;
    padding: 0.92rem 0.85rem;
  }

  .hp-auth-modern .hp-auth-card h3 {
    font-size: 1.7rem;
  }

  .hp-auth-modern .hp-auth-switch-card a {
    font-size: 0.94rem;
    padding: 0.52rem 0.3rem;
  }

  .hp-auth-modern .hp-auth-card input {
    min-height: 46px;
    font-size: 0.94rem;
    border-radius: 13px;
  }

  .hp-auth-modern .hp-auth-card .hp-btn-yellow {
    min-height: 48px;
    font-size: 1rem;
    border-radius: 14px;
  }

  .hp-auth-modern .hp-auth-help,
  .hp-auth-modern .hp-auth-foot,
  .hp-auth-modern .hp-auth-inline {
    font-size: 0.92rem;
  }
}

/* Become member page */
.wcy-plan-card {
  max-width: 760px;
  margin: 0 auto;
  padding: 1.25rem;
}

.wcy-plan-subtitle {
  margin: 0 0 0.95rem;
  color: #555;
}

.wcy-plan-box {
  border: 1px solid #d8d8d8;
  border-radius: 16px;
  background: #fff;
  padding: 1rem;
}

.wcy-plan-box h2 {
  margin: 0 0 0.45rem;
  font-size: 1.35rem;
}

.wcy-plan-box p {
  margin: 0 0 0.78rem;
  color: #666;
}

.wcy-plan-price {
  margin: 0 0 0.95rem;
  color: #111 !important;
  font-size: 2rem;
  font-weight: 900;
}

.wcy-plan-price span {
  font-size: 1rem;
  font-weight: 700;
  color: #666;
}

.wcy-plan-active {
  margin: 0.75rem 0 0;
  color: #1f7a2e !important;
  font-weight: 800;
}

.wcy-plan-error {
  margin: 0.75rem 0 0;
  color: #9f0f0f !important;
  font-weight: 800;
}

.wcy-member-guard {
  position: relative;
}

.wcy-member-hero {
  max-width: 760px;
  margin: 0 auto;
  padding: 1.2rem;
  filter: blur(1px);
  opacity: 0.55;
}

.wcy-member-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(0, 0, 0, 0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.wcy-member-modal {
  width: min(940px, 96vw);
  max-height: 92vh;
  overflow: auto;
}

.wcy-member-modal .hp-auth-modern {
  margin: 0;
}

@media (max-width: 700px) {
  .hp-brand-logo {
    height: 32px;
    max-width: 180px;
  }

  .hp-footer-brand .hp-brand-logo {
    height: 38px;
    max-width: 200px;
  }

  .hp-library-card .hp-poster-thumb {
    height: 168px;
  }

  .wcy-member-modal-backdrop {
    padding: 0.6rem;
    align-items: flex-start;
  }

  .wcy-member-modal {
    width: 100%;
    margin-top: 0.5rem;
  }

  .wcy-plan-card {
    padding: 0.9rem;
  }

  .wcy-plan-box {
    padding: 0.8rem;
  }

  .wcy-plan-price {
    font-size: 1.6rem;
  }
}

/* Final mobile home layout + remove hero loading line */
.hp-hero-progress {
  display: none !important;
}

@media (max-width: 700px) {
  .hp-home-hero-wrap {
    background: #0b0b0b !important;
  }

  .hp-home-hero-stage {
    position: relative;
    min-height: 420px !important;
    overflow: hidden;
  }

  .hp-home-hero-slide {
    display: none !important;
    position: absolute !important;
    inset: 0 !important;
    background-position: center center !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
  }

  .hp-home-hero-slide.is-active {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  .hp-home-rising .hp-poster-grid,
  .hp-home-new .hp-poster-grid,
  .hp-home-favorites .hp-poster-grid,
  .hp-poster-grid,
  .hp-grid-catalog {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.58rem !important;
    overflow: visible !important;
    grid-auto-flow: row !important;
    grid-auto-columns: unset !important;
    scroll-snap-type: none !important;
  }

  .hp-home-rising .hp-poster-card,
  .hp-home-new .hp-poster-card,
  .hp-home-favorites .hp-poster-card,
  .hp-poster-card {
    width: 100% !important;
    min-width: 0 !important;
  }

  .hp-home-rising .hp-poster-thumb img,
  .hp-home-new .hp-poster-thumb img,
  .hp-home-favorites .hp-poster-thumb img,
  .hp-poster-thumb img {
    min-height: 176px !important;
    aspect-ratio: 3 / 4;
  }

  .hp-home-hero {
    position: relative;
  }

  .hp-home-hero .hp-wrap {
    height: 100%;
    display: flex;
    align-items: flex-end;
  }

  .hp-home-overlay {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.22) 0%, rgba(0, 0, 0, 0.62) 58%, rgba(0, 0, 0, 0.86) 100%);
  }

  .hp-home-content {
    position: relative;
    z-index: 3;
    display: block !important;
    width: min(82%, 320px) !important;
    max-width: none;
    margin: 0;
    padding: 0 0 1rem 1rem !important;
  }

  .hp-home-content h1 {
    margin: 0 0 0.32rem;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
  }

  .hp-home-content p {
    margin: 0 0 0.62rem;
    color: rgba(255, 255, 255, 0.96);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
  }

  .hp-home-content .hp-btn {
    margin-top: 0;
    min-height: 46px;
    padding: 0.72rem 1.15rem;
  }
}

/* Final hero slider polish: height, button sizing, animation, arrows */
.hp-home-hero-stage,
.hp-home-hero {
  min-height: 440px;
}

.hp-home-hero-slide.is-active {
  animation: hpHeroFadeIn 520ms ease both;
}

.hp-home-hero-slide.is-active .hp-tags {
  animation: hpHeroRise 520ms ease both;
}

.hp-home-hero-slide.is-active h1 {
  animation: hpHeroRise 560ms ease both;
}

.hp-home-hero-slide.is-active p {
  animation: hpHeroRise 620ms ease both;
}

.hp-home-hero-slide.is-active .hp-btn {
  animation: hpHeroRise 680ms ease both;
}

.hp-home-content .hp-btn {
  min-height: 44px;
  padding: 0.64rem 1.05rem;
  font-size: 0.98rem;
  line-height: 1;
}

.hp-hero-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

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

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

@media (max-width: 900px) {
  .hp-home-hero-stage,
  .hp-home-hero {
    min-height: 360px !important;
  }

  .hp-home-content {
    padding: 0 0 0.9rem 0.9rem !important;
  }

  .hp-home-content .hp-btn {
    min-height: 40px;
    padding: 0.58rem 0.94rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 700px) {
  .hp-home-hero-stage,
  .hp-home-hero {
    min-height: 320px !important;
  }

  .hp-home-content {
    width: min(84%, 290px) !important;
    padding: 0 0 0.8rem 0.8rem !important;
  }

  .hp-home-content .hp-btn {
    min-height: 38px;
    padding: 0.5rem 0.82rem;
    font-size: 0.86rem;
    border-width: 1.5px;
  }

  .hp-hero-arrow {
    display: inline-flex !important;
    width: 30px;
    height: 44px;
    border-radius: 8px;
    font-size: 1.05rem;
    background: rgba(16, 16, 16, 0.86);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.22);
  }

  .hp-hero-arrow-prev {
    left: 0.45rem !important;
  }

  .hp-hero-arrow-next {
    right: 0.45rem !important;
  }

  .hp-episode-item {
    display: grid !important;
    grid-template-columns: 98px 1fr !important;
    gap: 0.6rem !important;
    align-items: center !important;
    padding: 0.74rem 0 !important;
  }

  .hp-episode-thumb {
    width: 98px !important;
    height: 72px !important;
    border-width: 2px;
    border-radius: 10px;
  }

  .hp-episode-kicker {
    font-size: 0.74rem !important;
  }

  .hp-episode-item h3 {
    font-size: clamp(0.95rem, 4.9vw, 1.2rem) !important;
  }

  .hp-episode-date {
    font-size: 0.74rem !important;
  }

  .hp-reading-flag { display: none !important; }
}

/* Global layout + typography + comic cover final overrides */
body,
button,
input,
select,
textarea {
  font-family: "Space Grotesk", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif !important;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
span,
a,
label,
small,
li {
  font-family: "Space Grotesk", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif !important;
}

.hp-wrap {
  width: min(1380px, 98.6vw) !important;
}

.hp-brand-logo {
  background: transparent !important;
}

.hp-series-cover img {
  width: clamp(320px, 38vw, 640px) !important;
  aspect-ratio: 4 / 3 !important;
  object-fit: cover !important;
}

@media (max-width: 900px) {
  .hp-wrap {
    width: 97.2vw !important;
  }

  .hp-series-cover img {
    width: 100% !important;
    max-width: 560px;
  }
}

@media (max-width: 700px) {
  .hp-wrap {
    width: 96.6vw !important;
  }
}

/* Episode reader hardening: prevent panel overlap/mixing */
#hp-reader-flow,
#hp-reader-flow .hp-episode-block,
#hp-reader-flow .reader-images {
  display: block !important;
}

#hp-reader-flow .reader-images {
  padding: 0 !important;
  margin-top: 0.8rem !important;
  line-height: 0 !important;
  overflow: hidden !important;
}

#hp-reader-flow .reader-images > *,
#hp-reader-flow .reader-images figure,
#hp-reader-flow .reader-images .wp-block-image {
  display: block !important;
  position: relative !important;
  float: none !important;
  clear: both !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

#hp-reader-flow .reader-images img {
  display: block !important;
  position: relative !important;
  z-index: 1 !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  object-fit: contain !important;
}

#hp-reader-flow .reader-images > * + * {
  margin-top: 0 !important;
}

/* Mobile navbar logo sizing */
@media (max-width: 700px) {
  .site-header .header-inner {
    min-height: 64px !important;
  }

  .site-header .hp-brand {
    max-width: calc(100vw - 132px);
  }

  .site-header .hp-brand-logo {
    height: 68px !important;
    max-width: min(400px, 100%) !important;
    width: auto !important;
  }
}

/* Episode reader final layout: single episode flow + sticky nav */
.hp-reader-page {
  background: #fff !important;
}

.reader-header,
.reader-images,
.reader-nav,
.hp-paywall,
.hp-infinite-state,
#hp-infinite-sentinel {
  width: min(640px, 100%) !important;
}

.reader-nav-sticky {
  position: sticky;
  top: 88px;
  z-index: 90;
  margin-top: 0 !important;
  margin-bottom: 0.72rem !important;
  padding: 0.45rem;
  border: 1px solid #e0e0e0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(5px);
}

.reader-nav-sticky a,
.reader-nav-sticky span {
  flex: 1 1 0;
  min-width: 0;
}

@media (max-width: 700px) {
  .hp-reader-page {
    padding-bottom: 96px !important;
  }

  .reader-nav-sticky {
    position: fixed !important;
    top: auto !important;
    left: 50%;
    bottom: 8px;
    transform: translateX(-50%);
    width: min(640px, calc(100vw - 16px)) !important;
    margin: 0 !important;
    z-index: 240;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  }
}

/* Final overrides: configurable logo size + library grid + reader image border reset */
.site-header .hp-brand-logo {
  height: var(--hp-logo-height-desktop, 44px) !important;
  max-width: min(520px, 45vw) !important;
  width: auto !important;
}

@media (max-width: 700px) {
  .site-header .hp-brand-logo {
    height: var(--hp-logo-height-mobile, 68px) !important;
    max-width: min(420px, 78vw) !important;
  }
}

.hp-library-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

@media (max-width: 1024px) {
  .hp-library-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 700px) {
  .hp-library-grid {
    grid-template-columns: 1fr !important;
  }
}

.reader-images,
#hp-reader-flow .reader-images {
  border: 0 !important;
  box-shadow: none !important;
}

.hp-reader-next-wrap {
  max-width: 640px;
  margin: 20px auto 0;
}

.hp-reader-next-card {
  display: grid;
  grid-template-columns: 240px 1fr 88px;
  align-items: center;
  gap: 18px;
  background: #fff;
  border: 4px solid #121212;
  border-radius: 20px;
  padding: 14px;
  text-decoration: none;
  color: #121212;
}

.hp-reader-next-thumb {
  display: block;
  width: 100%;
  height: 120px;
  border-radius: 12px;
  overflow: hidden;
  background: #ececec;
}

.hp-reader-next-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hp-reader-next-content {
  display: grid;
  gap: 6px;
}

.hp-reader-next-kicker {
  font-size: 14px;
  color: #555;
  font-weight: 600;
}

.hp-reader-next-content strong {
  font-size: clamp(26px, 3.4vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.hp-reader-next-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 120px;
  border-radius: 14px;
  background: #f6d919;
  font-size: 46px;
  font-weight: 700;
  color: #101010;
}

.hp-reader-next-complete {
  max-width: 640px;
  margin: 0 auto;
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
}

@media (max-width: 767px) {
  .hp-reader-next-wrap {
    margin-top: 14px;
    padding: 0 8px;
  }

  .hp-reader-next-card {
    grid-template-columns: 120px 1fr 64px;
    gap: 10px;
    border-width: 3px;
    border-radius: 14px;
    padding: 10px;
  }

  .hp-reader-next-thumb {
    height: 74px;
    border-radius: 10px;
  }

  .hp-reader-next-content strong {
    font-size: clamp(22px, 6vw, 32px);
  }

  .hp-reader-next-kicker {
    font-size: 11px;
  }

.hp-reader-next-arrow {
    height: 74px;
    border-radius: 10px;
    font-size: 34px;
  }
}

/* Final hero visibility overrides across all breakpoints */
.hp-home-hero-slide {
  background-position: center top !important;
}

.hp-home-hero-wrap {
  padding-bottom: 0 !important;
}

.hp-hero-shell {
  padding-left: 48px !important;
  padding-right: 48px !important;
}

.hp-home-hero-stage,
.hp-home-hero {
  border-radius: 16px !important;
}

.hp-home-overlay {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.12) 55%, rgba(0, 0, 0, 0.06)) !important;
}

.hp-home-hero::after {
  height: 48px !important;
  background: linear-gradient(180deg, rgba(6, 6, 6, 0), rgba(6, 6, 6, 0.3)) !important;
}

.hp-hero-shell .hp-hero-dots {
  position: absolute !important;
  left: 50% !important;
  bottom: 12px !important;
  transform: translateX(-50%) !important;
  margin-top: 0 !important;
  z-index: 6 !important;
}

@media (max-width: 700px) {
  .hp-hero-shell {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .hp-home-hero-stage,
  .hp-home-hero {
    border-radius: 12px !important;
  }

  .hp-hero-shell .hp-hero-dots {
    bottom: 8px !important;
  }
}

@media (max-width: 767px) {
  .hp-reader-page .hp-wrap {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  #hp-reader-flow,
  #hp-reader-flow .hp-episode-block,
  #hp-reader-flow .reader-images,
  #hp-reader-flow .reader-images > *,
  #hp-reader-flow .reader-images figure,
  #hp-reader-flow .reader-images .wp-block-image {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  #hp-reader-flow .reader-images img,
  .reader-images img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 0 !important;
  }
}

/* Live search dropdown */
.hp-search {
  position: relative;
}

.hp-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #dedede;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
  z-index: 300;
  overflow: hidden;
  max-height: min(420px, 62vh);
  overflow-y: auto;
}

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

.hp-search-list li + li {
  border-top: 1px solid #efefef;
}

.hp-search-list a {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 0.62rem;
  align-items: center;
  padding: 0.55rem 0.65rem;
  color: #131313;
}

.hp-search-list a:hover {
  background: #f7f7f7;
}

.hp-search-thumb img,
.hp-search-thumb-placeholder {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
}

.hp-search-thumb-placeholder {
  background: linear-gradient(135deg, #ececec, #d9d9d9);
}

.hp-search-text {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.25;
}

.hp-search-empty {
  padding: 0.75rem;
  color: #666;
  font-size: 0.9rem;
}

.hp-search-view-all {
  display: block;
  padding: 0.62rem 0.75rem;
  border-top: 1px solid #efefef;
  font-weight: 800;
  color: #a40f0f;
  background: #fff;
}

/* Fan Favorites desktop: force one row with 6 cards */
@media (min-width: 1024px) {
  .hp-home-favorites .hp-poster-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  }
}

/* Series episode list mobile polish */
@media (max-width: 840px) {
  .hp-episode-item {
    grid-template-columns: 130px 1fr !important;
    gap: 0.72rem !important;
    align-items: center !important;
  }

  .hp-episode-thumb {
    width: 130px !important;
    height: 80px !important;
    border-radius: 12px !important;
  }
}

@media (max-width: 700px) {
  .hp-episode-item {
    grid-template-columns: 130px 1fr !important;
    gap: 0.7rem !important;
    padding: 0.72rem 0 !important;
  }

  .hp-episode-thumb {
    width: 130px !important;
    height: 80px !important;
  }
}

/* Locked episodes: blur thumbnail for non-subscribed/locked viewers only */
.hp-episode-item.is-locked .hp-episode-thumb {
  position: relative;
}

.hp-episode-item.is-locked .hp-episode-thumb img {
  filter: blur(4.5px);
  transform: scale(1.03);
}
