/* Giao diện mới của truyenlau.com (chỉ nạp ở layouts/app.blade.php, webdammy có layout riêng).
   Cách làm: đổi bộ biến màu dùng chung của site, rồi chỉnh từng thành phần. Mọi thứ nằm dưới body.tl2. */

/* ---------- 1. Biến màu: sáng (pastel) và tối ---------- */
:root {
    --tl-ink: #2b2a44;
    --tl-butter: #fbe3a1;
    --tl-butter-2: #fdf0c9;
    --tl-mint: #cdeee6;
    --tl-peach: #fcc9a6;
    --tl-lilac: #dfd6f7;
    --tl-sky: #cddcf8;
    --tl-sage: #dcebb8;
    --tl-indigo: #5a67c9;
    --tl-line: #2b2a44;
    --tl-shadow: rgba(43, 42, 68, 0.22);

    --background: #fbf7ee;
    --foreground: #2b2a44;
    --card: #ffffff;
    --card-foreground: #2b2a44;
    --popover: #ffffff;
    --popover-foreground: #2b2a44;
    --primary: #5a67c9;
    --primary-foreground: #ffffff;
    --secondary: #fdf0c9;
    --secondary-foreground: #2b2a44;
    --muted: #f1ecdd;
    --muted-foreground: #5d5b78;
    --accent: #fdf0c9;
    --accent-foreground: #2b2a44;
    --destructive: #d6573f;
    --destructive-foreground: #ffffff;
    --border: rgba(43, 42, 68, 0.3);
    --input: rgba(43, 42, 68, 0.3);
    --input-background: #ffffff;
    --ring: #5a67c9;
    --radius: 14px;
}

html[data-theme="dark"] {
    --tl-ink: #f4f1e6;
    --tl-line: #8b89b3;
    --tl-shadow: rgba(0, 0, 0, 0.35);
    --tl-butter: #fbe3a1;
    --tl-butter-2: #34335a;
    --tl-mint: #2d4a49;
    --tl-peach: #5a3d36;
    --tl-lilac: #3d3862;
    --tl-sky: #2f3a63;
    --tl-sage: #3a4a2f;
    --tl-indigo: #aab4ff;

    --background: #1c1b2e;
    --foreground: #f4f1e6;
    --card: #26253d;
    --card-foreground: #f4f1e6;
    --popover: #26253d;
    --popover-foreground: #f4f1e6;
    --primary: #fbe3a1;
    --primary-foreground: #2b2a44;
    --secondary: #34335a;
    --secondary-foreground: #f4f1e6;
    --muted: #2f2e4a;
    --muted-foreground: #b9b6d3;
    --accent: #34335a;
    --accent-foreground: #f4f1e6;
    --destructive: #ff8a73;
    --destructive-foreground: #2b0f0a;
    --border: rgba(244, 241, 230, 0.22);
    --input: rgba(244, 241, 230, 0.22);
    --input-background: #26253d;
    --ring: #fbe3a1;
}

/* ---------- 2. Nền và chữ ---------- */
body.tl2 {
    font-family: 'Public Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    background: var(--background);
    color: var(--foreground);
}

body.tl2 h1,
body.tl2 h2,
body.tl2 .c-ttl-h2,
body.tl2 .book-detail .title,
body.tl2 .c-interaction-card__title,
body.tl2 .c-chapter-section__title {
    font-family: 'Bricolage Grotesque', 'Public Sans', system-ui, sans-serif;
    font-weight: 800;
    letter-spacing: -0.03em;
}

body.tl2 .tl-hand {
    font-family: 'Patrick Hand', 'Public Sans', cursive;
    font-weight: 400;
    color: var(--tl-indigo);
}

body.tl2 ::selection {
    background: var(--tl-butter);
    color: #2b2a44;
}

/* ---------- 3. Nút và ô nhập ---------- */
body.tl2 .c-feature__btn,
body.tl2 .read-btn,
body.tl2 .c-btn,
body.tl2 .btn-submit,
body.tl2 .c-btn-submit {
    border: 1.5px solid var(--tl-line);
    border-radius: 14px;
    font-weight: 700;
    box-shadow: 0 3px 0 var(--tl-shadow);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

body.tl2 .c-feature__btn:hover,
body.tl2 .read-btn:hover,
body.tl2 .c-btn:hover,
body.tl2 .btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 0 var(--tl-shadow);
}

body.tl2 .c-feature__btn:active,
body.tl2 .read-btn:active,
body.tl2 .c-btn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 0 var(--tl-shadow);
}

body.tl2 .c-feature__btn--register {
    background: var(--primary);
    color: var(--primary-foreground);
}

body.tl2 input[type='text'],
body.tl2 input[type='email'],
body.tl2 input[type='password'],
body.tl2 input[type='number'],
body.tl2 input[type='search'],
body.tl2 textarea,
body.tl2 select {
    border-radius: 14px;
    border: 1.5px solid var(--tl-line);
    background: var(--input-background);
    color: var(--foreground);
}

