@charset "UTF-8";

/*!
Theme Name: Cocoon Child
Description: Cocoon専用の子テーマ
Theme URI: https://wp-cocoon.com/
Author: わいひら
Author URI: https://nelog.jp/
Template:   cocoon-master
Version:    1.1.3
*/

/************************************
** 子テーマ用のスタイルを書く
************************************/
/*必要ならばここにコードを書く*/
/* トップページ以外でヘッダー全体を非表示にする */
/* トップページ以外ではロゴもメニューも非表示 */
/*body:not(.home) .header,
body:not(.home) .navi {
  display: none !important;
}
*/

/* Sidebar follow block spacing reset */
#sidebar-scroll {
  position: static;
  top: auto;
  align-self: auto;
  margin-top: 0;
  padding-top: 0;
}

#sidebar-scroll > .widget-sidebar-scroll {
  position: relative;
  margin-top: 0 !important;
  padding-top: 0 !important;
}

#sidebar-scroll > .widget-sidebar-scroll:first-child,
#sidebar-scroll.is-fixed > .widget-sidebar-scroll:first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

#sidebar-scroll.is-fixed {
  z-index: 20;
}

.sidebar-scroll-placeholder {
  display: none;
  height: 0;
  margin: 0;
  padding: 0;
}

#sidebar-scroll > aside.widget,
#sidebar-scroll > .widget {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

#sidebar-scroll > aside.widget:first-child,
#sidebar-scroll > .widget:first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

#sidebar-scroll .textwidget,
#sidebar-scroll .textwidget > *:first-child,
#sidebar-scroll .textwidget p:first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Let the outer sidebar block handle fixing; keep the TOC widget itself static. */
#sidebar-scroll #toc-3 {
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
}

#sidebar-scroll .toc,
#sidebar-scroll .toc-center,
#sidebar-scroll .toc.border-element,
#sidebar-scroll .toc-nt-number,
#sidebar-scroll .toc-widget-box {
  position: static !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  width: auto !important;
  max-width: 100% !important;
  transform: none !important;
  margin-left: 0 !important;
}

/* Article page: minimise the gap above eyecatch & sidebar (desktop) */
body.single .logo-header {
  padding: 6px 0 6px;
}

body.single #content {
  margin-top: 0;
}

body.single #main {
  margin-top: 0;
  padding-top: 0;
}

body.single #sidebar {
  padding-top: 0;
}

/* PR label: display as a normal block above content instead of
   floating absolute over the eyecatch. */
body.single .pr-label {
  position: relative;
  top: auto;
  left: auto;
  display: block;
  margin: 0;
  padding: 0;
  font-size: 11px;
  line-height: 1.4;
}

/* Article page (mobile): clear the fixed footer-mobile-button bar
   (50px height) so content doesn't hide behind it. */
@media screen and (max-width: 480px) {
  body.single #content,
  body.single .content {
    padding-top: 58px;
  }
}

/* Article overflow guardrails */
.entry-content,
.entry-content > *,
.article,
.article .entry-content {
  min-width: 0;
}

