/* =========================================================
   RESET
========================================================= */

* {
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    background: #f7f7f8;
    color: #222;
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

img {
    max-width: 100%;
}

button,
input,
select {
    font: inherit;
}

button,
select {
    cursor: pointer;
}

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

.hidden {
    display: none !important;
}


/* =========================================================
   ACCESSIBILITY
========================================================= */

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


/* =========================================================
   CONTAINER
========================================================= */

.container {
    width: min(1180px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}


/* =========================================================
   HEADER
========================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid #e5e5e5;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.header-inner {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}


/* =========================================================
   LOGO
========================================================= */

.logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    color: #222;
    font-size: 19px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.logo:hover {
    color: #000;
}


/* =========================================================
   DESKTOP NAV
========================================================= */

.site-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-width: 0;
    flex: 1;
}


/* =========================================================
   HEADER SEARCH
========================================================= */

.header-search {
    width: min(310px, 32vw);
    min-width: 180px;
}

.header-search-box {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.header-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 15px;
    opacity: 0.65;
}

.header-search input {
    width: 100%;
    height: 40px;
    padding: 0 12px 0 36px;
    border: 1px solid #ddd;
    border-radius: 9px;
    outline: none;
    background: #f8f8f8;
    color: #222;
    font-size: 14px;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.header-search input::placeholder {
    color: #888;
}

.header-search input:focus {
    border-color: #aaa;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}


/* =========================================================
   HEADER FILTER
========================================================= */

.header-filter {
    flex-shrink: 0;
}

.header-filter select {
    height: 40px;
    min-width: 118px;
    padding: 0 30px 0 12px;
    border: 1px solid #ddd;
    border-radius: 9px;
    outline: none;
    background-color: #f8f8f8;
    color: #333;
    font-size: 14px;
}

.header-filter select:focus {
    border-color: #aaa;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}


/* =========================================================
   THEME TOGGLE
========================================================= */

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    padding: 0;
    border: 1px solid #ddd;
    border-radius: 9px;
    background: #f8f8f8;
    color: #222;
    font-size: 17px;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.15s ease;
}

.theme-toggle:hover {
    background: #eee;
}

.theme-toggle:active {
    transform: scale(0.95);
}


/* =========================================================
   MOBILE MENU BUTTON
========================================================= */

.mobile-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid #ddd;
    border-radius: 9px;
    background: #f8f8f8;
    color: #222;
    font-size: 20px;
}


/* =========================================================
   MOBILE NAV
========================================================= */

.mobile-nav {
    display: none;
    border-top: 1px solid #eee;
    background: #fff;
}

.mobile-nav-inner {
    padding-top: 12px;
    padding-bottom: 14px;
}

.mobile-nav.is-open {
    display: block;
}

.mobile-search {
    width: 100%;
}

.mobile-search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.mobile-search-box > span {
    position: absolute;
    left: 12px;
    z-index: 1;
    pointer-events: none;
    opacity: 0.7;
}

.mobile-search-box input {
    width: 100%;
    height: 42px;
    padding: 0 12px 0 36px;
    border: 1px solid #ddd;
    border-radius: 9px;
    outline: none;
    background: #f8f8f8;
    color: #222;
}

.mobile-search-box input:focus {
    border-color: #aaa;
    background: #fff;
}

.mobile-filter-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}

.mobile-filter select {
    width: 100%;
    height: 40px;
    padding: 0 28px 0 10px;
    border: 1px solid #ddd;
    border-radius: 9px;
    background: #f8f8f8;
    color: #333;
}


/* =========================================================
   MAIN
========================================================= */

main.container {
    padding-top: 28px;
    padding-bottom: 50px;
}


/* =========================================================
   PAGE HEADER
========================================================= */

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.page-header h1 {
    margin: 0 0 3px;
    color: #222;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.25;
}

.page-header p {
    margin: 0;
    color: #777;
    font-size: 14px;
}


/* =========================================================
   OLD FILTER AREA
   Giữ CSS để không làm hỏng nếu app/HTML cũ còn dùng.
========================================================= */

.novel-filter {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 14px;
    margin-bottom: 28px;
}

.filter-search,
.filter-status {
    min-width: 0;
}

.filter-label {
    display: block;
    margin-bottom: 7px;
    color: #555;
    font-size: 13px;
    font-weight: 600;
}

.novel-filter input,
.novel-filter select {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border: 1px solid #ddd;
    border-radius: 9px;
    outline: none;
    background: #fff;
    color: #222;
}

.novel-filter input:focus,
.novel-filter select:focus {
    border-color: #aaa;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}


/* =========================================================
   SECTION
========================================================= */

.reader-section {
    margin-bottom: 34px;
}

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

.section-title h2 {
    margin: 0;
    color: #222;
    font-size: 21px;
    font-weight: 750;
    line-height: 1.35;
}


/* =========================================================
   NOVEL GRID
========================================================= */

.novel-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}


/* =========================================================
   NOVEL CARD
========================================================= */

.novel-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
    overflow: hidden;
    border: 1px solid #e4e4e4;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.025);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.novel-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.novel-card-link {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    height: 100%;
    color: inherit;
    text-decoration: none;
}


