/* Final 51 reference states: scoped to the real detail/player components. */
/* The demo's final overrides supersede its earlier white selected-label rules. */
html body.site51:is(.is-detail-page,.is-play-page):not(.swipe-mode) .detail-action--active:is([data-detail-like],[data-detail-collect],[data-chapter-like],[data-chapter-collect]){background:var(--accent);border-color:var(--accent);color:#101214!important;transition:background-color .18s,border-color .18s}
html body.site51:is(.is-detail-page,.is-play-page):not(.swipe-mode) .detail-action--active:is([data-detail-like],[data-detail-collect],[data-chapter-like],[data-chapter-collect]) span{color:#101214}
html body.site51:is(.is-detail-page,.is-play-page):not(.swipe-mode) .detail-action--active:is([data-detail-like],[data-detail-collect],[data-chapter-like],[data-chapter-collect]) :is(svg,svg path){color:#101214;fill:#101214;stroke:none}
html body.site51:is(.is-detail-page,.is-play-page):not(.swipe-mode) .detail-action--active:is([data-detail-like],[data-detail-collect],[data-chapter-like],[data-chapter-collect]):hover{background:#7af5c5;border-color:#7af5c5;color:#101214!important}
@media(prefers-reduced-motion:reduce){html body.site51 .detail-action--active{transition:none}}
html body.site51 :is(.detail-sort,.play-comment-sort){display:inline-flex;align-items:center;gap:4px;padding:4px;border:1px solid #ffffff08;border-radius:999px;background:#252527}
html body.site51 :is(.detail-sort-btn,.play-comment-sort-btn){box-sizing:border-box;min-width:42px;height:28px;padding:4px 10px;border:0;border-radius:999px;background:transparent;color:#929299!important;font-size:12px;font-weight:400;line-height:20px;box-shadow:none}
html body.site51 :is(.detail-sort-btn,.play-comment-sort-btn)[aria-pressed="true"]{background:#55555b;color:#fff!important;box-shadow:none}
html body.site51 :is(.detail-sort-btn,.play-comment-sort-btn)[aria-pressed="false"]:hover{background:#ffffff0d;color:#eee!important}
html body.site51 :is(.detail-sort-btn,.play-comment-sort-btn)[aria-pressed="true"]:hover{background:#626269}
/* Legacy body.is-play-page rules outrank the early swipe-mode selectors. */
html body.site51.swipe-mode .play-main > :not(.play-player),
html body.site51.swipe-mode :is(.play-sidebar,.play-aside,.hg-footer){display:none!important}

/* Preserve the project's existing accessible muted-text floor in the restored footer. */
html body.site51 .hg-footer-original-copyright{color:var(--muted)}
/* Compare separate surfaces, rather than treating the whole comments area as a card. */
html body.site51:is(.is-detail-page,.is-play-page) .detail-comments{margin-top:28px;padding:0;background:transparent;border:0;border-radius:0;box-shadow:none}
html body.site51:is(.is-detail-page,.is-play-page) .detail-comments-sort{box-sizing:border-box;display:inline-flex;align-items:center;gap:2px;padding:3px;height:36px;flex-shrink:0;border:1px solid #ffffff08;border-radius:999px;background:#252527}
html body.site51:is(.is-detail-page,.is-play-page) .detail-sort-btn{padding:4px 8px}
html body.site51:is(.is-detail-page,.is-play-page) .detail-sort-btn[aria-pressed="true"]:hover{background:#55555b}
html body.site51:is(.is-detail-page,.is-play-page) .drama-contacts{display:block;padding:28px 30px;background:#1a1a1b;border:0;border-radius:20px}
html body.site51:is(.is-detail-page,.is-play-page) .detail-comment-composer{padding:14px;gap:14px;background:#252527;border:0;border-radius:13px}
html body.site51:is(.is-detail-page,.is-play-page) .detail-comment-composer-input{box-sizing:border-box;height:66px;min-height:66px;padding:12px 14px;border:0;border-radius:9px;background:#090909}
@media(max-width:760px){
 html body.site51:is(.is-detail-page,.is-play-page) .drama-contacts{padding:20px 16px;border-radius:16px}
 html body.site51:is(.is-detail-page,.is-play-page) .detail-comment-composer{padding:12px;gap:10px}
 html body.site51:is(.is-detail-page,.is-play-page) .detail-comment-composer-input{min-height:84px;height:84px}
}
/* The desktop stage reserves 20px above and 24px below; inherited 28px leaked 4px. */
@media(min-width:761px){html body.site51.swipe-mode .play-page{padding-bottom:24px!important}}

/* Screenshot review 2026-10-20: final geometry, including inherited child rules. */
html body.site51{-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}
html body.site51 #channel-page.adult-layout>.topic-breadcrumb{height:auto;align-items:center}
html body.site51 #channel-page.adult-layout>.topic-breadcrumb>*{line-height:inherit;margin-inline:0}
html body.site51 #channel-page.adult-layout .adult-tabs{justify-content:flex-start}
html body.site51 #channel-page.adult-layout .adult-tabs a{flex:0 0 auto;height:auto;line-height:1.5}
html body.site51 #channel-page.adult-layout .card-grid{row-gap:26px}
html body.site51.is-detail-page .detail-page>.site-breadcrumb{margin-bottom:0}
/* With no parent gap, reserve the demo's separation with or without banner ads. */
html body.site51.is-detail-page .detail-primary>.drama-banner-ads{margin-block:26px}
html body.site51.is-detail-page .detail-episodes+.drama-contacts{margin-top:26px}
html body.site51:is(.is-detail-page,.is-play-page):not(.swipe-mode) .site-breadcrumb{display:flex!important}
html body.site51.is-play-page:not(.swipe-mode) .site-breadcrumb{font-size:16px;line-height:1.5;width:100%}
html body.site51.is-play-page:not(.swipe-mode) .site-breadcrumb :is(a,span){font-size:inherit;line-height:inherit}
html body.site51.is-play-page:not(.swipe-mode) .play-page{row-gap:26px}
html body.site51.is-play-page:not(.swipe-mode) .play-info-title{font-size:26px;line-height:1.5;font-weight:700}
html body.site51.is-play-page .drama-sidebar .poster-card{display:block;background:transparent;border:0;border-radius:0;box-shadow:none}
html body.site51.is-play-page .drama-sidebar .poster-card-body{padding:0;background:transparent}
@media(min-width:801px){
 html body.site51.is-play-page .drama-sidebar{padding-left:24px;border-left:1px solid #ffffff10}
 html body.site51.is-play-page .drama-sidebar h2{font-size:20px;font-weight:700;line-height:30px;margin:0 0 18px}
 html body.site51.is-detail-page .detail-related-head{min-height:30px;margin:0 0 9px}
 html body.site51.is-detail-page .detail-related-title{font-size:20px;line-height:30px}
}
@media(max-width:760px){
 html body.site51.is-detail-page .detail-primary>.drama-banner-ads{margin-block:22px}
 html body.site51.is-detail-page .detail-episodes+.drama-contacts{margin-top:22px}
 html body.site51 #channel-page.adult-layout .card-grid{row-gap:22px}
 html body.site51.is-detail-page .detail-page{row-gap:16px!important;padding-top:16px!important}
 html body.site51.is-detail-page .detail-title-row{flex-direction:row;align-items:baseline;gap:8px}
 html body.site51.is-detail-page .detail-title{width:auto;max-width:100%}
 html body.site51.is-play-page:not(.swipe-mode) .site-breadcrumb{font-size:12px;line-height:1.6}
 html body.site51.is-play-page:not(.swipe-mode) .play-info-title{font-size:20px}
 html body.site51.is-play-page:not(.swipe-mode) .play-page{row-gap:16px}
 html body.site51.is-play-page:not(.swipe-mode) .play-info-actions{gap:8px}
 html body.site51.is-play-page:not(.swipe-mode) .play-info-actions>.detail-action{flex:0 0 calc((100% - 24px)/4);width:calc((100% - 24px)/4);min-width:0;padding:9px 6px;justify-content:center;font-size:12px}
 html body.site51.is-play-page:not(.swipe-mode) .play-info-actions>.drama-download{flex-basis:auto;margin:0}
}
@media(min-width:601px) and (max-width:760px){
 html body.site51 #channel-page.adult-layout .card-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(min-width:601px) and (max-width:1180px){
 html body.site51 #channel-page.adult-layout .card-grid{row-gap:24px;column-gap:16px}
}
@media(min-width:761px) and (max-width:800px){
 html body.site51.is-play-page:not(.swipe-mode) .play-info-title{font-size:20px}
}
@media(min-width:801px) and (max-width:1100px){
 html body.site51.is-play-page:not(.swipe-mode) .play-info-title{font-size:22px}
}

html body.site51 .search-page:has(.search-results-heading){margin-top:0;margin-bottom:0;padding-top:32px;padding-bottom:48px;min-height:80vh}
html body.site51 .search-inner:has(.search-results-heading){display:block}
html body.site51 .search-page .search-results-heading{margin:26px 0 28px}
html body.site51 .search-page .search-results-heading h1{margin:0 0 12px;line-height:1.5}
html body.site51 .search-page .search-result-count{font-size:14px;line-height:21px;color:#aaa}
html body.site51 .search-page .search-result-count mark{color:#eee;font-weight:400}
html body.site51 .search-page .topic-breadcrumb{height:auto;align-items:center;font-size:16px;line-height:24px;color:#8d8d95}
html body.site51 .search-page .topic-breadcrumb>*{margin-inline:0;line-height:inherit}
html body.site51 .search-page .search-grid{gap:28px 18px}
html body.site51 .feedback-breadcrumb [aria-current="page"]{color:var(--accent)}
/* The old preview grid squeezed the full-size upload tile into one narrow cell. */
html body.site51 #feedback-form .feedback-upload-list{display:flex;flex-wrap:wrap;align-items:flex-start;gap:12px}
html body.site51 #feedback-form .feedback-upload{flex:0 0 auto;border:1px solid #ffffff12;border-radius:28px;background:#222}
html body.site51 #feedback-form .feedback-upload .feedback-reference-plus{border-radius:18px;background:#383838;stroke:#fff;stroke-width:4}
@media(max-width:760px){
 html body.site51 .search-page:has(.search-results-heading){padding-top:22px}
 html body.site51 .search-page .search-results-heading{margin:20px 0 24px}
 html body.site51 .search-page .search-results-heading h1{font-size:22px}
 html body.site51 .search-page .topic-breadcrumb{font-size:12px;line-height:1.6;gap:8px}
 html body.site51 .search-page .search-grid{gap:22px 12px}
 html body.site51 .feedback-breadcrumb{font-size:12px!important;line-height:1.6!important;gap:8px}
 html body.site51 #channel-page.home-road{padding-left:16px!important;padding-right:16px!important}
}

/* The business popup lives under body; map the demo's final component sizes explicitly. */
html body.site51 #headerSearchPanel{padding:20px;border-radius:18px;background:#0d0d0d;overflow:visible;transform-origin:top left}
html body.site51 #headerSearchPanel .search-discovery-heading{min-height:30px;margin-bottom:12px}
html body.site51 #headerSearchPanel h2{font-size:16px;font-weight:650;line-height:24px}
html body.site51 #headerSearchPanel button{color:var(--accent);font-size:14px;min-height:30px}
html body.site51 #headerSearchPanel :is([data-search-clear],[data-search-refresh]){color:var(--accent)!important}
html body.site51 #registerDialog .register-dialog-submit{background:linear-gradient(110deg,#40ffb5 0%,#5ef2b8 56%,#209567 100%)}
html body.site51 #headerSearchPanel .search-panel-close{display:grid;place-items:center;color:#ccc;width:30px;height:30px;padding:4px}
html body.site51 #headerSearchPanel .search-panel-close svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
html body.site51 #headerSearchPanel .search-history-tags{min-height:28px}
html body.site51 #headerSearchPanel .search-hot-section{border-top:0;border-bottom:1px solid #ffffff12;padding:16px 0;margin:0}
html body.site51 #headerSearchPanel .search-hot-section h2{margin:0 0 12px;min-height:0;line-height:24px}
html body.site51 #headerSearchPanel .search-hot-list{gap:2px;margin:0}
html body.site51 #headerSearchPanel .search-hot-list a{min-height:34px;padding:4px 0;gap:10px;font-size:14px;line-height:21px}
html body.site51 #headerSearchPanel .search-hot-rank{width:24px;height:24px;flex-basis:24px;font-size:14px}
html body.site51 #headerSearchPanel .search-hot-value{font-size:12px}
html body.site51 #headerSearchPanel .search-hot-value .heat-value-icon{display:none}
html body.site51 #headerSearchPanel .search-recommend-section{border:0;padding:16px 0 0;margin:0}
html body.site51 #headerSearchPanel .search-recommend-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:0}
html body.site51 #headerSearchPanel .search-recommend-grid>.poster-card:nth-child(n+4){display:none}
html body.site51 #headerSearchPanel .poster-card{display:block;background:#191919;border-radius:12px;overflow:hidden}
html body.site51 #headerSearchPanel .poster-cover{aspect-ratio:640/914;height:auto}
html body.site51 #headerSearchPanel .poster-card-body{display:grid;padding:9px 8px;gap:5px;height:auto;min-height:0}
html body.site51 #headerSearchPanel .poster-card-title{margin:0;font-size:12px;font-weight:600;line-height:18px}
html body.site51 #headerSearchPanel .poster-card-subtitle{margin:0;font-size:12px;line-height:18px}
html body.site51 #headerSearchPanel :is(.poster-card-meta,.home-corner-badge){display:none}
@media(max-width:760px){
 html body.site51 #headerSearchPanel .search-recommend-grid{gap:7px}
 html body.site51 #headerSearchPanel .poster-card-body{padding:8px 5px}
 html body.site51 #headerSearchPanel .poster-card-title{font-size:10px;line-height:15px}
 html body.site51 #headerSearchPanel .poster-card-subtitle{display:none}
}
