/*
Theme Name: 夜ふかしコミック - Cocoon Child
Theme URI: https://wp-cocoon.com/
Description: Cocoon専用子テーマ。ミッドナイトブルー×パープル×シャンパンゴールドの読書ラウンジ。PC3列/スマホ2列、広告4列/2列、空枠・画像見切れ対策。
Author: Custom theme
Version: 1.0.0
Template: cocoon-master
Text Domain: yofukashi-comic
Requires PHP: 7.4
*/

/* ============================================
   夜ふかしコミック — Cocoon child theme v1.0.0
   ============================================ */
:root {
  --yfc-bg: #0c0a0a;
  --yfc-surface: #1a1416;
  --yfc-raised: #302025;
  --yfc-ink: #f7f0e7;
  --yfc-muted: #c9becf;
  --yfc-gold: #e8c992;
  --yfc-wine: #8c3848;
  --yfc-line: rgba(235,193,132,.22);
  --yfc-radius: 15px;
}
body {
  background: var(--yfc-bg) !important;
  background-image: radial-gradient(ellipse 58% 320px at 50% 0%,rgba(75,62,161,.22),transparent 95%) !important;
  color:var(--yfc-ink);
  font-family:"Noto Sans JP","Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,sans-serif;
  font-size:15px;
  line-height:1.75;
}
a { transition:color .2s, background-color .2s, border-color .2s, transform .2s, box-shadow .2s; }
#container { background:transparent; }
.header-container { background: #1a1416 !important; border-bottom:1px solid var(--yfc-line); }
#header { background:linear-gradient(115deg,#31191f 0%,#452027 49%,#160e12 100%) !important; }
#header-in { padding-block:13px; }
#header .site-name-text, #header .site-name-text a, #header .logo-text, #header .logo-text a,
#header .logo-header, #header .site-name-text-link, .site-name-text-link {color:var(--yfc-gold) !important;letter-spacing:.055em;text-shadow:0 2px 18px rgba(162,167,238,.16);}
#header .tagline, #header .tagline a, #header .header-tagline {color:#ead4c4 !important;}
.navi {background:#24151b !important;border-top:1px solid rgba(237,206,145,.08);box-shadow:0 5px 15px rgba(0,0,0,.15);}
.navi .navi-in a, .navi .navi-in a:hover {color:#ffead6;}
.navi .navi-in a:hover, .navi .navi-in .current-menu-item > a {background:#60323e !important;color:#fff3d6 !important;}
#content, #content-in {background:transparent;}
#main, .main, #sidebar, .sidebar {background: #1b1417 !important; border:1px solid var(--yfc-line) !important;box-shadow:0 18px 56px rgba(0,0,0,.16);color:var(--yfc-ink);}
#main,.main {border-radius:20px;padding:28px 26px; min-width:0;}
#sidebar,.sidebar {border-radius:16px;min-width:0;}
#main a:not(.a-wrap), #sidebar a:not(.a-wrap) {color:var(--yfc-gold);}
#main a:not(.a-wrap):hover, #sidebar a:not(.a-wrap):hover {color:#ffe5b8;}
#main .widget-title, .sidebar .widget-title, #main .main-caption {color:#ffe4b3; border-color:var(--yfc-line);}
#main .main-widget-label, .sidebar .widget-title {background:transparent; border-bottom:1px solid var(--yfc-line);padding-bottom:10px;}
#main .list-title, #main .archive-title, #main .search-title, #main .cat-name, #main .tag-name {color:#fff0e1;}
#footer, .footer {background:#100b0d !important;color:#e7d6da;border-top:1px solid var(--yfc-line);}
#footer a {color:var(--yfc-gold);}
#main input, #main select, #main textarea, #sidebar input, #sidebar select {max-width:100%;}
#main input[type="text"], #main input[type="search"], #main select, #sidebar input[type="text"] {background:#322329 !important; color:#fff0e1 !important; border:1px solid var(--yfc-line);border-radius:9px;}
#main input::placeholder,#sidebar input::placeholder {color:#c5b2d2;opacity:1;}

/* Brand introduction & search */
.yfc-hero {position:relative;isolation:isolate;overflow:hidden;background:radial-gradient(circle at 94% 18%,rgba(177,165,240,.14),transparent 31%),linear-gradient(117deg,#4c252c,#2c181e 65%,#190f13);border:1px solid rgba(237,206,145,.35);border-radius:19px;padding:31px 30px 28px;margin-bottom:28px;box-shadow:0 18px 35px rgba(0,0,0,.20);}
.yfc-hero:before{content:"";position:absolute;z-index:-1;right:-35px;top:-66px;width:245px;height:245px;border:1px solid rgba(237,206,145,.26);border-radius:50%;box-shadow:0 0 0 35px rgba(237,206,145,.037),0 0 0 70px rgba(237,206,145,.018);pointer-events:none;}
.yfc-hero:after{content:"✦";position:absolute;right:57px;top:31px;color:rgba(237,206,145,.35);font-size:61px;line-height:1;pointer-events:none;}
.yfc-eyebrow{color:var(--yfc-gold);font-weight:700;font-size:11px;letter-spacing:.23em;margin:0 0 6px;}
.yfc-hero h1{font-family:"Noto Serif CJK JP","Yu Mincho","Hiragino Mincho ProN",serif;font-size:clamp(23px,3.2vw,34px);font-weight:750;line-height:1.45;color:#fff1db;margin:5px 0 10px;text-shadow:0 3px 14px rgba(0,0,0,.32);}
.yfc-hero-desc{color:#eed4c0;max-width:610px;font-size:14px;margin:0 0 21px;}
.yfc-search{display:flex;gap:9px;align-items:stretch;max-width:630px;margin:0;position:relative;z-index:1;}
#main .yfc-search input[type="search"]{min-width:0;flex:1;display:block;background:#fffaf8 !important;color:#2e1720 !important;border:1px solid rgba(255,255,255,.45);box-shadow:0 2px 10px rgba(0,0,0,.12);border-radius:11px;padding:13px 15px;font-size:15px;}
#main .yfc-search input[type="search"]::placeholder{color:#786d72;}
.yfc-search button{flex:0 0 auto;border:0;background:linear-gradient(135deg,#e8c591,#bf8b66);color:#2c1519;font-weight:800;border-radius:11px;padding:0 25px;cursor:pointer;box-shadow:0 4px 14px rgba(0,0,0,.15);}
.yfc-search button:hover{background:#ffda9f;transform:translateY(-1px);}
.yfc-search button:focus-visible,.yfc-tabs button:focus-visible,.yfc-categories a:focus-visible,.yfc-heading a:focus-visible {outline:3px solid #ffe1a3;outline-offset:3px;}
.yfc-section{margin-bottom:30px;}
.yfc-heading{display:flex;justify-content:space-between;align-items:end;gap:12px;margin:0 0 14px;}
.yfc-heading >div{min-width:0;}
.yfc-heading small{display:block;color:#d9a7a3;font-weight:700;letter-spacing:.16em;font-size:10px;}
.yfc-heading h2{font-size:20px;font-weight:800;line-height:1.4;letter-spacing:.04em;color:#fff0d7;margin:3px 0 0;padding:0; border:0;background:transparent;}
.yfc-heading h2:before{content:"";display:inline-block;width:4px;height:19px;border-radius:3px;background:var(--yfc-gold);vertical-align:-3px;margin-right:9px;}
.yfc-heading p{margin:0;color:var(--yfc-muted);font-size:12px;}
#main .yfc-heading a{font-size:12px;color:var(--yfc-gold);white-space:nowrap;}
.yfc-categories{display:flex;flex-wrap:wrap;gap:9px;}
#main .yfc-categories a{display:inline-flex;gap:7px;align-items:center;max-width:100%;padding:8px 13px;border:1px solid var(--yfc-line);color:#ffeadb;border-radius:999px;background:#332328;text-decoration:none;font-size:12px;line-height:1.35;}
#main .yfc-categories a:hover{color:#fffaf0;background:#773344;border-color:var(--yfc-gold);}
.yfc-categories .count{font-size:10px;opacity:.7;}

/* Ranking with week/month accessible tabs */
.yfc-rankbox{background:#291a20;border:1px solid var(--yfc-line);border-radius:16px;padding:19px 18px 17px;}
.yfc-rankheader{display:flex;align-items:end;justify-content:space-between;gap:12px;margin-bottom:14px;}
.yfc-rankheader .yfc-heading{margin-bottom:0;}
.yfc-tabs{display:flex;gap:4px;padding:4px;background:#1a1416;border:1px solid var(--yfc-line);border-radius:100px;flex-shrink:0;}
.yfc-tabs button{font:inherit;font-size:12px;border:0;border-radius:100px;padding:7px 12px;cursor:pointer;color:#d4aaa7;background:transparent;line-height:1.2;white-space:nowrap;}
.yfc-tabs button[aria-selected="true"]{color:#281518;background:var(--yfc-gold);font-weight:800;}
.yfc-ranking-panel[hidden]{display:none !important;}
.yfc-rank-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;}
#main .yfc-rank-item{display:flex;flex-direction:column;min-width:0;color:#fff0e4;text-decoration:none;background:#34232b;border:1px solid rgba(237,206,145,.14);border-radius:12px;overflow:hidden;}
#main .yfc-rank-item:hover{color:#fffaec;transform:translateY(-3px);border-color:rgba(237,206,145,.50);box-shadow:0 12px 26px rgba(0,0,0,.26);}
.yfc-rank-thumb{position:relative;display:block;aspect-ratio:3/4;background:#160e11;overflow:hidden;}
.yfc-rank-thumb img{width:100%;height:100%;display:block;object-fit:contain;object-position:center;background:#130b0e;}
.yfc-rank-position{position:absolute;top:8px;left:8px;background:#e8c992;color:#281518;font-size:12px;font-weight:900;width:30px;height:30px;display:grid;place-items:center;border-radius:8px;box-shadow:0 2px 9px rgba(0,0,0,.35);}
.yfc-rank-text{padding:10px 11px;font-weight:750;font-size:12px;line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:54px;}
.yfc-empty{color:var(--yfc-muted);font-size:13px;margin:8px 0 0;}

/* Work cards on every archive, including page 2+ */
#main .list:has(> .entry-card-wrap) {display:grid !important;grid-template-columns:repeat(3,minmax(0,1fr)) !important;column-gap:14px !important;row-gap:17px !important;align-items:stretch !important;}
#main .list > .entry-card-wrap {box-sizing:border-box !important;width:100% !important;max-width:none !important;min-width:0 !important;margin:0 !important;padding:0 !important;float:none !important;display:block !important;height:100%;}
#main .list > .entry-card-wrap .entry-card{display:flex !important;flex-direction:column !important;background:#302025;border:1px solid rgba(237,206,145,.14);border-radius:13px;overflow:hidden;min-width:0;height:100%;position:relative;box-shadow:0 5px 18px rgba(0,0,0,.10);}
#main .list > .entry-card-wrap:hover .entry-card {border-color:rgba(237,206,145,.52);box-shadow:0 16px 28px rgba(0,0,0,.25);transform:translateY(-3px);}
#main .list .entry-card-thumb{display:flex !important;align-items:center;justify-content:center;width:100% !important;float:none !important;margin:0 !important;padding:8px !important;box-sizing:border-box;height:auto !important;aspect-ratio:3/4;overflow:hidden;position:relative;background:radial-gradient(circle at 45% 35%,#48303b,#160e12);border:0;}
#main .list .entry-card-thumb img, #main .list .entry-card-thumb .card-thumb-image,
#main .list .entry-card-thumb .entry-card-thumb-image{display:block;width:100% !important;height:100% !important;max-width:100% !important;max-height:100% !important;object-fit:contain !important;object-position:center !important;position:static !important;inset:auto;border:0;border-radius:0;}
#main .list .entry-card-content{display:flex !important;flex:1;min-width:0;flex-direction:column;margin:0 !important;padding:12px 12px 10px !important;background:transparent;}
#main .list .entry-card-title{font-size:13px !important;font-weight:750;line-height:1.55;margin:0 0 5px !important;color:#fff0e3 !important;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow-wrap:anywhere;}
#main .list .entry-card-snippet{font-size:11px;color:var(--yfc-muted);line-height:1.6;max-height:3.2em;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;margin:0 0 8px !important;padding:0;}
#main .list .entry-card-meta{position:static !important;display:block;margin-top:auto;padding-top:5px;font-size:10px;color:#b6a5ad;min-height:0;}
#main .list .entry-card-categorys, #main .list .entry-card-info {color:#c9b0bd;font-size:10px;}
#main .list .entry-card .cat-label{background:#78394c;color:#fff5e8;border-radius:0 0 8px 0;font-size:10px;max-width:90%;}
#main .list .entry-card .yfc-new{position:absolute;right:8px;top:8px;display:inline-block;border-radius:6px;background:#edc98a;color:#271a21;line-height:1;font-size:10px;font-weight:900;letter-spacing:.055em;padding:6px 8px;box-shadow:0 2px 9px rgba(0,0,0,.35);}
#main .list .entry-card .e-card-info {justify-content:flex-start;}
#main .list > :not(.entry-card-wrap){min-width:0;max-width:100%;grid-column:1/-1;}
#main .list .a-wrap:hover {background:transparent !important;}

/* WordPress widget ad positions; no widget content is removed */
.yfc-widget-strip{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:14px;margin:17px 0 25px;min-width:0;}
.yfc-widget-strip > *{box-sizing:border-box;margin:0 !important;min-width:0;max-width:100%;width:100%;overflow-wrap:anywhere;}
.yfc-widget-strip > :only-child{grid-column:1/-1;}
/* Two banners inside one Custom HTML widget stay side by side too. */
.yfc-widget-strip .custom-html-widget:has(> a:nth-of-type(2)),
.yfc-widget-strip .textwidget:has(> a:nth-of-type(2)){
 display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:start;
}
.yfc-widget-strip .custom-html-widget > a, .yfc-widget-strip .textwidget > a{max-width:100%;min-width:0;display:block;}
.yfc-widget-strip .custom-html-widget > a > img,.yfc-widget-strip .textwidget > a > img{width:100%;height:auto;object-fit:contain;}

.yfc-widget-strip .widget-title{font-size:14px;}
.yfc-widget-strip img,.yfc-widget-strip iframe,.yfc-widget-strip video{display:block;max-width:100% !important;margin-inline:auto;}
.yfc-widget-strip img{height:auto !important;}
.yfc-widget-strip .wp-block-image, .yfc-widget-strip figure {max-width:100%;margin:0 auto;}
.yfc-widget-strip .wp-block-columns{display:block;}
.yfc-widget-strip .wp-block-column{max-width:100%;}
.yfc-widget-strip .widget iframe {max-width:100% !important;}


.yfc-widget-strip .widget_search,
.yfc-widget-strip .search-edit,
#sidebar .widget_search,
.sidebar .widget_search{display:none !important;}
.yfc-widget-strip .widget{background:#2e1d24;border:1px solid var(--yfc-line);border-radius:14px;padding:12px;}
.yfc-widget-strip .widget.widget_search{padding:0;border:0;background:transparent;}
.yfc-widget-strip .widget img, .yfc-widget-strip a img{width:100%;height:auto !important;max-height:none !important;object-fit:contain !important;}
.yfc-widget-strip .ad-area, .yfc-widget-strip .ad-responsive, .yfc-widget-strip .ad-rectangle{width:100%;max-width:100%;}

/* Single work page */
#main .article, #main .article-header, #main .entry-content, #main .article-footer, #main .under-entry-content {color:#f1e5eb;}
#main .article .entry-title{font-size:clamp(21px,2.3vw,28px);font-weight:800;line-height:1.55;color:#fbead7;border-left:4px solid var(--yfc-gold);padding:9px 0 9px 15px;}
#main .article .eye-catch img{display:block;object-fit:contain;max-height:650px;height:auto;width:auto;max-width:100%;margin-inline:auto;border-radius:12px;}
#main .article .entry-content {font-size:15px;line-height:2;overflow-wrap:anywhere;word-break:normal;min-width:0;}
#main .article .entry-content > p{margin-block:1em 1.2em;}
#main .article .entry-content h2{background:#3b242a;color:#fff2d6;border-left:4px solid var(--yfc-gold);padding:12px 16px;font-size:19px;border-radius:6px;}
#main .article .entry-content h3{border-color:var(--yfc-gold);color:#fff2d6;}
#main .article .entry-content blockquote {color:#f2e9e8;background:#2c1c23;border-left:3px solid var(--yfc-gold);}
#main .article .entry-content a {overflow-wrap:anywhere;}
#main .related-entry-heading, #main .related-entry-heading *{color:#f5e7c4;}
#main .related-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px;}
#main .related-list .related-entry-card-wrap{display:block;width:100% !important;min-width:0;margin:0;}
#main .related-list .related-entry-card{height:100%;background:#37252b;border-radius:11px;overflow:hidden;border:1px solid var(--yfc-line);}
#main .related-entry-card-thumb{display:flex;align-items:center;justify-content:center;width:100%;float:none;aspect-ratio:3/4;margin:0;padding:8px;box-sizing:border-box;background:#160e12;}
#main .related-entry-card-thumb img{display:block;width:100%;height:100%;object-fit:contain;object-position:center;}
#main .related-entry-card-content{padding:10px;margin:0;}
#main .related-entry-card-title{font-size:12px;line-height:1.6;color:#f2edff;}
/* Social controls are not helpful on a work detail page. Hide just those UI blocks. */
body.single .sns-share,body.single .sns-follow,body.single .sns-share-buttons,
body.single .sns-follow-buttons, body.single .sns-buttons {display:none !important;}

/* Pagination: no two-line split */
#main .pagination {display:flex;justify-content:center;align-items:center;flex-wrap:nowrap !important;max-width:100%;overflow-x:auto;scrollbar-width:thin;gap:5px;padding:8px 3px;margin:22px auto 8px;white-space:nowrap;-webkit-overflow-scrolling:touch;}
#main .pagination > *{flex:0 0 auto !important;float:none !important;margin:0 !important;min-width:34px;}
#main .pagination a, #main .pagination span{box-sizing:border-box;background:#302126;color:#f0d6c7;border:1px solid var(--yfc-line);border-radius:8px;min-height:34px;display:inline-flex;justify-content:center;align-items:center;padding:5px 10px;font-weight:700;text-decoration:none;}
#main .pagination .current{background:var(--yfc-gold);color:#2f1c23;}
#main .pagination-next{text-align:center;margin-bottom:10px;}
#main .pagination-next a{background:#4d2934;color:#ffedc9;border:1px solid var(--yfc-line);border-radius:10px;}

/* All viewports */
img,svg,iframe,video{max-width:100%;}
#main *,#sidebar *{box-sizing:border-box;}
#main .widget a,#sidebar .widget a{overflow-wrap:anywhere;}
@media (max-width:1023px){
  #content-in{gap:14px;}
  #main, .main{padding:20px 18px;}
  .yfc-rank-grid{gap:10px;}
}
@media (max-width:834px){
  #main,.main,#sidebar,.sidebar{width:100% !important;}
  #main .list:has(> .entry-card-wrap){grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:12px !important;}
  .yfc-rank-grid{grid-template-columns:repeat(3,minmax(0,1fr));}
}
@media (max-width:600px){
  .wrap{max-width:100%;}
  #content-in{padding:0 8px;}
  #main,.main{padding:14px 11px !important;border-radius:13px !important;}
  #sidebar,.sidebar{padding:13px !important;}
  #header-in{padding:9px 12px;}
  .yfc-hero{padding:25px 16px 22px;border-radius:13px;margin-bottom:22px;}
  .yfc-hero:before{width:160px;height:160px;right:-62px;top:-53px;}
  .yfc-hero:after{font-size:39px;right:24px;top:25px;}
  .yfc-hero h1{font-size:24px;}
  .yfc-hero-desc{font-size:12px;margin-bottom:15px;}
  .yfc-search{gap:6px;}
  #main .yfc-search input[type="search"]{font-size:16px;padding:12px 10px;min-width:0;}
  .yfc-search button{padding:0 12px;font-size:12px;}
  .yfc-heading h2{font-size:18px;}
  .yfc-section{margin-bottom:23px;}
  .yfc-rankbox{padding:13px 10px;}
  .yfc-rankheader{flex-wrap:wrap;align-items:center;}
  .yfc-tabs{margin-left:auto;}
  .yfc-rank-grid{gap:7px;}
  .yfc-rank-text{font-size:10px;padding:7px;min-height:44px;}
  .yfc-rank-position{width:25px;height:25px;font-size:11px;top:5px;left:5px;}
  #main .list:has(> .entry-card-wrap){grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:10px !important;}
  #main .list .entry-card-content{padding:9px 8px !important;}
  #main .list .entry-card-title{font-size:12px !important;}
  #main .list .entry-card-snippet{font-size:10px;}
  .yfc-widget-strip{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
  #main .related-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;}
  #main .article .entry-title{font-size:21px;}
}
@media (max-width:420px){
  .yfc-widget-strip{gap:7px;}
  .yfc-widget-strip .widget{padding:8px;}
}
@media (max-width:360px){
  .yfc-categories{gap:6px;}
  #main .yfc-categories a{padding:7px 9px;font-size:11px;}
  .yfc-rankheader{display:block;}
  .yfc-tabs{margin-top:9px;width:max-content;}
  .yfc-search button{padding:0 9px;}
}
@media (prefers-reduced-motion:reduce){
  *, *:before, *:after{scroll-behavior:auto !important;transition:none !important;}
}


/* ==========================================================
   v1.1.1: images, banner widgets, and 1-column layout
   ========================================================== */
#main .list .entry-card-thumb,
#main .related-entry-card-thumb,
#main .yfc-rank-thumb {
  position: relative !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  aspect-ratio: 3 / 4 !important;
  height: auto !important;
  min-height: 0 !important;
  background: #25161b !important;
}
#main .list .entry-card-thumb {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}
#main .list .entry-card-thumb > img,
#main .related-entry-card-thumb > img,
#main .yfc-rank-thumb > img {
  position: absolute !important;
  inset: 7px !important;
  display: block !important;
  width: calc(100% - 14px) !important;
  height: calc(100% - 14px) !important;
  max-width: calc(100% - 14px) !important;
  max-height: calc(100% - 14px) !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  object-position: center center !important;
  margin: 0 !important;
  float: none !important;
  border: 0 !important;
  border-radius: 0 !important;
}
#main .article .eye-catch img,
#main .entry-content img,
#main .article .article-body img,
#sidebar .widget img,
.sidebar .widget img {
  max-width: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
}
#main .entry-content img,
#main .article .article-body img {height: auto !important;}
#main .entry-content figure, #main .entry-content .wp-block-image {max-width:100%;}

/* Search widgets do not appear. The main custom search in the header remains. */
.widget.widget_search,
.widget.widget_block:has(.wp-block-search),
.widget:has(> .search-box),
.widget:has(> form.searchform),
.widget:has(> form.search-form),
.widget:has(> form[role="search"]),
.widget:has(> .widget_search) {display: none !important;}

/* Two distinct ad widgets in the homepage widget area. */
.yfc-widget-strip {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
  align-items: start !important;
  width: 100%;
}
.yfc-widget-strip > .widget,
.yfc-widget-strip > aside,
.yfc-widget-strip > div {
  box-sizing: border-box !important;
  grid-column: auto !important;
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
}
.yfc-widget-strip > :only-child {grid-column: 1 / -1 !important;}
.yfc-widget-strip .yfc-banner-pair,
.sidebar .yfc-banner-pair,
.yfc-sidebar-ad-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  align-items: start !important;
  gap: 10px !important;
}
.yfc-banner-pair > *,
.yfc-sidebar-ad-grid > * {box-sizing: border-box !important;min-width: 0 !important;max-width:100% !important;margin:0 !important;}
.yfc-banner-pair img,
.yfc-sidebar-ad-grid img,
.yfc-widget-strip .widget img {max-width:100% !important;width:100% !important;height:auto !important;object-fit:contain !important;}
.yfc-widget-strip a:has(img),
.yfc-banner-pair a:has(img),
.yfc-sidebar-ad-grid a:has(img) {display:block;min-width:0;}
.yfc-widget-strip iframe,
.yfc-banner-pair iframe,
.yfc-sidebar-ad-grid iframe {max-width:100% !important;width:100% !important;}
@media (max-width:600px){
  .yfc-widget-strip,
  .yfc-widget-strip .yfc-banner-pair,
  .sidebar .yfc-banner-pair,
  .yfc-sidebar-ad-grid {gap:7px !important;grid-template-columns:repeat(2,minmax(0,1fr)) !important;}
  .yfc-widget-strip .widget {padding:5px !important;}
}


/* ==============================================
   v1.0.0 — ad layout using real existing widgets
   (same principle as おとなの夜遊び v1.0.4)
   ============================================== */
.yfc-bottom-banners {clear:both;margin:28px 0 16px;padding:22px 0 10px;border-top:1px solid rgba(237,206,145,.25);max-width:100%;}
.yfc-bottom-banners-title {font-size:20px!important;line-height:1.5;color:#f9ddaf!important;margin:0 0 14px!important;padding:0 0 0 12px!important;border:0!important;border-left:4px solid #e8c992!important;background:transparent!important;}
.yfc-ad-grid {display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:12px!important;align-items:start!important;max-width:100%;min-width:0;}
.yfc-ad-grid > .widget {box-sizing:border-box!important;display:block!important;min-width:0!important;max-width:100%!important;width:100%!important;float:none!important;margin:0!important;padding:7px!important;background:#261f32!important;border:1px solid rgba(237,206,145,.25)!important;border-radius:10px!important;box-shadow:none!important;overflow:hidden!important;}
.yfc-ad-grid > .widget .widget-title {display:none!important;}
.yfc-ad-grid > .widget a:has(img) {display:block!important;min-width:0!important;line-height:0!important;}
.yfc-ad-grid > .widget img {display:block!important;max-width:100%!important;width:100%!important;height:auto!important;max-height:none!important;object-fit:contain!important;object-position:center top!important;position:static!important;inset:auto!important;float:none!important;margin:0 auto!important;border:0!important;}
.yfc-ad-grid > .widget figure,.yfc-ad-grid > .widget .wp-block-image {margin:0!important;max-width:100%;}
.yfc-ad-grid > .widget iframe {max-width:100%!important;}
.yfc-ad-grid > .yfc-banner-clean :is(.widget-title,h2,h3,h4,h5,h6) {display:none!important;}
.yfc-ad-grid > .yfc-banner-clean a:not(:has(img)):not(:has(iframe)) {display:none!important;}
.yfc-ad-grid > .yfc-banner-clean :is(.textwidget,.custom-html-widget) > p:not(:has(img)):not(:has(iframe)),
.yfc-ad-grid > .yfc-banner-clean > p:not(:has(img)):not(:has(iframe)) {display:none!important;}
.yfc-ad-grid > .yfc-banner-multi {grid-column:span var(--yfc-count,2)!important;}
.yfc-banner-inline-grid {display:grid!important;grid-template-columns:repeat(var(--yfc-count,2),minmax(0,1fr))!important;align-items:start!important;gap:8px!important;min-width:0;}
.yfc-banner-inline-grid > * {display:block!important;min-width:0!important;width:100%!important;max-width:100%!important;margin:0!important;padding:0!important;}
.yfc-hidden-text-promo {display:none!important;}
.yfc-widget-strip:not(:has(> .widget:not(.yfc-hidden-text-promo))) {display:none!important;}
@media(max-width:960px){.yfc-ad-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;}.yfc-ad-grid > .yfc-banner-multi{grid-column:span min(3,var(--yfc-count,2))!important;}.yfc-banner-inline-grid{grid-template-columns:repeat(min(3,var(--yfc-count,2)),minmax(0,1fr))!important;}}
@media(max-width:700px){
  .yfc-ad-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;}
  .yfc-ad-grid > .widget{padding:5px!important;border-radius:7px!important;}
  .yfc-ad-grid > .yfc-banner-multi{grid-column:span 2!important;}
  .yfc-banner-inline-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important;}
  .yfc-bottom-banners{margin-top:20px;padding-top:16px;}
  .yfc-bottom-banners-title{font-size:17px!important;}
}
@media(max-width:360px){.yfc-ad-grid{gap:6px!important;}.yfc-ad-grid>.widget{padding:4px!important;}}


/* ==========================================================
   v1.0.0: remove right sidebar and expand content to one column
   ========================================================== */
#sidebar,
.sidebar,
.sidebar-scroll,
#sidebar1,
#sidebar2 {
  display: none !important;
}

#content,
#content-in {
  display: block !important;
}

#main,
.main,
.content,
.main-scroll {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

#content-in > #main,
#content-in > .main {
  flex: 1 1 100% !important;
}

@media (min-width: 835px) {
  #content-in {
    padding-right: 0 !important;
    gap: 0 !important;
  }
  #main,
  .main {
    min-width: 0 !important;
  }
}


/* ==========================================================
   v1.0.0: keep ranking images dominant with a wider one-column page;
   visible title directly above the regular work list.
   ========================================================== */
.yfc-work-list-heading {
  display:flex;
  align-items:center;
  gap:12px;
  margin:34px 0 18px;
  padding:0 0 13px;
  border-bottom:1px solid rgba(237,206,145,.22);
}
.yfc-work-list-heading h2 {
  color:#f6e5ba !important;
  font-size:clamp(20px,2.1vw,25px) !important;
  line-height:1.35 !important;
  font-weight:800 !important;
  letter-spacing:.04em;
  margin:0 !important;
  padding:0 0 0 14px !important;
  border:0 !important;
  border-left:5px solid #e8c992 !important;
  background:transparent !important;
}
.yfc-work-list-heading h2::before,
.yfc-work-list-heading h2::after { content:none!important; }

/* Wide single-column layout: keep ranking cards from becoming oversized,
   while giving most of each card to the cover image. */
#main .yfc-rank-grid {
  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:14px !important;
  align-items:stretch;
}
#main .yfc-rank-grid .yfc-rank-item {
  display:flex !important;
  flex-direction:column !important;
  min-width:0 !important;
  max-width:none !important;
  height:100% !important;
}
#main .yfc-rank-grid .yfc-rank-thumb {
  display:block !important;
  flex:none !important;
  box-sizing:border-box !important;
  width:100% !important;
  height:auto !important;
  aspect-ratio: 4 / 5 !important;
  position:relative !important;
  overflow:hidden !important;
  padding:0 !important;
}
#main .yfc-rank-grid .yfc-rank-thumb > img {
  position:absolute !important;
  inset:3px !important;
  width:calc(100% - 6px) !important;
  height:calc(100% - 6px) !important;
  max-width:none !important;
  max-height:none !important;
  object-fit:contain !important;
  object-position:center center !important;
  margin:0 !important;
  padding:0 !important;
  background:transparent !important;
}
#main .yfc-rank-grid .yfc-rank-text {
  flex:none !important;
  padding:10px 11px 12px !important;
  font-size:13px !important;
  font-weight:750 !important;
  line-height:1.5 !important;
  min-height:0 !important;
}
@media(max-width:1023px) {
  #main .yfc-rank-grid {grid-template-columns:repeat(3,minmax(0,1fr)) !important;gap:10px!important;}
}
@media(max-width:600px) {
  #main .yfc-rank-grid {grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:9px!important;}
  #main .yfc-rank-grid .yfc-rank-text {font-size:11px!important;padding:8px 8px 10px!important;}
  .yfc-work-list-heading {margin:25px 0 13px;padding-bottom:10px;}
  .yfc-work-list-heading h2 {font-size:19px!important;}
}



/* v1.0.0 — Server-rendered single ad grid (PC: 4 / mobile: 2).
 * Keep the old JS grid as a fallback for unusual dynamic HTML widgets. */
body.home .yfc-ad-grid,
body.home #yfc-ad-grid,
body.blog .yfc-ad-grid {
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  width:100%!important;
  margin:0 auto!important;
  gap:14px!important;
}
.yfc-ad-grid > :is(.widget,aside,div){
  grid-column:auto;
  min-width:0!important;
  max-width:none!important;
  margin:0!important;
  float:none!important;
}
.yfc-ad-grid :is(.custom-html-widget,.textwidget,.wp-block-image,.ad-area,.ad-wrap,.ad-inserter,.ad-responsive){
  max-width:100%!important;
  min-width:0!important;
}
.yfc-ad-grid img,.yfc-ad-grid picture img{
  max-width:100%!important;
  height:auto!important;
  object-fit:contain!important;
}
/* Original footer widget wrappers are empty on the homepage after ads move.
 * Hide only empty wrappers; non-ad footer contents remain untouched. */
body.home #footer .footer-widgets:not(:has(.widget)),
body.home #content-bottom:not(:has(.widget)){
  display:none!important;
}
/* Fallback when cached HTML or a plugin skips the banner script:
 * footer ads still appear side-by-side instead of vertically. */
body.home #footer .footer-widgets:has(.widget){
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:12px!important;
  align-items:start!important;
  width:100%!important;
}
body.home #footer .footer-widgets > :is(.footer-left,.footer-center,.footer-right){
  display:contents!important;
}
body.home #footer .footer-widgets .widget{
  float:none!important;
  width:100%!important;
  max-width:100%!important;
  margin:0!important;
  min-width:0!important;
}
body.home #footer .footer-widgets .widget img{display:block;max-width:100%!important;height:auto!important;margin:auto!important;}
@media(max-width:960px){
  body.home .yfc-ad-grid,body.home #yfc-ad-grid,
  body.home #footer .footer-widgets:has(.widget){grid-template-columns:repeat(3,minmax(0,1fr))!important;}
}
@media(max-width:700px){
  body.home .yfc-ad-grid,body.home #yfc-ad-grid,
  body.home #footer .footer-widgets:has(.widget){grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;}
}

/* Guard against themes/plugins setting 100% content-box widths. */
#main,.main,#content,#content-in{box-sizing:border-box!important;}










/* ===========================================================
/* Loaded banners and asynchronous DMM widgets remain fluid within grid cells. */
.yfc-ad-grid>.yfc-banner-extracted{grid-column:auto!important;min-width:0!important;}
.yfc-ad-grid>.yfc-banner-extracted>a{display:block!important;line-height:0!important;}
.yfc-ad-grid>.yfc-banner-extracted img{display:block!important;width:100%!important;height:auto!important;object-fit:contain!important;}
.yfc-ad-grid .widget :is(img,iframe,video){max-width:100%!important;}
.yfc-ad-grid :is(.widget-banner,.widget-banner img){max-width:100%!important;}
/* ==========================================================
   v1.0.1 — Single-post advertisements + empty-shell cleanup
   Keep real linked images and DMM async embeds; hide only empty wrappers.
   ========================================================== */
/* The gallery is now also rendered on single works, not just the homepage. */
body.single #yfc-ad-grid,
body.single .yfc-ad-grid,
body.single .yfc-ad-section-v101 .yfc-ad-grid {
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:12px!important;
  align-items:start!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
}
body.single .yfc-bottom-banners {
  clear:both;
  max-width:1280px!important;
  margin:24px auto 28px!important;
  padding:20px 12px 8px!important;
}
body.single .yfc-ad-grid>.widget,
body.single #yfc-ad-grid>.widget {
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  float:none!important;
  margin:0!important;
  padding:7px!important;
  border-radius:10px!important;
  overflow:hidden!important;
}
body.single #yfc-ad-grid .widget img,
body.single .yfc-ad-grid .widget img {
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  height:auto!important;
  object-fit:contain!important;
  margin:0 auto!important;
}
body.single .yfc-ad-grid .widget .widget-title {display:none!important;}
/* An empty widget is not an ad and must never take up a grid cell. */
#yfc-ad-grid>.widget:not(:has(img,picture,iframe,video,object,embed,canvas,svg,ins,script[src],form,input,button)),
.yfc-ad-grid>.widget:not(:has(img,picture,iframe,video,object,embed,canvas,svg,ins,script[src],form,input,button)),
.yfc-ad-grid>.yfc-empty-banner-widget,
.yfc-widget-strip>.yfc-empty-banner-widget,
#footer .yfc-empty-banner-widget,
#content-bottom .yfc-empty-banner-widget,
#main .article .yfc-empty-banner-widget,
.yfc-empty-banner-shell {
  display:none!important;
  border:0!important;
  padding:0!important;
  margin:0!important;
  min-height:0!important;
  height:0!important;
}
/* If a suppressed footer area has only empty shell nodes, hide its frame. */
body:is(.home,.single) #footer .footer-widgets:not(:has(img,iframe,video,ins,script[src],.widget:not(.yfc-empty-banner-widget))),
body:is(.home,.single) #footer .footer-widgets-mobile:not(:has(img,iframe,video,ins,script[src],.widget:not(.yfc-empty-banner-widget))),
body:is(.home,.single) #content-bottom:not(:has(img,iframe,video,ins,script[src],.widget:not(.yfc-empty-banner-widget))) {
  display:none!important;
}
/* On single posts, footer fallback keeps intact ads aligned even when dynamic
   content is injected after PHP filters have already run. */
body.single #footer .footer-widgets:has(.widget:not(.yfc-empty-banner-widget)),
body.single #footer .footer-widgets-mobile:has(.widget:not(.yfc-empty-banner-widget)) {
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:12px!important;
  align-items:start!important;
}
body.single #footer .footer-widgets > :is(.footer-left,.footer-center,.footer-right),
body.single #footer .footer-widgets-mobile > .footer-mobile {
  display:contents!important;
}
body.single #footer .footer-widgets .widget,
body.single #footer .footer-widgets-mobile .widget {float:none!important;width:100%!important;min-width:0!important;max-width:100%!important;}
/* Parent Cocoon ad wrapper must not stretch an image past the card width. */
body.single .ad-area img,
body.single .ad-wrap img,
body.single #content-bottom .widget img {width:auto;max-width:100%!important;height:auto!important;object-fit:contain!important;}
@media(max-width:960px){
  body.single #yfc-ad-grid,body.single .yfc-ad-grid,
  body.single #footer .footer-widgets:has(.widget:not(.yfc-empty-banner-widget)),
  body.single #footer .footer-widgets-mobile:has(.widget:not(.yfc-empty-banner-widget)) {
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
}
@media(max-width:700px){
  body.single #yfc-ad-grid,body.single .yfc-ad-grid,
  body.single #footer .footer-widgets:has(.widget:not(.yfc-empty-banner-widget)),
  body.single #footer .footer-widgets-mobile:has(.widget:not(.yfc-empty-banner-widget)) {
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
  }
  body.single .yfc-ad-grid>.widget,body.single #yfc-ad-grid>.widget {
    padding:5px!important;border-radius:7px!important;
  }
}