/* =========================================================
   NOVEL COVER
========================================================= */

.novel-cover {
    width: 100%;
    aspect-ratio: 2 / 3;
    flex-shrink: 0;
    overflow: hidden;
    background: #eee;
}

.novel-cover img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    object-position: center;
    vertical-align: middle;
    transition: transform 0.3s ease;
}

.novel-card:hover .novel-cover img {
    transform: scale(1.025);
}


/* =========================================================
   NOVEL INFO
========================================================= */

.novel-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    min-height: 0;
    padding: 14px;
}

.novel-title {
    margin: 0 0 6px;
    color: #222;
    font-size: 17px;
    font-weight: 750;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.novel-author {
    margin-top: auto;
    margin-bottom: 7px;
    overflow: hidden;
    color: #666;
    font-size: 14px;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.novel-status {
    margin-bottom: 8px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #f0f0f0;
    color: #555;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.2;
}

.status-badge.status-reading,
.status-badge.status-ongoing,
.status-badge.status-active {
    background: #eaf7ee;
    color: #23733b;
}

.status-badge.status-completed {
    background: #edf3ff;
    color: #315d9d;
}

.status-badge.status-paused {
    background: #fff4df;
    color: #94631b;
}


/* =========================================================
   NOVEL DESCRIPTION
========================================================= */

.novel-description {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    max-height: calc(14px * 1.5 * 3);
    margin: 0 0 10px;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}


/* =========================================================
   NOVEL META
========================================================= */

.novel-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin-bottom: 10px;
    color: #444;
    font-size: 13px;
    line-height: 1.4;
}

.novel-meta span {
    display: inline-flex;
    align-items: center;
}


/* =========================================================
   NOVEL READ BUTTON
========================================================= */

.novel-latest {
    width: 100%;
    margin-top: 0;
    padding-top: 0;
}

.novel-read-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 42px;
    padding: 9px 12px;
    border-radius: 9px;
    background: #222;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    transition:
        background 0.2s ease,
        transform 0.15s ease;
}

.novel-card:hover .novel-read-button {
    background: #111;
}

.novel-read-button:active {
    transform: scale(0.98);
}


/* =========================================================
   CONTINUE READING
========================================================= */

#continue-reading:not(:empty) {
    margin-bottom: 34px;
}

.continue-reading,
.continue-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.continue-card {
    display: flex;
    min-width: 0;
    overflow: hidden;
    border: 1px solid #e3e3e3;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.continue-cover {
    width: 86px;
    min-width: 86px;
    height: 126px;
    overflow: hidden;
    background: #eee;
}

.continue-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.continue-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
    padding: 12px;
}

.continue-label {
    margin-bottom: 3px;
    color: #777;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.continue-info h2 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    margin: 0 0 4px;
    color: #222;
    font-size: 15px;
    line-height: 1.35;
}