body.tl2 input:focus-visible,
body.tl2 textarea:focus-visible,
body.tl2 button:focus-visible,
body.tl2 a:focus-visible {
    outline: 3px solid var(--tl-indigo);
    outline-offset: 2px;
}

/* ---------- 4. Thanh trên cùng (trang chủ) ---------- */
body.tl2 .l-header .l-header-inner {
    background: var(--background);
    border-bottom: 1.5px solid var(--tl-line);
}

body.tl2 .brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--foreground);
}

body.tl2 .brand span {
    font-family: 'Bricolage Grotesque', 'Public Sans', sans-serif;
    font-weight: 800;
    letter-spacing: -0.01em;
}

body.tl2 .l-theme-inner {
    border: 1.5px solid var(--tl-line);
    border-radius: 14px;
    background: var(--card);
}

body.tl2 .l-theme-inner .theme-option.active {
    background: var(--tl-ink);
    color: var(--background);
    border-radius: 10px;
}

body.tl2 .l-chip-item {
    border: 1.5px solid var(--tl-line);
    border-radius: 12px;
    background: var(--card);
    color: var(--foreground);
    font-weight: 600;
}

body.tl2 .l-chip-item:hover,
body.tl2 .l-chip-item.active {
    background: var(--tl-ink);
    color: var(--background);
    border-color: var(--tl-ink);
}

/* ---------- 5. Tiêu đề từng mục ---------- */
body.tl2 .c-ttl-h2 {
    font-size: 40px;
    line-height: 1.05;
    margin: 56px 0 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

@media (max-width: 768px) {
    body.tl2 .c-ttl-h2 {
        font-size: 30px;
        margin: 40px 0 18px;
    }
}

/* ---------- 6. Thẻ truyện ---------- */
body.tl2 .book-card {
    background: var(--card);
    border: 1.5px solid var(--tl-line);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 3px 0 var(--tl-shadow);
}

body.tl2 .book-cover {
    border-radius: 0;
}

body.tl2 .book-title a {
    font-family: 'Bricolage Grotesque', 'Public Sans', sans-serif;
    font-weight: 800;
    letter-spacing: -0.02em;
}

body.tl2 .tag,
body.tl2 .l-category-item {
    border: 1.5px solid var(--tl-line);
    border-radius: 8px;
    background: var(--card);
    color: var(--foreground);
    font-weight: 600;
}

body.tl2 .c-status__complete {
    background: var(--tl-ink);
    color: var(--background);
    border-radius: 8px;
}

/* ---------- 7. Bảng "Truyện vừa cập nhật" ---------- */
body.tl2 .c-table {
    border: 1.5px solid var(--tl-line);
    border-radius: 24px;
    overflow: hidden;
    background: var(--card);
}

/* ---------- 8. Chân trang ---------- */
body.tl2 .ft2:not(.ft2--webdammy) {
    --ft-bg: #2b2a44;
    --ft-ink: #ffffff;
    --ft-muted: #c9c6e3;
    --ft-line: rgba(255, 255, 255, 0.2);
    --ft-accent: #fbe3a1;
    --ft-on: #2b2a44;
    --ft-chip: rgba(255, 255, 255, 0.1);
    --ft-chip-ink: #ffffff;
    --ft-chip-hover: rgba(255, 255, 255, 0.2);
    margin: 64px 16px 16px;
    border-radius: 40px;
    border-top: 0;
}

body.tl2 .ft2:not(.ft2--webdammy) .ft2__word {
    font-family: 'Bricolage Grotesque', 'Public Sans', sans-serif;
    font-weight: 800;
    font-size: 28px;
    letter-spacing: -0.01em;
}

/* ---------- 9. Trang chủ: khối đầu trang ---------- */
body.tl2 .tl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 52px;
    padding: 0 26px;
    border-radius: 14px;
    border: 1.5px solid var(--tl-line);
    background: var(--card);
    color: var(--foreground);
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 3px 0 var(--tl-shadow);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

body.tl2 .tl-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 0 var(--tl-shadow);
}

body.tl2 .tl-btn--primary {
    background: var(--primary);
    color: var(--primary-foreground);
}

body.tl2 .tl-hero {
    position: relative;
    margin: 24px 0 0;
    min-height: 460px;
    padding: 56px 56px;
    border-radius: 48px;
    background: #fbe3a1;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    align-items: center;
    gap: 24px;
}

body.tl2 .tl-hero::before,
body.tl2 .tl-hero::after {
    content: '';
    position: absolute;
    pointer-events: none;
    border-radius: 50%;
}

body.tl2 .tl-hero::before {
    width: 720px;
    height: 720px;
    right: -120px;
    bottom: -420px;
    background: #fdf0c9;
}

body.tl2 .tl-hero::after {
    width: 440px;
    height: 440px;
    right: -140px;
    bottom: -300px;
    background: #fcc9a6;
}

body.tl2 .tl-hero__text {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    color: #2b2a44;
}

body.tl2 .tl-hero__note {
    display: inline-block;
    font-size: 26px;
    transform: rotate(-3deg);
    color: #5a67c9;
}