/* Respect banners deliberately placed *inside* a post. Keep them in place,
   while preventing multiple links inside one HTML widget from stacking badly. */
body.single #main .article .widget_custom_html .custom-html-widget:has(> a:has(img) ~ a:has(img)),
body.single #main .article .widget_text .textwidget:has(> a:has(img) ~ a:has(img)) {
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  align-items:start!important;
  gap:10px!important;
}
body.single #main .article .widget_custom_html .custom-html-widget > a:has(img),
body.single #main .article .widget_text .textwidget > a:has(img) {
  display:block!important;
  min-width:0!important;
}
body.single #main .article .widget_custom_html .custom-html-widget > a img,
body.single #main .article .widget_text .textwidget > a img {
  max-width:100%!important;
  height:auto!important;
  object-fit:contain!important;
}
@media(max-width:960px){
  body.single #main .article .widget_custom_html .custom-html-widget:has(> a:has(img) ~ a:has(img)),
  body.single #main .article .widget_text .textwidget:has(> a:has(img) ~ a:has(img)) {
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
}
@media(max-width:700px){
  body.single #main .article .widget_custom_html .custom-html-widget:has(> a:has(img) ~ a:has(img)),
  body.single #main .article .widget_text .textwidget:has(> a:has(img) ~ a:has(img)) {
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
  }
}


