/* ========== Hero Banner Comic – Responsive ========== */

/* Large tablet */
@media (max-width: 1200px) {
    .hero-banner__bg-main {
        max-width: 55%;
    }

    .hero-banner__content {
        max-width: 420px;
    }

    .hero-banner__inner {
        padding: 40px 40px 108px;
    }

    .hero-banner__controls {
        right: 24px;
    }

    .hero-banner__thumbs {
        left: 40px;
        max-width: calc(100% - 240px);
    }

    .hero-banner__slogan {
        right: 36px;
        font-size: 10px;
        letter-spacing: 0.14em;
    }
}

@media (max-width: 1024px) {
    .hero-banner-comic,
    .hero-banner__main,
    .hero-banner__slide {
        min-height: 420px;
    }

    .hero-banner__bg-main {
        max-width: 50%;
    }

    .hero-banner__inner {
        padding: 32px 32px 100px;
    }

    .hero-banner__quote {
        font-size: 0.98rem;
        margin-bottom: 22px;
    }

    .hero-banner__features {
        gap: 12px 16px;
    }

    .hero-banner__features li {
        font-size: 0.75rem;
    }

    .hero-banner__deco {
        top: 20px;
        right: 24px;
        font-size: 1.2rem;
        max-width: 160px;
    }

    .hero-banner__controls {
        right: 16px;
        gap: 10px;
    }

    .hero-banner__nav {
        width: 42px;
        height: 42px;
    }

    .hero-banner__thumbs {
        left: 32px;
        max-width: calc(100% - 200px);
    }

    .hero-banner__thumbs .swiper-slide {
        width: 52px;
    }

    .hero-banner__thumb {
        width: 52px;
        height: 70px;
    }

    .hero-banner__slogan {
        right: 24px;
        bottom: 24px;
        letter-spacing: 0.1em;
    }
}