body.tl2 .tl-hero__title {
    margin: 0;
    font-size: clamp(44px, 6vw, 88px);
    line-height: 0.98;
    letter-spacing: -0.04em;
    max-width: 640px;
    color: #2b2a44;
}

body.tl2 .tl-hero__lead {
    margin: 6px 0 8px;
    max-width: 470px;
    font-size: 17px;
    line-height: 1.55;
    font-weight: 500;
}

body.tl2 .tl-hero__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

body.tl2 .tl-hero .tl-btn {
    color: #2b2a44;
    background: #ffffff;
    border-color: #2b2a44;
}

body.tl2 .tl-hero .tl-btn--primary {
    background: #5a67c9;
    color: #ffffff;
}

body.tl2 .tl-hero__covers {
    position: relative;
    z-index: 2;
    height: 400px;
}

body.tl2 .tl-hero__cover {
    position: absolute;
    display: block;
    width: 190px;
    aspect-ratio: 220 / 285;
    border: 2px solid #2b2a44;
    border-radius: 22px;
    overflow: hidden;
    background: #f1e8d6;
    box-shadow: 0 4px 0 rgba(43, 42, 68, 0.22);
}

body.tl2 .tl-hero__cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body.tl2 .tl-hero__cover--1 { left: 10px; top: 10px; transform: rotate(-8deg); }
body.tl2 .tl-hero__cover--2 { left: 200px; top: 70px; width: 210px; transform: rotate(6deg); z-index: 2; }
body.tl2 .tl-hero__cover--3 { left: 70px; top: 190px; width: 180px; transform: rotate(-3deg); z-index: 3; }

/* Chọn theo tâm trạng */
body.tl2 .tl-mood {
    padding: 64px 16px 8px;
}

body.tl2 .tl-mood__note {
    display: inline-block;
    font-size: 24px;
    transform: rotate(-2deg);
}

body.tl2 .tl-mood__title {
    margin: 6px 0 28px;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.02;
}

body.tl2 .tl-mood__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 12px;
    max-width: 900px;
}

body.tl2 .tl-mood__chip {
    display: inline-flex;
    align-items: center;
    height: 48px;
    padding: 0 20px;
    border-radius: 14px;
    border: 1.5px solid var(--tl-line);
    background: var(--card);
    color: var(--foreground);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 3px 0 var(--tl-shadow);
    transition: background-color 0.12s ease, color 0.12s ease;
}

body.tl2 .tl-mood__chip--0 { transform: rotate(-2deg); }
body.tl2 .tl-mood__chip--1 { transform: rotate(1.5deg); }
body.tl2 .tl-mood__chip--2 { transform: rotate(-1deg); }
body.tl2 .tl-mood__chip--3 { transform: rotate(2deg); }

body.tl2 .tl-mood__chip:hover {
    background: var(--tl-ink);
    color: var(--background);
}

body.tl2 #tl-hot,
body.tl2 #tl-new {
    scroll-margin-top: 260px;
}

@media (max-width: 900px) {
    body.tl2 .tl-hero {
        grid-template-columns: 1fr;
        padding: 36px 24px 28px;
        border-radius: 32px;
        min-height: 0;
    }

    body.tl2 .tl-hero__covers {
        height: 250px;
    }

    body.tl2 .tl-hero__cover {
        width: 120px;
    }

    body.tl2 .tl-hero__cover--1 { left: 0; top: 10px; }
    body.tl2 .tl-hero__cover--2 { left: 120px; top: 40px; width: 130px; }
    body.tl2 .tl-hero__cover--3 { left: 220px; top: 0; width: 110px; }

    body.tl2 .tl-hero::before {
        width: 520px;
        height: 520px;
        right: -200px;
        bottom: -330px;
    }

    body.tl2 .tl-hero::after {
        width: 300px;
        height: 300px;
        right: -160px;
        bottom: -220px;
    }
}

/* ---------- 10. Thanh đầu trang trên máy tính: cuộn đi cùng trang để nhường chỗ cho nội dung ---------- */
@media (min-width: 769px) {
    body.tl2 .l-header {
        height: auto;
    }

    body.tl2 .l-header .l-header-inner {
        position: static;
        transform: none;
        padding: 14px 0 16px;
    }

    body.tl2 .l-header .brand span {
        font-size: 30px;
    }

    body.tl2 #tl-hot,
    body.tl2 #tl-new {
        scroll-margin-top: 24px;
    }
}

/* ---------- 11. Khung "Tiếp tục đọc" (JS ở guest.js, lịch sử lưu trên thiết bị) ---------- */
body.tl2 .gx-panel {
    --gx-accent: var(--primary);
    --gx-on: var(--primary-foreground);
    --gx-surface: var(--card);
    --gx-line: var(--tl-line);
    --gx-muted: var(--muted-foreground);
    margin: 56px 0 8px;
}

body.tl2 .gx-head {
    align-items: center;
    margin-bottom: 20px;
}

