/* === FORCE HIDE MAIN VISUAL === */
.p-mainVisual, #main_visual, .p-mainVisual__inner {
  display: none !important;
  height: 0 !important;
  overflow: hidden !important;
  max-height: 0 !important;
}
/* === Header Bar Full Width === */
.l-header__bar, .p-announcementBar {
  max-width: 100% !important;
  width: 100vw !important;
  margin-left: calc(-50vw + 50%) !important;
}
.l-header__barInner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}
/* === Midnight Gate Dark Theme === */
body, .l-body, #body_wrap {
  background: #0a0a1a !important;
  color: #e0e0e0 !important;
}
.l-header, .l-header__inner {
  background: #0d0d2b !important;
}
.l-header__bar {
  background: #e63946 !important;
}
.l-header__inner, .l-header .c-gnav a, .l-header .c-headLogo a,
.c-gnav a, .l-header__menuBtn {
  color: #fff !important;
}
h1, h2, h3, h4, .c-postTitle__ttl, .p-postList__title {
  color: #fff !important;
}
.post_content h2:where(:not([class^="swell-block-"])) {
  background: linear-gradient(135deg, #1a1a3e, #2a1a2e) !important;
  border-left: 4px solid #e63946 !important;
  padding: 12px 16px !important;
  border-radius: 6px !important;
  color: #fff !important;
}
.post_content h2::before { display: none !important; }
.post_content h3:where(:not([class^="swell-block-"])) {
  border-bottom: 2px solid #e63946 !important;
  padding-bottom: 8px !important;
  color: #fff !important;
}
.post_content h3::before { display: none !important; }
a { color: #e63946 !important; }
a:hover { color: #ff6b6b !important; }
.post_content, .p-article__content, .e-content { color: #ccc !important; }
.l-footer, .l-footer__inner {
  background: #050510 !important;
  color: #888 !important;
}
.l-footer a { color: #aaa !important; }
.p-postList__item, .p-blogCard, .p-postList.-type-card .p-postList__body {
  background: #12122a !important;
  border-radius: 8px !important;
}
.c-widget {
  background: #12122a !important;
  border-radius: 8px;
  padding: 16px;
}
.c-widget__title {
  color: #fff !important;
  background: linear-gradient(135deg, #1a1a3e, #2a1a2e) !important;
}
.c-widget__title.-side::before, .c-widget__title.-side::after {
  background: #e63946 !important;
}
.l-mainContent, .l-content, .l-sidebar, .l-article,
.l-content__inner, .-sidebar-on .l-content {
  background: transparent !important;
}
.l-sidebar { color: #ccc !important; }
.p-articleThumb__cat, .c-postThumb__cat {
  background: #e63946 !important;
  color: #fff !important;
}
table, th, td { border-color: #1e1e3a !important; }
th { background: #1a1a3e !important; color: #fff !important; }
td { background: #0f0f25 !important; color: #ddd !important; }
input, textarea, select, .c-searchForm__input {
  background: #1a1a3a !important;
  color: #e0e0e0 !important;
  border-color: #333 !important;
}
.c-mvBtn a, .swell-block-button a, [class*="page-numbers"] {
  background: #e63946 !important;
  color: #fff !important;
}
.p-authorBox, .p-authorBox__inner {
  background: #12122a !important;
  color: #ccc !important;
}
.swell-toc, .p-toc {
  background: #12122a !important;
  border-color: #1e1e3a !important;
  color: #ccc !important;
}
.p-articleMetas, .p-articleMetas a, .c-postMeta, .c-postMeta a { color: #888 !important; }
.c-breadcrumb, .c-breadcrumb a { color: #888 !important; }
.c-shareBtns { border-color: #1e1e3a !important; }
/* Override SWELL CSS vars */
:root {
  --color_main: #e63946 !important;
  --color_text: #e0e0e0 !important;
  --color_bg: #0a0a1a !important;
  --color_link: #e63946 !important;
  --color_htag: #e63946 !important;
  --color_header_bg: #0d0d2b !important;
  --color_header_text: #fff !important;
  --color_footer_bg: #050510 !important;
  --color_footer_text: #888 !important;
  --color_content_bg: transparent !important;
  --color_border: #1e1e3a !important;
}

/* === Post Slider Fix - Wider cards, no text cutoff === */
:root {
  --swl-post_slide_width--pc: 33.333% !important;
  --swl-post_slide_width--sp: 80% !important;
}
.p-postSlider .p-postList__title {
  font-size: 14px !important;
  line-height: 1.5 !important;
  max-height: 4.5em !important;
  overflow: hidden !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 3 !important;
  -webkit-box-orient: vertical !important;
}
.p-postSlider .p-postList__item {
  padding: 0 12px !important;
}
/* Make the slider container full width */
.p-postSlider {
  background: #0d0d2b !important;
  padding: 20px 0 !important;
}
/* Fix the thumbnail overlay text readability */
.p-postSlider .p-postList__thumb {
  border-radius: 8px !important;
  overflow: hidden !important;
}

/* === Category Navigation Bar === */
.category-nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 20px 16px;
  background: #0d0d2b;
  flex-wrap: wrap;
  border-bottom: 1px solid #1e1e3a;
}
.category-nav a {
  display: inline-block;
  padding: 8px 20px;
  background: #1a1a3e !important;
  color: #e0e0e0 !important;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none !important;
  transition: all 0.3s;
  border: 1px solid #2a2a5a;
}
.category-nav a:hover {
  background: #e63946 !important;
  color: #fff !important;
  border-color: #e63946;
}

/* === Hide post slider title text (already shown in thumbnail overlay) === */
.p-postSlider .p-postList__body {
  display: none !important;
}
/* Make slider items tighter without the text below */
.p-postSlider .p-postList__item {
  padding-bottom: 8px !important;
}

/* === Author Profile Box === */
.p-authorBox {
  border: 1px solid #1e1e3a !important;
}
.p-authorBox__name {
  color: #fff !important;
}
.p-authorBox__desc {
  color: #ccc !important;
}

/* === Category page header text fix === */
.l-topTitleArea, .l-topTitleArea * {
  color: #fff !important;
}
.l-topTitleArea .c-pageTitle {
  color: #fff !important;
}
.l-topTitleArea .c-breadcrumb, .l-topTitleArea .c-breadcrumb a {
  color: #ccc !important;
}
/* Archive/category description */
.archive-description, .term-description {
  color: #ccc !important;
}
/* Section titles on top page */
.p-postSlider__title, .c-secTitle, .c-secTitle span {
  color: #fff !important;
}
/* SWELL top page section heading (記事スライダーの上のテキスト) */
#post_slider .p-postSlider__title {
  color: #fff !important;
}
/* Any remaining light text areas */
.p-postList__cat, .c-postThumb__cat {
  color: #fff !important;
}
/* Fix for small text above content that might be invisible */
.c-pageTitle, .p-archiveTitle, .l-mainContent__title {
  color: #fff !important;
}