.entry-content {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.entry-content img,
.entry-content video,
.entry-content canvas,
.entry-content svg,
.entry-content iframe,
.entry-content embed,
.entry-content object,
.entry-content .wp-block-image img,
.entry-content .wp-block-cover img,
.entry-content .wp-block-media-text__media img,
.entry-content .instagram-media,
.entry-content .twitter-tweet,
.entry-content .wp-block-embed,
.entry-content .wp-block-embed__wrapper,
.entry-content .wp-block-table,
.entry-content .scrollable-table,
.entry-content .booklink-box,
.entry-content .kaerebalink-box,
.entry-content .tomarebalink-box,
.entry-content .product-item-box,
.entry-content .blogcard-wrap,
.entry-content .video-container,
.entry-content .caption-box,
.entry-content .tab-caption-box,
.entry-content .label-box,
.entry-content .toggle-wrap,
.entry-content .speech-wrap,
.entry-content .wp-block-group,
.entry-content .wp-block-columns {
  max-width: 100% !important;
}

.entry-content iframe,
.entry-content embed,
.entry-content object {
  display: block;
}

.entry-content table,
.entry-content pre,
.entry-content code,
.entry-content .scrollable-table,
.entry-content .wp-block-table,
.entry-content .wp-block-code,
.entry-content .wp-block-preformatted {
  max-width: 100%;
}

.entry-content table,
.entry-content pre,
.entry-content .scrollable-table,
.entry-content .wp-block-table,
.entry-content .wp-block-code,
.entry-content .wp-block-preformatted {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.entry-content pre,
.entry-content code,
.entry-content .wp-block-code code,
.entry-content .wp-block-preformatted {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.entry-content .wp-block-columns,
.entry-content .wp-block-media-text {
  max-width: 100%;
}

/* Sidebar toggle */
.owm-sidebar-toggle-slot {
  display: block;
  width: 100%;
  margin: 0 0 12px;
  padding: 0;
}

.owm-sidebar-toggle-slot.is-hidden {
  display: none !important;
}

.owm-sidebar-toggle {
  width: 100%;
  z-index: 120;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45em;
  min-height: 42px;
  max-width: 100%;
  padding: 0 16px;
  border: 1px solid #c7b299;
  border-radius: 999px;
  background: rgba(255, 248, 240, 0.96);
  color: #5a4635;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(60, 42, 26, 0.14);
}

.owm-sidebar-toggle:hover,
.owm-sidebar-toggle:focus {
  background: #fffaf4;
  color: #3c2a1a;
}

/* Collapsed: hide all sidebar content — keep sidebar element for the reopen button */
body.owm-sidebar-collapsed #sidebar-scroll,
body.owm-sidebar-collapsed #sidebar > .widget,
body.owm-sidebar-collapsed #sidebar > aside {
  display: none !important;
}

body.owm-sidebar-collapsed #sidebar,
body.owm-sidebar-collapsed .sidebar {
  flex: 0 0 40px !important;
  width: 40px !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

body.owm-sidebar-collapsed .owm-sidebar-toggle-slot:not(.is-hidden) {
  position: fixed !important;
  right: 0;
  width: 40px;
}

body.owm-sidebar-collapsed #main,
body.owm-sidebar-collapsed .main {
  flex: 1 1 auto !important;
  width: auto !important;
  margin-right: 8px !important;
}

/* Collapsed reopen button: vertical pill so it fits in the narrow sidebar column */
body.owm-sidebar-collapsed .owm-sidebar-toggle {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  min-height: 0 !important;
  height: auto;
  width: auto !important;
  max-width: none !important;
  padding: 14px 10px;
  font-size: 12px;
  border-radius: 8px;
  white-space: nowrap;
}

@media screen and (max-width: 480px) {
  #sidebar,
  .sidebar,
  .owm-sidebar-toggle-slot,
  .owm-sidebar-toggle {
    display: none !important;
  }
}

/* Ensure the mobile menu bar (which contains the sidebar drawer) renders
   above page-level overlays such as the header image slider arrows/dots. */
.mobile-header-menu-buttons.mobile-menu-buttons {
  z-index: 9999 !important;
}

/* Theme toggle foundation */
:root {
  --owm-theme-bg: #f6f2ec;
  --owm-theme-surface: #fffdf9;
  --owm-theme-surface-soft: #efe7dc;
  --owm-theme-nav-surface: #f3eee7;
  --owm-theme-text: #241f1a;
  --owm-theme-text-soft: #6b6258;
  --owm-theme-accent: #b7793e;
  --owm-theme-accent-strong: #9e6330;
  --owm-theme-border: rgba(74, 60, 45, 0.14);
  --owm-theme-shadow: 0 16px 32px rgba(32, 24, 18, 0.08);
  --owm-theme-toggle-bg: rgba(255, 253, 249, 0.94);
  --owm-theme-toggle-text: #241f1a;
  --owm-theme-toggle-hover: #efe7dc;
  --owm-theme-toggle-icon: #1f1914;
}

html[data-theme="dark"] {
  --owm-theme-bg: #1d2023;
  --owm-theme-surface: #2b3035;
  --owm-theme-surface-soft: #373d43;
  --owm-theme-nav-surface: #4a5056;
  --owm-theme-text: #f1ebe2;
  --owm-theme-text-soft: #cfc5ba;
  --owm-theme-accent: #cf9761;
  --owm-theme-accent-strong: #ddb07c;
  --owm-theme-border: rgba(255, 255, 255, 0.10);
  --owm-theme-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  --owm-theme-toggle-bg: rgba(74, 80, 86, 0.96);
  --owm-theme-toggle-text: #f1ebe2;
  --owm-theme-toggle-hover: #555c63;
  --owm-theme-toggle-icon: #f1ebe2;
  color-scheme: dark;
}

html[data-theme="light"] {
  color-scheme: light;
}

body,
body.public-page {
  background-color: var(--owm-theme-bg);
  color: var(--owm-theme-text);
}

html[data-theme="light"] .search-edit,
html[data-theme="light"] .wp-block-search__input,
html[data-theme="light"] input[type="search"] {
  background-color: var(--owm-theme-surface) !important;
  color: var(--owm-theme-text) !important;
  border-color: var(--owm-theme-border) !important;
  -webkit-text-fill-color: var(--owm-theme-text) !important;
  box-shadow: none !important;
}

html[data-theme="light"] .search-submit,
html[data-theme="light"] .wp-block-search__button,
html[data-theme="light"] form.search-form button {
  background-color: var(--owm-theme-accent) !important;
  color: #fffdf9 !important;
  border-color: var(--owm-theme-border) !important;
  box-shadow: none !important;
}

#header-container,
#header,
#footer,
#main,
#sidebar,
.mobile-header-menu-buttons,
.mobile-menu-buttons {
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Header logo fallback and nav flattening after live markup returned to logo-text. */
#header .logo.logo-header.logo-text,
#header .logo.logo-header.logo-image {
  text-align: center;
}

body.home .logo.logo-header.logo-text {
  box-sizing: border-box;
}

#navi .caption-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

#navi .item-description,
#navi .sub-caption {
  display: none !important;
}

#navi .item-label {
  display: block;
  line-height: 1.15;
}

@media screen and (min-width: 835px) {
  #navi .navi-in > .menu-header {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: center;
    align-items: stretch;
  }

  #navi .navi-in > .menu-mobile {
    display: none !important;
  }

  #navi .navi-in > .menu-header > li {
    flex: 0 1 auto;
    min-width: 0;
  }

  #navi .navi-in > .menu-header > li > a {
    padding-left: 6px !important;
    padding-right: 6px !important;
    white-space: nowrap;
  }

  #navi .item-label {
    font-family: "Zen Kaku Gothic Antique", sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.01em;
  }
}