body.tl2 .gx-head h2 {
    font-family: 'Bricolage Grotesque', 'Public Sans', sans-serif;
    font-size: clamp(34px, 5vw, 56px);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
}

body.tl2 .gx-tabs {
    gap: 6px;
    padding: 4px;
    border: 1.5px solid var(--tl-line);
    border-radius: 14px;
    background: var(--card);
}

body.tl2 .gx-tabs button {
    border: 0;
    border-radius: 10px;
    padding: 8px 14px;
    font-weight: 600;
}

body.tl2 .gx-tabs button.on {
    background: var(--tl-ink);
    color: var(--background);
}

body.tl2 .gx-feat,
body.tl2 .gx-row {
    border: 1.5px solid var(--tl-line);
    box-shadow: 0 3px 0 var(--tl-shadow);
}

body.tl2 .gx-feat {
    border-radius: 32px;
    background: var(--tl-mint);
    padding: 26px;
}

body.tl2 .gx-row {
    border-radius: 22px;
}

body.tl2 .gx-feat:hover,
body.tl2 .gx-row:hover {
    border-color: var(--tl-line);
    transform: translateY(-1px);
}

body.tl2 .gx-ft {
    font-family: 'Bricolage Grotesque', 'Public Sans', sans-serif;
    font-weight: 800;
    font-size: 1.9em;
    letter-spacing: -0.03em;
    line-height: 1.04;
}

body.tl2 .gx-rt {
    font-family: 'Bricolage Grotesque', 'Public Sans', sans-serif;
    font-weight: 800;
    letter-spacing: -0.02em;
}

body.tl2 .gx-tag {
    color: var(--foreground);
    opacity: 0.8;
}

body.tl2 .gx-cta {
    border: 1.5px solid var(--tl-line);
    border-radius: 12px;
    font-weight: 700;
    background: var(--tl-ink);
    color: var(--background);
}

body.tl2 .gx-cv {
    border: 1.5px solid var(--tl-line);
    border-radius: 14px;
}

body.tl2 .gx-cv-sm {
    border-radius: 10px;
}

body.tl2 .gx-note {
    font-size: 0.8em;
}

/* ---------- 12. Điểm nhấn nhỏ ---------- */
body.tl2 .hot-trend,
body.tl2 .progress-badge {
    background: var(--tl-ink);
    color: var(--background);
    border-radius: 8px;
    font-weight: 700;
}

body.tl2 .ft2 .c-icon__logo::before,
body.tl2-admin .ft2 .c-icon__logo::before {
    filter: brightness(0) invert(1);
}

/* ---------- 13. Trang chi tiết truyện ---------- */
body.tl2 .l-book-header__inner {
    background: var(--background);
    border-bottom: 1.5px solid var(--tl-line);
}

body.tl2 .l-book-header .back-link {
    font-weight: 600;
}

/* Khối thông tin truyện: bảng màu bơ, bìa nghiêng */
body.tl2 .l-book .book-detail {
    position: relative;
    margin-top: 24px;
    padding: 48px;
    gap: 56px;
    grid-template-columns: 320px minmax(0, 1fr);
    align-items: center;
    border-radius: 48px;
    background: #fbe3a1;
    color: #2b2a44;
    overflow: hidden;
}

body.tl2 .l-book .book-detail::before {
    content: '';
    position: absolute;
    width: 720px;
    height: 720px;
    right: -180px;
    bottom: -440px;
    border-radius: 50%;
    background: var(--tl-butter-2);
    pointer-events: none;
}

html[data-theme="dark"] body.tl2 .l-book .book-detail::before {
    background: #fdf0c9;
}

body.tl2 .l-book .book-detail > * {
    position: relative;
    z-index: 1;
}

body.tl2 .l-book .book-detail .cover {
    width: 320px;
    border: 2px solid #2b2a44;
    border-radius: 28px;
    background: #f1e8d6;
    transform: rotate(-4deg);
    box-shadow: 0 5px 0 rgba(43, 42, 68, 0.22);
}

