/* Yuejie cross-device layout layer. Keeps the original CMS/theme structure intact. */
*, *::before, *::after { box-sizing: border-box; }
html, body { max-width: 100%; overflow-x: clip; }
img { max-width: 100%; height: auto; }
.wrap1200 { width: min(1200px, calc(100% - 40px)); }
.yj-filter-page,
.yj-rank-page,
.yj-rank-hits-page,
.yj-search-page,
.yj-news-page,
.yj-news-detail-page .ranklist { margin-inline: auto; }

/* Library and filtered category results */
.yj-filter-page {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.yj-filter-page .leftbar,
.yj-filter-page .right-cont-box,
.yj-filter-page .rankdata { width: 100% !important; min-width: 0; }
.yj-filter-page .comment-r-menu { overflow: visible; }
.yj-filter-page .comment-status { display: flex; flex-wrap: wrap; gap: 4px; }
.yj-filter-page .comment-status li { float: none; }
.yj-filter-page .listboxw {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
}
.yj-filter-page .listboxw > dl {
  width: 100% !important;
  min-width: 0;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px;
  margin: 0 !important;
  padding: 22px 0;
}
.yj-filter-page .listboxw > dl dt,
.yj-filter-page .listboxw > dl dd { float: none; width: auto !important; min-width: 0; margin: 0; }
.yj-filter-page .listboxw > dl dt img { width: 96px; height: 132px; object-fit: cover; border-radius: 8px; }
.yj-filter-page .big-book-info { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.yj-filter-page .listboxw > .line { display: none; }

/* Ranking */
.yj-rank-page,
.yj-rank-hits-page {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.yj-rank-page .leftbarlist,
.yj-rank-hits-page .leftbarlist,
.yj-rank-page .rightcont,
.yj-rank-hits-page .rightcont { width: 100% !important; min-width: 0; }
.yj-rank-page .rightcont {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.yj-rank-page .rank-list-w { width: 100% !important; min-width: 0; margin: 0 !important; }
.yj-rank-page .rank-list-w .book-list-f { max-width: calc(100% - 44px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yj-rank-hits-page .rightcont .rank-list-w { width: 100% !important; }

/* Search, news lists and articles */
.yj-search-page,
.yj-news-page,
.yj-news-detail-page .ranklist {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 28px;
  align-items: start;
}
.yj-search-page .right-cont-box,
.yj-news-page .right-cont-box,
.yj-news-detail-page .right-cont-box,
.yj-search-page .search-result-r,
.yj-news-page .search-result-r,
.yj-news-detail-page .search-result-r { width: 100% !important; min-width: 0; }
.yj-search-page .secd-rank-list {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 22px 0;
}
.yj-search-page .secd-rank-list dl {
  width: 100% !important;
  min-width: 0;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px;
  margin: 0 !important;
}
.yj-search-page .secd-rank-list dt,
.yj-search-page .secd-rank-list dd { float: none; width: auto !important; min-width: 0; margin: 0; }
.yj-search-page .secd-rank-list dt img { width: 96px; height: 132px; object-fit: cover; border-radius: 8px; }
.yj-search-page .big-book-info { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.yj-search-page .clicknum { float: none; }
.yj-news-page .news-list li { min-height: 0; overflow: hidden; }
.yj-news-page .news-list .pic img { object-fit: cover; }
.yj-news-detail-page .news-info,
.yj-news-detail-page .news-info .content { width: 100%; min-width: 0; overflow-wrap: anywhere; }
.yj-news-detail-page .news-info .content img,
.yj-news-detail-page .news-info .cover img { max-width: 100% !important; height: auto !important; }
.yj-news-detail-page .related { height: auto !important; min-height: 0; overflow: hidden; }

/* Channel/category landing */
.yj-type-page .goodbookbox { height: auto !important; min-height: 0; }
.yj-type-page .goodbook-tabcont > div { display: grid; gap: 18px; }
.yj-type-page .goodbook-b {
  width: 100% !important;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin: 0 !important;
}
.yj-type-page .goodbook-b .book-block,
.yj-type-page .nbook-l .booklist-l { width: 100% !important; min-width: 0; margin: 0 !important; }
.yj-type-page .goodbook-b .book-block { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 12px; }
.yj-type-page .goodbook-b .book-block dt,
.yj-type-page .goodbook-b .book-block dd { float: none; width: auto !important; min-width: 0; margin: 0; }
.yj-type-page .goodbook-b .book-block img { width: 78px; height: 108px; object-fit: cover; border-radius: 7px; }
.yj-type-page .nbook-l {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.yj-type-page .booklist-l .book-block { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 12px; }
.yj-type-page .booklist-l .book-block dt,
.yj-type-page .booklist-l .book-block dd { float: none; width: auto !important; min-width: 0; margin: 0; }
.yj-type-page .booklist-l .book-block img { width: 82px; height: 112px; object-fit: cover; border-radius: 7px; }
.yj-type-page .rank-box {
  width: min(1200px, calc(100% - 40px)) !important;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-inline: auto;
}
.yj-type-page .rank-box .rank-list { width: 100% !important; min-width: 0; margin: 0 !important; }
.yj-type-page .page-ad,
.yj-type-page .slideBox,
.yj-type-page .slider-film,
.yj-type-page .slider-film img { width: 100% !important; max-width: 100%; }

/* Novel details */
.yj-novel-page .path,
.yj-novel-page .work_brief,
.yj-novel-page .work_content { width: min(1200px, calc(100% - 40px)) !important; }
.yj-novel-page .work_brief {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 28px;
}
.yj-novel-page .detailgame { width: 100% !important; min-width: 0; display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; }
.yj-novel-page .detailgame .pic,
.yj-novel-page .detailgame .brief { float: none; width: auto !important; min-width: 0; margin: 0; }
.yj-novel-page .detailgame .pic img { width: 200px; height: 280px; object-fit: cover; border-radius: 10px; }
.yj-novel-page .detailgame_btn { width: 200px !important; }
.yj-novel-page .detailgame_btn img { width: 200px; height: 280px; object-fit: cover; }
.yj-novel-page .tabcontent-1 { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 28px; }
.yj-novel-page .column_left,
.yj-novel-page .column_right { float: none; width: auto !important; min-width: 0; }
.yj-novel-page .summary1 { white-space: pre-wrap; overflow-wrap: anywhere; }
.yj-novel-page .newchapter .title { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.yj-novel-page .newchapter .chaptername,
.yj-novel-page .newchapter .updatetime { float: none; }
.yj-novel-page .same-recomend .rec-content li { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; }
.yj-novel-page .same-recomend .rec-pic,
.yj-novel-page .same-recomend .rec-detail { float: none; width: auto !important; min-width: 0; }

/* Home latest-update table becomes readable cards on phones. */
@media (max-width: 1080px) {
  .yj-filter-page .listboxw { grid-template-columns: 1fr; }
  .yj-rank-page .rightcont { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .yj-type-page .goodbook-b,
  .yj-type-page .nbook-l,
  .yj-type-page .rank-box { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .wrap1200 { width: min(100% - 28px, 760px); }
  .yj-filter-page,
  .yj-rank-page,
  .yj-rank-hits-page,
  .yj-search-page,
  .yj-news-page,
  .yj-news-detail-page .ranklist { grid-template-columns: minmax(0, 1fr); }
  .yj-filter-page .leftbar { border: 1px solid #eadfce; border-radius: 12px; background: #fff; overflow: hidden; }
  .yj-filter-page .selectlist { padding: 4px 0; }
  .yj-filter-page .select { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: start; padding: 10px 12px; }
  .yj-filter-page .select .tname { float: none; width: auto; }
  .yj-filter-page .select .textlist { display: flex; overflow-x: auto; white-space: nowrap; gap: 4px; padding-bottom: 4px; scrollbar-width: thin; }
  .yj-filter-page .select .textlist li { float: none; flex: 0 0 auto; }
  .yj-rank-page .leftbarlist ul,
  .yj-rank-hits-page .leftbarlist ul { display: flex; overflow-x: auto; white-space: nowrap; scrollbar-width: thin; }
  .yj-rank-page .leftbarlist li,
  .yj-rank-hits-page .leftbarlist li { flex: 0 0 auto; }
  .yj-search-page > .search-result-r,
  .yj-news-page > .search-result-r,
  .yj-news-detail-page .ranklist > .search-result-r { display: none; }
  .yj-novel-page .path,
  .yj-novel-page .work_brief,
  .yj-novel-page .work_content { width: min(100% - 28px, 760px) !important; }
  .yj-novel-page .work_brief { grid-template-columns: 1fr; }
  .yj-novel-page .detailgame_btn { display: none; }
  .yj-novel-page .tabcontent-1 { grid-template-columns: 1fr; }
  .yj-novel-page .column_right { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
}

@media (max-width: 680px) {
  .wrap1200 { width: calc(100% - 24px); }
  .body-bg .block10, .body-bg .block20 { height: 10px; }
  .yj-rank-page .rightcont,
  .yj-type-page .goodbook-b,
  .yj-type-page .nbook-l,
  .yj-type-page .rank-box { grid-template-columns: minmax(0, 1fr); }
  .yj-filter-page { gap: 12px; }
  .yj-filter-page .comment-r-menu { overflow-x: auto; scrollbar-width: thin; }
  .yj-filter-page .comment-status { flex-wrap: nowrap; width: max-content; }
  .yj-filter-page .listboxw > dl,
  .yj-search-page .secd-rank-list dl { grid-template-columns: 82px minmax(0, 1fr); gap: 12px; padding: 16px 0; }
  .yj-filter-page .listboxw > dl dt img,
  .yj-search-page .secd-rank-list dt img { width: 82px; height: 114px; }
  .yj-filter-page .big-book-info,
  .yj-search-page .big-book-info { -webkit-line-clamp: 2; }
  .yj-search-page .secd-rank-list { grid-template-columns: 1fr; padding: 8px 12px; }
  .yj-search-page .secd-rank-list .bigbtn { display: none; }
  .yj-news-page .news-list li { padding: 16px 12px; }
  .yj-news-page .news-list .pic { width: 92px; height: 70px; margin-right: 12px; }
  .yj-news-page .news-list .text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .yj-news-detail-page .news-info { padding-inline: 14px; }
  .yj-news-detail-page .news-info .title h1 { font-size: 24px; line-height: 1.35; }
  .yj-news-detail-page .related li { width: 100% !important; float: none; }
  .yj-novel-page .path,
  .yj-novel-page .work_brief,
  .yj-novel-page .work_content { width: calc(100% - 24px) !important; }
  .yj-novel-page .detailgame { grid-template-columns: 108px minmax(0, 1fr); gap: 14px; }
  .yj-novel-page .detailgame .pic img { width: 108px; height: 152px; }
  .yj-novel-page .detailgame .title .name { font-size: 23px; line-height: 1.35; }
  .yj-novel-page .detailgame .hits { display: flex; flex-wrap: wrap; gap: 4px 8px; }
  .yj-novel-page .brief_text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .yj-novel-page .btns { display: flex; gap: 8px; }
  .yj-novel-page .btns a { float: none; flex: 1; min-width: 0; padding-inline: 8px; text-align: center; }
  .yj-novel-page .work_content .header { overflow-x: auto; white-space: nowrap; }
  .yj-novel-page .column_right { grid-template-columns: 1fr; }
  .yj-novel-page .newchapter .updatetime { display: none; }
  .yj-novel-page .catebg { width: 100% !important; }
  .yj-update { overflow: visible; }
  .yj-update table,
  .yj-update tbody,
  .yj-update tr,
  .yj-update td { display: block; width: 100% !important; }
  .yj-update table { min-width: 0 !important; }
  .yj-update thead { display: none; }
  .yj-update tr {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 6px 10px;
    padding: 13px 0;
    border-bottom: 1px solid #eee4d8;
  }
  .yj-update td { border: 0 !important; padding: 0 !important; min-width: 0; }
  .yj-update td:nth-child(1) { grid-column: 1; grid-row: 1; }
  .yj-update td:nth-child(2) { grid-column: 2; grid-row: 1; }
  .yj-update td:nth-child(3) { grid-column: 1 / -1; grid-row: 2; }
  .yj-update td:nth-child(4) { display: none; }
  .yj-update td:nth-child(5) { grid-column: 3; grid-row: 1; }
  .yj-update td div,
  .yj-update td a { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .yj-type-page .botnews table,
  .yj-type-page .botnews tbody,
  .yj-type-page .botnews tr,
  .yj-type-page .botnews td { width: 100% !important; max-width: 100%; }
  .yj-type-page .page-ad { display: none; }
}

@media (max-width: 390px) {
  .wrap1200 { width: calc(100% - 20px); }
  .yj-filter-page .select { grid-template-columns: 52px minmax(0, 1fr); padding-inline: 10px; }
  .yj-filter-page .listboxw > dl,
  .yj-search-page .secd-rank-list dl { grid-template-columns: 74px minmax(0, 1fr); gap: 10px; }
  .yj-filter-page .listboxw > dl dt img,
  .yj-search-page .secd-rank-list dt img { width: 74px; height: 104px; }
  .yj-novel-page .path,
  .yj-novel-page .work_brief,
  .yj-novel-page .work_content { width: calc(100% - 20px) !important; }
  .yj-novel-page .detailgame { grid-template-columns: 94px minmax(0, 1fr); }
  .yj-novel-page .detailgame .pic img { width: 94px; height: 132px; }
}