@media screen and (max-width: 834px) {
  #navi .navi-in > .menu-header {
    display: none !important;
  }

  #navi .navi-in > .menu-mobile {
    display: flex !important;
  }
}

html[data-theme="dark"] body,
html[data-theme="dark"] body.public-page {
  background-color: var(--owm-theme-bg) !important;
  color: var(--owm-theme-text) !important;
}

html[data-theme="dark"] #header-container,
html[data-theme="dark"] #header-container .navi,
html[data-theme="dark"] #navi,
html[data-theme="dark"] #navi .navi-in > .menu-header .sub-menu,
html[data-theme="dark"] #footer,
html[data-theme="dark"] #main,
html[data-theme="dark"] #sidebar,
html[data-theme="dark"] .appeal-content,
html[data-theme="dark"] .article .toc,
html[data-theme="dark"] .author-box,
html[data-theme="dark"] .widget {
  background-color: var(--owm-theme-surface) !important;
  color: var(--owm-theme-text) !important;
  border-color: var(--owm-theme-border) !important;
  box-shadow: var(--owm-theme-shadow);
}

html[data-theme="dark"] #header-container,
html[data-theme="dark"] #header,
html[data-theme="dark"] #navi,
html[data-theme="dark"] .mobile-header-menu-buttons,
html[data-theme="dark"] .mobile-menu-buttons {
  background-color: var(--owm-theme-nav-surface) !important;
}