/* Tablet / Mobile – stacked layout */
@media (max-width: 768px) {
    .hero-banner-comic {
        border-radius: 18px;
        min-height: 0;
        box-shadow: 0 12px 32px color-mix(in srgb, var(--fs-color-primary) 10%, transparent);
    }

    .hero-banner__main,
    .hero-banner__slide {
        min-height: 0;
        height: auto;
    }

    .hero-banner__slide {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-banner__bg {
        position: relative;
        inset: auto;
        width: 100%;
        height: 260px;
        flex-shrink: 0;
    }

    .hero-banner__bg-fill {
        display: none;
    }

    .hero-banner__bg-main {
        left: 0;
        right: 0;
        max-width: none;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center 18%;
    }

    .hero-banner__shade {
        inset: auto;
        top: 0;
        left: 0;
        right: 0;
        height: 260px;
        background: linear-gradient(180deg, transparent 35%, rgba(255, 255, 255, 0.55) 72%, #fff 100%);
    }

    .hero-banner__inner {
        z-index: 3;
        padding: 8px 16px 88px;
        background: #fff;
    }

    .hero-banner__content {
        max-width: 100%;
        justify-content: flex-start;
    }

    .hero-banner__label {
        margin-bottom: 10px;
        font-size: 11px;
        letter-spacing: 0.2em;
    }

    .hero-banner__quote {
        margin-bottom: 18px;
        font-size: 0.95rem;
        max-width: 100%;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .hero-banner__actions {
        margin-bottom: 16px;
        gap: 8px;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
    }

    .hero-banner__btn {
        flex: 1 1 0;
        justify-content: center;
        padding: 9px 12px;
        font-size: 0.8rem;
        gap: 5px;
        white-space: nowrap;
    }

    .hero-banner__btn svg {
        width: 14px;
        height: 14px;
    }

    .hero-banner__features {
        gap: 10px 14px;
    }

    .hero-banner__features li {
        font-size: 0.72rem;
    }

    .hero-banner__feature-icon {
        width: 24px;
        height: 24px;
    }

    .hero-banner__deco,
    .hero-banner__slogan {
        display: none;
    }

    /* Bottom: ẩn prev/next, chỉ còn số trang + thumbs */
    .hero-banner__controls {
        top: auto;
        bottom: 20px;
        right: 12px;
        left: auto;
        transform: none;
        flex-direction: row;
        align-items: center;
        gap: 0;
        z-index: 6;
        width: auto;
    }

    .hero-banner__nav {
        display: none;
    }

    .hero-banner__fraction {
        margin: 0;
        order: 0;
        font-size: 0.75rem;
        line-height: 1;
        text-align: center;
        white-space: nowrap;
    }

    .hero-banner__fraction-current {
        font-size: 0.85rem;
    }

    .hero-banner__thumbs {
        left: 12px;
        right: 64px;
        bottom: 18px;
        max-width: none;
        width: auto;
        padding-bottom: 8px;
        z-index: 5;
        overflow: hidden;
    }

    .hero-banner__thumbs .swiper-slide {
        width: 44px;
    }

    .hero-banner__thumb {
        width: 44px;
        height: 60px;
        border-radius: 8px;
    }

    .hero-banner__thumbs .swiper-slide-thumb-active .hero-banner__thumb::after {
        bottom: -8px;
        width: 22px;
        height: 3px;
    }
}

/* Small mobile */
@media (max-width: 640px) {
    .hero-banner__bg,
    .hero-banner__shade {
        height: 220px;
    }

    .hero-banner__inner {
        padding: 6px 14px 84px;
    }

    .hero-banner__label {
        font-size: 10px;
        letter-spacing: 0.16em;
    }

    .hero-banner__label::after {
        width: 28px;
    }
    .hero-banner__actions {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 6px;
    }

    .hero-banner__btn {
        flex: 1 1 0;
        width: auto;
        justify-content: center;
        padding: 8px 10px;
        font-size: 0.75rem;
    }

    .hero-banner__features {
        display: none;
    }

    .hero-banner__controls {
        bottom: 16px;
        right: 12px;
    }

    .hero-banner__thumbs {
        left: 10px;
        right: 58px;
        bottom: 16px;
    }

    .hero-banner__thumbs .swiper-slide {
        width: 40px;
    }

    .hero-banner__thumb {
        width: 40px;
        height: 54px;
    }
}

/* Extra small */
@media (max-width: 400px) {
    .hero-banner-comic {
        border-radius: 14px;
    }

    .hero-banner__bg,
    .hero-banner__shade {
        height: 200px;
    }

    .hero-banner__inner {
        padding: 4px 12px 80px;
    }

    .hero-banner__btn {
        padding: 6px 6px;
        font-size: 0.72rem;
        gap: 3px;
    }

    .hero-banner__btn svg {
        width: 12px;
        height: 12px;
    }

    .hero-banner__thumbs {
        left: 8px;
        right: 52px;
    }

    .hero-banner__controls {
        right: 10px;
    }

    .hero-banner__thumbs .swiper-slide {
        width: 36px;
    }

    .hero-banner__thumb {
        width: 36px;
        height: 48px;
    }
}

/* ========== Comic Items – Responsive ========== */
@media (max-width: 768px) {
    .comic-original-title {
        font-size: 14px;
    }
}

/* ========== Comic Info (mbv/comic-info.php) – Responsive ========== */
@media (max-width: 768px) {
    .comic-container {
        gap: 1.1rem;
        padding: 1rem;
        border-radius: 0.9rem;
    }

    .comic-image-container {
        flex-basis: 140px;
        width: 140px;
    }

    .comic-info {
        padding: 0;
        gap: 0.7rem;
    }

    .comic-title-detail {
        font-size: 1.2rem;
    }

    .comic-info__stats {
        gap: 0.4rem 0.6rem;
        font-size: 0.85rem;
    }

    .comic-info__rating {
        flex-direction: row;
        align-items: center;
        gap: 0.3rem;
    }

    ul.story-detail-menu a {
        min-width: 132px;
        padding: 0.65rem 1rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 640px) {
    .comic-container {
        flex-direction: column;
        align-items: stretch;
    }

    .comic-image-container {
        width: min(180px, 52vw);
        flex-basis: auto;
        align-self: center;
    }

    .comic-title-detail {
        text-align: center;
    }

    .comic-info__facts {
        gap: 0.85rem 1.25rem;
    }

    ul.story-detail-menu {
        flex-direction: column;
        gap: 0.6rem;
    }

    ul.story-detail-menu li,
    ul.story-detail-menu a {
        width: 100%;
        min-width: 0;
    }
}

/* ========== Comic Grid (comic_new_list) – Responsive ========== */
@media (max-width: 1024px) {
    .comics-grid.comics-grid--cols {
        grid-template-columns: repeat(var(--cols-md, var(--cols-xl, 4)), minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .comics-grid.comics-grid--cols {
        grid-template-columns: repeat(var(--cols-xs, 2), minmax(0, 1fr));
    }

    .comic-card-7.comic-item {
        gap: 10px;
    }

    .comic-card-7__time {
        font-size: 12px;
    }

    .comic-card-7__title {
        font-size: 0.92rem;
    }

    .comic-card-7__chapter {
        font-size: 13px;
    }

    .comic-card-7__genre,
    .comic-card-7__genre:hover,
    .comic-card-7__views {
        font-size: 12px;
    }

    .comic-card-9.comic-item {
        gap: 12px;
        padding: 12px;
    }

    .comic-card-9__cover {
        width: 84px;
    }

    .comic-card-9__excerpt,
    .comic-card-9__genres {
        display: none;
    }

    .comic-card-9__foot {
        flex-wrap: wrap;
        gap: 4px 10px;
    }

    .comic-card-8__rank {
        font-size: 1.5rem;
    }

    .comic-card-8__title {
        font-size: 0.85rem;
    }

    .comic-card-8__badge {
        font-size: 10px;
        padding: 1px 5px;
    }

    .comic-card-8__origin,
    .comic-card-8__line {
        font-size: 11px;
    }

    .top-rank__meta {
        padding-left: 42px;
    }

    .top-rank__meta--wide {
        padding-left: 62px;
    }

    .top-rank__no {
        width: auto;
        font-size: 2.4em;
    }

    .top-rank__no--wide {
        font-size: 1.85em;
    }

    .top-rank__origin,
    .top-rank__line {
        font-size: 11px;
    }

    .top-rank__line svg {
        width: 12px;
        height: 12px;
    }

    .top-rank-list--2 .top-rank__body,
    .top-rank-list--overlay .top-rank__body {
        padding: 28px 8px 8px;
        gap: 2px;
    }

    .top-rank-list--2 .top-rank__no,
    .top-rank-list--overlay .top-rank__no {
        font-size: clamp(1.75rem, 34cqw, 2.6rem);
    }

    .top-rank-list--2 .top-rank__title,
    .top-rank-list--overlay .top-rank__title {
        font-size: 0.85em;
        margin-bottom: 2px;
    }

    .top-rank-list--2 .top-rank__meta-line,
    .top-rank-list--overlay .top-rank__meta-line {
        font-size: 0.7em;
    }

    .top-rank-list--3 .top-rank__no {
        font-size: clamp(2rem, 40cqw, 3rem);
    }

    .top-rank-list--3 .top-rank__title {
        font-size: 0.85em;
    }

    .top-rank-list--3 .top-rank__genre {
        font-size: 0.72em;
    }
}

/* ========== Search page – Responsive ========== */
@media (max-width: 1024px) {
    .search-novel-page {
        padding-bottom: 24px;
    }

    .search-novel-hero {
        margin: 0 -15px 14px;
        padding: 14px 15px 16px;
    }

    .search-novel-hero h1 {
        font-size: 2rem;
    }

    .search-novel-hero p {
        margin-bottom: 12px;
        font-size: 0.92rem;
    }

    .search-novel-hero--banner {
        margin: 0 -15px 18px;
        padding: 0;
    }

    .search-novel-hero--banner.is-container {
        margin-left: 0;
        margin-right: 0;
    }

    .search-novel-hero--banner .search-novel-hero__inner {
        min-height: 0;
        padding: 20px 12px;
    }

    .search-novel-hero--banner.is-container .search-novel-hero__inner {
        padding-right: 18px;
        padding-left: 18px;
    }

    .search-novel-hero--banner .search-novel-hero__grid {
        grid-template-columns: 1fr;
        gap: 18px;
        align-items: stretch;
    }

    .search-novel-hero--banner .search-novel-hero__copy {
        max-width: none;
        padding-bottom: 0;
    }

    .search-novel-hero--banner h1 {
        font-size: clamp(1.8rem, 6vw, 2.4rem);
    }

    .search-novel-hero--banner .search-novel-hero__copy > p {
        margin-bottom: 16px;
        font-size: 0.9rem;
    }

    .search-novel-hero--banner .search-novel-hero__panel {
        padding: 12px;
        border-radius: 14px;
        overflow: hidden;
    }

    .search-novel-hero--banner .search-novel-form {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 6px;
        padding: 4px;
    }

    .search-novel-hero--banner .search-novel-form__icon {
        left: 14px;
        z-index: 1;
        pointer-events: none;
    }

    .search-novel-hero--banner .search-novel-form input[type="search"] {
        width: 100%;
        min-width: 0;
        padding-right: 8px;
    }

    .search-novel-hero--banner .search-novel-form button {
        flex: 0 0 auto;
        min-width: 0;
        padding: 0 12px;
        font-size: 0.86rem;
        white-space: nowrap;
    }

    .search-novel-hero--banner .search-novel-keywords {
        max-width: 100%;
        margin-top: 10px;
        padding-bottom: 2px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .search-novel-hero--banner .search-novel-keywords::-webkit-scrollbar {
        display: none;
    }

    .search-novel-form {
        max-width: none;
    }

    .search-novel-form input[type="search"] {
        min-width: 0;
    }

    .search-novel-keywords,
    .search-story-card__tags {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .search-novel-keywords::-webkit-scrollbar,
    .search-story-card__tags::-webkit-scrollbar {
        display: none;
    }

    .search-novel-keywords > *,
    .search-story-card__tags a {
        flex: none;
    }

    /* Sidebar gom vào nút "Bộ lọc", mở ra thành các nhóm chip */
    .search-novel-sidebar {
        position: static;
        display: block;
        width: 100%;
    }

    .search-filter-toggle {
        display: flex;
        padding: 11px 14px;
        font-size: 0.92rem;
        font-weight: 700;
    }

    .search-filter-toggle span {
        flex: 1;
    }

    .search-filter-toggle strong {
        min-width: 20px;
        padding: 1px 7px;
        border-radius: 999px;
        background: var(--search-blue);
        color: #fff;
        font-size: 0.72rem;
        text-align: center;
    }

    .search-filter-toggle i {
        transform: translateY(-2px) rotate(45deg);
    }

    .search-novel-sidebar.is-open .search-filter-toggle i {
        transform: translateY(2px) rotate(-135deg);
    }

    .search-filter-panel {
        display: none;
        padding: 0 12px;
        border-top: 1px solid var(--search-line);
    }

    .search-novel-sidebar.is-open .search-filter-panel {
        display: block;
    }

    .search-filter-all {
        display: none;
    }

    .search-filter-list .search-filter-list__all {
        display: flex;
    }

    .search-filter-box,
    .search-filter-box:last-child {
        min-width: 0;
        padding: 10px 0;
        border: 0;
    }

    .search-filter-box + .search-filter-box {
        border-top: 1px dashed var(--search-line);
    }

    .search-filter-box__label {
        margin-bottom: 7px;
        color: var(--search-muted);
        font-size: 0.68rem;
    }

    .search-filter-list,
    .search-filter-checks,
    .search-filter-radio {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 5px;
        min-width: 0;
        max-height: none;
    }

    .search-filter-radio {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .search-filter-list a,
    .search-filter-checks a,
    .search-filter-radio a {
        justify-content: center;
        gap: 4px;
        min-width: 0;
        height: 30px;
        padding: 0 8px;
        border: 1px solid var(--search-line);
        border-radius: 7px;
        background: #fff;
        color: #56657e;
        font-size: 0.75rem;
        font-weight: 600;
        line-height: 1;
        white-space: nowrap;
    }

    .search-filter-list a {
        justify-content: space-between;
    }

    .search-filter-list .search-filter-list__all {
        justify-content: center;
    }

    .search-filter-list a span {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .search-filter-list a:hover {
        color: #56657e;
    }

    .search-filter-list a.is-active,
    .search-filter-checks a.is-active,
    .search-filter-radio a.is-active {
        border-color: var(--search-blue);
        background: var(--search-blue);
        color: #fff;
    }

    .search-filter-list a strong {
        flex: none;
        color: inherit;
        font-size: 0.66rem;
        font-weight: 600;
        opacity: 0.6;
    }

    .search-filter-checks a span,
    .search-filter-radio a span {
        display: none;
    }

    .search-results-head {
        margin-bottom: 10px;
    }

    .search-results-head__title {
        font-size: 1.05rem;
        overflow-wrap: anywhere;
    }

    .search-results-head p {
        font-size: 0.85rem;
    }

    .search-story-card {
        grid-template-columns: 90px minmax(0, 1fr) 120px;
        gap: 12px;
        padding: 12px;
    }

    .search-story-card.is-plain {
        grid-template-columns: 90px minmax(0, 1fr);
    }

    .search-novel-list {
        grid-template-columns: repeat(var(--cols-md, var(--cols-xl, 1)), minmax(0, 1fr));
    }

    .search-story-card__title-row h3 {
        min-width: 0;
        display: -webkit-box;
        overflow: hidden;
        overflow-wrap: anywhere;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .search-novel-pagination .page-numbers {
        min-width: 36px;
        height: 36px;
        padding: 0 8px;
    }
}

@media (max-width: 768px) {
    .search-novel-hero h1 {
        font-size: 1.6rem;
        letter-spacing: -0.03em;
    }

    .search-novel-form {
        gap: 6px;
        padding: 5px;
    }

    .search-novel-form__icon {
        left: 15px;
    }

    .search-novel-form input[type="search"],
    .search-novel-form button {
        height: 42px;
    }

    .search-novel-form input[type="search"] {
        padding-left: 34px;
        font-size: 0.95rem;
    }

    .search-novel-form button {
        padding: 0 14px;
        line-height: 42px;
        font-size: 0.9rem;
    }

    .search-story-card {
        grid-template-columns: 76px minmax(0, 1fr);
        gap: 10px;
        padding: 10px;
        border-radius: 10px;
    }

    .search-novel-list {
        grid-template-columns: repeat(var(--cols-xs, 1), minmax(0, 1fr));
    }

    .search-story-card__body {
        align-self: start;
    }

    .search-story-card__title-row {
        display: block;
        margin-bottom: 4px;
    }

    .search-story-card__title-row h3 {
        font-size: 0.95rem;
    }

    .search-story-card__status {
        display: inline-block;
        margin-top: 4px;
        padding: 2px 7px;
        font-size: 0.66rem;
    }

    .search-story-card__meta {
        gap: 2px 12px;
        margin-bottom: 5px;
        font-size: 0.75rem;
    }

    .search-story-card__meta span:not(:first-child)::before,
    .search-story-card__meta time::before {
        left: -8px;
    }

    .search-story-card__body p {
        display: none;
    }

    .search-story-card__tags {
        gap: 5px;
    }

    .search-story-card__tags a {
        padding: 3px 8px;
        font-size: 0.72rem;
    }

    .search-story-card__side {
        grid-column: 1 / -1;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 8px 0 0;
        border-top: 1px solid var(--search-line);
        border-left: 0;
    }

    .search-story-card__stats {
        display: flex;
        align-items: baseline;
        gap: 6px;
    }

    .search-story-card__stats strong {
        font-size: 0.9rem;
    }

    .search-story-card__read {
        flex: none;
        min-height: 34px;
        padding: 0 16px;
        font-size: 0.84rem;
    }

    .search-novel-empty {
        padding: 32px 16px;
    }
}

@media (max-width: 480px) {
    .search-novel-breadcrumb {
        gap: 6px;
        margin-bottom: 6px;
        font-size: 0.76rem;
    }

    .search-novel-hero h1 {
        margin-bottom: 10px;
        font-size: 1.4rem;
    }

    .search-novel-hero:not(.search-novel-hero--banner) p {
        display: none;
    }

    .search-novel-hero--banner h1 {
        font-size: 1.7rem;
    }

    .search-novel-hero--banner .search-novel-hero__copy > p {
        display: -webkit-box;
        -webkit-line-clamp: 3;
        line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin-bottom: 14px;
        font-size: 0.86rem;
    }

    .search-novel-hero--banner .search-novel-hero__stats {
        gap: 8px 12px;
    }

    .search-novel-hero--banner .search-novel-hero__stats li {
        font-size: 0.8rem;
    }

    .search-novel-hero--banner .search-novel-form {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 0;
        background: transparent;
    }

    .search-novel-hero--banner .search-novel-form__icon {
        top: 13px;
        left: 14px;
    }

    .search-novel-hero--banner .search-novel-form input[type="search"] {
        height: 44px;
        padding: 0 12px 0 40px;
        border-radius: 10px;
        background: #f3f5f9;
    }

    .search-novel-hero--banner .search-novel-form button {
        width: 100%;
        height: 44px;
        padding: 0 14px;
    }

    .search-novel-form button {
        padding: 0 12px;
    }

    .search-novel-keywords span {
        display: none;
    }

    .search-story-card {
        grid-template-columns: 68px minmax(0, 1fr);
    }

    .search-novel-pagination {
        gap: 4px;
        margin-top: 16px;
    }

    .search-novel-pagination .page-numbers {
        min-width: 32px;
        height: 32px;
        padding: 0 6px;
        font-size: 0.82rem;
    }
}

/* ========== Tìm truyện (comic_tim_truyen) – Responsive ========== */
@media (max-width: 1200px) {
    .tim-truyen-layout {
        grid-template-columns: minmax(0, 1fr) 240px;
        gap: 18px;
    }

    .tim-truyen-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .tim-truyen-page .tim-truyen-grid {
        grid-template-columns: repeat(var(--cols-md, 3), minmax(0, 1fr));
    }
}

@media (max-width: 849px) {
    .tim-truyen-hero {
        margin: -30px -15px 14px;
        padding: 20px 15px 18px;
    }

    .tim-truyen-hero p {
        margin-bottom: 12px;
        font-size: 0.92rem;
    }

    .tim-truyen-status {
        -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
        mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
    }

    .tim-truyen-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .tim-truyen-mobile-cats {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 12px;
        padding: 6px 6px 6px 14px;
        border: 1px solid var(--tt-line);
        border-radius: 12px;
        background: var(--tt-cats-bg, #fff);
        border-color: var(--tt-cats-line, var(--tt-line));
        box-shadow: 0 12px 28px rgba(15, 41, 82, 0.05);
    }

    .tim-truyen-mobile-cats__label {
        display: inline-flex;
        flex: none;
        align-items: center;
        gap: 6px;
        color: var(--tt-cats-heading, var(--tt-ink));
        font-size: 0.88rem;
        font-weight: 700;
    }

    .tim-truyen-mobile-cats__label svg {
        color: var(--tt-cats-active, var(--tt-blue));
    }

    .tim-truyen-mobile-cats form {
        flex: 1;
        min-width: 0;
        margin: 0;
    }

    .tim-truyen-mobile-cats select {
        width: 100%;
        height: 38px;
        margin: 0;
        padding: 0 30px 0 12px;
        border: 1px solid var(--tt-cats-line, var(--tt-line));
        border-radius: 8px;
        background-color: var(--tt-cats-bg, #f7f9fc);
        box-shadow: none;
        color: var(--tt-cats-text, var(--tt-ink));
        font-size: 0.88rem;
        font-weight: 600;
    }

    .tim-truyen-status {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 10px 28px 10px 12px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .tim-truyen-status::-webkit-scrollbar {
        display: none;
    }

    .tim-truyen-status > * {
        flex: none;
        white-space: nowrap;
    }

    .tim-truyen-toolbar {
        padding: 10px 12px;
    }

    .tim-truyen-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
    }
}

@media (max-width: 849px) {
    .novel-list-banner__inner,
    .container .novel-list-banner.is-full .novel-list-banner__inner.container {
        max-width: none;
        padding: 28px 16px 22px;
    }

    .history-page .novel-list-banner.is-full > .novel-list-banner__inner.container,
    .rank-page .novel-list-banner.is-full > .novel-list-banner__inner.container {
        padding: 28px 31px 22px;
    }

    .novel-list-banner {
        min-height: 0;
    }

    .novel-list-banner__inner {
        min-height: min(var(--nl-banner-min), 300px);
    }

    .novel-list-banner h1.novel-list-banner__title {
        font-size: 1.85rem;
    }

    .novel-list-banner__desc {
        font-size: 0.95rem;
    }

    .novel-list-banner__shade {
        background:
            linear-gradient(180deg, rgba(28, 14, 32, 0.28) 0%, rgba(28, 14, 32, 0.42) 48%, rgba(28, 14, 32, 0.55) 100%);
    }

    .novel-list-banner.is-container {
        border-radius: 16px;
    }
}

@media (max-width: 640px) {
    .novel-list__title {
        font-size: 1.45rem;
    }

    .novel-list-banner h1.novel-list-banner__title {
        font-size: 1.6rem;
    }

    .tim-truyen-hero h1 {
        font-size: 1.6rem;
    }

    .tim-truyen-search {
        gap: 6px;
        padding: 5px;
    }

    .tim-truyen-search__icon {
        left: 15px;
    }

    .tim-truyen-search input[type="search"],
    .tim-truyen-search button {
        height: 42px;
    }

    .tim-truyen-search input[type="search"] {
        padding-left: 36px;
        font-size: 0.95rem;
    }

    .tim-truyen-search button {
        padding: 0 14px;
        line-height: 42px;
        font-size: 0.9rem;
    }

    .tim-truyen-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .tim-truyen-page .tim-truyen-grid {
        grid-template-columns: repeat(var(--cols-xs, 2), minmax(0, 1fr));
    }

    .tim-truyen-card__body {
        padding: 8px 10px 10px;
    }

    .tim-truyen-card__title {
        font-size: 0.88rem;
    }

    .tim-truyen-tabs a {
        padding: 6px 14px;
        font-size: 0.82rem;
    }

    .tim-truyen-pagination .page-numbers {
        min-width: 34px;
        height: 34px;
        padding: 0 8px;
    }
}

@media (max-width: 480px) {
    .tim-truyen-hero p {
        display: none;
    }

    .tim-truyen-hero {
        padding: 16px 15px 14px;
    }

    .tim-truyen-hero h1 {
        margin-bottom: 12px;
        font-size: 1.45rem;
    }

    .tim-truyen-status__label {
        font-size: 0.82rem;
    }

    .tim-truyen-status__chip {
        padding: 4px 10px;
        font-size: 0.8rem;
    }

    .tim-truyen-toolbar {
        flex-wrap: nowrap;
        gap: 8px;
    }

    .tim-truyen-tabs {
        gap: 6px;
        min-width: 0;
    }

    .tim-truyen-tabs a {
        padding: 6px 12px;
        white-space: nowrap;
    }

    .tim-truyen-tabs {
        flex-wrap: nowrap;
    }

    .tim-truyen-sort summary {
        min-height: 32px;
        padding-left: 6px;
        font-size: 0.8rem;
    }

    .tim-truyen-sort summary strong {
        display: none;
    }

    .tim-truyen-card__stats {
        gap: 8px;
        font-size: 0.74rem;
    }

    .tim-truyen-card__chapter {
        font-size: 0.76rem;
    }

    .tim-truyen-card__tags {
        gap: 4px;
    }

    .tim-truyen-card__tags a {
        padding: 2px 7px;
        font-size: 0.68rem;
    }
}

/* ========== Updated Comics (comic_updated_list) – Responsive ========== */
@media (max-width: 767px) {
  .updated-comics__grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* ========== Hero Search (comic_hero_search) – Responsive ========== */
@media (max-width: 1100px) {
    .hero-search__inner {
        grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
        gap: 18px;
        min-height: 420px;
        padding: 32px 20px 22px 28px;
    }

    h2.hero-search__title {
        font-size: 36px !important;
    }
}

@media (max-width: 849px) {
    .hero-search {
        border-radius: 18px;
    }

    .hero-search__shade {
        background: linear-gradient(180deg, rgba(18, 8, 22, 0.55) 0%, rgba(18, 8, 22, 0.28) 55%, rgba(18, 8, 22, 0.45) 100%);
    }

    .hero-search__inner,
    .hero-search--solo .hero-search__inner {
        grid-template-columns: 1fr;
        align-items: stretch;
        min-height: 0;
        padding: 28px 16px 16px;
    }

    .hero-search__copy {
        max-width: none;
        padding-bottom: 0;
    }

    h2.hero-search__title {
        font-size: 30px !important;
    }

    .hero-search__desc {
        font-size: 14px;
    }

    .hero-search__form {
        max-width: none;
        height: 48px;
    }

    .hero-search__panel {
        padding: 14px 12px 12px;
    }

    .hero-search__card {
        flex-basis: 84px;
        width: 84px;
    }

    .hero-search__next {
        top: 52px;
        right: 0;
    }
}

/* ========== Hero Feature (comic_hero_feature) – Responsive ========== */
@media (max-width: 1100px) {
    .hero-feature,
    .hero-feature__main,
    .hero-feature__main .swiper-slide,
    .hero-feature__slide {
        min-height: 500px;
        height: 500px;
    }

    .hero-feature {
        min-height: 500px;
    }

    h2.hero-feature__title {
        font-size: 30px !important;
    }

    .hero-feature__content {
        max-width: 460px;
        padding: 36px 24px 90px 32px;
    }

    .hero-feature__rail {
        width: 230px;
    }
}

@media (max-width: 849px) {
    .hero-feature,
    .hero-feature__main,
    .hero-feature__main .swiper-slide,
    .hero-feature__slide {
        height: auto;
        min-height: 0;
    }

    .hero-feature__slide {
        min-height: 520px;
    }

    .hero-feature__rail {
        display: none;
    }

    .hero-feature__content {
        max-width: none;
        padding: 28px 16px 88px;
    }

    h2.hero-feature__title {
        font-size: 26px !important;
    }

    .hero-feature__excerpt {
        font-size: 14px;
    }

    .hero-feature__stats {
        flex-wrap: nowrap;
        gap: 12px;
        margin-bottom: 18px;
    }

    .hero-feature__stats li {
        gap: 6px;
        min-width: 0;
    }

    .hero-feature__stats strong {
        font-size: 14px;
    }

    .hero-feature__stats small {
        font-size: 11px;
        white-space: nowrap;
    }

    .hero-feature__stat-icon {
        flex: 0 0 26px;
        width: 26px;
        height: 26px;
        border-radius: 8px;
    }

    .hero-feature__stat-icon svg {
        width: 14px;
        height: 14px;
    }

    .hero-feature__dots {
        left: 16px;
        transform: none;
    }

    .hero-feature__nav {
        right: 12px;
        bottom: 14px;
    }

    a.hero-feature__btn {
        height: 35px;
        padding: 0 16px;
        font-size: 14px;
    }
}

/* ========== Hero Covers (comic_hero_covers) – Responsive ========== */
@media (max-width: 1100px) {
    .hero-covers__main .swiper-slide {
        width: min(440px, 52%);
    }

    .hero-covers__title {
        font-size: 22px;
    }
}

@media (max-width: 849px) {
    .hero-covers {
        --hero-covers-radius: 14px;
        padding: 12px 0 4px;
    }

    .hero-covers button.hero-covers__arrow,
    .hero-covers button.hero-covers__arrow:hover,
    .hero-covers button.hero-covers__arrow:focus {
        width: 28px;
        height: 44px;
    }

    button.hero-covers__arrow--prev {
        left: 4px;
    }

    button.hero-covers__arrow--next {
        right: 4px;
    }

    button.hero-covers__arrow svg {
        width: 16px;
        height: 26px;
    }

    .hero-covers__main .swiper-slide,
    .hero-covers--single .swiper-slide {
        width: 72%;
    }

    .hero-covers__info {
        left: 14px;
        right: 58px;
        bottom: 12px;
        gap: 4px;
    }

    .hero-covers__title {
        font-size: 18px;
    }

    .hero-covers__line,
    .hero-covers__label,
    .hero-covers__count {
        font-size: 12px;
    }
}

/* ========== Trang tác giả ========== */
@media (max-width: 768px) {
    .author-profile__name {
        font-size: 1.85em;
    }

    .author-profile__stats {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px 12px;
    }

    .author-profile__stats li,
    .col-inner .author-profile__stats li,
    .author-profile__stats li + li {
        padding: 0;
        border-left: 0;
    }

    .author-works__head {
        align-items: flex-start;
    }

    .author-works__title {
        font-size: 1.15em;
    }
}

/* ========== Danh sách truyện nền ========== */
@media (max-width: 1100px) {
    .story-banner__inner {
        grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
        padding: 28px 3%;
    }

    .story-banner__title {
        font-size: 15px;
    }
}

@media (max-width: 849px) {
    .story-banner,
    .story-banner__inner {
        height: auto;
        min-height: var(--story-banner-min, 440px);
    }

    .story-banner__bg {
        position: absolute;
        inset: 0;
        height: auto;
    }

    .story-banner--has-mobile-bg .story-banner__bg img {
        object-position: center center;
    }

    .story-banner__inner {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: minmax(180px, 1fr) auto;
        align-items: stretch;
        align-content: stretch;
        padding: 0 14px 16px;
    }

    .story-banner__grid {
        gap: 14px 12px;
    }

    .story-banner__cover {
        width: 58px;
    }

    .story-banner__title {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .story-banner__inner {
        grid-template-rows: minmax(150px, 1fr) auto;
        padding: 0 12px 14px;
    }

    .story-banner__grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* ========== Slider bìa truyện ========== */
@media (max-width: 1100px) {
    .cover-slider__stage {
        column-gap: 24px;
        padding-left: var(--cover-slider-pad-x, 48px);
    }

    h3.cover-slider__title {
        font-size: 22px !important;
    }
}

@media (max-width: 849px) {
    .cover-slider__stage {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto;
        grid-template-areas:
            "head"
            "main"
            "foot";
        row-gap: 14px;
        height: auto;
        padding: var(--cover-slider-pad-y-md, 16px) var(--cover-slider-pad-x-md, 16px);
    }

    .cover-slider__main,
    .cover-slider__main .swiper-slide {
        height: 230px;
    }

    .cover-slider__main .swiper-slide {
        width: 158px;
    }

    .cover-slider__foot {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
        gap: 12px;
    }

    .cover-slider__info {
        flex: 1;
        min-height: 0;
    }

    h3.cover-slider__title {
        font-size: 20px !important;
    }
}

@media (max-width: 549px) {
    .cover-slider__stage {
        padding: var(--cover-slider-pad-y-sm, 16px) var(--cover-slider-pad-x-sm, 16px);
    }
}

/* ========== Danh sách nép ========== */
@media (max-width: 849px) {
    .nest-list {
        --nest-gap: 8px;
        height: 250px;
    }

    .nest-list__track {
        padding: 6px 0;
    }

    .nest-list__item,
    .nest-list__track:hover .nest-list__item,
    .nest-list__track:hover .nest-list__item:hover,
    .nest-list__item:focus-visible,
    .nest-list--single .nest-list__item,
    .nest-list--single .nest-list__track:hover .nest-list__item {
        flex-basis: var(--nest-item);
        max-width: none;
        height: 238px;
        transform: none;
    }

    .nest-list__track:has(.is-open) .nest-list__item {
        flex-basis: calc(var(--nest-item) * 0.72);
    }

    .nest-list__track:has(.is-open) .nest-list__item.is-open,
    .nest-list__track:hover .nest-list__item.is-open {
        z-index: 2;
        flex-basis: calc(var(--nest-item) * 1.85);
    }

    .nest-list__title {
        padding: 36px 10px 10px;
        font-size: 14px;
    }
}

/* ========== Trang bảng xếp hạng ========== */
@media (max-width: 849px) {
    .rank-head__title {
        font-size: 1.45rem;
    }

    .rank-modes {
        gap: 16px;
    }

    .rank-modes__tab {
        font-size: 12px;
        letter-spacing: 0.04em;
    }

    .rank-board__count {
        margin-bottom: 8px;
        font-size: 12px;
    }

    .rank-board__sub {
        gap: 14px;
    }

    .rank-board__tab {
        font-size: 11px;
    }

    .rank-stage {
        gap: 8px;
        padding: 12px 8px 10px;
        border-radius: 16px;
    }

    .rank-stage--3 {
        row-gap: 40px;
    }

    .rank-stage__lead {
        gap: 8px;
    }

    .rank-stage__mark {
        width: 26px;
        height: 26px;
        border-radius: 8px;
    }

    .rank-stage__mark svg {
        width: 14px;
        height: 14px;
    }

    .rank-stage__lead strong {
        font-size: 13px;
    }

    .rank-stage__lead em {
        font-size: 10px;
    }

    .rank-stage--3 .rank-stage__card--1 {
        transform: translateY(-6px);
    }

    .rank-stage__card {
        padding: 6px 6px 8px;
        border-radius: 12px;
    }

    .rank-stage__cover {
        border-radius: 10px;
    }

    .rank-stage__badge {
        top: 8px;
        left: 8px;
    }

    .rank-stage__card--1 .rank-stage__badge {
        top: -10px;
    }

    .rank-stage__card--1 .rank-stage__badge::before {
        bottom: -3px;
        width: 34px;
        height: 38px;
    }

    .rank-stage__card--2 .rank-stage__badge::before,
    .rank-stage__card--3 .rank-stage__badge::before {
        bottom: -3px;
        width: 30px;
        height: 34px;
    }

    .rank-stage__crown {
        top: -12px;
        width: 18px;
        height: 12px;
    }

    .rank-stage__no {
        width: 24px;
        height: 28px;
        font-size: 12px;
    }

    .rank-stage__card--1 .rank-stage__no {
        width: 28px;
        height: 32px;
        font-size: 13px;
    }

    .rank-stage__hot {
        top: 6px;
        right: 6px;
        gap: 2px;
        padding: 2px 5px;
        font-size: 10px;
    }

    .rank-stage__hot svg {
        width: 11px;
        height: 11px;
    }

    .rank-stage__body {
        padding: 6px 2px 0;
    }

    .rank-stage__title,
    .rank-stage__card--1 .rank-stage__title {
        font-size: 12px;
    }

    .rank-stage__tags {
        gap: 4px;
        margin-top: 6px;
    }

    .rank-stage__tags span {
        padding: 2px 5px;
        font-size: 10px;
    }

    .rank-stage__foot {
        gap: 4px 6px;
        margin-top: 6px;
        font-size: 10px;
    }

    .rank-stage__foot svg {
        width: 10px;
        height: 10px;
    }

    .rank-sheet__row {
        grid-template-columns: 28px 36px minmax(0, 1fr) minmax(0, max-content) max-content;
        gap: 8px;
        padding: 8px 10px;
    }

    .rank-sheet__no {
        font-size: 13px;
    }

    .rank-sheet__cover {
        width: 36px;
        height: 50px;
    }

    .rank-sheet__title {
        font-size: 13px;
    }

    .rank-sheet__origin,
    .rank-sheet__chapter {
        font-size: 11px;
    }

    .rank-sheet__views {
        font-size: 10px;
    }

    .rank-sheet__views strong {
        font-size: 12px;
    }

    .rank-grid__modes {
        gap: 18px;
    }

    .rank-grid__mode {
        font-size: 12px;
    }

    .rank-grid__list {
        grid-template-columns: repeat(var(--rg-cols-md, var(--rg-cols, 3)), minmax(0, 1fr));
        gap: 20px 10px;
        padding: 12px 10px 16px;
    }

    .rank-grid__frame {
        border-radius: var(--rg-radius-md, var(--rg-radius, 0px));
    }

    .rank-grid__no {
        --rank-stroke: 4px;
        --rank-edge: 6px;
        bottom: -6px;
        font-size: 36px;
    }

    .rank-grid__no--wide {
        font-size: 28px;
    }

    .rank-grid__badge {
        font-size: 10px;
    }

    .rank-grid__title,
    .rank-grid__kind,
    .rank-grid__views {
        font-size: 12px;
    }
}

@media (max-width: 849px) {
    .rank-rows {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 12px;
    }

    .rank-rows__modes {
        flex-direction: row;
        overflow-x: auto;
    }

    .rank-rows__item {
        grid-template-columns: 40px 56px minmax(0, 1fr);
        gap: 10px;
    }

    .rank-rows__cover {
        width: 56px;
        height: 76px;
    }

    .rank-rows__read {
        grid-column: 3;
        justify-self: start;
    }

    .rank-rows__title {
        font-size: 15px;
    }
}

@media (max-width: 549px) {
    .rank-grid__list {
        grid-template-columns: repeat(var(--rg-cols-sm, 2), minmax(0, 1fr));
    }

    .rank-grid__frame {
        border-radius: var(--rg-radius-sm, var(--rg-radius-md, var(--rg-radius, 0px)));
    }

    .rank-rows {
        display: grid;
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 4px 8px;
        align-items: start;
        padding: 4px 0 8px;
        border-radius: 0;
    }

    .rank-rows__side {
        display: contents;
    }

    .rank-rows__mobile-bar {
        display: block;
        grid-column: 2;
        grid-row: 1;
        margin: 0;
    }

    .rank-rows__mobile-title {
        margin: 0;
        color: var(--rr-text, #111);
        font-size: 18px;
        font-weight: 800;
        line-height: 1.2;
    }

    .rank-rows__modes {
        position: sticky;
        top: 72px;
        z-index: 3;
        display: flex;
        grid-column: 1;
        grid-row: 1 / span 2;
        flex-direction: column;
        align-items: center;
        align-self: start;
        gap: 16px;
        overflow: visible;
        padding-top: 36px;
    }

    .rank-rows__mode {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        padding: 0;
        border-radius: 12px;
        background: transparent;
        color: #c5cad3;
    }

    .rank-rows__mode-icon {
        display: block;
    }

    .rank-rows__mode-label {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: -1px;
        padding: 0;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .rank-rows__main {
        display: flex;
        grid-column: 2;
        grid-row: 2;
        flex-direction: column;
        min-width: 0;
    }

    .rank-rows__filter-label {
        display: none;
    }

    .rank-rows__panel {
        order: 1;
    }

    .rank-rows__filters {
        position: sticky;
        bottom: 12px;
        z-index: 4;
        order: 2;
        flex-wrap: nowrap;
        gap: 0;
        margin: 10px 0 0;
        padding: 4px;
        overflow-x: auto;
        border-radius: 999px;
        background: #eceff4;
        scrollbar-width: none;
    }

    body.has-mbn .rank-rows__filters {
        bottom: calc(74px + env(safe-area-inset-bottom, 0px));
    }

    .rank-rows__filters--time {
        flex-direction: row-reverse;
    }

    .rank-rows__filters::-webkit-scrollbar {
        display: none;
    }

    .rank-rows__filter {
        flex: 1 0 auto;
        min-width: max-content;
        gap: 0;
        border: 0;
        border-radius: 999px;
        padding: 8px 12px;
        background: transparent;
        color: #8b95a7;
    }

    .rank-rows__filter small {
        display: none;
    }

    .rank-rows__filter span {
        font-size: 13px;
        font-weight: 700;
    }

    .rank-rows__filter.is-active,
    .rank-rows__filter.is-active small {
        background: #fff;
        color: #222;
        box-shadow: 0 1px 4px rgba(17, 17, 17, 0.1);
    }

    .rank-rows__item {
        grid-template-columns: 64px minmax(0, 1fr);
        gap: 12px;
        align-items: center;
        padding: 10px 0;
        border-bottom: 0;
    }

    .rank-rows__no,
    .rank-rows__tags,
    .rank-rows__excerpt,
    .rank-rows__read {
        display: none;
    }

    .rank-rows__cover {
        width: 64px;
        height: 86px;
    }

    .rank-rows__badge {
        position: absolute;
        left: 0px;
        bottom: 0px;
        z-index: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 16px;
        height: 16px;
        padding: 0 3px;
        border-radius: 3px;
        color: #fff;
        font-size: 11px;
        font-weight: 800;
        line-height: 1;
    }

    .rank-rows__badge--1 {
        background: #ff4d4f;
    }

    .rank-rows__badge--2 {
        background: #ff8c1a;
    }

    .rank-rows__badge--3 {
        background: #f5b301;
    }

    .rank-rows__badge--rest {
        background: #4c8dff;
    }

    .rank-rows__title {
        display: -webkit-box;
        overflow: hidden;
        font-size: 15px;
        font-weight: 700;
        line-height: 1.35;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .rank-rows__byline {
        margin-top: 4px;
        color: #9aa0a6;
        font-size: 12px;
    }
}

@media (max-width: 1024px) {
    .novel-list .tim-truyen-grid {
        grid-template-columns: repeat(var(--cols-md, 3), minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .novel-list .tim-truyen-grid {
        grid-template-columns: repeat(var(--cols-xs, 2), minmax(0, 1fr));
    }

    .novel-list__bar {
        flex-wrap: wrap;
        gap: 8px;
    }

    .novel-list__tabs.is-line {
        gap: 18px;
        overflow-x: auto;
    }

    .novel-list__tabs.is-line a,
    .novel-list__tabs.is-line a:visited {
        font-size: 0.92rem;
        white-space: nowrap;
    }

    .novel-list__tools {
        width: 100%;
        justify-content: flex-end;
    }

    .novel-list-page {
        grid-template-columns: minmax(0, 1fr);
    }

    .novel-list-page > .novel-list__tabs:has(+ .novel-list__tools),
    .novel-list-page > .novel-list__tabs.is-line:has(+ .novel-list__tools) + .novel-list__tools {
        grid-column: 1 / -1;
        padding-left: 0;
    }

    .novel-list-page > .novel-list__tabs.is-line:has(+ .novel-list__tools) + .novel-list__tools {
        border-bottom: 0;
    }
}

/* ========== Hero đề xuất (comic_hero_suggest) ========== */
@media (max-width: 1100px) {
    .hero-suggest {
        column-gap: 20px;
        padding: 40px 28px 28px;
    }

    .hero-suggest h2.hero-suggest__title {
        font-size: 26px;
    }

}

@media (max-width: 849px) {
    .hero-suggest {
        grid-template-columns: 1fr;
        row-gap: 8px;
        min-height: 0;
        padding: 28px 16px 20px;
        border-radius: 16px;
    }

    .hero-suggest__copy {
        max-width: none;
    }

    .hero-suggest h2.hero-suggest__title {
        font-size: 24px;
    }

    .hero-suggest__excerpt {
        font-size: 15px;
        line-height: 22px;
    }

    .hero-suggest__stage {
        order: -1;
    }

    .hero-suggest__main .swiper-slide,
    .hero-suggest--single .swiper-slide {
        width: min(calc(var(--hs-cover) * 2 / 3), 58vw);
    }

    button.hero-suggest__arrow,
    button.hero-suggest__arrow:hover,
    button.hero-suggest__arrow:focus {
        width: 36px;
        height: 36px;
    }

    button.hero-suggest__arrow--prev {
        left: 4px;
    }

    button.hero-suggest__arrow--next {
        right: 4px;
    }

    a.hero-suggest__read,
    a.hero-suggest__read:visited,
    a.hero-suggest__read:hover,
    a.hero-suggest__read:focus {
        min-width: 0;
        height: 44px;
        font-size: 15px;
    }

    button.hero-suggest__heart,
    button.hero-suggest__heart:hover,
    button.hero-suggest__heart:focus {
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 849px) {
    .trend-rank {
        padding-top: var(--tr-pad-y-md, var(--tr-pad-y, 22px));
        padding-bottom: var(--tr-pad-y-md, var(--tr-pad-y, 22px));
        border-radius: 10px;
    }

    .trend-rank__head {
        padding-right: var(--tr-pad-x-md, var(--tr-pad-x, 20px));
        padding-left: var(--tr-pad-x-md, var(--tr-pad-x, 20px));
    }

    h2.trend-rank__heading {
        font-size: var(--tr-heading-md, var(--tr-heading, 18px));
    }

    .trend-rank__slider {
        padding-left: var(--tr-pad-x-md, var(--tr-pad-x, 20px));
    }

    .trend-rank__slider .swiper-wrapper {
        gap: var(--tr-gap-md, var(--tr-gap, 12px));
    }

    .trend-rank__slider .swiper-slide {
        width: var(--tr-card-md, 140px);
    }

    .trend-rank__copy {
        padding-left: calc(var(--tr-rank-md, var(--tr-rank, 70px)) * 0.5);
    }

    .trend-rank__name {
        font-size: var(--tr-name-md, var(--tr-name, 13px));
    }

    .trend-rank__foot {
        font-size: calc(var(--tr-name-md, var(--tr-name, 13px)) - 2px);
    }

    .trend-rank__no {
        font-size: var(--tr-rank-md, var(--tr-rank, 70px));
    }

    button.trend-rank__nav,
    button.trend-rank__nav:hover,
    button.trend-rank__nav:focus {
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 549px) {
    .trend-rank {
        padding-top: var(--tr-pad-y-sm, var(--tr-pad-y-md, 16px));
        padding-bottom: var(--tr-pad-y-sm, var(--tr-pad-y-md, 16px));
    }

    .trend-rank__head {
        padding-right: var(--tr-pad-x-sm, var(--tr-pad-x-md, 16px));
        padding-left: var(--tr-pad-x-sm, var(--tr-pad-x-md, 16px));
    }

    .trend-rank__slider {
        padding-left: var(--tr-pad-x-sm, var(--tr-pad-x-md, 16px));
    }

    .trend-rank__slider .swiper-wrapper {
        gap: var(--tr-gap-sm, var(--tr-gap-md, 10px));
    }

    .trend-rank__slider .swiper-slide {
        width: var(--tr-card-sm, 124px);
    }

    h2.trend-rank__heading {
        font-size: var(--tr-heading-sm, var(--tr-heading-md, 16px));
    }

    .trend-rank__copy {
        padding-left: calc(var(--tr-rank-sm, var(--tr-rank-md, 62px)) * 0.5);
    }

    .trend-rank__name {
        font-size: var(--tr-name-sm, var(--tr-name-md, 12px));
    }

    .trend-rank__foot {
        font-size: calc(var(--tr-name-sm, var(--tr-name-md, 12px)) - 1px);
    }

    .trend-rank__no {
        font-size: var(--tr-rank-sm, var(--tr-rank-md, 62px));
    }

    button.trend-rank__chip,
    button.trend-rank__chip:hover,
    button.trend-rank__chip:focus {
        height: 30px;
        padding: 0 12px;
        font-size: 13px;
        line-height: 30px;
    }
}

@media (max-width: 849px) {
    .cat-suggest {
        padding: var(--cat-pad-y-md, var(--cat-pad-y, 22px)) var(--cat-pad-x-md, var(--cat-pad-x, 18px));
    }

    h2.cat-suggest__title {
        font-size: var(--cat-title-size-md, var(--cat-title-size, 18px));
    }

    ul.cat-suggest__list {
        gap: var(--cat-gap-md, var(--cat-gap, 10px));
    }

    a.cat-suggest__chip {
        min-height: calc(var(--cat-chip-size-md, var(--cat-chip-size, 13px)) + 21px);
        padding: 0 calc(var(--cat-chip-size-md, var(--cat-chip-size, 13px)) + 1px);
        font-size: var(--cat-chip-size-md, var(--cat-chip-size, 13px));
    }
}

@media (max-width: 549px) {
    .cat-suggest {
        padding: var(--cat-pad-y-sm, var(--cat-pad-y-md, 16px)) var(--cat-pad-x-sm, var(--cat-pad-x-md, 14px));
    }

    h2.cat-suggest__title {
        font-size: var(--cat-title-size-sm, var(--cat-title-size-md, 16px));
    }

    ul.cat-suggest__list {
        gap: var(--cat-gap-sm, var(--cat-gap-md, 8px));
    }

    a.cat-suggest__chip {
        min-height: calc(var(--cat-chip-size-sm, var(--cat-chip-size-md, 13px)) + 20px);
        padding: 0 calc(var(--cat-chip-size-sm, var(--cat-chip-size-md, 13px)) + 1px);
        font-size: var(--cat-chip-size-sm, var(--cat-chip-size-md, 13px));
    }
}

@media (max-width: 849px) {
    h2.sentence-search__title {
        font-size: 18px;
    }

    .sentence-search__field input[type="search"],
    .sentence-search__field input[type="search"]:hover,
    .sentence-search__field input[type="search"]:focus {
        font-size: 16px;
    }
}

/* Chỗ ngang không đủ: tách cột hình lên trên, form giữ như desktop */
@media (max-width: 640px) {
    .sentence-search {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .sentence-search__art {
        flex: 0 0 auto;
        width: 120px;
        height: 91px;
        align-self: center;
    }

    h2.sentence-search__title,
    .sentence-search__form {
        margin-right: 0;
    }

    h2.sentence-search__title {
        font-size: 16px;
    }

    .sentence-search__form {
        flex-wrap: wrap;
    }

    .sentence-search__field input[type="search"],
    .sentence-search__field input[type="search"]:hover,
    .sentence-search__field input[type="search"]:focus {
        font-size: 15px;
    }

    button.sentence-search__go,
    button.sentence-search__go:hover,
    button.sentence-search__go:focus {
        min-width: 72px;
        height: 40px;
    }

    .sentence-search__chips {
        gap: 10px;
    }

    button.sentence-search__chip,
    button.sentence-search__chip:hover,
    button.sentence-search__chip:focus {
        max-width: min(100%, 260px);
    }

    button.sentence-search__chip span {
        font-size: 13px;
        line-height: 16px;
        padding: 5px 9px;
    }
}