/* ==========================================================
   v1.0.2 — empty strips under advertisements (final specificity override)
   Previous CSS had `display:grid !important` with higher specificity on
   Cocoon footer shells and `display:block !important` on individual cells.
   A JS class alone could not win the cascade. These rules intentionally can.
   ========================================================== */
body.home #yfc-ad-grid > .yfc-empty-banner-widget,
body.blog #yfc-ad-grid > .yfc-empty-banner-widget,
body.single #yfc-ad-grid > .yfc-empty-banner-widget,
body.home .yfc-ad-grid > .yfc-empty-banner-widget,
body.single .yfc-ad-grid > .yfc-empty-banner-widget,
body:is(.home,.blog,.single) .yfc-widget-strip > .yfc-empty-banner-widget,
body:is(.home,.blog,.single) #footer .footer-widgets .yfc-empty-banner-widget,
body:is(.home,.blog,.single) #footer .footer-widgets-mobile .yfc-empty-banner-widget,
body:is(.home,.blog,.single) #content-bottom .yfc-empty-banner-widget,
body:is(.home,.blog,.single) #footer .yfc-empty-banner-shell,
body:is(.home,.blog,.single) #footer .footer-widgets.yfc-empty-banner-shell,
body:is(.home,.blog,.single) #footer .footer-widgets-mobile.yfc-empty-banner-shell,
body:is(.home,.blog,.single) #footer .footer-left.yfc-empty-banner-shell,
body:is(.home,.blog,.single) #footer .footer-center.yfc-empty-banner-shell,
body:is(.home,.blog,.single) #footer .footer-right.yfc-empty-banner-shell,
body:is(.home,.blog,.single) #footer .footer-mobile.yfc-empty-banner-shell,
body:is(.home,.blog,.single) .yfc-widget-strip.yfc-empty-banner-shell,
body:is(.home,.blog,.single) .yfc-hidden-text-promo {
  display:none!important;
  height:0!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
}
/* Preserve DMM's original live ins/script but suppress its empty outline
   until a real image/iframe/canvas becomes visible. */