.continue-info p {
    margin: 0 0 8px;
    overflow: hidden;
    color: #666;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.continue-progress {
    margin-top: auto;
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: #e8e8e8;
}

.continue-progress-bar {
    height: 100%;
    border-radius: inherit;
    background: #333;
}

.continue-percent {
    margin-top: 5px;
    color: #777;
    font-size: 11px;
}

.continue-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    margin-top: 8px;
    padding: 6px 10px;
    border-radius: 7px;
    background: #222;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.continue-button:hover {
    background: #111;
}


/* =========================================================
   READING HISTORY
========================================================= */

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

.history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    background: #fff;
}

.history-info {
    min-width: 0;
}

.history-title {
    overflow: hidden;
    margin: 0 0 2px;
    color: #222;
    font-size: 14px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-chapter {
    overflow: hidden;
    color: #777;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-height: 34px;
    padding: 6px 10px;
    border-radius: 7px;
    background: #222;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}


/* =========================================================
   PAGINATION
========================================================= */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 28px;
}

.pagination button,
.pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    color: #444;
    font-size: 13px;
    font-weight: 600;
}

.pagination button:hover,
.pagination a:hover {
    border-color: #bbb;
    background: #f4f4f4;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #fff;
}

.pagination button:disabled:hover {
    border-color: #ddd;
    background: #fff;
}

.pagination .active,
.pagination button.active,
.pagination a.active {
    border-color: #222;
    background: #222;
    color: #fff;
}


/* =========================================================
   EMPTY / LOADING
========================================================= */

.empty {
    width: 100%;
    padding: 45px 20px;
    border: 1px dashed #d8d8d8;
    border-radius: 12px;
    background: #fff;
    color: #777;
    text-align: center;
}

.loading {
    grid-column: 1 / -1;
    padding: 50px 20px;
    color: #777;
    text-align: center;
}


/* =========================================================
   FOOTER
========================================================= */

.site-footer {
    margin-top: 40px;
    border-top: 1px solid #e3e3e3;
    background: #fff;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.5fr 1fr;
    gap: 36px;
    padding-top: 42px;
    padding-bottom: 40px;
}

.footer-brand {
    min-width: 0;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #222;
    font-size: 19px;
    font-weight: 800;
}

.footer-description {
    max-width: 300px;
    margin: 12px 0 0;
    color: #777;
    font-size: 14px;
    line-height: 1.6;
}

.footer-column {
    min-width: 0;
}

.footer-column h3 {
    margin: 0 0 12px;
    color: #222;
    font-size: 14px;
    font-weight: 750;
}