html[data-theme="dark"] .header,
html[data-theme="dark"] .header .site-name-text,
html[data-theme="dark"] #navi .navi-in a,
html[data-theme="dark"] #navi .navi-in a:hover,
html[data-theme="dark"] #navi .menu-mobile > li > a,
html[data-theme="dark"] #navi .menu-mobile .item-label,
html[data-theme="dark"] #navi .menu-mobile .item-description,
html[data-theme="dark"] .mobile-menu-buttons .menu-button-in,
html[data-theme="dark"] .mobile-menu-buttons .menu-button-in *,
html[data-theme="dark"] .mobile-header-menu-buttons .menu-button-in,
html[data-theme="dark"] .mobile-header-menu-buttons .menu-button-in *,
html[data-theme="dark"] #footer,
html[data-theme="dark"] #footer a:not(.sns-button),
html[data-theme="dark"] .article,
html[data-theme="dark"] .article p,
html[data-theme="dark"] .article li,
html[data-theme="dark"] .article dd,
html[data-theme="dark"] .article dt,
html[data-theme="dark"] .widget,
html[data-theme="dark"] .toc a,
html[data-theme="dark"] .toc-title,
html[data-theme="dark"] .search-edit,
html[data-theme="dark"] .wp-block-search__input,
html[data-theme="dark"] .archive-title,
html[data-theme="dark"] .article-title,
html[data-theme="dark"] .entry-title,
html[data-theme="dark"] .archive-description,
html[data-theme="dark"] .archive-description p,
html[data-theme="dark"] .page-title,
html[data-theme="dark"] .breadcrumb a,
html[data-theme="dark"] .breadcrumb span {
  color: var(--owm-theme-text) !important;
}

html[data-theme="dark"] #navi,
html[data-theme="dark"] .mobile-header-menu-buttons,
html[data-theme="dark"] .mobile-menu-buttons,
html[data-theme="dark"] .mobile-footer-menu-buttons,
html[data-theme="dark"] .footer-mobile-buttons {
  border-color: var(--owm-theme-border) !important;
}

html[data-theme="dark"] .entry-content h2,
html[data-theme="dark"] .entry-content h3,
html[data-theme="dark"] .entry-content h4,
html[data-theme="dark"] .article h2:not(.entry-card-title):not(.related-entry-card-title):not(.ect-entry-card-title),
html[data-theme="dark"] .article h3:not(.entry-card-title):not(.related-entry-card-title):not(.ect-entry-card-title),
html[data-theme="dark"] .article h4:not(.entry-card-title):not(.related-entry-card-title):not(.ect-entry-card-title),
html[data-theme="dark"] .sidebar h3,
html[data-theme="dark"] .widget-title {
  background: transparent !important;
  color: var(--owm-theme-text) !important;
  border-color: transparent !important;
}