body.tl2 .l-book .l-info {
    color: #2b2a44;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

body.tl2 .l-book .l-info .title {
    font-size: clamp(36px, 5vw, 76px);
    line-height: 1;
    letter-spacing: -0.035em;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

body.tl2 .l-book .l-info .l-author,
body.tl2 .l-book .l-info .c-ttl,
body.tl2 .l-book .l-info .desc {
    color: #2b2a44;
}

body.tl2 .l-book .l-info .c-ttl {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.tl2 .l-book .l-info-count,
body.tl2 .l-book .l-info-view {
    background: #ffffff;
    color: #2b2a44;
    border: 1.5px solid #2b2a44;
    border-radius: 14px;
    font-weight: 700;
}

body.tl2 .l-book .l-info .l-category-item {
    background: #ffffff;
    color: #2b2a44;
    border-color: #2b2a44;
}

body.tl2 .l-book .l-info .l-category-item:hover {
    background: #2b2a44;
    color: #ffffff;
}

body.tl2 .l-book .l-info-btn .read-btn {
    height: 52px;
    padding: 0 26px;
    background: #5a67c9;
    color: #ffffff;
    border-radius: 14px;
    font-weight: 700;
}

body.tl2 .l-book .l-info-btn .read-btn[data-guest-resume] {
    background: #ffffff;
    color: #2b2a44;
}

body.tl2 .l-book .l-info-btn .sub-btn {
    height: 52px;
    padding: 0 16px;
    background: #ffffff;
    color: #2b2a44;
    border: 1.5px solid #2b2a44;
    border-radius: 14px;
    font-weight: 700;
    box-shadow: 0 3px 0 rgba(43, 42, 68, 0.22);
}

body.tl2 .l-book .l-info-btn .sub-btn.report-btn,
body.tl2 .l-book .l-info-btn .c-btn-report {
    color: #2b2a44;
}

body.tl2 .l-book .l-info-btn .c-btn-favorites.is-active {
    background: #fcc9a6;
}

body.tl2 .desc-gradient {
    display: none;
}

body.tl2 .btn-show-more {
    color: #2b2a44;
    font-weight: 700;
}

@media (max-width: 900px) {
    body.tl2 .l-book .book-detail {
        grid-template-columns: 1fr;
        padding: 72px 20px 28px;
        gap: 28px;
        border-radius: 32px;
        justify-items: center;
        text-align: left;
    }

    body.tl2 .l-book .book-detail .cover {
        width: 190px;
    }

    body.tl2 .l-book .l-info {
        width: 100%;
    }
}

/* Danh sách chương */
body.tl2 .l-chapters {
    margin-top: 48px;
}

body.tl2 .c-chapter-section__header {
    align-items: flex-end;
    border-bottom: 0;
}

body.tl2 .c-chapter-section__title {
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1;
}

body.tl2 .c-chapter-section__item {
    border: 1.5px solid var(--tl-line);
    border-radius: 18px;
    background: var(--card);
    transition: background-color 0.12s ease;
}

body.tl2 .c-chapter-section__item:hover {
    background: var(--tl-butter-2);
}

body.tl2 .c-chapter-section__link {
    font-weight: 600;
}

/* Đánh giá và bình luận */
body.tl2 .c-interaction-card {
    border: 1.5px solid var(--tl-line);
    border-radius: 32px;
    background: var(--card);
    box-shadow: 0 3px 0 var(--tl-shadow);
}

body.tl2 .c-interaction-card__title {
    font-size: 36px;
    line-height: 1.05;
}

body.tl2 .c-rating-summary__score {
    font-family: 'Bricolage Grotesque', 'Public Sans', sans-serif;
    font-weight: 800;
    font-size: 72px;
    letter-spacing: -0.04em;
}

body.tl2 .c-rating-summary__stars span.is-active,
body.tl2 .star-selector .star.is-active {
    color: #e0a526;
}

body.tl2 .c-modal-overlay .c-auth-modal,
body.tl2 .c-report-modal,
body.tl2 .c-share-modal__content {
    border: 1.5px solid var(--tl-line);
    border-radius: 28px;
    background: var(--card);
    color: var(--foreground);
}

/* ---------- 14. Trang đọc chương ---------- */
body.tl2 .reader-header {
    margin: 12px 12px 0;
    border-radius: 24px;
    background: var(--tl-butter);
    color: #2b2a44;
    border: 0;
}

html[data-theme="dark"] body.tl2 .reader-header {
    background: #34335a;
    color: var(--foreground);
}

body.tl2 .reader-header .read-book-title {
    font-family: 'Bricolage Grotesque', 'Public Sans', sans-serif;
    font-weight: 800;
    letter-spacing: -0.02em;
}

body.tl2 .c-chapter-select__toggle {
    border: 1.5px solid var(--tl-line);
    border-radius: 12px;
    background: var(--card);
    color: var(--foreground);
    font-weight: 600;
}

body.tl2 .c-chapter-select__menu {
    border: 1.5px solid var(--tl-line);
    border-radius: 18px;
    background: var(--card);
}

body.tl2 .reader-body {
    max-width: 760px;
}

body.tl2 .reader-body__heading {
    border-bottom: 1.5px solid var(--tl-line);
    padding-bottom: 28px;
    margin-bottom: 12px;
}

body.tl2 .reader-body__heading .heading-title {
    font-family: 'Public Sans', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted-foreground);
    margin-bottom: 4px;
}

body.tl2 .reader-body__heading .heading-chapter {
    font-family: 'Bricolage Grotesque', 'Public Sans', sans-serif;
    font-size: clamp(30px, 5vw, 52px);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.04;
    color: var(--foreground);
}

body.tl2 .reader-footer {
    width: auto;
    margin: 0 12px 12px;
    border: 1.5px solid var(--tl-line);
    border-radius: 24px;
    background: var(--card);
}

body.tl2 .reader-footer .nav-btn:not(.disabled) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    padding: 0 20px;
    border: 1.5px solid var(--tl-line);
    border-radius: 14px;
    font-weight: 700;
    background: var(--card);
    box-shadow: 0 3px 0 var(--tl-shadow);
}

body.tl2 .c-modal__content {
    border: 1.5px solid var(--tl-line);
    border-radius: 28px;
    background: var(--card);
    color: var(--foreground);
}

body.tl2 .c-modal__btn.active {
    background: var(--tl-ink);
    color: var(--background);
}

body.tl2 .l-footer-read {
    background: transparent;
    color: var(--muted-foreground);
}

/* ---------- 15. Điện thoại: thanh đầu trang gọn hơn ---------- */
@media (max-width: 768px) {
    body.tl2 .l-theme-inner {
        padding: 3px;
        gap: 2px;
    }

    body.tl2 .l-theme-inner .theme-option {
        padding: 4px 8px;
    }

    body.tl2 .l-header .brand span {
        font-size: 17px;
    }

    body.tl2 .l-header .l-header-inner__right {
        gap: 6px;
    }
}

/* Bìa trong thẻ truyện luôn đúng tỉ lệ 220 × 285 (trước đây cao cố định nên bị cắt ngang khi thẻ hẹp) */
body.tl2 .book-card .book-cover {
    height: auto;
    aspect-ratio: 220 / 285;
}

/* ---------- 16. Nút "Đổi giao diện", hộp thoại, trang Hành trình ---------- */
body.tl2 #os-picker [data-os='picker'] {
    background: var(--tl-ink);
    color: var(--background);
    border: 1.5px solid var(--tl-line);
    border-radius: 14px;
    font-weight: 700;
    box-shadow: 0 3px 0 var(--tl-shadow);
}