.footer-link {
    display: block;
    width: fit-content;
    max-width: 100%;
    margin-bottom: 8px;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.footer-link:hover {
    color: #111;
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid #eee;
    background: #fafafa;
}

.footer-bottom .container {
    padding-top: 14px;
    padding-bottom: 14px;
}

.footer-bottom p {
    margin: 0;
    color: #888;
    font-size: 13px;
    text-align: center;
}


/* =========================================================
   DARK MODE
========================================================= */

body.dark-mode {
    background: #121212;
    color: #e8e8e8;
}

body.dark-mode .site-header {
    background: rgba(25, 25, 25, 0.96);
    border-color: #2f2f2f;
}

body.dark-mode .logo {
    color: #f1f1f1;
}

body.dark-mode .logo:hover {
    color: #fff;
}

body.dark-mode .header-search input,
body.dark-mode .header-filter select,
body.dark-mode .theme-toggle,
body.dark-mode .mobile-search-box input,
body.dark-mode .mobile-filter select {
    border-color: #3a3a3a;
    background: #202020;
    color: #eee;
}

body.dark-mode .header-search input::placeholder,
body.dark-mode .mobile-search-box input::placeholder {
    color: #888;
}

body.dark-mode .header-search input:focus,
body.dark-mode .mobile-search-box input:focus {
    border-color: #666;
    background: #242424;
}

body.dark-mode .header-filter select,
body.dark-mode .mobile-filter select {
    color: #eee;
}

body.dark-mode .theme-toggle {
    color: #eee;
}

body.dark-mode .theme-toggle:hover {
    background: #2a2a2a;
}

body.dark-mode .mobile-menu-toggle {
    border-color: #3a3a3a;
    background: #202020;
    color: #eee;
}

body.dark-mode .mobile-nav {
    border-color: #2f2f2f;
    background: #191919;
}

body.dark-mode .page-header h1,
body.dark-mode .section-title h2 {
    color: #f1f1f1;
}

body.dark-mode .page-header p {
    color: #999;
}

body.dark-mode .novel-card,
body.dark-mode .continue-card,
body.dark-mode .history-item,
body.dark-mode .empty {
    border-color: #303030;
    background: #1c1c1c;
    box-shadow: none;
}

body.dark-mode .novel-cover,
body.dark-mode .continue-cover {
    background: #282828;
}

body.dark-mode .novel-title,
body.dark-mode .continue-info h2,
body.dark-mode .history-title {
    color: #f1f1f1;
}

body.dark-mode .novel-author,
body.dark-mode .novel-description,
body.dark-mode .continue-info p,
body.dark-mode .history-chapter {
    color: #999;
}

body.dark-mode .novel-meta {
    color: #bbb;
}

body.dark-mode .status-badge {
    background: #2a2a2a;
    color: #bbb;
}

body.dark-mode .status-badge.status-reading,
body.dark-mode .status-badge.status-ongoing,
body.dark-mode .status-badge.status-active {
    background: #193523;
    color: #8ed6a1;
}

body.dark-mode .status-badge.status-completed {
    background: #1d2b43;
    color: #9cb9e8;
}

body.dark-mode .status-badge.status-paused {
    background: #40331d;
    color: #e4c278;
}

body.dark-mode .novel-read-button,
body.dark-mode .continue-button,
body.dark-mode .history-button {
    background: #eee;
    color: #111;
}

body.dark-mode .novel-card:hover .novel-read-button {
    background: #fff;
}

body.dark-mode .continue-progress {
    background: #333;
}

body.dark-mode .continue-progress-bar {
    background: #ddd;
}

body.dark-mode .continue-percent {
    color: #888;
}

body.dark-mode .pagination button,
body.dark-mode .pagination a {
    border-color: #383838;
    background: #1c1c1c;
    color: #ccc;
}

body.dark-mode .pagination button:hover,
body.dark-mode .pagination a:hover {
    border-color: #555;
    background: #282828;
}

body.dark-mode .pagination button:disabled {
    background: #1c1c1c;
}

body.dark-mode .pagination button:disabled:hover {
    border-color: #383838;
    background: #1c1c1c;
}

body.dark-mode .pagination .active,
body.dark-mode .pagination button.active,
body.dark-mode .pagination a.active {
    border-color: #eee;
    background: #eee;
    color: #111;
}

body.dark-mode .site-footer {
    border-color: #2f2f2f;
    background: #181818;
}

body.dark-mode .footer-logo,
body.dark-mode .footer-column h3 {
    color: #eee;
}

body.dark-mode .footer-description,
body.dark-mode .footer-link {
    color: #999;
}

body.dark-mode .footer-link:hover {
    color: #fff;
}

body.dark-mode .footer-bottom {
    border-color: #2b2b2b;
    background: #141414;
}

body.dark-mode .footer-bottom p {
    color: #777;
}


/* =========================================================
   OLD FILTER DARK MODE
========================================================= */

body.dark-mode .novel-filter input,
body.dark-mode .novel-filter select {
    border-color: #3a3a3a;
    background: #202020;
    color: #eee;
}

body.dark-mode .filter-label {
    color: #aaa;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1000px) {

    .container {
        width: min(100% - 28px, 900px);
    }

    .header-inner {
        gap: 14px;
    }

    .header-search {
        width: min(250px, 28vw);
        min-width: 150px;
    }

    .header-filter select {
        min-width: 100px;
    }

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

    .continue-reading,
    .continue-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-inner {
        grid-template-columns: 1.5fr 1fr 1.5fr;
    }

}


/* =========================================================
   TABLET / SMALL DESKTOP
========================================================= */

@media (max-width: 820px) {

    .header-inner {
        min-height: 62px;
    }

    .site-nav {
        gap: 7px;
    }

    .header-search {
        width: 220px;
    }

    .header-filter select {
        min-width: 90px;
        padding-left: 9px;
        padding-right: 24px;
        font-size: 13px;
    }

    .logo {
        font-size: 17px;
    }

    .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 28px;
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {

    .container {
        width: calc(100% - 24px);
    }

    .site-header {
        position: sticky;
        top: 0;
    }

    .header-inner {
        min-height: 58px;
        gap: 8px;
    }

    .logo {
        font-size: 17px;
    }

    .site-nav {
        flex: 0 auto;
        gap: 7px;
    }

    .header-search,
    .header-filter {
        display: none;
    }

    .theme-toggle,
    .mobile-menu-toggle {
        display: inline-flex;
    }

    .mobile-nav {
        display: none;
    }

    .mobile-nav.is-open {
        display: block;
    }

    main.container {
        padding-top: 22px;
        padding-bottom: 40px;
    }

    .page-header {
        margin-bottom: 18px;
    }

    .page-header h1 {
        font-size: 23px;
    }

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

    .novel-info {
        padding: 11px;
    }

    .novel-title {
        font-size: 15px;
    }

    .novel-author {
        font-size: 13px;
    }

    .novel-description {
        font-size: 13px;
        -webkit-line-clamp: 3;
        max-height: calc(13px * 1.5 * 3);
    }

    .novel-meta {
        font-size: 12px;
    }

    .novel-read-button {
        min-height: 39px;
        padding: 8px 9px;
        font-size: 12px;
    }

    .continue-reading,
    .continue-grid {
        grid-template-columns: 1fr;
    }

    .history-list {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 25px 20px;
        padding-top: 32px;
        padding-bottom: 30px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 480px) {

    .container {
        width: calc(100% - 20px);
    }

    .logo span {
        display: inline;
    }

    .mobile-filter-row {
        gap: 7px;
    }

    .novel-grid {
        gap: 10px;
    }

    .novel-info {
        padding: 9px;
    }

    .novel-title {
        font-size: 14px;
        line-height: 1.35;
    }

    .novel-author {
        margin-bottom: 5px;
        font-size: 12px;
    }

    .novel-description {
        margin-bottom: 8px;
        font-size: 12px;
        line-height: 1.45;
        max-height: calc(12px * 1.45 * 3);
    }

    .novel-meta {
        gap: 4px 7px;
        margin-bottom: 8px;
        font-size: 11px;
    }

    .status-badge {
        min-height: 23px;
        padding: 3px 7px;
        font-size: 10px;
    }

    .novel-read-button {
        min-height: 37px;
        padding: 7px 6px;
        border-radius: 8px;
        font-size: 11px;
    }

    .continue-cover {
        width: 78px;
        min-width: 78px;
        height: 115px;
    }

    .continue-info {
        padding: 10px;
    }

    .continue-info h2 {
        font-size: 14px;
    }

    .continue-info p {
        font-size: 12px;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .footer-brand {
        grid-column: auto;
    }

}


/* =========================================================
   VERY SMALL IPHONE
========================================================= */

@media (max-width: 360px) {

    .container {
        width: calc(100% - 16px);
    }

    .logo {
        font-size: 15px;
    }

    .theme-toggle,
    .mobile-menu-toggle {
        width: 37px;
        height: 37px;
    }

    .novel-grid {
        gap: 8px;
    }

    .novel-info {
        padding: 8px;
    }

    .novel-title {
        font-size: 13px;
    }

    .novel-author {
        font-size: 11px;
    }

    .novel-description {
        font-size: 11px;
        line-height: 1.4;
        max-height: calc(11px * 1.4 * 3);
    }

    .novel-meta {
        font-size: 10px;
    }

    .novel-read-button {
        min-height: 35px;
        font-size: 10px;
    }

}


/* =========================================================
   REDUCE MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }

}