/* Spacing adapter: measured against the user's rendered HTML, 2026-10-18.
   Data-driven text/counts and conditional business content keep their natural size. */
html body.site51 .home-content .category-normal{row-gap:28px;column-gap:18px;grid-template-columns:repeat(6,minmax(0,1fr))}
html body.site51 .home-content .category-normal .drama-data-card h3{margin:14px 0 9px}
html body.site51 .home-content .drama-description{margin-bottom:9px}
html body.site51 .home-content .drama-meta{gap:10px}
/* The input wrapper and input may distribute padding differently; text inset stays 14px. */
html body.site51 :is(.login-dialog-card,.register-dialog-card){gap:0}
html body.site51 :is(.login-dialog-head,.register-dialog-head){margin:0 0 24px;gap:10px}
html body.site51 :is(.login-dialog-form,.register-dialog-form){display:block;margin:0;gap:0}
html body.site51 .login-dialog-field-group{display:grid;gap:10px;margin:0 0 20px}
html body.site51 .register-dialog-field-group{display:grid;gap:8px;margin:0 0 18px}
html body.site51 :is(.login-dialog-label,.register-dialog-label){margin:0}
html body.site51 :is(.login-dialog-field,.register-dialog-field){gap:10px}
html body.site51 :is(.login-dialog-submit,.register-dialog-submit){display:block;width:100%}
html body.site51 :is(.login-dialog-register,.register-dialog-login){margin:18px 0 0}
html body.site51 :is(.login-dialog-legal,.register-dialog-legal){margin:16px 0 0}
/* Avoid a legacy breadcrumb bottom margin being counted again by the page heading. */
html body.site51 .feedback-page{margin-bottom:0!important}
html body.site51 .feedback-breadcrumb{margin:0;padding:0;gap:12px}
html body.site51 #feedback-form .feedback-section{display:block;gap:0;margin:0;padding:0;min-width:0}
html body.site51 #feedback-form .feedback-section>h2{font-size:18px;line-height:27px;margin:0 0 16px}
html body.site51 #feedback-form .feedback-panel.feedback-stack{padding:22px;gap:16px}
html body.site51 #feedback-form .feedback-description-box{position:relative}
html body.site51 #feedback-form .feedback-description-box textarea{height:180px;min-height:180px;padding:14px 16px 40px;line-height:25.2px}
html body.site51 #feedback-form .feedback-counter{position:absolute;bottom:14px;right:16px;margin:0;width:auto;line-height:18px}
html body.site51 #feedback-form .feedback-upload{width:360px;height:auto;max-width:100%;aspect-ratio:1;padding:28px 16px;gap:10px}
html body.site51 #feedback-form .feedback-upload .feedback-reference-plus{box-sizing:content-box;width:25px;height:25px;padding:11.5px;margin:0 0 18px;flex:none}
html body.site51 #feedback-form .feedback-file-limit{margin:18px 0 0;font-size:14px;line-height:22.4px}
html body.site51 #feedback-form .feedback-upload>span{font-size:18px;line-height:27px}
html body.site51 #feedback-form .feedback-upload>small{font-size:14px;line-height:22.4px}
/* Let the title use the available column instead of shrinking to its contents. */
html body.is-detail-page .detail-hero-info{display:block;width:100%;padding-top:4px;align-self:stretch}
html body.is-detail-page .detail-title-row{width:100%}
html body.is-detail-page .detail-hero-main{gap:0}
html body.is-detail-page .detail-tags{margin-top:18px}
html body.is-detail-page .detail-genres{margin-top:18px}
html body.is-detail-page .detail-intro-block{margin:18px 0 26px}
html body.is-detail-page .detail-intro{margin:0;line-height:26.6px;-webkit-line-clamp:3}
html body.is-detail-page .detail-primary{gap:0}
html body.is-detail-page .detail-episodes{display:block;padding-top:26px;gap:0}
html body.is-detail-page .detail-episodes-head{margin:0 0 18px}
html body.is-detail-page .detail-episode-tabs{margin:0 0 22px}
html body.site51 :is(.detail-comments,.play-main>.detail-comments){display:block;padding:0;margin-top:28px;gap:0}
html body.site51 .detail-comment-list{margin-top:12px}
html body.site51 .detail-aside .poster-card{margin-bottom:24px}
@media(min-width:761px){
 html body.is-detail-page .detail-page{padding-top:30px!important}
 html body.is-detail-page .site-breadcrumb{margin-bottom:26px}
 html body.site51 .home-content .category-normal{grid-template-columns:repeat(6,minmax(0,1fr))}
}
@media(min-width:761px) and (max-width:1180px){html body.site51 .home-content .category-normal{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){
 html body.site51 .home-content .category-normal{grid-template-columns:repeat(2,minmax(0,1fr));row-gap:22px;column-gap:12px}
 html body.site51 :is(.login-dialog-card,.register-dialog-card){width:440px;max-width:calc(100vw - 48px)}
 html body.site51 #feedback-form .feedback-panel.feedback-stack{padding:16px}
 html body.site51 #feedback-form .feedback-upload{width:100%;max-width:360px;border-radius:24px}
 html body.is-detail-page .detail-page{padding-top:18px!important}
 html body.is-detail-page .detail-hero{gap:16px}
 html body.is-detail-page .detail-intro-block{margin:14px 0 18px}
 html body.is-detail-page .detail-tags{margin-top:12px}
}

@media(min-width:761px){html body.site51 #global-site-header>.top{gap:24px}}
html body.site51 .home-content .section-heading-copy>p{margin:0 0 0 14px;padding-left:14px}
@media(max-width:760px){
 html body.site51 .home-content .section-heading-copy>p{margin-left:10px;padding-left:10px}
 html body.site51.is-detail-page .detail-hero{display:block}
 html body.site51.is-detail-page .detail-cover{display:block;margin:0 0 18px}
 html body.site51.is-detail-page .detail-action-group{gap:6px}
}

/* ID-scoped inherited dialog adapters otherwise restore their 18px flex gap. */
html body #loginDialog .login-dialog-form,html body #registerDialog .register-dialog-form{display:block!important;gap:0!important}
html body #loginDialog .login-dialog-card,html body #registerDialog .register-dialog-card{gap:0}
html body.is-detail-page .detail-hero{align-items:start}
html body.is-detail-page .detail-hero-main{align-self:start}
@media(max-width:760px){html body #loginDialog .login-dialog-card,html body #registerDialog .register-dialog-card{max-width:calc(100vw - 48px)!important}}

html body.site51 .feedback-breadcrumb{font-size:16px!important;line-height:24px!important}

html body .site-breadcrumb{gap:12px}
html body .poster-card-subtitle{margin-bottom:9px}
html body .poster-card-meta{display:flex;gap:10px;margin-top:0!important}
html body.is-detail-page .detail-page{padding-bottom:0!important}
html body.is-play-page:not(.swipe-mode) .play-page{padding-top:30px!important;padding-bottom:0!important}
@media(max-width:760px){
 html body .site-breadcrumb{gap:8px}
 html body .info-heading{padding-top:24px;padding-bottom:24px}
 html body .poster-card-subtitle{margin-bottom:7px}
 html body .home-content .drama-description{margin-bottom:7px}
 html body .poster-card-meta,html body .home-content .drama-meta{gap:6px}
 html body.is-play-page:not(.swipe-mode) .play-page{padding-top:16px!important;padding-left:16px!important;padding-right:16px!important;padding-bottom:0!important}
 html body.site51 .play-ep-grid{gap:10px}
}

@media(max-width:760px){html body.site51 .home-content .category-normal .drama-data-card h3{margin:9px 0}}

/* Content columns remain centered at the reference maximum on wide displays. */
html body.site51>main.shell,html.sidebar-collapsed body.site51>main.shell,html body.site51>.page-shell{max-width:1720px!important;margin-left:auto!important;margin-right:auto!important}
@media(min-width:761px) and (max-width:1180px){
 html body.site51>main.shell,html.sidebar-collapsed body.site51>main.shell,html body.site51>.page-shell{padding-left:28px!important;padding-right:28px!important}
 html body.site51 #global-site-header{padding-left:28px!important;padding-right:28px!important}
}

@media(min-width:761px){html body.site51 .home-content .section-heading-copy{display:flex;align-items:center;min-width:0}}
@media(max-width:760px){html body.site51 #info-page .info-heading{padding:24px 0}}

@media(min-width:761px) and (max-width:1180px){html body.is-detail-page .detail-hero{padding:24px;gap:24px}}
html body.is-detail-page .detail-tags{margin-top:20px}
html body #profile-popover>.profile-switch{padding-top:14px;margin-top:6px}
@media(min-width:521px) and (max-width:760px){html body #registerDialog .register-dialog-card{padding-top:32px;padding-bottom:32px}}

html body.site51 .poster-card .poster-card-meta{gap:10px!important}
html body.site51 .site-breadcrumb{gap:12px!important}
@media(min-width:761px) and (max-width:1180px){html body.site51 #global-site-header>.top{gap:16px}}
@media(max-width:760px){
 html body.site51 .poster-card .poster-card-meta{gap:6px!important}
 html body.site51 .home-content .category-normal .drama-description{margin-bottom:7px!important}
}
@media(max-width:520px){html body.site51 #loginDialog .login-dialog-card{padding-top:26px;padding-bottom:26px}}
@media(min-width:521px) and (max-width:760px){html body.site51 #loginDialog .login-dialog-card{padding-top:36px;padding-bottom:36px}}

/* Swipe copy reserves the original action rail; controls align to the player edges. */
html body.site51.swipe-mode .play-page{padding-top:20px!important}
html body.site51.swipe-mode .play-player{height:calc(100dvh - var(--global-header-height,73px) - 44px)!important;border:1px solid #ffffff12;box-sizing:border-box}
html body.site51.swipe-mode .swipe-caption{left:30px;right:auto;bottom:98px;width:min(600px,calc(100% - 150px));max-width:none}
html body.site51.swipe-mode .swipe-caption h1{line-height:1.45;margin-bottom:10px}
html body.site51.swipe-mode .swipe-caption p{line-height:1.8;margin-bottom:10px}
html body.site51.swipe-mode .swipe-caption-tags{font-size:12px;line-height:18px;gap:10px;margin-bottom:14px}
html body.site51.swipe-mode .swipe-caption button{padding:10px 14px;gap:12px;font-size:13px;line-height:19.5px}
html body.site51.swipe-mode .swipe-next-drama{gap:10px;right:calc(max(0px,(100vw - 1720px)/2) + 72px);top:calc(50dvh + var(--global-header-height,73px)/2 - 84px);bottom:auto}
html body.site51.swipe-mode .swipe-next-drama a{width:36px;height:36px;padding:0;box-sizing:border-box}
html body.site51.swipe-mode .play-screen-controls{left:24px;right:24px;bottom:0;width:auto;height:72px;padding:0;gap:15px;font-size:16px;line-height:24px}
html body.site51.swipe-mode .play-screen-controls>.player-seek{position:absolute;top:0;left:0;width:100%;height:3px;margin:0}
html body.site51.swipe-mode .player-control-row{height:100%;gap:15px;align-items:center}
@media(max-width:760px){
 html body.site51.swipe-mode .play-page{padding-top:0!important}
 html body.site51.swipe-mode .play-player{height:calc(100dvh - 68px)!important;border:0}
 html body.site51.swipe-mode .swipe-caption{left:18px;right:auto;bottom:90px;width:calc(100% - 95px)}
 html body.site51.swipe-mode .swipe-caption h1{font-size:19px;line-height:1.45;margin-bottom:6px}
 html body.site51.swipe-mode .swipe-caption p{font-size:12px;line-height:1.7;margin-bottom:10px}
 html body.site51.swipe-mode .swipe-caption-tags{gap:10px;margin-bottom:10px}
 html body.site51.swipe-mode .swipe-caption button{padding:8px 10px;gap:7px;font-size:12px;line-height:18px}
 html body.site51.swipe-mode .swipe-next-drama{right:15px;top:168px;gap:10px}
 html body.site51.swipe-mode .swipe-next-drama a{width:30px;height:30px}
 html body.site51.swipe-mode .play-screen-controls{left:16px;right:16px;bottom:0;height:65px;padding:0;gap:9px}
 html body.site51.swipe-mode .player-control-row{gap:9px}
}

@media(max-width:760px){
 html body.site51 .site-breadcrumb{gap:8px!important}
 html body.site51 .home-content .card.drama-data-card .drama-meta{gap:6px!important}
 html body.site51 .home-content .card.drama-data-card .drama-description{margin-bottom:7px!important}
 html body.site51.is-detail-page .detail-tags{margin-top:12px}
}

@media(min-width:761px) and (max-width:1180px){html body.is-detail-page .detail-cover{width:180px;max-width:180px;flex-basis:180px}}

@media(max-width:520px){html body.site51 #loginDialog .login-dialog-card{padding-top:30px;padding-bottom:30px}}
@media(min-width:601px) and (max-width:760px){html body.site51.is-detail-page .detail-tags{margin-top:20px}}

@media(min-width:981px) and (max-width:1180px){
 html body.is-detail-page .detail-page{grid-template-columns:minmax(0,1fr) 222px}
 html body.is-detail-page .detail-aside{width:auto;min-width:0;max-width:none}
}