body.tl2 .c-auth-modal__header h3,
body.tl2 .c-auth-modal__heading h2,
body.tl2 .c-report-modal__title,
body.tl2 .c-modal__title,
body.tl2 .c-share-modal__title {
    font-family: 'Bricolage Grotesque', 'Public Sans', sans-serif;
    font-weight: 800;
    letter-spacing: -0.02em;
}

body.tl2 .jn-page {
    --jn-surface: var(--card);
    --jn-line: var(--tl-line);
    --jn-muted: var(--muted-foreground);
}

body.tl2 .jn-hero {
    border-width: 1.5px;
    border-radius: 32px;
    box-shadow: 0 3px 0 var(--tl-shadow);
}

body.tl2 .jn-hero h1 {
    font-family: 'Bricolage Grotesque', 'Public Sans', sans-serif;
    font-weight: 800;
    letter-spacing: -0.03em;
}

body.tl2 .l-book .l-info-block.row {
    flex-wrap: wrap;
}

body.tl2 .l-book .l-info-count,
body.tl2 .l-book .l-info-view,
body.tl2 .l-book .c-status > div {
    white-space: nowrap;
}

/* ---------- 17. Mục lục theo nhóm chương ---------- */
body.tl2 .tl-toc {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 8px 0 24px;
}

body.tl2 .tl-toc__quick {
    display: grid;
    grid-template-columns: 1fr 1fr minmax(260px, 1fr);
    gap: 12px;
    align-items: stretch;
}

body.tl2 .tl-toc__card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 20px;
    border: 1.5px solid var(--tl-line);
    border-radius: 22px;
    background: var(--tl-mint);
    color: var(--foreground);
    text-decoration: none;
    min-width: 0;
}

body.tl2 .tl-toc__card--new {
    background: var(--tl-sage);
}

body.tl2 .tl-toc__kicker {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.8;
}

body.tl2 .tl-toc__name {
    font-family: 'Bricolage Grotesque', 'Public Sans', sans-serif;
    font-weight: 800;
    font-size: 20px;
    line-height: 1.1;
    letter-spacing: -0.02em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

body.tl2 .tl-toc__jump {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
}

body.tl2 .tl-toc__jump label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted-foreground);
}

body.tl2 .tl-toc__jumprow {
    display: flex;
    gap: 8px;
}

body.tl2 .tl-toc__jumprow input {
    flex: 1;
    min-width: 0;
    height: 48px;
    padding: 0 14px;
    font-size: 15px;
}

body.tl2 .tl-toc__jumprow button {
    width: 48px;
    height: 48px;
    border: 1.5px solid var(--tl-line);
    border-radius: 14px;
    background: var(--tl-ink);
    color: var(--background);
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
}

body.tl2 .tl-ranges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

