:root{--bg:#171327;--surface:#251e3b;--fg:#f3edff;--muted:#b4a7cf;--accent:#b79aff;--on:#111827;--edge:#b4a7cf40;--cols:7;--max:1440px;--radius:16px}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--fg);font:15px/1.6 system-ui,"Microsoft YaHei",sans-serif}a{color:inherit;text-decoration:none}button,input,select{font:inherit}button{cursor:pointer}a:focus-visible,button:focus-visible,input:focus-visible{outline:2px solid var(--accent);outline-offset:3px}.sc-header{display:flex;align-items:center;gap:28px;padding:18px max(24px,calc((100% - var(--max))/2));background:var(--surface);border-bottom:1px solid var(--edge);position:sticky;top:0;z-index:10}.sc-brand{font-size:27px;font-weight:850;letter-spacing:-1px;color:var(--accent);white-space:nowrap}.sc-nav{display:flex;gap:20px;flex:1;overflow-x:auto;white-space:nowrap;scrollbar-width:thin}.sc-nav a:hover,.sc-info a:hover{color:var(--accent)}.sc-header form{display:flex;gap:6px;margin:0;flex-shrink:0}.sc-header input{width:190px;min-width:0;background:var(--bg);color:var(--fg);border:1px solid var(--edge);border-radius:8px;padding:8px 12px}.sc-header button,.sc-watch{background:var(--accent);color:var(--on);border:0;border-radius:8px;padding:8px 16px;font-weight:700;white-space:nowrap}main{max-width:var(--max);margin:auto;padding:28px 24px 48px;min-height:65vh}h1{font-size:26px;margin:0 0 24px;letter-spacing:-.4px}h2{font-size:21px;margin:24px 0 16px}.section-title{display:flex;align-items:center;gap:12px}.section-title:before{content:'';width:4px;height:22px;border-radius:4px;background:var(--accent)}.grid{display:grid;grid-template-columns:repeat(var(--cols),minmax(0,1fr));gap:24px 16px}.sc-card{min-width:0;margin:0}.sc-card>a{display:block}.sc-card-cover{position:relative;aspect-ratio:2/3;background:var(--surface);border-radius:var(--radius);overflow:hidden;box-shadow:0 4px 16px #0002}.sc-card-cover img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .25s}.sc-card:hover img{transform:scale(1.04)}.sc-card:hover h2{color:var(--accent)}.sc-card-quality,.sc-quality{position:absolute;bottom:8px;right:8px;background:#101018d9;color:white;padding:3px 7px;border-radius:5px;font-size:12px;max-width:90%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sc-card-quality:empty,.sc-quality:empty{display:none}.sc-card h2,.sc-card-actors{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0}.sc-card h2{font-size:15px;font-weight:650;line-height:24px;margin-top:8px}.sc-card-actors{font-size:12px;color:var(--muted);height:20px;line-height:20px}.rec-carousel{max-width:var(--max);margin:24px auto 0;padding:0 24px;overflow:hidden}.rec-track{display:flex;gap:16px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;padding-inline:16%;scroll-padding-inline:16%}.rec-track::-webkit-scrollbar{display:none}.rec-slide{flex:0 0 100%;height:clamp(230px,30vw,420px);position:relative;overflow:hidden;scroll-snap-align:center;background:var(--surface);border-radius:var(--radius)}.rec-slide img{width:100%;height:100%;object-fit:cover;display:block}.rec-slide span{position:absolute;inset:auto 0 0;padding:60px 24px 24px;background:linear-gradient(transparent,#080910e8);color:#fff;font-size:24px;font-weight:700}.rec-slide small{display:block;font-size:13px;font-weight:400;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.rec-controls{display:flex;justify-content:center;align-items:center;gap:12px;margin:12px}.rec-controls button{border:0;background:var(--surface);color:var(--fg);border-radius:6px;padding:3px 12px}.rec-dots{display:flex;gap:6px;flex-wrap:wrap}.rec-dots button{width:18px;height:5px;padding:0;background:var(--muted);opacity:.45}.rec-dots button[aria-current=true]{background:var(--accent);opacity:1}.sc-detail{display:grid;grid-template-columns:minmax(150px,240px) minmax(0,1fr);gap:32px;padding:28px;background:var(--surface);border-radius:var(--radius);border:1px solid var(--edge)}.sc-cover{position:relative;display:block;aspect-ratio:2/3;background:var(--bg);border-radius:var(--radius);overflow:hidden}.sc-cover img{width:100%;height:100%;object-fit:cover;display:block}.sc-cover-play{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);background:#0009;color:white;border-radius:50%;width:58px;height:58px;display:grid;place-items:center}.sc-info{min-width:0}.sc-info h1{font-size:32px;margin:0 0 16px}.sc-info p{margin:8px 0;overflow-wrap:anywhere}.sc-info .person-label{color:var(--muted);margin-right:8px}.sc-info details{margin:14px 0;color:var(--muted)}.sc-info summary{cursor:pointer}.sc-info summary span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.sc-info details[open] summary span{display:none}.sc-watch{display:inline-block;margin-top:12px;padding:11px 28px}.sc-line{background:var(--surface);padding:16px;border-radius:var(--radius);margin:12px 0}.sc-line h3{margin:0 0 12px;font-size:15px}.sc-episodes{display:grid;grid-template-columns:repeat(auto-fill,minmax(90px,1fr));gap:8px}.sc-episodes a,.pagination a,.sort-links a{padding:8px 12px;border:1px solid var(--edge);border-radius:7px;text-align:center;overflow-wrap:anywhere}.sc-episodes a.current,.sc-episodes a:hover,.pagination a:hover{background:var(--accent);color:var(--on)}.sc-play-page,.sc-detail-page{width:100%;max-width:none;margin:0 auto;box-sizing:border-box}.sc-related{margin-top:32px}.pagination{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin:32px 0}.sort-links{display:flex;gap:8px;flex-wrap:wrap}footer{border-top:1px solid var(--edge);color:var(--muted)}@media(max-width:1200px){.grid{grid-template-columns:repeat(6,minmax(0,1fr))}.sc-header{gap:14px}.sc-nav{gap:14px}}@media(max-width:900px){.grid{grid-template-columns:repeat(4,minmax(0,1fr))}.sc-header{flex-wrap:wrap;padding:12px 16px}.sc-nav{order:3;flex-basis:100%}.sc-header form{margin-left:auto}.sc-header input{width:130px}.sc-detail{gap:20px;padding:20px}}@media(max-width:600px){main{padding:20px 14px}.grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px 10px}.sc-card h2{font-size:13px}.sc-card-actors{font-size:11px}.sc-header form input{width:100px}.sc-brand{font-size:22px}.rec-carousel{padding:0 14px;margin-top:14px}.rec-track{padding-inline:0;scroll-padding-inline:0}.rec-slide{height:200px}.rec-slide span{font-size:18px;padding:35px 14px 14px}.sc-detail{grid-template-columns:100px minmax(0,1fr);gap:12px;padding:12px}.sc-info h1{font-size:21px}.sc-info{font-size:13px}.sc-watch{padding:8px 16px}.sc-episodes{grid-template-columns:repeat(auto-fill,minmax(72px,1fr))}}@media(max-width:380px){.grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
.rec-carousel{background:linear-gradient(135deg,#382555,transparent);padding-top:16px;border-radius:20px}
/* RC8 dynamic homepage category sections */
.home-category{margin:28px 0;padding:20px;background:var(--surface);border:1px solid var(--edge);border-radius:var(--radius)}.home-category-head{display:flex;align-items:center;gap:16px;margin-bottom:18px;min-width:0}.home-category-head h2{margin:0;font-size:21px;white-space:nowrap;display:flex;align-items:center;gap:9px}.home-category-head h2:before{content:'';width:4px;height:20px;background:var(--accent);border-radius:4px}.home-subcats{display:flex;gap:14px;overflow-x:auto;white-space:nowrap;min-width:0;margin-left:auto;font-size:13px;color:var(--muted);scrollbar-width:thin}.home-more{white-space:nowrap;font-size:13px;color:var(--accent);margin-left:auto}.home-subcats a:hover{color:var(--accent)}.home-category-grid{grid-template-columns:repeat(6,minmax(0,1fr))}.home-category-grid .sc-card{min-width:0}@media(max-width:900px){.home-category-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}@media(max-width:600px){.home-category{padding:12px;margin:20px 0}.home-category-head{flex-wrap:wrap;gap:8px;margin-bottom:12px}.home-category-head h2{font-size:18px}.home-subcats{order:3;flex-basis:100%;margin-left:0}.home-category-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:380px){.home-category-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

.latest-grid{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:16px}.home-latest,.sc-related,.friend-links{margin:24px 0;padding:16px;border:1px solid rgba(128,128,128,.18);border-radius:12px}.friend-links a{display:inline-block;margin:6px 18px 6px 0}.latest-grid>*:nth-child(n+17){display:none}@media(max-width:1600px){.latest-grid{grid-template-columns:repeat(6,minmax(0,1fr))}.latest-grid>*:nth-child(n+13){display:none}}@media(max-width:900px){.latest-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.latest-grid>*:nth-child(n+9){display:none}}@media(max-width:600px){.latest-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.latest-grid>*:nth-child(n+7){display:none}}@media(max-width:360px){.latest-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.latest-grid>*:nth-child(n+5){display:none}}

/* RC10.8 responsive visual refresh */
:root{--max:1600px;--radius:12px;--cols:8}
body{font-size:14px;line-height:1.65;-webkit-font-smoothing:antialiased}
.sc-header{padding:14px max(24px,calc((100% - var(--max))/2 + 24px));gap:24px;box-shadow:0 2px 12px #0000000b}
.sc-brand{font-size:25px;letter-spacing:-.5px;max-width:40%;overflow:hidden;text-overflow:ellipsis}
.sc-nav{gap:8px;align-items:center}.sc-nav a{padding:7px 12px;border-radius:7px}.sc-nav a:hover{background:var(--bg)}
.sc-header input{border-radius:20px;padding:8px 15px}.sc-header button{border-radius:20px}
main{padding:24px 24px 48px}.home-latest,.home-category,.sc-related{padding:0;border:0;background:transparent;margin:28px 0 36px}
.home-category-head{padding-bottom:12px;border-bottom:1px solid var(--edge);margin-bottom:18px}.home-category-head h2{font-size:22px;letter-spacing:-.4px}.home-more{padding:4px 12px;border:1px solid var(--edge);border-radius:20px}
.grid,.latest-grid,.home-category-grid{gap:20px 16px}.sc-card{background:transparent;padding:0;border-radius:0}.sc-card-cover{border-radius:10px;box-shadow:none;border:1px solid var(--edge)}
.sc-card-cover:after{content:'';position:absolute;inset:60% 0 0;background:linear-gradient(transparent,#0005);pointer-events:none}.sc-card-quality{z-index:1;bottom:7px;right:7px;font-size:11px;padding:2px 6px}.sc-card h2{font-size:15px;padding:0;margin-top:8px}.sc-card-actors{padding:0;font-size:12px}
.rec-carousel{margin-top:18px}.rec-slide{border-radius:16px}.rec-slide span{font-size:28px}.rec-controls button{border:1px solid var(--edge)}
.sc-detail{padding:30px;gap:32px;border-radius:16px;box-shadow:0 8px 28px #0000000a}.sc-info h1{font-size:30px;line-height:1.35}.sc-info p{line-height:1.8}.sc-watch{border-radius:24px;padding:11px 30px}.sc-line{border:1px solid var(--edge);padding:18px}.sc-episodes a{background:var(--bg);border-radius:8px}.sc-play-page h1{margin-bottom:12px}.friend-links{border-radius:10px}footer{background:var(--surface)}
@media(max-width:1600px){.grid{grid-template-columns:repeat(6,minmax(0,1fr))}}@media(max-width:900px){.grid{grid-template-columns:repeat(4,minmax(0,1fr))}.sc-header{padding:12px 16px;gap:10px}.sc-nav a{padding:5px 9px}}@media(max-width:600px){main{padding:14px 12px 30px}.grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px 10px}.sc-brand{font-size:20px}.sc-header{padding:10px 12px}.sc-header input{width:95px}.sc-header button{padding:7px 10px}.home-category-head h2{font-size:18px}.home-latest,.home-category,.sc-related{margin:20px 0 26px}.sc-card h2{font-size:13px}.sc-card-actors{font-size:11px}.sc-detail{padding:14px;gap:14px}.sc-info h1{font-size:20px}.sc-watch{padding:8px 16px}.rec-slide span{font-size:18px}.sc-line{padding:12px}}@media(max-width:380px){.grid{grid-template-columns:repeat(2,minmax(0,1fr))}.latest-grid>*:nth-child(n+5){display:none}}

/* RC10.23d: unify detail/play content width and related recommendations */
.sc-detail-page,.sc-play-page{width:100%;max-width:none;min-width:0;box-sizing:border-box}.sc-detail-page>.sc-detail{width:100%;box-sizing:border-box}.sc-related{width:100%;max-width:none;box-sizing:border-box}.sc-related .grid{min-width:0}


/* RC10.23f hard override: playback page must align with the same main content edges as detail page */
main .sc-play-page,
main.layout-classic .sc-play-page,
main.layout-cinema .sc-play-page,
main.layout-drama .sc-play-page,
main.layout-anime .sc-play-page,
main.layout-search .sc-play-page,
main.layout-magazine .sc-play-page{
  display:block !important;
  width:100% !important;
  max-width:none !important;
  min-width:0 !important;
  margin:0 !important;
  padding-left:0 !important;
  padding-right:0 !important;
  box-sizing:border-box !important;
}
main .sc-play-page .sc-player,
main .sc-play-page .sc-related{
  display:block;
  width:100% !important;
  max-width:none !important;
  min-width:0 !important;
  margin-left:0 !important;
  margin-right:0 !important;
  box-sizing:border-box !important;
}
@media(max-width:600px){
  main .sc-play-page{width:100% !important;max-width:none !important;margin:0 !important}
}


/* RC10.23p: homepage category shelves aligned to a centered content frame */
.home-category{
  width:100%!important;
  max-width:1680px!important;
  margin:26px auto 30px!important;
  padding:18px 20px 20px!important;
  box-sizing:border-box!important;
  border:1px solid var(--edge)!important;
  border-radius:15px!important;
  background:linear-gradient(135deg,
    color-mix(in srgb,var(--surface) 96%,var(--accent) 4%),
    var(--surface))!important;
  box-shadow:0 8px 24px rgba(0,0,0,.075)!important;
}
.home-category-head{
  display:flex!important;
  flex-flow:row nowrap!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:16px!important;
  width:100%!important;
  min-width:0!important;
  margin:0 0 17px!important;
  padding:0 0 13px!important;
  border-bottom:1px solid var(--edge)!important;
  box-sizing:border-box!important;
}
.home-category-head h2{
  flex:0 0 auto!important;
  margin:0!important;
  padding:0!important;
  font-size:21px!important;
  line-height:1.3!important;
  white-space:nowrap!important;
}
.home-category-head h2:before{
  height:24px!important;
  width:5px!important;
  margin-right:10px!important;
}
.home-subcats{
  display:flex!important;
  flex:0 1 auto!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:8px!important;
  min-width:0!important;
  margin:0 0 0 4px!important;
  padding:0!important;
  overflow-x:auto!important;
  white-space:nowrap!important;
  scrollbar-width:none!important;
}
.home-subcats::-webkit-scrollbar{display:none!important}
.home-subcats a{
  display:inline-flex!important;
  flex:0 0 auto!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:32px!important;
  padding:5px 12px!important;
  border:1px solid var(--edge)!important;
  border-radius:999px!important;
  background:color-mix(in srgb,var(--surface) 82%,var(--fg) 18%)!important;
  color:var(--muted)!important;
  font-size:12px!important;
  font-weight:650!important;
  line-height:1.2!important;
  text-decoration:none!important;
  transition:all .18s ease!important;
}
.home-subcats a:hover{
  color:var(--on)!important;
  border-color:var(--accent)!important;
  background:var(--accent)!important;
  transform:translateY(-1px)!important;
}
.home-category-head .home-more{
  display:inline-flex!important;
  flex:0 0 auto!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:34px!important;
  margin:0 0 0 auto!important;
  padding:6px 14px!important;
  border:1px solid color-mix(in srgb,var(--accent) 58%,var(--edge))!important;
  border-radius:999px!important;
  background:color-mix(in srgb,var(--accent) 8%,var(--surface))!important;
  color:var(--accent)!important;
  font-size:13px!important;
  font-weight:750!important;
  line-height:1!important;
  white-space:nowrap!important;
}
.home-category-head .home-more:hover{
  background:var(--accent)!important;
  color:var(--on)!important;
}
.home-category-grid{
  display:grid!important;
  width:100%!important;
  grid-template-columns:repeat(6,minmax(0,1fr))!important;
  gap:18px 15px!important;
  align-items:start!important;
}
.home-category-grid>*{min-width:0!important}
.home-category-grid .sc-card-cover{
  overflow:hidden!important;
  border-radius:11px!important;
}
.home-category-grid .sc-card h2{
  margin:8px 0 0!important;
  font-size:14px!important;
  line-height:1.45!important;
}
@media(max-width:1200px){
 .home-category{max-width:100%!important}
 .home-category-grid{grid-template-columns:repeat(5,minmax(0,1fr))!important}
}
@media(max-width:850px){
 .home-category-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
}
@media(max-width:600px){
 .home-category{margin:19px 0 24px!important;padding:14px 13px 15px!important;border-radius:12px!important}
 .home-category-head{
   display:grid!important;
   grid-template-columns:minmax(0,1fr) auto!important;
   grid-template-rows:auto auto!important;
   gap:10px!important;
   margin-bottom:13px!important;
   padding-bottom:11px!important;
 }
 .home-category-head h2{grid-column:1;grid-row:1;font-size:18px!important}
 .home-subcats{
   grid-column:1/-1!important;grid-row:2!important;
   width:100%!important;max-width:100%!important;
   margin:0!important;justify-content:flex-start!important;
   padding:1px 0 3px!important;
 }
 .home-subcats a{min-height:30px!important;padding:4px 11px!important;font-size:12px!important}
 .home-category-head .home-more{
   grid-column:2!important;grid-row:1!important;
   min-height:31px!important;padding:5px 11px!important;font-size:12px!important;
 }
 .home-category-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:15px 9px!important}
 .home-category-grid .sc-card h2{font-size:12px!important}
}
@media(max-width:380px){
 .home-category-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}


/* RC10.23q: align home categories to the same content frame as main/header */
.home-category{
  width:100%!important;
  max-width:var(--max,1480px)!important;
  margin:14px auto 26px!important;
  box-sizing:border-box!important;
}
main .home-category{max-width:100%!important;margin-left:0!important;margin-right:0!important}
.sc-header .sc-nav .sc-nav-module{
  display:inline-flex!important;
  flex:0 0 auto!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:32px!important;
  padding:5px 10px!important;
  border:1px solid color-mix(in srgb,var(--accent) 35%,var(--edge))!important;
  border-radius:999px!important;
  color:var(--accent)!important;
  background:color-mix(in srgb,var(--accent) 7%,var(--surface))!important;
  font-size:13px!important;
  font-weight:700!important;
  line-height:1.2!important;
  text-decoration:none!important;
  white-space:nowrap!important;
}
.sc-header .sc-nav .sc-nav-module:hover{
  color:var(--on)!important;
  background:var(--accent)!important;
  border-color:var(--accent)!important;
}
.sc-header .sc-nav{
  align-items:center!important;
  min-width:0!important;
  gap:12px!important;
}
@media(max-width:900px){
 .sc-header .sc-nav{gap:9px!important}
 .sc-header .sc-nav .sc-nav-module{font-size:12px!important;padding:5px 8px!important}
}


/* RC10.23r: constrain homepage content to the same centered frame as the theme */
body:has(.home-category) main,
body:has(.rec-carousel) main{
  display:block!important;
  width:100%!important;
  max-width:1480px!important;
  margin-left:auto!important;
  margin-right:auto!important;
  padding-left:24px!important;
  padding-right:24px!important;
  box-sizing:border-box!important;
}
body:has(.home-category) .home-category,
body:has(.home-category) .home-latest,
body:has(.rec-carousel) .rec-carousel{
  width:100%!important;
  max-width:100%!important;
  margin-left:0!important;
  margin-right:0!important;
  box-sizing:border-box!important;
}
body:has(.home-category) .home-category{
  margin-top:18px!important;
  margin-bottom:26px!important;
}
body:has(.rec-carousel) .rec-carousel{
  margin-top:18px!important;
  padding-left:0!important;
  padding-right:0!important;
}
body:has(.home-category) .home-category-grid,
body:has(.home-category) .latest-grid{
  width:100%!important;
  min-width:0!important;
}
@media(max-width:600px){
 body:has(.home-category) main,
 body:has(.rec-carousel) main{
   width:100%!important;
   max-width:100%!important;
   padding-left:13px!important;
   padding-right:13px!important;
 }
 body:has(.home-category) .home-category{margin-top:14px!important;margin-bottom:21px!important}
 body:has(.rec-carousel) .rec-carousel{margin-top:12px!important}
}


/* RC10.24: one shared content frame for home, category, detail and play pages */
:root{
  --max:1480px!important;
}
.layout-classic,
.layout-cinema,
.layout-drama,
.layout-anime,
.layout-search,
.layout-magazine{
  width:100%!important;
  min-width:0!important;
}
main{
  display:block!important;
  width:100%!important;
  max-width:1480px!important;
  margin-left:auto!important;
  margin-right:auto!important;
  padding-left:24px!important;
  padding-right:24px!important;
  box-sizing:border-box!important;
}
.rec-carousel{
  display:block!important;
  width:100%!important;
  max-width:1480px!important;
  margin-left:auto!important;
  margin-right:auto!important;
  padding-left:24px!important;
  padding-right:24px!important;
  box-sizing:border-box!important;
}
.home-category,
.sc-home-module,
.home-latest,
.sc-home-topics,
.sc-home-module .grid,
.home-category-grid{
  max-width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
}
.sc-detail,
.sc-play-page-clean,
.sc-play-episodes,
.sc-related,
.section-title,
main>.grid{
  max-width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
}
@media(max-width:600px){
  main{
    width:100%!important;
    max-width:100%!important;
    padding-left:14px!important;
    padding-right:14px!important;
  }
  .rec-carousel{
    width:100%!important;
    max-width:100%!important;
    padding-left:14px!important;
    padding-right:14px!important;
  }
}


/* RC10.24a: remove excessive blank gap directly below the header on homepage */
body:has(.home-category) main{
  padding-top:10px!important;
}
body:has(.home-category) main>.home-category:first-child,
body:has(.home-category) main>.home-latest:first-child,
body:has(.home-category) main>.sc-home-module:first-child,
body:has(.home-category) main>section:first-child{
  margin-top:0!important;
}
body:has(.home-category) main .home-category:first-child{
  margin-top:0!important;
}
@media(max-width:600px){
  body:has(.home-category) main{
    padding-top:8px!important;
  }
}


/* RC10.25: shared width system for every public page */
:root{
  --max:1480px!important;
  --site-content-width:1480px;
}
.layout-classic,.layout-cinema,.layout-drama,.layout-anime,.layout-search,.layout-magazine{
  width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
}
/* Keep the header background full width, but align its contents to the shared frame */
.layout-classic>.sc-header,
.layout-cinema>.sc-header,
.layout-drama>.sc-header,
.layout-anime>.sc-header,
.layout-search>.sc-header,
.layout-magazine>.sc-header{
  width:100%!important;
  box-sizing:border-box!important;
  padding-left:max(24px,calc((100vw - var(--site-content-width))/2 + 24px))!important;
  padding-right:max(24px,calc((100vw - var(--site-content-width))/2 + 24px))!important;
}
/* Main is the single shared content frame for home, category, detail and play */
.layout-classic>main,
.layout-cinema>main,
.layout-drama>main,
.layout-anime>main,
.layout-search>main,
.layout-magazine>main{
  display:block!important;
  width:100%!important;
  max-width:var(--site-content-width)!important;
  margin-left:auto!important;
  margin-right:auto!important;
  padding-left:24px!important;
  padding-right:24px!important;
  box-sizing:border-box!important;
}
/* Recommendation slider is rendered before main; give it the same outer frame */
.layout-classic>.rec-carousel,
.layout-cinema>.rec-carousel,
.layout-drama>.rec-carousel,
.layout-anime>.rec-carousel,
.layout-search>.rec-carousel,
.layout-magazine>.rec-carousel{
  display:block!important;
  width:100%!important;
  max-width:var(--site-content-width)!important;
  margin-left:auto!important;
  margin-right:auto!important;
  padding-left:24px!important;
  padding-right:24px!important;
  box-sizing:border-box!important;
}
/* No child section may expand beyond the shared frame */
.layout-classic>main>*,
.layout-cinema>main>*,
.layout-drama>main>*,
.layout-anime>main>*,
.layout-search>main>*,
.layout-magazine>main>*{
  max-width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
}
.layout-classic main>.grid,
.layout-cinema main>.grid,
.layout-drama main>.grid,
.layout-anime main>.grid,
.layout-search main>.grid,
.layout-magazine main>.grid,
.home-category,.home-category-grid,
.home-latest,.latest-grid,
.sc-home-module,.sc-home-module .grid,
.sc-detail,.sc-play-page,.sc-play-page-clean,
.sc-play-episodes,.sc-related{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
}
@media(max-width:600px){
  .layout-classic>.sc-header,
  .layout-cinema>.sc-header,
  .layout-drama>.sc-header,
  .layout-anime>.sc-header,
  .layout-search>.sc-header,
  .layout-magazine>.sc-header{
    padding-left:14px!important;
    padding-right:14px!important;
  }
  .layout-classic>main,
  .layout-cinema>main,
  .layout-drama>main,
  .layout-anime>main,
  .layout-search>main,
  .layout-magazine>main{
    width:100%!important;
    max-width:100%!important;
    padding-left:14px!important;
    padding-right:14px!important;
  }
  .layout-classic>.rec-carousel,
  .layout-cinema>.rec-carousel,
  .layout-drama>.rec-carousel,
  .layout-anime>.rec-carousel,
  .layout-search>.rec-carousel,
  .layout-magazine>.rec-carousel{
    width:100%!important;
    max-width:100%!important;
    padding-left:14px!important;
    padding-right:14px!important;
  }
}


/* RC10.25a: match the user's reference screenshot - fluid full-width layout with 20px gutters */
:root{
  --max:100%!important;
  --site-content-width:100%!important;
}
.layout-classic,.layout-cinema,.layout-drama,.layout-anime,.layout-search,.layout-magazine{
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  box-sizing:border-box!important;
}
.layout-classic>main,
.layout-cinema>main,
.layout-drama>main,
.layout-anime>main,
.layout-search>main,
.layout-magazine>main{
  display:block!important;
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding:14px 20px 40px!important;
  box-sizing:border-box!important;
}
.layout-classic>.rec-carousel,
.layout-cinema>.rec-carousel,
.layout-drama>.rec-carousel,
.layout-anime>.rec-carousel,
.layout-search>.rec-carousel,
.layout-magazine>.rec-carousel{
  display:block!important;
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding:14px 20px 0!important;
  box-sizing:border-box!important;
}
.layout-classic>.sc-header,
.layout-cinema>.sc-header,
.layout-drama>.sc-header,
.layout-anime>.sc-header,
.layout-search>.sc-header,
.layout-magazine>.sc-header{
  width:100%!important;
  max-width:none!important;
  box-sizing:border-box!important;
  padding-left:20px!important;
  padding-right:20px!important;
}
.layout-classic>main>*,
.layout-cinema>main>*,
.layout-drama>main>*,
.layout-anime>main>*,
.layout-search>main>*,
.layout-magazine>main>*{
  width:100%;
  max-width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
}
.home-category,.home-category-grid,.home-latest,.latest-grid,
.sc-home-module,.sc-home-module .grid,
.sc-detail,.sc-play-page,.sc-play-page-clean,
.sc-play-episodes,.sc-related,
.layout-classic main>.grid,.layout-cinema main>.grid,
.layout-drama main>.grid,.layout-anime main>.grid,
.layout-search main>.grid,.layout-magazine main>.grid{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
}
@media(max-width:600px){
  .layout-classic>main,.layout-cinema>main,.layout-drama>main,
  .layout-anime>main,.layout-search>main,.layout-magazine>main{
    padding:10px 12px 28px!important;
  }
  .layout-classic>.rec-carousel,.layout-cinema>.rec-carousel,
  .layout-drama>.rec-carousel,.layout-anime>.rec-carousel,
  .layout-search>.rec-carousel,.layout-magazine>.rec-carousel{
    padding:10px 12px 0!important;
  }
  .layout-classic>.sc-header,.layout-cinema>.sc-header,
  .layout-drama>.sc-header,.layout-anime>.sc-header,
  .layout-search>.sc-header,.layout-magazine>.sc-header{
    padding-left:12px!important;padding-right:12px!important;
  }
}


/* RC10.25b: give playback page the same rounded-card treatment as detail page */
.sc-play-page{
  display:block!important;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  margin:0 auto 28px!important;
  padding:28px!important;
  box-sizing:border-box!important;
  background:var(--surface)!important;
  border:1px solid var(--edge)!important;
  border-radius:var(--radius,16px)!important;
  box-shadow:0 8px 28px rgba(0,0,0,.08)!important;
  overflow:hidden!important;
}
.sc-play-page>h1{
  margin:0 0 18px!important;
  line-height:1.35!important;
}
.sc-play-page>h2{
  margin:26px 0 16px!important;
}
.sc-play-page iframe,
.sc-play-page video{
  max-width:100%!important;
  border-radius:12px!important;
}
.sc-play-page .sc-related{
  margin-top:28px!important;
}
.sc-play-page .sc-play-back{
  margin-top:22px!important;
}
@media(max-width:900px){
  .sc-play-page{padding:20px!important}
}
@media(max-width:600px){
  .sc-play-page{
    padding:14px!important;
    margin-bottom:20px!important;
    border-radius:12px!important;
  }
  .sc-play-page>h1{font-size:21px!important}
  .sc-play-page>h2{margin:20px 0 12px!important}
}


/* RC10.25c: refined playback page typography, player and episode cards */
.sc-play-page{
  width:100%!important;
  max-width:none!important;
  margin:0 auto 30px!important;
  padding:clamp(16px,2.2vw,30px)!important;
  background:linear-gradient(145deg,var(--surface),color-mix(in srgb,var(--surface) 92%,var(--accent) 8%))!important;
  border:1px solid var(--edge)!important;
  border-radius:18px!important;
  box-shadow:0 12px 34px rgba(0,0,0,.14)!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
}
.sc-play-page > h1{
  display:flex!important;
  align-items:center!important;
  gap:12px!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  margin:0 0 22px!important;
  padding:15px 18px!important;
  border:1px solid var(--edge)!important;
  border-radius:13px!important;
  background:linear-gradient(110deg,color-mix(in srgb,var(--accent) 15%,var(--surface)),var(--surface) 68%)!important;
  color:var(--fg)!important;
  font-size:clamp(20px,2.2vw,29px)!important;
  font-weight:800!important;
  line-height:1.4!important;
  letter-spacing:0!important;
  overflow-wrap:anywhere!important;
  word-break:normal!important;
  box-sizing:border-box!important;
}
.sc-play-page > h1:before{
  content:""!important;
  display:block!important;
  flex:0 0 5px!important;
  width:5px!important;
  height:1.25em!important;
  border-radius:99px!important;
  background:var(--accent)!important;
}
.sc-play-page > h2{
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  margin:28px 0 15px!important;
  padding:0 0 12px!important;
  border-bottom:1px solid var(--edge)!important;
  color:var(--fg)!important;
  font-size:clamp(19px,2vw,24px)!important;
  line-height:1.35!important;
}
.sc-play-page > h2:before{
  content:""!important;
  display:block!important;
  width:4px!important;
  height:1.15em!important;
  border-radius:99px!important;
  background:var(--accent)!important;
}
.sc-play-page .sc-player{
  width:100%!important;
  max-width:100%!important;
  margin:0!important;
  border:1px solid rgba(255,255,255,.08)!important;
  border-radius:15px!important;
  background:#10141b!important;
  overflow:hidden!important;
  box-shadow:0 10px 28px rgba(0,0,0,.2)!important;
}
.sc-play-page .sc-player video{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  aspect-ratio:16/9!important;
  height:auto!important;
  border-radius:0!important;
  background:#080a0e!important;
  object-fit:contain!important;
}
.sc-play-page .sc-status{
  min-height:0!important;
  padding:8px 16px!important;
  color:#ffc17d!important;
  font-size:13px!important;
  line-height:1.5!important;
}
.sc-play-page .sc-status:empty{display:none!important}
.sc-play-page .sc-controls{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  gap:9px!important;
  padding:13px 15px!important;
  border-top:1px solid rgba(255,255,255,.08)!important;
  background:#151b24!important;
}
.sc-play-page .sc-controls button,
.sc-play-page .sc-controls select,
.sc-play-page .sc-controls a{
  min-height:38px!important;
  padding:8px 13px!important;
  border:1px solid #3b4654!important;
  border-radius:9px!important;
  background:#222c39!important;
  color:#f5f7fa!important;
  font-size:13px!important;
  font-weight:650!important;
  text-decoration:none!important;
}
.sc-play-page .sc-controls button:hover,
.sc-play-page .sc-controls a:hover{
  border-color:var(--accent)!important;
  background:var(--accent)!important;
  color:#171717!important;
}
.sc-play-page .sc-controls label{
  display:flex!important;
  align-items:center!important;
  gap:7px!important;
  color:#d8dee8!important;
  font-size:13px!important;
}
.sc-play-page .sc-line{
  margin:14px 0!important;
  padding:17px!important;
  border:1px solid var(--edge)!important;
  border-radius:13px!important;
  background:color-mix(in srgb,var(--surface) 94%,var(--fg) 6%)!important;
}
.sc-play-page .sc-line h3{
  margin:0 0 13px!important;
  color:var(--fg)!important;
  font-size:16px!important;
  font-weight:750!important;
}
.sc-play-page .sc-episodes{
  display:grid!important;
  grid-template-columns:repeat(auto-fill,minmax(90px,1fr))!important;
  gap:9px!important;
}
.sc-play-page .sc-episodes a{
  display:flex!important;
  min-height:40px!important;
  align-items:center!important;
  justify-content:center!important;
  padding:8px 10px!important;
  border:1px solid var(--edge)!important;
  border-radius:9px!important;
  background:var(--surface)!important;
  color:var(--fg)!important;
  font-size:13px!important;
  text-align:center!important;
  text-decoration:none!important;
  transition:background .18s,border-color .18s,transform .18s!important;
}
.sc-play-page .sc-episodes a:hover{
  border-color:var(--accent)!important;
  transform:translateY(-1px)!important;
}
.sc-play-page .sc-episodes a.current{
  border-color:var(--accent)!important;
  background:var(--accent)!important;
  color:#171717!important;
  font-weight:800!important;
}
.sc-play-page .sc-play-back{
  margin:24px 0 0!important;
}
.sc-play-page .sc-play-back a{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:40px!important;
  padding:9px 18px!important;
  border:1px solid var(--edge)!important;
  border-radius:999px!important;
  background:var(--surface)!important;
  color:var(--fg)!important;
  font-weight:700!important;
  text-decoration:none!important;
}
.sc-play-page .sc-play-back a:hover{
  border-color:var(--accent)!important;
  background:var(--accent)!important;
  color:#171717!important;
}
.sc-play-page .sc-related{
  margin-top:30px!important;
}
@media(max-width:600px){
  .sc-play-page{
    padding:12px!important;
    margin-bottom:20px!important;
    border-radius:13px!important;
  }
  .sc-play-page > h1{
    gap:9px!important;
    margin-bottom:16px!important;
    padding:12px!important;
    font-size:19px!important;
    line-height:1.4!important;
  }
  .sc-play-page > h2{
    margin:22px 0 12px!important;
    font-size:18px!important;
  }
  .sc-play-page .sc-controls{
    gap:7px!important;
    padding:10px!important;
  }
  .sc-play-page .sc-controls button,
  .sc-play-page .sc-controls select,
  .sc-play-page .sc-controls a{
    min-height:35px!important;
    padding:7px 10px!important;
    font-size:12px!important;
  }
  .sc-play-page .sc-line{padding:12px!important}
  .sc-play-page .sc-episodes{
    grid-template-columns:repeat(auto-fill,minmax(70px,1fr))!important;
    gap:7px!important;
  }
}



/* RC10.25f: keep category title on the left; move subcategory pills (e.g. 22, 33) to the right, before More */
.home-category-head{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto auto!important;
  align-items:center!important;
  column-gap:12px!important;
  row-gap:8px!important;
  width:100%!important;
  min-width:0!important;
}
.home-category-head>h2{
  grid-column:1!important;
  grid-row:1!important;
  justify-self:start!important;
  min-width:0!important;
}
.home-category-head>.home-subcats{
  grid-column:2!important;
  grid-row:1!important;
  justify-self:end!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  flex:0 1 auto!important;
  min-width:0!important;
  max-width:min(42vw,520px)!important;
  margin:0!important;
  gap:9px!important;
  overflow-x:auto!important;
  white-space:nowrap!important;
}
.home-category-head>.home-subcats a{
  display:inline-flex!important;
  flex:0 0 auto!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:48px!important;
  min-height:36px!important;
  padding:6px 14px!important;
  border:1px solid var(--edge)!important;
  border-radius:999px!important;
  background:color-mix(in srgb,var(--fg) 10%,var(--surface))!important;
  color:var(--muted)!important;
  font-size:14px!important;
  font-weight:700!important;
  line-height:1!important;
  text-decoration:none!important;
}
.home-category-head>.home-subcats a:hover{
  border-color:var(--accent)!important;
  background:color-mix(in srgb,var(--accent) 14%,var(--surface))!important;
  color:var(--accent)!important;
  transform:translateY(-1px)!important;
}
.home-category-head>.home-more{
  grid-column:3!important;
  grid-row:1!important;
  justify-self:end!important;
  margin:0!important;
}
@media(max-width:600px){
  .home-category-head{
    grid-template-columns:minmax(0,1fr) auto!important;
    column-gap:8px!important;
  }
  .home-category-head>h2{
    grid-column:1!important;
    grid-row:1!important;
  }
  .home-category-head>.home-subcats{
    grid-column:1!important;
    grid-row:2!important;
    justify-self:start!important;
    justify-content:flex-start!important;
    max-width:100%!important;
    width:100%!important;
    margin:0!important;
  }
  .home-category-head>.home-more{
    grid-column:2!important;
    grid-row:1!important;
    align-self:center!important;
  }
  .home-category-head>.home-subcats a{
    min-width:42px!important;
    min-height:31px!important;
    padding:5px 11px!important;
    font-size:12px!important;
  }
}

/* RC11.3: stable header order and responsive overflow, all site layouts */
body .sc-header{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center!important;justify-content:flex-start!important;gap:16px!important;padding:10px 20px!important;min-height:0!important;height:auto!important;}
body .sc-header .sc-brand{flex:0 1 auto!important;min-width:0!important;max-width:22%!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
body .sc-header .sc-nav{display:flex!important;flex:1 1 0%!important;order:0!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center!important;min-width:0!important;overflow-x:auto!important;overflow-y:hidden!important;white-space:nowrap!important;gap:8px!important;scrollbar-width:thin;}
body .sc-header .sc-nav>a{flex:0 0 auto!important;white-space:nowrap!important;order:0!important;padding:6px 8px;}
body .sc-header form{display:flex!important;flex:0 0 auto!important;order:0!important;min-width:0!important;margin:0!important;align-items:center!important;}
body .sc-header form input{width:clamp(85px,10vw,160px)!important;min-width:0!important;}
@media(max-width:900px){body .sc-header{flex-wrap:wrap!important;gap:8px!important;padding:8px 12px!important;}body .sc-header .sc-brand{max-width:48%!important;}body .sc-header form{margin-left:auto!important;max-width:50%!important;}body .sc-header .sc-nav{order:3!important;flex:1 0 100%!important;justify-content:flex-start!important;gap:6px!important;}body .sc-header form input{width:100px!important;max-width:100%;}body .sc-header form button{padding:6px 10px!important;}}

/* RC11.13: one outer frame, including home pages with category modules. */
body [class^="layout-"] > main,
body:has(.home-category) [class^="layout-"] > main,
body:has(.rec-carousel) [class^="layout-"] > main {
 width:100%!important;max-width:none!important;margin:0!important;
 padding:14px 20px 40px!important;box-sizing:border-box!important;
}
body [class^="layout-"] > .rec-carousel,
body:has(.rec-carousel) [class^="layout-"] > .rec-carousel {
 width:100%!important;max-width:none!important;margin:0!important;padding:14px 20px 0!important;box-sizing:border-box!important;
}
body [class^="layout-"] > main > .home-category {width:100%!important;max-width:none!important;margin-left:0!important;margin-right:0!important;box-sizing:border-box!important;}
body [class^="layout-"] > main > .home-category:first-child {margin-top:0!important;}
@media(max-width:600px){
 body [class^="layout-"] > main,body:has(.home-category) [class^="layout-"] > main,body:has(.rec-carousel) [class^="layout-"] > main {padding:10px 12px 28px!important;}
 body [class^="layout-"] > .rec-carousel,body:has(.rec-carousel) [class^="layout-"] > .rec-carousel {padding:10px 12px 0!important;}
}

/* RC11.16 independent site footer */
.sc-site-footer{display:block;width:100%;max-width:var(--max);margin:0 auto;padding:26px 24px 18px;color:var(--fg);border-top:1px solid var(--edge);background:var(--surface);box-sizing:border-box}
.sc-footer-inner{width:100%;margin:0 auto}
.sc-footer-heading{margin:0 0 18px}
.sc-footer-heading h2{margin:0 0 5px;font-size:21px;line-height:1.35;color:var(--fg)}
.sc-footer-heading p{margin:0;color:var(--muted);font-size:13px}
.sc-footer-grid{display:grid;grid-template-columns:repeat(var(--sc-footer-cols,4),minmax(0,1fr));gap:14px}
.sc-footer-card{min-width:0;padding:15px 16px;border:1px solid var(--edge);border-radius:12px;background:var(--surface);background:color-mix(in srgb,var(--bg) 28%,var(--surface));box-sizing:border-box}
.sc-footer-card h3{margin:0 0 7px;font-size:15px;font-weight:750;color:var(--accent)}
.sc-footer-card p{margin:0;color:var(--muted);font-size:13px;line-height:1.75;overflow-wrap:anywhere}
.sc-footer-bottom{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:20px;padding-top:15px;border-top:1px solid var(--edge);color:var(--muted);font-size:12px}
.sc-footer-links{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.sc-footer-links a:hover{color:var(--accent)}
.sc-footer-legacy{padding:20px 24px;text-align:center}
@media(max-width:900px){.sc-footer-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.sc-site-footer{padding:22px 14px 16px}.sc-footer-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.sc-footer-card{padding:12px}.sc-footer-card h3{font-size:13px}.sc-footer-card p{font-size:12px}.sc-footer-bottom{justify-content:center;text-align:center}.sc-footer-links{justify-content:center}}

@media(max-width:360px){.sc-footer-grid{grid-template-columns:1fr}}

/* RC11.17: align footer outer frame with the main content and remove stacked bottom spacing. */
body [class^="layout-"] > main {padding-bottom:16px!important;min-height:0;}
body:has(.home-category) [class^="layout-"] > main,
body:has(.rec-carousel) [class^="layout-"] > main {padding-bottom:16px!important;}
body [class^="layout-"] > main > :last-child {margin-bottom:0!important;}
body [class^="layout-"] > main > .home-category:last-child {margin-bottom:0!important;}
body [class^="layout-"] > .sc-site-footer {
 width:calc(100% - 40px)!important;max-width:none!important;
 margin:0 20px 20px!important;padding:20px!important;
 border:1px solid var(--edge);border-radius:14px;box-sizing:border-box;
}
body [class^="layout-"] > .sc-site-footer .sc-footer-inner {max-width:none;width:100%;box-sizing:border-box;}
body [class^="layout-"] > .sc-footer-legacy .sc-footer-bottom {margin-top:0;padding-top:0;border-top:0;justify-content:center;}
@media(max-width:600px){
 body [class^="layout-"] > main,body:has(.home-category) [class^="layout-"] > main,body:has(.rec-carousel) [class^="layout-"] > main {padding-bottom:12px!important;}
 body [class^="layout-"] > .sc-site-footer {width:calc(100% - 24px)!important;margin:0 12px 12px!important;padding:14px!important;border-radius:12px;}
}

.sc-friend-links{margin:16px 0 0!important;padding:20px!important;background:var(--surface);border:1px solid var(--edge);border-radius:var(--radius);width:100%;box-sizing:border-box}.sc-friend-links h2{margin:0 0 12px;font-size:20px;color:var(--fg)}.sc-friend-grid{display:flex;flex-wrap:nowrap;gap:8px;max-width:100%;overflow-x:auto;white-space:nowrap;scrollbar-width:thin;-webkit-overflow-scrolling:touch}.sc-friend-grid a{flex:0 0 auto;white-space:nowrap;margin:0!important;padding:6px 12px;border:1px solid var(--edge);border-radius:6px;color:var(--muted);background:var(--bg);overflow-wrap:anywhere}.sc-friend-grid a:hover{color:var(--accent);border-color:var(--accent)}@media(max-width:600px){.sc-friend-links{padding:12px!important;margin-top:12px!important}}

/* RC11.29: integrated footer links */
.sc-site-footer .sc-friend-links{display:flex;align-items:baseline;flex-wrap:wrap;gap:8px 16px;margin:16px 0 0!important;padding:12px 0 0!important;background:transparent;border:0;border-top:1px solid var(--edge);border-radius:0;box-shadow:none;width:100%;min-width:0;box-sizing:border-box}
.sc-site-footer .sc-friend-links h2{font-size:14px;line-height:1.6;margin:0!important;flex:0 0 auto;color:var(--fg)}
.sc-site-footer .sc-friend-grid{display:flex;flex:1 1 200px;min-width:0;flex-wrap:nowrap;overflow-x:auto;white-space:nowrap;gap:6px 16px}
.sc-site-footer .sc-friend-grid a{font-size:13px;line-height:1.6;padding:0!important;margin:0!important;background:transparent;border:0;border-radius:0;color:var(--muted);overflow-wrap:anywhere;max-width:100%}
.sc-site-footer .sc-friend-grid a:hover{color:var(--accent);text-decoration:underline}
.sc-site-footer .sc-friend-links + .sc-footer-bottom{margin-top:12px;padding-top:12px;border-top:1px solid var(--edge)}
@media(max-width:600px){.sc-site-footer .sc-friend-links{gap:6px;margin-top:12px!important;padding:10px 0 0!important}.sc-site-footer .sc-friend-grid{flex-basis:100%}}

/* RC37.10.21: category navigation without clipped leading items */
.home-category-head{grid-template-columns:auto minmax(0,1fr) auto!important;}
.home-category-head>h2{white-space:normal!important;overflow-wrap:anywhere;}
.home-category-head>.home-subcats{justify-self:stretch!important;justify-content:flex-start!important;flex-wrap:wrap!important;max-width:none!important;width:100%!important;overflow:visible!important;white-space:normal!important;}
@media(max-width:900px){
.home-category-head{grid-template-columns:minmax(0,1fr) auto!important;}
.home-category-head>.home-more{grid-column:2!important;grid-row:1!important;}
.home-category-head>.home-subcats{grid-column:1/-1!important;grid-row:2!important;flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important;white-space:nowrap!important;}
}

/* RC37.10.22: right aligned categories, mobile scroll starts at first item */
.home-category-head>.home-subcats{justify-content:flex-end!important;}
@media(max-width:900px){.home-category-head>.home-subcats{justify-content:flex-start!important;}}


/* RC37.10.40: keep all primary categories and the four content channels
   on ONE horizontal navigation row on desktop. */
@media (min-width: 901px){
  .sc-header{
    display:flex!important;
    flex-wrap:nowrap!important;
    align-items:center!important;
    gap:clamp(8px,1vw,18px)!important;
    min-width:0!important;
  }
  .sc-brand{
    flex:0 1 auto!important;
    max-width:18%!important;
    min-width:0!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  .sc-header .sc-nav{
    display:flex!important;
    flex:1 1 auto!important;
    flex-wrap:nowrap!important;
    align-items:center!important;
    justify-content:flex-start!important;
    min-width:0!important;
    width:auto!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    white-space:nowrap!important;
    gap:clamp(7px,.8vw,13px)!important;
    scrollbar-width:none!important;
  }
  .sc-header .sc-nav::-webkit-scrollbar{display:none!important}
  .sc-header .sc-nav>a{
    display:inline-flex!important;
    flex:0 0 auto!important;
    align-items:center!important;
    padding:5px 4px!important;
    margin:0!important;
    white-space:nowrap!important;
    font-size:clamp(12px,.82vw,14px)!important;
    line-height:1.35!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
  }
  .sc-header .sc-nav>a.sc-nav-module{
    color:var(--fg)!important;
    font-size:clamp(12px,.82vw,14px)!important;
    font-weight:600!important;
    padding:5px 4px!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
  }
  .sc-header .sc-nav>a.sc-nav-module:hover{
    color:var(--accent)!important;
    background:transparent!important;
  }
  .sc-header form{flex:0 0 auto!important;margin-left:auto!important}
  .sc-header form input{width:clamp(110px,12vw,190px)!important}
}
@media (max-width:900px){
  .sc-header{flex-wrap:wrap!important}
  .sc-header .sc-nav{order:3!important;flex:1 0 100%!important;flex-wrap:nowrap!important;overflow-x:auto!important}
}



/* RC37.10.41 — polished single-row navigation */
@media (min-width: 901px) {
  body .sc-header {
    display:flex!important;
    flex-flow:row nowrap!important;
    align-items:center!important;
    gap:clamp(10px,1.15vw,20px)!important;
    min-width:0!important;
    padding:12px clamp(18px,2.2vw,36px)!important;
    background:linear-gradient(180deg,var(--surface),color-mix(in srgb,var(--surface) 94%,var(--bg)))!important;
    border-bottom:1px solid var(--edge)!important;
    box-shadow:0 5px 18px rgba(0,0,0,.10)!important;
  }
  body .sc-header .sc-brand {
    flex:0 1 170px!important;
    width:auto!important;
    max-width:17%!important;
    min-width:72px!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
    font-size:clamp(19px,1.55vw,25px)!important;
    line-height:1.2!important;
    letter-spacing:-.5px!important;
  }
  body .sc-header .sc-nav {
    display:flex!important;
    flex:1 1 auto!important;
    flex-flow:row nowrap!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:clamp(5px,.62vw,10px)!important;
    width:auto!important;
    min-width:0!important;
    margin:0!important;
    padding:3px 2px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    white-space:nowrap!important;
    scrollbar-width:none!important;
  }
  body .sc-header .sc-nav::-webkit-scrollbar {display:none!important;width:0!important;height:0!important}
  body .sc-header .sc-nav>a {
    display:inline-flex!important;
    flex:0 0 auto!important;
    align-items:center!important;
    justify-content:center!important;
    min-height:36px!important;
    margin:0!important;
    padding:7px clamp(5px,.55vw,9px)!important;
    border:1px solid transparent!important;
    border-radius:8px!important;
    background:transparent!important;
    color:var(--fg)!important;
    font-size:clamp(12px,.88vw,14px)!important;
    font-weight:600!important;
    line-height:1.25!important;
    letter-spacing:0!important;
    white-space:nowrap!important;
    transition:color .18s ease,background .18s ease,border-color .18s ease!important;
  }
  body .sc-header .sc-nav>a:hover {
    color:var(--accent)!important;
    background:var(--bg)!important;
    border-color:var(--edge)!important;
  }
  body .sc-header .sc-nav>a.sc-nav-module {
    position:relative!important;
    color:var(--accent)!important;
    font-weight:700!important;
    background:color-mix(in srgb,var(--accent) 7%,var(--surface))!important;
    border-color:color-mix(in srgb,var(--accent) 19%,var(--edge))!important;
    border-radius:8px!important;
    padding-inline:clamp(7px,.7vw,11px)!important;
  }
  body .sc-header .sc-nav>a.sc-nav-module:hover {
    color:var(--on)!important;
    background:var(--accent)!important;
    border-color:var(--accent)!important;
    transform:translateY(-1px);
  }
  body .sc-header form {
    display:flex!important;
    flex:0 0 auto!important;
    align-items:center!important;
    gap:7px!important;
    width:auto!important;
    max-width:24%!important;
    margin:0 0 0 auto!important;
  }
  body .sc-header form input {
    width:clamp(105px,12vw,175px)!important;
    min-width:0!important;
    height:38px!important;
    padding:7px 13px!important;
    border:1px solid var(--edge)!important;
    border-radius:20px!important;
    background:var(--bg)!important;
    font-size:13px!important;
  }
  body .sc-header form button {
    min-height:38px!important;
    padding:7px 15px!important;
    border:0!important;
    border-radius:20px!important;
    background:var(--accent)!important;
    color:var(--on)!important;
    font-size:13px!important;
    font-weight:700!important;
    white-space:nowrap!important;
    box-shadow:0 3px 9px color-mix(in srgb,var(--accent) 22%,transparent)!important;
  }
}
@media (max-width:900px) {
  body .sc-header {
    display:flex!important;
    flex-wrap:wrap!important;
    align-items:center!important;
    gap:8px 12px!important;
    padding:10px 14px!important;
  }
  body .sc-header .sc-brand {max-width:48%!important}
  body .sc-header form {margin-left:auto!important;max-width:52%!important}
  body .sc-header .sc-nav {
    order:3!important;
    flex:1 0 100%!important;
    display:flex!important;
    flex-flow:row nowrap!important;
    gap:7px!important;
    overflow-x:auto!important;
    white-space:nowrap!important;
    scrollbar-width:none!important;
    padding:2px 0!important;
  }
  body .sc-header .sc-nav::-webkit-scrollbar {display:none!important}
  body .sc-header .sc-nav>a {
    flex:0 0 auto!important;
    min-height:33px!important;
    padding:6px 9px!important;
    border-radius:7px!important;
    white-space:nowrap!important;
  }
  body .sc-header .sc-nav>a.sc-nav-module {
    color:var(--accent)!important;
    background:color-mix(in srgb,var(--accent) 8%,var(--surface))!important;
    border:1px solid color-mix(in srgb,var(--accent) 20%,var(--edge))!important;
  }
}

/* Footer links: compact inline row above copyright. */
.sc-site-footer .sc-friend-links{display:flex;align-items:baseline;gap:8px 16px;margin:12px 0 0!important;padding:10px 0!important;border:0;border-top:1px solid var(--edge);background:transparent;box-shadow:none}.sc-site-footer .sc-friend-grid{flex:1 1 220px;display:flex;flex-wrap:nowrap;overflow-x:auto;white-space:nowrap;gap:6px 16px}.sc-site-footer .sc-friend-links h2{font-size:14px;margin:0!important}.sc-site-footer .sc-friend-links+.sc-footer-bottom{margin-top:0}


/* RC11.32: one unified, single-row friend links bar */
.sc-site-footer .sc-friend-links-single,
.sc-friend-links-single{
  display:flex!important;align-items:center!important;flex-wrap:nowrap!important;
  gap:8px 16px!important;min-width:0!important;width:100%!important;
  margin:12px 0 0!important;padding:10px 0!important;
  border:0!important;border-top:1px solid var(--edge)!important;
  border-radius:0!important;background:transparent!important;box-shadow:none!important;
  box-sizing:border-box!important;overflow:hidden!important;
}
.sc-site-footer .sc-friend-links-single h2,
.sc-friend-links-single h2{
  flex:0 0 auto!important;margin:0!important;padding:0!important;
  font-size:14px!important;line-height:1.6!important;white-space:nowrap!important;
}
.sc-site-footer .sc-friend-links-single .sc-friend-grid,
.sc-friend-links-single .sc-friend-grid{
  display:flex!important;flex:1 1 auto!important;flex-wrap:nowrap!important;
  align-items:center!important;gap:6px 16px!important;min-width:0!important;
  max-width:100%!important;margin:0!important;padding:0!important;
  overflow-x:auto!important;overflow-y:hidden!important;white-space:nowrap!important;
  scrollbar-width:thin!important;-webkit-overflow-scrolling:touch!important;
}
.sc-site-footer .sc-friend-links-single .sc-friend-grid a,
.sc-friend-links-single .sc-friend-grid a{
  flex:0 0 auto!important;display:inline-block!important;white-space:nowrap!important;
  max-width:none!important;margin:0!important;padding:0!important;
  border:0!important;border-radius:0!important;background:transparent!important;
  font-size:13px!important;line-height:1.6!important;text-decoration:none!important;
  overflow-wrap:normal!important;
}
.sc-site-footer .sc-friend-links-single+.sc-footer-bottom{margin-top:10px!important}
@media(max-width:600px){
  .sc-site-footer .sc-friend-links-single,.sc-friend-links-single{
    flex-wrap:nowrap!important;gap:8px!important;margin-top:10px!important;padding:9px 0!important;
  }
  .sc-site-footer .sc-friend-links-single h2,.sc-friend-links-single h2{font-size:13px!important}
  .sc-site-footer .sc-friend-links-single .sc-friend-grid,.sc-friend-links-single .sc-friend-grid{
    flex:1 1 0!important;min-width:0!important;gap:6px 12px!important;
  }
}
/* SearchCMS friend links compact responsive layout */
.sc-site-footer .sc-friend-links-single,.sc-friend-links-single{display:flex!important;align-items:baseline!important;gap:12px!important;padding:12px 0!important;border-top:1px solid rgba(128,128,128,.18)!important;flex-wrap:nowrap!important}
.sc-friend-links-single h2{flex:none!important;margin:0!important;font-size:14px!important;font-weight:600!important;white-space:nowrap!important}
.sc-friend-links-single .sc-friend-grid{display:flex!important;flex:1 1 0!important;min-width:0!important;flex-wrap:wrap!important;gap:6px 10px!important;overflow:visible!important}
.sc-friend-links-single .sc-friend-grid a{display:inline-block!important;padding:3px 8px!important;border:1px solid rgba(128,128,128,.20)!important;border-radius:5px!important;font-size:12px!important;line-height:1.5!important;max-width:100%!important;overflow-wrap:anywhere!important;text-decoration:none!important}
.sc-friend-links-single .sc-friend-grid a:hover{border-color:#64748b!important;text-decoration:underline!important}
@media(max-width:600px){.sc-friend-links-single{flex-direction:column!important;gap:8px!important}.sc-friend-links-single .sc-friend-grid{width:100%!important}}