html[data-theme="dark"] .entry-content h2,
html[data-theme="dark"] .entry-content h3,
html[data-theme="dark"] .entry-content h4 {
  box-shadow: none !important;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.article h1,
.article h2,
.article h3,
.article h4,
.archive-title,
.page-title,
.entry-title,
.wp-block-heading,
.widget-title,
.sidebar h3,
.owm-carousel-title {
  background: transparent !important;
  background-color: transparent !important;
  border-left: none !important;
  box-shadow: none !important;
  padding-left: 0 !important;
}

.entry-content h1 mark,
.entry-content h2 mark,
.entry-content h3 mark,
.entry-content h4 mark,
.article h1 mark,
.article h2 mark,
.article h3 mark,
.article h4 mark,
.wp-block-heading mark,
.wp-block-heading .has-inline-color {
  color: inherit !important;
  background: transparent !important;
  background-color: transparent !important;
}

html[data-theme="dark"] .a-wrap,
html[data-theme="dark"] .a-wrap h1,
html[data-theme="dark"] .a-wrap h2,
html[data-theme="dark"] .a-wrap h3,
html[data-theme="dark"] .a-wrap p,
html[data-theme="dark"] .a-wrap span,
html[data-theme="dark"] .a-wrap time,
html[data-theme="dark"] .entry-card-title,
html[data-theme="dark"] .entry-card-snippet,
html[data-theme="dark"] .related-entry-card-title,
html[data-theme="dark"] .related-entry-card-snippet,
html[data-theme="dark"] .new-entry-card-title,
html[data-theme="dark"] .new-entry-card-snippet,
html[data-theme="dark"] .ect-entry-card-title,
html[data-theme="dark"] .ect-entry-card-snippet,
html[data-theme="dark"] .blogcard-title,
html[data-theme="dark"] .blogcard-snippet,
html[data-theme="dark"] .post-date,
html[data-theme="dark"] .cat-label,
html[data-theme="dark"] .card-content,
html[data-theme="dark"] .entry-card-content {
  color: var(--owm-theme-text) !important;
}

html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .sidebar p,
html[data-theme="dark"] .sidebar li,
html[data-theme="dark"] .sidebar span,
html[data-theme="dark"] .sidebar strong,
html[data-theme="dark"] .sidebar a,
html[data-theme="dark"] .widget p,
html[data-theme="dark"] .widget li,
html[data-theme="dark"] .widget span,
html[data-theme="dark"] .widget strong,
html[data-theme="dark"] .widget a,
html[data-theme="dark"] .widget_recent_entries a,
html[data-theme="dark"] .swiper-slide,
html[data-theme="dark"] .swiper-slide * {
  color: var(--owm-theme-text) !important;
}

html[data-theme="dark"] #post-622 .blank-box.block-box,
html[data-theme="dark"] #post-622 .blank-box.block-box *,
html[data-theme="dark"] #post-622 .wp-block-cocoon-blocks-blank-box-1,
html[data-theme="dark"] #post-622 .wp-block-cocoon-blocks-blank-box-1 * {
  color: var(--owm-theme-text) !important;
}

html[data-theme="dark"] #post-622 .blank-box.block-box,
html[data-theme="dark"] #post-622 .wp-block-cocoon-blocks-blank-box-1 {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border-color: rgba(60, 42, 26, 0.16) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] #post-622 .blank-box.block-box *,
html[data-theme="dark"] #post-622 .wp-block-cocoon-blocks-blank-box-1 * {
  color: #3c2a1a !important;
}

html[data-theme="dark"] .entry-content .wp-block-cocoon-blocks-blank-box-1.blank-box.block-box {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border-color: rgba(60, 42, 26, 0.16) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .entry-content .wp-block-cocoon-blocks-blank-box-1.blank-box.block-box *,
html[data-theme="dark"] .entry-content .wp-block-cocoon-blocks-blank-box-1.blank-box.block-box p,
html[data-theme="dark"] .entry-content .wp-block-cocoon-blocks-blank-box-1.blank-box.block-box strong {
  color: #3c2a1a !important;
}

html[data-theme="dark"] #post-2387 .blank-box.block-box,
html[data-theme="dark"] #post-2387 .wp-block-cocoon-blocks-blank-box-1,
html[data-theme="dark"] #post-2387 .blogcard-wrap,
html[data-theme="dark"] #post-2387 .blogcard,
html[data-theme="dark"] #post-2387 .blogcard-type,
html[data-theme="dark"] #post-2387 .bct-check {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border-color: rgba(60, 42, 26, 0.16) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] #post-2387 .blank-box.block-box *,
html[data-theme="dark"] #post-2387 .wp-block-cocoon-blocks-blank-box-1 *,
html[data-theme="dark"] #post-2387 .blogcard-title,
html[data-theme="dark"] #post-2387 .blogcard-snippet,
html[data-theme="dark"] #post-2387 .blogcard-label,
html[data-theme="dark"] #post-2387 .internal-blogcard-label,
html[data-theme="dark"] #post-2387 .blogcard-label.internal-blogcard-label,
html[data-theme="dark"] #post-2387 .blogcard * {
  color: #3c2a1a !important;
}

html[data-theme="dark"] .blank-box.block-box,
html[data-theme="dark"] .wp-block-cocoon-blocks-blank-box-1 {
  background: rgba(74, 80, 86, 0.38) !important;
  background-color: rgba(74, 80, 86, 0.38) !important;
  border-color: var(--owm-theme-border) !important;
}