body.tl2 .tl-ranges__chip,
body.tl2 .tl-ranges__all summary {
    display: inline-flex;
    align-items: center;
    height: 42px;
    padding: 0 14px;
    border: 1.5px solid var(--tl-line);
    border-radius: 12px;
    background: var(--card);
    color: var(--foreground);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

body.tl2 .tl-ranges__chip.is-on {
    background: var(--tl-ink);
    color: var(--background);
}

body.tl2 .tl-ranges__gap {
    color: var(--muted-foreground);
}

body.tl2 .tl-ranges__all {
    margin-left: auto;
    position: relative;
}

body.tl2 .tl-ranges__all summary {
    list-style: none;
}

body.tl2 .tl-ranges__all summary::-webkit-details-marker {
    display: none;
}

body.tl2 .tl-ranges__grid {
    position: absolute;
    right: 0;
    top: 50px;
    z-index: 20;
    width: min(560px, 86vw);
    max-height: 320px;
    overflow: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
    gap: 6px;
    padding: 12px;
    border: 1.5px solid var(--tl-line);
    border-radius: 18px;
    background: var(--card);
    box-shadow: 0 6px 0 var(--tl-shadow);
}

body.tl2 .tl-ranges__grid a {
    display: block;
    padding: 8px 10px;
    border: 1.5px solid transparent;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    color: var(--foreground);
    text-decoration: none;
}

body.tl2 .tl-ranges__grid a:hover {
    background: var(--tl-butter-2);
}

body.tl2 .tl-ranges__grid a.is-on {
    background: var(--tl-ink);
    color: var(--background);
}

@media (max-width: 900px) {
    body.tl2 .tl-toc__quick {
        grid-template-columns: 1fr 1fr;
    }

    body.tl2 .tl-toc__jump {
        grid-column: 1 / -1;
    }

    body.tl2 .tl-ranges__all {
        margin-left: 0;
    }

    body.tl2 .tl-ranges__grid {
        right: auto;
        left: 0;
    }
}

/* ---------- 18. Phân bố số sao ---------- */
body.tl2 .tl-rating-bars {
    flex: 1;
    min-width: 220px;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

body.tl2 .tl-rating-bars__row {
    display: grid;
    grid-template-columns: 44px 1fr 40px;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
}

body.tl2 .tl-rating-bars__row span:last-child {
    text-align: right;
}

body.tl2 .tl-rating-bars__track {
    display: block;
    height: 10px;
    border-radius: 5px;
    background: var(--muted);
    overflow: hidden;
}

body.tl2 .tl-rating-bars__track span {
    display: block;
    height: 100%;
    background: var(--tl-ink);
}

/* ---------- 19. Trang chủ: Đang hot, Hành trình, Thể loại ---------- */
body.tl2 .tl-btn--ink {
    background: var(--tl-ink);
    color: var(--background);
}

body.tl2 .tl-btn--butter {
    background: #fbe3a1;
    color: #2b2a44;
    border-color: #2b2a44;
}

body.tl2 .tl-hand {
    display: inline-block;
    font-size: 24px;
    transform: rotate(-2deg);
}

body.tl2 .tl-hot {
    margin: 64px 0 0;
    padding: 56px;
    border-radius: 48px;
    background: var(--tl-mint);
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 56px;
    align-items: start;
    scroll-margin-top: 24px;
}

body.tl2 .tl-hot__title {
    margin: 4px 0 24px;
    font-size: clamp(40px, 6vw, 80px);
    line-height: 1;
}

body.tl2 .tl-hot__cover {
    display: block;
    width: min(100%, 280px);
    aspect-ratio: 220 / 285;
    border: 2px solid var(--tl-line);
    border-radius: 24px;
    overflow: hidden;
    transform: rotate(-3deg);
    box-shadow: 0 5px 0 var(--tl-shadow);
}

body.tl2 .tl-hot__cover img,
body.tl2 .tl-hot__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body.tl2 .tl-hot__name {
    display: block;
    margin-top: 26px;
    font-family: 'Bricolage Grotesque', 'Public Sans', sans-serif;
    font-weight: 800;
    font-size: 30px;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--foreground);
    text-decoration: none;
}

body.tl2 .tl-hot__meta {
    display: block;
    margin-top: 6px;
    font-size: 14.5px;
    font-weight: 500;
}

body.tl2 .tl-hot__list {
    list-style: none;
    margin: 0;
    padding: 12px 0 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

body.tl2 .tl-hot__row {
    display: grid;
    grid-template-columns: 56px 56px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 14px 20px;
    border: 1.5px solid var(--tl-line);
    border-radius: 20px;
    background: var(--card);
    color: var(--foreground);
    text-decoration: none;
    transition: transform 0.12s ease;
}

body.tl2 .tl-hot__row:hover {
    transform: translateY(-1px);
}

body.tl2 .tl-hot__rank {
    font-family: 'Bricolage Grotesque', 'Public Sans', sans-serif;
    font-weight: 800;
    font-size: 40px;
    text-align: center;
    color: var(--tl-indigo);
}

body.tl2 .tl-hot__thumb {
    display: block;
    width: 56px;
    aspect-ratio: 220 / 285;
    border: 1.5px solid var(--tl-line);
    border-radius: 8px;
    overflow: hidden;
}

body.tl2 .tl-hot__info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

body.tl2 .tl-hot__rowname {
    font-family: 'Bricolage Grotesque', 'Public Sans', sans-serif;
    font-weight: 800;
    font-size: 21px;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

body.tl2 .tl-hot__rowmeta {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--muted-foreground);
}

body.tl2 .tl-hot__side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
}

/* Hành trình đọc */
body.tl2 .tl-journey {
    padding: 88px 16px 24px;
}

body.tl2 .tl-journey__head,
body.tl2 .tl-genres__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    flex-wrap: wrap;
}