body:is(.home,.blog,.single) #yfc-ad-grid > .yfc-pending-banner,
body:is(.home,.blog,.single) .yfc-ad-grid > .yfc-pending-banner,
body:is(.home,.blog,.single) #footer .yfc-pending-banner {
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  min-height:0!important;
  padding:0!important;
}
/* JS-independent fallback: script-only and truly empty slots cannot draw
   decorative pills, including when CSS is cached independently of JavaScript. */
body:is(.home,.blog,.single) #yfc-ad-grid > .widget:empty,
body:is(.home,.blog,.single) .yfc-ad-grid > .widget:empty,
body:is(.home,.blog,.single) #footer .footer-widgets .widget:empty,
body:is(.home,.blog,.single) #footer .footer-widgets-mobile .widget:empty {
  display:none!important;
}

/* ============================================================
   YOFUKASHI COMIC — Midnight Reader's Lounge
   Branding layer. Functional fixes above are intentionally retained.
   ============================================================ */
:root {
  --yfc-bg:#090e20;
  --yfc-surface:#151d35;
  --yfc-raised:#202743;
  --yfc-ink:#f8f3ed;
  --yfc-muted:#bdc9e3;
  --yfc-gold:#e8d4aa;
  --yfc-wine:#7771bf;
  --yfc-line:rgba(231,207,162,.24);
}
body {
  color:var(--yfc-ink)!important;
  background:#090e20!important;
  background-image:radial-gradient(ellipse 66% 450px at 50% -140px,rgba(85,70,156,.30),transparent 90%),radial-gradient(ellipse 40% 520px at 0% 55%,rgba(52,83,152,.13),transparent 90%)!important;
}
.header-container{background:#10162d!important;border-bottom:1px solid rgba(226,205,160,.21)!important;}
#header{background:linear-gradient(115deg,#131b36 0%,#222142 53%,#101428 100%)!important;}
#header .site-name-text,#header .site-name-text a,#header .logo-header,.site-name-text-link{color:#f6dfb5!important;font-weight:800!important;letter-spacing:.055em!important;text-shadow:0 0 19px rgba(196,170,239,.15)!important;}
#header .tagline,#header .header-tagline{color:#cfd2f1!important;}
.navi{background:#171b35!important;border-color:rgba(220,198,157,.14)!important;}
.navi .navi-in a:hover,.navi .navi-in .current-menu-item>a{background:#423b69!important;color:#fff1ce!important;}
#main,.main{background:linear-gradient(180deg,#151c32,#10172c 95%)!important;border:1px solid rgba(229,201,157,.19)!important;box-shadow:0 18px 56px rgba(0,0,0,.24)!important;}
#footer,.footer{background:#10162a!important;border-top:1px solid rgba(222,195,155,.22)!important;}
#main a:not(.a-wrap){color:#f3d8ac!important;}
#main a:not(.a-wrap):hover{color:#fff1d2!important;}
.yfc-hero{isolation:isolate!important;position:relative!important;overflow:hidden!important;min-height:324px!important;padding:45px 43px 37px!important;border-radius:22px!important;background:radial-gradient(ellipse 50% 95% at 79% 38%,rgba(121,111,188,.32),transparent 80%),linear-gradient(118deg,#252b53 0%,#1b2447 51%,#121a31 100%)!important;border:1px solid rgba(231,204,157,.46)!important;box-shadow:inset 0 0 0 5px rgba(229,207,157,.045),0 22px 44px rgba(0,0,0,.24)!important;}
.yfc-hero::before{content:""!important;display:block!important;position:absolute!important;inset:13px!important;width:auto!important;height:auto!important;top:13px!important;right:13px!important;border:1px solid rgba(233,217,187,.14)!important;border-radius:13px!important;box-shadow:none!important;pointer-events:none!important;}
.yfc-hero::after{content:"✧"!important;right:24px!important;top:18px!important;font-size:18px!important;color:#eed8ae!important;opacity:.9!important;}
.yfc-eyebrow{color:#c9bdf1!important;font-size:11px!important;letter-spacing:.24em!important;font-weight:800!important;}
.yfc-hero h1{position:relative;z-index:2;max-width:720px!important;font-family:"Noto Serif CJK JP","Yu Mincho","Hiragino Mincho ProN",serif!important;font-size:clamp(29px,3.6vw,46px)!important;color:#fff2d9!important;letter-spacing:.07em!important;font-weight:800!important;text-shadow:0 5px 18px rgba(0,0,0,.42)!important;}
.yfc-hero-desc{position:relative;z-index:2;color:#e0def3!important;font-size:14px!important;max-width:650px!important;}
.yfc-search{position:relative;z-index:3;max-width:640px!important;}
#main .yfc-search input[type="search"]{background:#fffaf6!important;color:#242546!important;border:1px solid #e0d5c7!important;}
.yfc-search button{background:linear-gradient(135deg,#f1e0bb,#d0ad7c)!important;color:#242044!important;font-weight:900!important;}
.yfc-search button:hover{background:#ffebc4!important;}
/* Quiet reading lamp, open comic pages and tiny stars — pure CSS art. */
.yfc-night-art{position:absolute;right:64px;top:29px;width:265px;height:270px;z-index:1;pointer-events:none;filter:drop-shadow(0 16px 22px rgba(2,5,19,.39));}
.yfc-night-halo{position:absolute;width:265px;height:230px;right:0;top:25px;border-radius:50%;background:radial-gradient(ellipse,rgba(213,191,243,.18) 0,rgba(157,139,226,.09) 36%,transparent 71%);}
.yfc-reading-lamp{position:absolute;right:78px;top:10px;width:108px;height:171px;border-top:5px solid #c9ae83;border-right:5px solid #c9ae83;border-radius:70px 60px 0 0;transform:rotate(17deg);opacity:.87;}
.yfc-reading-lamp:before{content:"";position:absolute;top:-12px;left:-37px;width:78px;height:44px;background:linear-gradient(145deg,#f3ddab,#947b72);border:2px solid #f2d8aa;border-radius:57px 56px 7px 7px;transform:rotate(-19deg);box-shadow:0 15px 25px rgba(243,223,173,.14);}
.yfc-reading-lamp:after{content:"";position:absolute;bottom:-4px;right:-19px;width:46px;height:7px;border-radius:60%;background:#d6bb8b;}
.yfc-book-shadow{position:absolute;left:43px;bottom:22px;width:193px;height:20px;background:rgba(7,9,29,.7);filter:blur(9px);border-radius:50%;}
.yfc-open-book{position:absolute;bottom:34px;left:32px;display:flex;width:208px;height:91px;filter:drop-shadow(0 9px 6px rgba(0,0,0,.38));transform:rotate(-8deg);}
.yfc-open-book:after{content:"";position:absolute;left:50%;top:5px;width:4px;height:89px;background:linear-gradient(180deg,#a59491,#615e87);border-radius:50%;transform:translateX(-50%);}
.yfc-page{position:relative;display:block;box-sizing:border-box;width:50%;height:100%;background:repeating-linear-gradient(180deg,transparent 0px,transparent 12px,rgba(80,79,121,.30) 13px,transparent 14px),linear-gradient(145deg,#fff2d6,#dbd6ef);border:2px solid rgba(225,200,159,.94);}
.yfc-page-left{border-radius:6px 14px 18px 9px;transform:skewY(10deg);box-shadow:inset 6px -6px 11px rgba(99,87,141,.18);}
.yfc-page-right{border-radius:14px 6px 9px 18px;transform:skewY(-10deg);box-shadow:inset -7px -5px 11px rgba(90,83,137,.22);}
.yfc-spark{position:absolute;color:#f5dca7;font-family:Georgia,serif;text-shadow:0 0 15px rgba(255,229,164,.53);}
.yfc-spark-one{left:16px;top:62px;font-size:29px;}.yfc-spark-two{right:20px;top:78px;font-size:23px;}.yfc-spark-three{left:71px;top:26px;font-size:35px;}
#main .yfc-heading h2,#main .yfc-work-list-heading h2{color:#f8e8c9!important;}
.yfc-heading small{color:#b5b4f0!important;}.yfc-heading h2::before{background:linear-gradient(180deg,#eac68a,#aaa2ed)!important;}
#main .yfc-categories a{background:#242e50!important;color:#f2eafa!important;border-color:rgba(230,202,156,.23)!important;}
#main .yfc-categories a:hover{background:#41427c!important;color:#fff6de!important;border-color:#e8c992!important;}
.yfc-rankbox{background:linear-gradient(145deg,#242a50,#151d38)!important;border-color:rgba(230,203,161,.26)!important;}
#main .yfc-rank-item{background:#252d51!important;border-color:rgba(238,207,169,.18)!important;}
#main .yfc-rank-item:hover{border-color:#edcd9f!important;}
.yfc-rank-thumb,#main .list .entry-card-thumb,#main .related-entry-card-thumb{background:radial-gradient(circle at 46% 30%,#3f3c69,#121a36 84%)!important;}
#main .list>.entry-card-wrap .entry-card{background:#202944!important;border-color:rgba(231,202,166,.18)!important;}
#main .list>.entry-card-wrap:hover .entry-card{border-color:#eed2a4!important;}
#main .list .entry-card .cat-label{background:#484578!important;color:#fff3ec!important;}
#main .yfc-rank-grid .yfc-rank-text{color:#fff3e8!important;}
.yfc-rank-position{background:#ecd4aa!important;color:#252744!important;}
.yfc-work-list-heading{border-bottom-color:rgba(226,197,168,.27)!important;}.yfc-work-list-heading h2{border-left-color:#e5c99b!important;}
.yfc-ad-grid>.widget{background:#1e2747!important;border-color:rgba(225,201,165,.26)!important;}
.yfc-bottom-banners-title{color:#f4e2c5!important;border-left-color:#e4c194!important;}
#main .article .entry-title{color:#fff0db!important;border-left-color:#e3c89d!important;}
#main .article .entry-content,#main .article .entry-content p{color:#eae7f4!important;}
#main .article .entry-content h2{background:#292d50!important;border-color:#e7cba2!important;}
#main .pagination .current{background:#ead0a4!important;color:#1b2541!important;}
@media(max-width:1040px){.yfc-night-art{right:18px;top:43px;transform:scale(.78);transform-origin:top right;opacity:.75;}}
@media(max-width:700px){.yfc-night-art{right:5px;top:37px;transform:scale(.50);transform-origin:top right;opacity:.19;}}
@media(max-width:600px){.yfc-hero{padding:27px 16px 24px!important;min-height:0!important;}.yfc-hero h1{font-size:26px!important;}.yfc-hero-desc{font-size:12px!important;max-width:100%!important;}.yfc-night-art{right:0;top:18px;opacity:.15;transform:scale(.45);}.yfc-hero::before{inset:7px!important;}}
/* Re-apply visibility after theme colors: blank ad shells must never reappear. */
body:is(.home,.blog,.single) #yfc-ad-grid > .yfc-empty-banner-widget,
body:is(.home,.blog,.single) .yfc-ad-grid > .yfc-empty-banner-widget,
body:is(.home,.blog,.single) .yfc-widget-strip > .yfc-empty-banner-widget,
body:is(.home,.blog,.single) #footer .yfc-empty-banner-shell,
body:is(.home,.blog,.single) .yfc-hidden-text-promo{display:none!important;}