html[data-theme="dark"] .blank-box.block-box *,
html[data-theme="dark"] .wp-block-cocoon-blocks-blank-box-1 *,
html[data-theme="dark"] .new-entry-card-title,
html[data-theme="dark"] .new-entry-card-title *,
html[data-theme="dark"] .entry-card-title,
html[data-theme="dark"] .entry-card-title * {
  color: var(--owm-theme-text) !important;
}

html[data-theme="dark"] body.home .owm-card,
html[data-theme="dark"] body.home .owm-card-title,
html[data-theme="dark"] body.home .owm-card-title span,
html[data-theme="dark"] body.home .owm-card-title *,
html[data-theme="dark"] body.home .owm-card--more,
html[data-theme="dark"] body.home .owm-card--more .owm-card-title,
html[data-theme="dark"] body.home .owm-card-thumb__arrow {
  color: #3c2a1a !important;
}

html[data-theme="light"] .wp-block-search__input,
html[data-theme="light"] .wp-block-search__button {
  background-image: none !important;
}

html[data-theme="dark"] .toc-title,
html[data-theme="dark"] .search-submit,
html[data-theme="dark"] .appeal-content .appeal-button {
  background-color: var(--owm-theme-accent) !important;
  color: #fffdf9 !important;
  border-color: var(--owm-theme-border) !important;
}

html[data-theme="dark"] .tagcloud a,
html[data-theme="dark"] .page-numbers,
html[data-theme="dark"] .comment-reply-link {
  color: var(--owm-theme-text) !important;
  background-color: var(--owm-theme-surface-soft) !important;
  border-color: var(--owm-theme-border) !important;
}

html[data-theme="dark"] .wp-block-search__input,
html[data-theme="dark"] .search-edit,
html[data-theme="dark"] input[type="search"] {
  background-color: var(--owm-theme-surface-soft) !important;
  color: var(--owm-theme-text) !important;
  border-color: var(--owm-theme-border) !important;
}

html[data-theme="dark"] .toc li .current {
  background-color: #544a47 !important;
  color: #f6efe5 !important;
}

.owm-theme-toggle-host .menu-button-in,
.owm-theme-toggle {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 100%;
  min-height: 52px;
  margin: 0;
  padding: 6px 8px 7px;
  border: 0;
  border-radius: 0;
  background: var(--owm-theme-toggle-bg);
  color: var(--owm-theme-toggle-text);
  cursor: pointer;
  font: inherit;
  box-shadow: inset 0 0 0 1px var(--owm-theme-border);
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.owm-theme-toggle-host .menu-button-in:hover,
.owm-theme-toggle-host .menu-button-in:focus-visible,
.owm-theme-toggle:hover,
.owm-theme-toggle:focus-visible {
  background: var(--owm-theme-toggle-hover);
  color: var(--owm-theme-toggle-text);
}

.owm-theme-toggle__icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: inline-block;
  color: var(--owm-theme-toggle-icon);
}

.owm-theme-toggle__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.owm-theme-toggle__label {
  display: block;
  font-size: 7px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.04em;
  opacity: 0.8;
}

/* Mobile drawer: cloned sidebar widgets (applies at any viewport) */
.sidebar-menu-content .owm-mobile-sidebar-widget {
  display: block !important;
  width: 100% !important;
  margin: 0 0 8px !important;
  padding: 8px 12px !important;
  box-sizing: border-box;
}

.sidebar-menu-content .owm-mobile-sidebar-widget .widget-sidebar-scroll,
.sidebar-menu-content .owm-mobile-sidebar-widget .toc,
.sidebar-menu-content .owm-mobile-sidebar-widget .textwidget {
  position: static !important;
  width: auto !important;
  max-width: 100% !important;
}

.sidebar-menu-content .owm-mobile-sidebar-widget img {
  max-width: 100% !important;
  height: auto !important;
  /* Prevent upscaling beyond the image's natural resolution */
  image-rendering: auto;
}

/* Remove extra bottom margin on search form inside drawer */
.sidebar-menu-content .owm-mobile-sidebar-widget form.wp-block-search,
.sidebar-menu-content .owm-mobile-sidebar-widget .wp-block-search {
  margin-bottom: 0 !important;
}