body.tl2 .tl-journey__head h2,
body.tl2 .tl-genres__head h2 {
    margin: 6px 0 0;
    font-size: clamp(34px, 5vw, 72px);
    line-height: 1;
    max-width: 780px;
}

body.tl2 .tl-journey__steps {
    list-style: none;
    margin: 48px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

body.tl2 .tl-step {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
    min-height: 300px;
    padding: 24px;
    border: 1.5px solid var(--tl-line);
    border-radius: 28px;
    color: #2b2a44;
    font-size: 15px;
    line-height: 1.55;
}

body.tl2 .tl-step strong {
    font-family: 'Bricolage Grotesque', 'Public Sans', sans-serif;
    font-weight: 800;
    font-size: 28px;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-top: auto;
}

body.tl2 .tl-step__n {
    font-family: 'Bricolage Grotesque', 'Public Sans', sans-serif;
    font-weight: 800;
    font-size: 88px;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 2.5px #2b2a44;
}

body.tl2 .tl-step--1 { background: #fbe3a1; transform: rotate(-2deg); }
body.tl2 .tl-step--2 { background: #fcc9a6; transform: rotate(1.5deg); margin-top: 18px; }
body.tl2 .tl-step--3 { background: #dcebb8; transform: rotate(-1.5deg); }
body.tl2 .tl-step--4 { background: #dfd6f7; transform: rotate(2deg); margin-top: 12px; }

/* Thể loại */
body.tl2 .tl-genres {
    margin-top: 56px;
    padding: 56px;
    border-radius: 48px;
    background: #2b2a44;
    color: #f4f1e6;
}

html[data-theme="dark"] body.tl2 .tl-genres {
    background: #26253d;
}

body.tl2 .tl-genres .tl-hand {
    color: #fbe3a1;
}

body.tl2 .tl-genres__head {
    margin-bottom: 36px;
}

body.tl2 .tl-genres__grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

body.tl2 .tl-genre {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    min-height: 140px;
    padding: 18px 20px;
    border: 1.5px solid #f4f1e6;
    border-radius: 24px;
    color: #2b2a44;
    text-decoration: none;
    transition: transform 0.12s ease;
}

body.tl2 .tl-genre:hover {
    transform: translateY(-2px) rotate(-1deg);
}

body.tl2 .tl-genre--0 { background: #fbe3a1; }
body.tl2 .tl-genre--1 { background: #cdeee6; }
body.tl2 .tl-genre--2 { background: #fcc9a6; }
body.tl2 .tl-genre--3 { background: #dfd6f7; }
body.tl2 .tl-genre--4 { background: #dcebb8; }

body.tl2 .tl-genre__name {
    font-family: 'Bricolage Grotesque', 'Public Sans', sans-serif;
    font-weight: 800;
    font-size: 24px;
    line-height: 1.05;
    letter-spacing: -0.02em;
}

body.tl2 .tl-genre__n {
    font-size: 13.5px;
    font-weight: 600;
}

@media (max-width: 900px) {
    body.tl2 .tl-hot {
        grid-template-columns: 1fr;
        padding: 32px 20px;
        border-radius: 32px;
        gap: 28px;
    }

    body.tl2 .tl-hot__row {
        grid-template-columns: 34px 48px minmax(0, 1fr);
        gap: 12px;
        padding: 12px;
    }

    body.tl2 .tl-hot__rank {
        font-size: 28px;
    }

    body.tl2 .tl-hot__thumb {
        width: 48px;
    }

    body.tl2 .tl-hot__side {
        display: none;
    }

    body.tl2 .tl-journey__steps {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    body.tl2 .tl-step {
        min-height: 190px;
        padding: 16px;
        font-size: 13px;
    }

    body.tl2 .tl-step strong {
        font-size: 19px;
    }

    body.tl2 .tl-step__n {
        font-size: 48px;
    }

    body.tl2 .tl-genres {
        padding: 32px 16px;
        border-radius: 32px;
    }

    body.tl2 .tl-genres__grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    body.tl2 .tl-genre {
        min-height: 110px;
        padding: 14px;
    }

    body.tl2 .tl-genre__name {
        font-size: 19px;
    }
}

/* ---------- 20. Trang quản trị: chỉ đổi màu (bộ biến ở mục 1), giữ phông và bo góc cũ ---------- */
body.tl2-admin {
    --radius: 10px;
}

body.tl2-admin .ft2:not(.ft2--webdammy) {
    --ft-bg: #2b2a44;
    --ft-ink: #ffffff;
    --ft-muted: #c9c6e3;
    --ft-line: rgba(255, 255, 255, 0.2);
    --ft-accent: #fbe3a1;
    --ft-on: #2b2a44;
    --ft-chip: rgba(255, 255, 255, 0.1);
    --ft-chip-ink: #ffffff;
    --ft-chip-hover: rgba(255, 255, 255, 0.2);
    border-top: 0;
}
