/* V16.29 – Story Detail Redesign / only on story pages, preserves all existing handlers. */
.tg29-story-page{max-width:1220px;padding-top:12px;padding-bottom:4px;}
.tg29-back{display:inline-flex;align-items:center;color:#dfbf83!important;margin:0 0 15px;font-size:13px;text-decoration:none}
.tg29-hero{position:relative;isolation:isolate;overflow:hidden;border-radius:20px;background:#0c1422;border:1px solid rgba(217,167,85,.4);box-shadow:0 22px 65px #0006}
.tg29-hero::before{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;background:linear-gradient(90deg,rgba(7,13,24,.99) 0%,rgba(7,13,24,.96) 23%,rgba(7,13,24,.86) 52%,rgba(7,13,24,.43) 100%)}
.tg29-hero-banner{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center;z-index:0;opacity:.95;pointer-events:none}
.tg29-hero-banner[hidden]{display:none!important}
.tg29-hero .detail-card{position:relative;z-index:2}
.tg29-hero::after{content:"";position:absolute;inset:auto 0 0;height:65px;z-index:1;pointer-events:none;background:linear-gradient(0deg,#0b121f,transparent)}
.tg29-hero .detail-card{display:grid;grid-template-columns:minmax(175px,245px) minmax(0,1fr);gap:30px;background:transparent;border:0;box-shadow:none;padding:28px;margin:0;max-width:none;align-items:start}
.tg29-cover-wrap{width:100%;align-self:start;padding:0;border:1px solid #d2a65c;border-radius:13px;overflow:hidden;background:#161c27;box-shadow:0 16px 35px #0009}
.tg29-hero .detail-card .tg29-cover-wrap>img{display:block;width:100%;height:auto;aspect-ratio:3/4;object-fit:cover;margin:0;max-height:none;max-width:none;border:0;border-radius:0;box-shadow:none}
.tg29-hero-content{min-width:0}
.tg29-eyebrow,.tg29-kicker{display:inline-block;color:#e2b970;font:750 10px/1.5 Inter,Arial,sans-serif;letter-spacing:.15em}
.tg29-hero-content h1{font:700 clamp(25px,2.9vw,39px)/1.24 Georgia,'Times New Roman',serif;color:#ffe4ab;letter-spacing:.005em;margin:7px 0 11px;overflow-wrap:anywhere;text-shadow:0 1px 12px #0009}
.tg29-author{color:#dec28f;display:flex;align-items:center;gap:9px;flex-wrap:wrap;font-size:13px}
.tg29-genres{margin:10px 0 8px;display:flex;gap:7px;flex-wrap:wrap}
.tg29-story-page .pill{margin:0;padding:5px 11px;border-radius:100px;color:#ebd39d;border:1px solid #9e7841;background:#151923b3;font:600 12px/1.3 Georgia,'Times New Roman',serif}
.tg29-hero-content .description{font:14px/1.75 Georgia,'Times New Roman',serif;color:#d9dee7;margin:12px 0 0;max-width:780px;white-space:pre-line;overflow-wrap:anywhere}
.tg29-description.is-clamped{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;line-clamp:4;overflow:hidden}
.tg29-expand-description{appearance:none;border:0;background:none;padding:5px 0;color:#f4c77d;font-size:12px;cursor:pointer}
.tg29-stats{display:flex;flex-wrap:wrap;align-items:stretch;gap:0;max-width:790px;margin:19px 0 16px;padding:10px 5px;border:1px solid rgba(206,169,104,.35);border-radius:14px;background:rgba(7,14,24,.8);box-shadow:inset 0 1px rgba(255,255,255,.07)}
.tg29-stat{flex:1 1 125px;min-width:0;display:flex;align-items:center;gap:9px;padding:7px 12px;border-right:1px solid rgba(206,169,104,.17)}
.tg29-stat>span{font-size:23px;color:#e5bd76}
.tg29-stat>div{display:flex;flex-direction:column;min-width:0}
.tg29-stat-value{display:block;font:700 19px/1.25 Georgia,'Times New Roman',serif;color:#f9d78f;overflow-wrap:anywhere}
.tg29-stat-label{display:block;color:#c3c9d3;font-size:11px;white-space:normal}
.tg29-status{display:inline-flex;align-items:center;gap:7px;align-self:center;white-space:nowrap;font-weight:750;font-size:12px;margin:7px 10px;padding:9px 13px;border:1px solid #28704d;color:#81e2a7;background:#123329b9;border-radius:100px}
.tg29-status-dot{width:8px;height:8px;background:currentColor;border-radius:50%}
.tg29-status-completed{color:#f2cf83;background:#403019;border-color:#8f743a}
.tg29-status-paused{color:#e9bd92;background:#3b2a2a;border-color:#915840}
.tg29-story-page .detail-tools.tg29-actions{display:flex;align-items:center;flex-wrap:wrap;gap:9px;padding:0;margin:15px 0 0}
.tg29-actions .gold-btn,.tg29-actions .simple-btn{width:auto;display:inline-flex;justify-content:center;align-items:center;min-height:41px;padding:9px 17px;border-radius:22px;font-size:13px;font-weight:700;box-shadow:none;margin:0;text-decoration:none}
.tg29-actions .gold-btn{background:linear-gradient(105deg,#fbe59d,#e6b75b);color:#24180a;border-color:#f3c66f}
.tg29-actions .simple-btn{background:rgba(8,14,23,.8);color:#e8d7b9;border:1px solid rgba(210,171,105,.56)}
.tg29-actions .simple-btn:hover{border-color:#f0c77f;background:#252031}
.tg29-tabs{display:flex;align-items:center;gap:6px;overflow-x:auto;scrollbar-width:thin;white-space:nowrap;padding:10px 0;margin:15px 0 8px;border-bottom:1px solid rgba(215,172,99,.3)}
.tg29-tabs button,.tg29-tabs a{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;padding:11px 17px;background:none;color:#d7dce5;border:1px solid transparent;border-radius:11px;font:700 13px/1.2 Georgia,'Times New Roman',serif;text-decoration:none;cursor:pointer}
.tg29-tabs button:hover,.tg29-tabs a:hover{color:#f9d68e;border-color:#786239}
.tg29-tabs .is-active{background:linear-gradient(105deg,#fbe29a,#dca951);border:1px solid #f2c369;color:#231a0c;box-shadow:0 5px 22px #e9b96433}
.tg29-story-page .chapter-list.tg29-chapter-list{background:linear-gradient(158deg,#101b2c,#0b121f);border:1px solid #a37e45;border-radius:17px;padding:18px 22px 16px;box-shadow:0 14px 45px #0003;scroll-margin-top:95px}
.tg29-chapters-head{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:12px}
.tg29-chapters-head h2{font:700 clamp(19px,2.5vw,26px)/1.3 Georgia,'Times New Roman',serif;color:#f3ca80;margin:4px 0 4px}
.tg29-chapters-head p{margin:0;color:#b8c5d5;font-size:12px}
.tg29-sort{border:1px solid #856c44;background:#121c29;color:#e6c88d;border-radius:10px;padding:9px 13px;cursor:pointer;white-space:nowrap;font:700 12px Inter,Arial,sans-serif}
.tg29-sort:hover{background:#2b261e}
.tg29-chapter-items{min-width:0}
.tg29-chapter-items .chapter-row{display:flex;align-items:center;gap:12px;min-height:50px;padding:10px 13px;background:#142235b0;border:1px solid #31435a;border-bottom-color:#31435a;border-radius:8px;margin:5px 0}
.tg29-chapter-items .chapter-row:nth-child(2n){background:#101b2bbd}
.tg29-chapter-items .chapter-row:before{content:'▤';color:#efc36e;font-size:17px;flex:0 0 auto}
.tg29-chapter-items .chapter-row a{flex:1;min-width:0;color:#f0e0bc;font:600 13px/1.5 Georgia,'Times New Roman',serif;text-decoration:none;overflow-wrap:anywhere}
.tg29-chapter-items .chapter-row a:hover{color:#fff1bb;text-decoration:underline}
.tg29-chapter-items .chapter-row>span.muted{margin-left:auto;color:#e6bd79;font-size:11px;white-space:nowrap}
.tg29-chapter-date{font-size:11px;color:#c1ccda;white-space:nowrap}
.tg29-chapter-items .chapter-row[hidden]{display:none!important}
.tg29-chapter-items .tg50-volume{border-radius:12px;margin-bottom:10px;border:1px solid #3c5367;background:rgba(9,16,26,.7)}
.tg29-chapter-items .tg50-volume>summary{font-family:Georgia,'Times New Roman',serif;color:#f2ca7a;font-size:15px;padding:14px}
.tg29-chapter-items .tg50-volume>.chapter-row{margin:5px 10px}
.tg29-chapter-items .tg50-volume-nav{margin-bottom:12px}
.tg29-page-controls{border-top:1px solid #36445a;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:15px;padding:12px 3px 2px;color:#b7c8da;font-size:12px}
.tg29-page-controls[hidden]{display:none!important}
.tg29-page-buttons{display:flex;align-items:center;gap:12px}
.tg29-page-buttons button{border:1px solid #745a35;border-radius:10px;background:#1b2430;color:#f4c778;width:34px;height:34px;cursor:pointer}
.tg29-page-buttons button:disabled{opacity:.35;cursor:default}
/* Lịch và FAQ được ghép thành hai card ngay dưới danh sách chương, không có banner trang riêng. */
#app .tg-r17-story-shell.tg29-info-grid{width:calc(100% - 32px);max-width:1220px;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:stretch;gap:18px;padding:0;margin:18px auto 28px;border:0;box-shadow:none;background:transparent;color:#f0e8d9}
.tg29-info-card{position:relative;overflow:hidden;min-width:0;border:1px solid #ae8346;border-radius:17px;padding:23px;background:linear-gradient(145deg,#111d2e,#0b1422);box-shadow:0 14px 38px #0004}
.tg29-info-card::after{content:"";position:absolute;bottom:0;right:0;width:52%;height:48%;pointer-events:none;opacity:.21;background:radial-gradient(ellipse at right bottom,rgba(225,179,98,.22),transparent 65%);mask-image:linear-gradient(90deg,transparent,black)}
.tg29-info-card>*{position:relative;z-index:1}
.tg29-info-header{display:flex;align-items:center;gap:12px;padding-bottom:16px;border-bottom:1px solid #605039;margin-bottom:15px}
.tg29-info-icon{font-family:Georgia,serif;display:grid;place-items:center;flex:0 0 41px;width:41px;height:41px;border-radius:11px;border:1px solid #a98248;background:#302719;color:#f7ce82;font-size:26px;font-weight:700}
.tg29-info-card h2{font:700 clamp(20px,2.2vw,26px)/1.25 Georgia,'Times New Roman',serif;color:#f6d597;margin:3px 0 0}
.tg29-info-lines{display:grid;gap:3px;margin:0 0 13px}
.tg29-info-lines>div{display:flex;justify-content:space-between;align-items:baseline;gap:15px;padding:11px 5px;border-bottom:1px solid #ffffff16;color:#d9e0e8;font-size:13px}
.tg29-info-lines strong{font-weight:750;color:#f0c77f;text-align:right;overflow-wrap:anywhere}
.tg29-info-lines .tg29-state{color:#8ce0ac}
#app .tg29-schedule-panel .tg-r17-story-schedule{margin:9px 0}
#app .tg29-schedule-panel .tg-r17-empty{padding:12px 13px;font-size:12px;border:1px solid #554831;background:rgba(220,181,99,.07);color:#d7d5ce}
#app .tg29-schedule-panel .tg-r17-card{padding:10px 12px;background:#111d2a;border-color:#485167}
#app .tg29-schedule-panel .tg-r17-card h3{font-size:14px}
.tg29-schedule-link{display:inline-flex;justify-content:center;align-items:center;min-height:39px;padding:9px 15px;border:1px solid #f0c478;background:linear-gradient(100deg,#f7da8c,#d6a14b);color:#241705!important;font-weight:800;text-decoration:none;border-radius:10px;margin:10px 0 0;font-size:13px}
#app .tg29-faq-panel .tg-r17-faq{margin:0}
#app .tg29-faq-panel .tg-r17-faq details{border:1px solid #49556b;border-radius:10px;background:#111c2c;margin:8px 0;overflow:hidden}
#app .tg29-faq-panel .tg-r17-faq details[open]{border-color:#b78d4d;background:linear-gradient(120deg,#27251f,#17202d)}
#app .tg29-faq-panel .tg-r17-faq summary{font:700 14px/1.5 Georgia,'Times New Roman',serif;color:#eee5d5;padding:13px 14px;cursor:pointer}
#app .tg29-faq-panel .tg-r17-faq summary::before{content:'▾';display:inline-block;color:#eec478;margin-right:11px;transform:rotate(-90deg)}
#app .tg29-faq-panel .tg-r17-faq details[open] summary::before{transform:rotate(0deg)}
#app .tg29-faq-panel .tg-r17-faq-answer{font:13px/1.7 Georgia,'Times New Roman',serif;color:#d1d8e1;padding:1px 17px 16px}
#app .tg29-faq-panel .tg-r17-faq-answer strong{color:#ffd68b}
.tg29-story-page #tg29-description,#app .tg-r17-story-shell,#app #tg-rating-slot{scroll-margin-top:100px}
@media(max-width:900px){.tg29-hero .detail-card{grid-template-columns:190px minmax(0,1fr);gap:17px;padding:19px}.tg29-stat{flex:1 1 115px}.tg29-story-page .chapter-list.tg29-chapter-list{padding:14px}#app .tg-r17-story-shell.tg29-info-grid{gap:12px}}
@media(max-width:700px){.tg29-story-page{padding:10px 10px 0}.tg29-hero .detail-card{grid-template-columns:minmax(105px,31%) minmax(0,1fr);gap:12px;padding:13px}.tg29-hero-content h1{font-size:clamp(20px,5vw,28px)}.tg29-eyebrow{font-size:9px}.tg29-author{font-size:11px}.tg29-hero-content .description{font-size:12px;line-height:1.55}.tg29-cover-wrap{border-radius:8px}.tg29-stats{gap:4px}.tg29-stat{min-width:95px;flex:1 1 45%;border-right:0;padding:5px 8px}.tg29-status{margin:6px}.tg29-actions .gold-btn,.tg29-actions .simple-btn{font-size:12px;padding:8px 12px}.tg29-tabs button,.tg29-tabs a{padding:10px 13px;font-size:12px}#app .tg-r17-story-shell.tg29-info-grid{grid-template-columns:1fr;width:calc(100% - 20px);margin:13px auto 22px}.tg29-info-card{padding:16px}.tg29-info-card h2{font-size:21px}.tg29-chapters-head{flex-wrap:wrap}.tg29-chapter-items .chapter-row{padding:9px 8px}.tg29-chapter-date{display:none}}
@media(max-width:410px){.tg29-hero .detail-card{display:flex;flex-direction:column}.tg29-cover-wrap{width:min(48%,180px);align-self:center}.tg29-hero-content{width:100%}.tg29-hero-content h1{text-align:center}.tg29-author{justify-content:center}.tg29-genres{justify-content:center}.tg29-stats{margin-top:12px}.tg29-story-page .chapter-list.tg29-chapter-list{padding:11px}.tg29-chapter-items .chapter-row>span.muted{display:none}}
@media(prefers-reduced-motion:reduce){.tg29-story-page *,#app .tg-r17-story-shell *{scroll-behavior:auto!important;transition:none!important}}

.tg29-public-note{color:#b9c4d0;font-size:11px;margin:3px 0 7px}.tg29-public-note span{padding:0 6px;color:#d8ae6b}.tg29-adult-tag{display:inline-flex;align-items:center;border:1px solid #9c5346;border-radius:20px;background:#3f2425b5;color:#ffd1c0;padding:5px 11px;font-size:12px;font-weight:700}

/* V16.29.1: tab duy nhất cho mục lục, lịch và FAQ; không còn hai thẻ kéo dài trang. */
#app .tg29-story-page #tg29-chapters[hidden],
#app .tg29-story-page #tg-r17-story[hidden],
#app .tg29-story-page .tg29-info-card[hidden]{display:none!important}
#app .tg29-story-page .tg-r17-story-shell.tg29-info-grid{max-width:none;width:100%;margin:13px 0 25px;padding:0;grid-template-columns:minmax(0,1fr)}
#app .tg29-story-page .tg-r17-story-shell.tg29-info-grid:not(.is-active){display:none!important}
#app .tg29-story-page .tg29-info-card{min-height:230px;padding:24px 28px}
.tg29-story-page .tg29-tabs{scroll-margin-top:95px;gap:6px}
.tg29-story-page #tg-r17-story{scroll-margin-top:95px}
.tg29-story-page .tg29-tabs button:focus-visible,.tg29-story-page .tg29-tabs a:focus-visible{outline:2px solid #f4cf7f;outline-offset:3px}
@media(max-width:700px){
 .tg29-hero::before{background:linear-gradient(90deg,rgba(6,12,22,.95),rgba(6,12,22,.74))}
 #app .tg29-story-page .tg29-info-card{padding:17px}
 .tg29-story-page .tg29-tabs{gap:5px;scrollbar-width:thin}
 .tg29-story-page .tg29-tabs button,.tg29-story-page .tg29-tabs a{min-height:42px}
}