/* Keep drawer images at their natural size to avoid blurry upscaling */
.sidebar-menu-content .owm-mobile-sidebar-widget .textwidget img {
  width: auto !important;
  max-width: 100% !important;
}

@media screen and (min-width: 481px) and (max-width: 1260px) {
  .content,
  .content-in,
  body #content-in {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: flex-start;
  }

  #main,
  .main,
  #sidebar,
  .sidebar {
    float: none !important;
  }

  #main,
  .main {
    width: calc(100% - 280px) !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    margin-right: 24px !important;
  }

  #sidebar,
  .sidebar {
    display: block !important;
    width: 256px !important;
    flex: 0 0 256px !important;
    margin-top: 0 !important;
    clear: none !important;
    min-width: 0 !important;
  }

  .owm-sidebar-toggle-slot:not(.is-hidden) {
    position: sticky;
    z-index: 50;
  }
}

@media screen and (min-width: 1024px) and (max-width: 1260px) {
  #main,
  .main {
    width: calc(100% - 304px) !important;
  }

  #sidebar,
  .sidebar {
    width: 280px !important;
    flex-basis: 280px !important;
  }
}

/* ===== Slider text overlay ===== */
.oisy-slide a {
  position: relative;
  display: block;
}

.oisy-slide-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
  padding: 32px 24px 40px;  /* bottom padding increased to clear dots */
  display: flex;
  flex-direction: column;
  gap: 4px;
  pointer-events: none;
  z-index: 2;
}

/* 【非表示中 2026-03-26】オーバーレイ全体（影＋タイトル）を一時的に消しています。
   再表示するには .oisy-slide-overlay の display:none; 行を削除してください。
   JS側(javascript.js の appendOverlay 関数)はそのまま残してあるので
   CSS を戻すだけで即復活します。 */
.oisy-slide-overlay {
  display: none;  /* ← この行を削除すると再表示 */
}

.oisy-slide-overlay-title {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.oisy-slide-overlay-desc {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

@media screen and (max-width: 480px) {
  .oisy-slide-overlay {
    padding: 20px 12px 10px;
  }
  .oisy-slide-overlay-title {
    font-size: 15px;
  }
  .oisy-slide-overlay-desc {
    font-size: 12px;
  }
  #oisy-slider-wrap .oisy-dots {
    display: none !important;
  }
}

/* ===== 習熟度ナビ（Level Navigation） ===== */
.owm-level-nav {
  margin: 0 0 2rem;
  padding: 0;
}

.owm-level-nav__heading {
  display: block;
  text-align: left;
  padding-left: 0.6rem;
  background: #26292b !important;
  color: #ffffff !important;
  font-size: 0.85rem;
  font-weight: bold;
  letter-spacing: 0.05em;
  padding: 0.3rem 0 !important;
  margin: 0.1rem 0 0 !important;
}

.owm-level-nav__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  row-gap: 8px;
  column-gap: 8px;
}

.owm-level-nav__card {
  display: block;
  overflow: hidden;
  border-radius: 8px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.owm-level-nav__card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.owm-level-nav__video {
  width: 100%;
  height: auto;
  display: block;
}

.owm-level-nav__label {
  background: #CBD2D2;
  text-align: center;
  padding: 0.4rem 0.5rem 0.5rem;
  font-size: 0.8rem;
  font-weight: bold;
  color: #3c2a1a;
  line-height: 1.4;
  margin: 0 !important;
  border-radius: 0 0 8px 8px;
}

/* ===== owm_carousel ショートコード ===== */

.owm-carousel-section {
  margin: 2rem 0;
  overflow: hidden;
}

.owm-carousel-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  padding: 0;
  color: #3c2a1a;
  line-height: 1.4;
  /* h2 のデフォルトスタイルをリセット */
  border-bottom: none;
  background: none;
}

.owm-carousel-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  padding-bottom: 12px;
}

/* スクロールバーを細く（Webkit 系） */
.owm-carousel-row::-webkit-scrollbar {
  height: 4px;
}
.owm-carousel-row::-webkit-scrollbar-track {
  background: #f5f0eb;
  border-radius: 2px;
}
.owm-carousel-row::-webkit-scrollbar-thumb {
  background: #c7b299;
  border-radius: 2px;
}

.owm-card {
  flex: 0 0 130px;
  width: 130px;
  text-decoration: none;
  color: inherit;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  scroll-snap-align: start;
  transition: transform 0.2s, box-shadow 0.2s;
  display: block;
}

.owm-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
  text-decoration: none;
  color: inherit;
}

/* 縦画像（3:4）に最適化したサムネイル */
.owm-card-thumb {
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #e8e0d8;
}

.owm-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.owm-card-thumb__placeholder {
  width: 100%;
  height: 100%;
  background: #e8e0d8;
}

.owm-card-title {
  padding: 8px 10px 10px;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  color: #3c2a1a;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media screen and (min-width: 768px) {
  .owm-card {
    flex: 0 0 160px;
    width: 160px;
  }

  .owm-carousel-title {
    font-size: 1.2rem;
  }

  .owm-card-title {
    font-size: 13px;
  }
}

main .wp-block-heading,
h1.wp-block-heading,
h2.wp-block-heading,
h3.wp-block-heading,
h4.wp-block-heading {
  border-left: 0 !important;
  padding-left: 0 !important;
  box-shadow: none !important;
}

body.home.page-id-4016 .entry-content h2.wp-block-heading,
body.home.page-id-4016 .entry-content h3.wp-block-heading {
  border: none !important;
  border-left: 0 !important;
  padding-left: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

html[data-theme="dark"] body #header-container,
html[data-theme="dark"] body #header-container .navi,
html[data-theme="dark"] body #header,
html[data-theme="dark"] body nav#navi,
html[data-theme="dark"] body #navi,
html[data-theme="dark"] body .mobile-header-menu-buttons,
html[data-theme="dark"] body .mobile-menu-buttons,
html[data-theme="dark"] body .mobile-footer-menu-buttons,
html[data-theme="dark"] body .footer-mobile-buttons {
  background: var(--owm-theme-nav-surface) !important;
  background-color: var(--owm-theme-nav-surface) !important;
  color: var(--owm-theme-text) !important;
}

html[data-theme="dark"] body .entry-content h1,
html[data-theme="dark"] body .entry-content h2,
html[data-theme="dark"] body .entry-content h3,
html[data-theme="dark"] body .entry-content h4,
html[data-theme="dark"] body .entry-content h2.wp-block-heading,
html[data-theme="dark"] body .entry-content h3.wp-block-heading,
html[data-theme="dark"] body .article h1,
html[data-theme="dark"] body .article h2,
html[data-theme="dark"] body .article h3,
html[data-theme="dark"] body .article h4,
html[data-theme="dark"] body main h1,
html[data-theme="dark"] body main h2,
html[data-theme="dark"] body main h3,
html[data-theme="dark"] body main h4 {
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  border-left: 0 !important;
  padding-left: 0 !important;
  box-shadow: none !important;
}

/* ===== ピックアップ記事スライダー（#oisy-slider）コンテナ ===== */
#oisy-slider {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #1a1a1a;
  aspect-ratio: 40 / 21;
  max-height: 630px;
  cursor: pointer;
}

.oisy-slider-track {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  height: 100%;
  transition: transform 0.5s ease;
  will-change: transform;
}

.oisy-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
}

.oisy-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
}

.oisy-slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.4);
  color: #fff;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  z-index: 10;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  -webkit-user-select: none;
  user-select: none;
}
.oisy-slider-btn:hover {
  background: rgba(0,0,0,0.7);
}
.oisy-slider-prev { left: 12px; }
.oisy-slider-next { right: 12px; }

.oisy-slider-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}
.oisy-slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s;
}
.oisy-slider-dot.active {
  background: #fff;
}

@media (max-width: 700px) {
  #oisy-slider {
    aspect-ratio: 40 / 21;
  }
  .oisy-slider-btn {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }
  .oisy-slider-prev { left: 6px; }
  .oisy-slider-next { right: 6px; }
}
