@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
*/

/************************************
** 子テーマ用のスタイルを書く
************************************/

/************************************
** レスポンシブデザイン用のメディアクエリ
************************************/
/*1023px以下*/
@media screen and (max-width: 1023px){}
/*834px以下*/
@media screen and (max-width: 834px){}
/*480px以下*/
@media screen and (max-width: 480px){}

/* NMG サイドバー FF5チャプター一覧 */
.nmg-sidebar-ff5{margin:0;padding:0}
.nmg-sidebar-game{border:1px solid rgba(240,192,64,0.4);border-radius:6px;overflow:hidden;background:rgba(26,26,46,0.6)}
summary.nmg-sidebar-game-title{display:block;list-style:none;cursor:pointer;padding:10px 14px;font-weight:bold;font-size:0.95em;color:#f0c040;background:rgba(26,26,46,0.9);border-bottom:1px solid rgba(240,192,64,0.3);user-select:none}
summary.nmg-sidebar-game-title::-webkit-details-marker{display:none}
.nmg-sidebar-game[open]>summary.nmg-sidebar-game-title::before{content:""}
.nmg-sidebar-game:not([open])>summary.nmg-sidebar-game-title::before{content:""}
.nmg-sidebar-list{list-style:none;margin:0;padding:6px 0}
.nmg-sidebar-list li{margin:0;border-bottom:1px solid rgba(255,255,255,0.06)}
.nmg-sidebar-list li:last-child{border-bottom:none}
.nmg-sidebar-list li a{display:block;padding:8px 14px;color:#cce0ff;font-size:0.88em;text-decoration:none;transition:background 0.2s,color 0.2s}
.nmg-sidebar-list li a:hover{background:rgba(240,192,64,0.15);color:#f0c040}

/* NMG トップページ */
.home .article-title,.home .entry-title,.home .page-header{display:none}
.home .byline,.home .posted-on,.home .entry-meta,.home .article-info-area{display:none !important}
.nmg-top-hero{text-align:center;padding:20px 20px 14px;border-bottom:2px solid rgba(240,192,64,0.3);margin-bottom:24px}
.nmg-top-hero h2{font-size:1.1em;color:#aaa;margin-bottom:6px;letter-spacing:0.1em}
.nmg-top-hero p{font-size:0.9em;color:#bbb}
.nmg-game-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:20px;padding:0 0 30px}
.nmg-game-card{border:1px solid rgba(240,192,64,0.35);border-radius:10px;overflow:hidden;background:rgba(26,26,46,0.75);transition:transform 0.2s,box-shadow 0.2s;display:flex;flex-direction:column}
.nmg-game-card:hover{transform:translateY(-3px);box-shadow:0 6px 20px rgba(240,192,64,0.25)}
.nmg-game-card-thumb-placeholder{width:100%;padding:20px 0;background:linear-gradient(135deg,#1a1a2e 0%,#2a2a4e 100%);display:flex;align-items:center;justify-content:center;font-size:2.5em}
.nmg-game-card-body{padding:14px;flex:1}
.nmg-game-card-title{font-size:1em;font-weight:bold;color:#f0c040;margin-bottom:8px}
.nmg-game-card-desc{font-size:0.82em;color:#aaa;margin-bottom:10px}
.nmg-chapter-list-inline{margin:8px 0 0;padding:0;list-style:none}
.nmg-chapter-list-inline li{padding:5px 0;border-bottom:1px solid rgba(255,255,255,0.07)}
.nmg-chapter-list-inline li:last-child{border-bottom:none}
.nmg-chapter-list-inline li a{font-size:0.84em;color:#cce0ff;text-decoration:none}
.nmg-chapter-list-inline li a:hover{color:#f0c040}

/* サイドバー背景色をホームページカラーと統一 */
.sidebar{background-color:#243560 !important;}


/* nmg-item内の空pタグによる余白を除去 */
.nmg-item p:empty {
  display: none;
  margin: 0;
}
/* nmg-detail内のpタグ下余白を除去 */
.nmg-detail p {
  margin-bottom: 0;
}
/* 章間ナビゲーションボタン */
.nmg-nav {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 2px solid #2a5a8a;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.nmg-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: bold;
  font-size: 0.9em;
  text-decoration: none;
  text-align: center;
  line-height: 1.4;
}
.nmg-nav-prev {
  flex: 1;
  background: #1a3a6a;
  color: #f0c840 !important;
  border: 1px solid rgba(240,200,80,0.3);
  justify-content: flex-start !important;
}
.nmg-nav-list {
  flex: 0 0 auto;
  width: 70px;
  background: #243560;
  color: #f0c840 !important;
  border: 1px solid rgba(240,200,80,0.3);
}
.nmg-nav-next {
  flex: 1;
  background: #1a3a6a;
  color: #f0c840 !important;
  border: 1px solid rgba(240,200,80,0.3);
  justify-content: flex-end !important;
}
.nmg-nav-prev:hover, .nmg-nav-list:hover, .nmg-nav-next:hover {
  opacity: 0.85;
}
/* nmg-navのwpautop自動brを非表示 */
.nmg-nav br {
  display: none;
}
/* nmg-navのwpautop自動brを非表示 */
.nmg-nav br {
  display: none;
}
/* モバイルフッターバーの重複導線を非表示（ヘッダーメニューと重複するメニューボタン・サイドバーボタン） */
/* ホーム・検索・トップの3ボタンは機能的なので残す */
.navi-menu-button,
.sidebar-menu-button {
  display: none !important;
}
/* モバイルフッターバーをサイトカラー（濃紺）に変更 */
.mobile-menu-buttons {
  background: #1a2a4a !important;
  box-shadow: rgba(0, 0, 0, 0.5) 0px -2px 8px !important;
  border-top: 1px solid rgba(240, 200, 80, 0.3) !important;
}
.mobile-menu-buttons .menu-button > a,
.mobile-menu-buttons .menu-button > label {
  color: #f0c840 !important;
}
.mobile-menu-buttons .menu-caption {
  color: rgba(240, 200, 80, 0.8) !important;
}
.mobile-menu-buttons .menu-icon span {
  color: #f0c840 !important;
}

/* ホームページのゲーム選択カード見出し */
body.home .article .wp-block-columns .wp-block-group > h3.wp-block-heading {
  background: transparent;
  border: 0;
  border-left: 4px solid #f5c842;
  padding: 0.35rem 0 0.35rem 0.8rem;
}

/* NMG 通常チャプター: スマートフォン上部UI */
.nmg-mobile-settings,
.nmg-mobile-settings-panel {
  display: contents;
}
.nmg-mobile-settings-toggle,
.nmg-mobile-settings-summary,
.nmg-mobile-toc-toggle,
.nmg-mobile-resume-wrap,
.nmg-mobile-quickbar {
  display: none;
}

@media screen and (max-width: 767px) and (hover: none),
       screen and (max-width: 767px) and (pointer: coarse) {
  body.nmg-normal-chapter .entry-title {
    margin-top: 8px;
    margin-bottom: 6px;
    font-size: 19px;
    line-height: 1.35;
  }
  body.nmg-normal-chapter .eye-catch {
    width: 100%;
    height: 132px;
    min-height: 132px;
    margin: 0 0 12px;
    overflow: hidden;
    border-radius: 6px;
  }
  body.nmg-normal-chapter .eye-catch img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 35%;
  }
  body.nmg-normal-chapter .eye-catch .cat-label {
    display: none !important;
  }
  body.nmg-normal-chapter .entry-content {
    padding-top: 0;
  }
  body.nmg-normal-chapter .entry-content > p:first-child {
    margin-top: 8px;
    margin-bottom: 10px;
    font-size: 15px;
    line-height: 1.6;
  }
  body.nmg-normal-chapter .entry-content > p:first-child + p {
    margin-top: 0;
    margin-bottom: 10px;
  }

  html.nmg-mobile-ui-loading body.nmg-normal-chapter .nmg-filter,
  html.nmg-mobile-ui-loading body.nmg-normal-chapter .nmg-check-all-controls,
  html.nmg-mobile-ui-loading body.nmg-normal-chapter .nmg-detail-controls,
  html.nmg-mobile-ui-loading body.nmg-normal-chapter #toc .toc-checkbox,
  html.nmg-mobile-ui-loading body.nmg-normal-chapter #toc .toc-title,
  html.nmg-mobile-ui-loading body.nmg-normal-chapter #toc .toc-content {
    display: none !important;
  }

  html.nmg-mobile-ui-ready body.nmg-normal-chapter .nmg-mobile-settings {
    display: block;
    margin: 10px 0 8px;
  }
  html.nmg-mobile-ui-ready body.nmg-normal-chapter .nmg-mobile-settings-toggle,
  html.nmg-mobile-ui-ready body.nmg-normal-chapter .nmg-mobile-toc-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 44px;
    margin: 0;
    padding: 9px 12px;
    border: 1px solid rgba(245, 200, 66, 0.55);
    border-radius: 7px;
    background: #2b416f;
    color: #fff8e0;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    text-align: left;
    cursor: pointer;
  }
  html.nmg-mobile-ui-ready body.nmg-normal-chapter .nmg-mobile-settings-toggle::after,
  html.nmg-mobile-ui-ready body.nmg-normal-chapter .nmg-mobile-toc-toggle::after {
    content: "▼";
    margin-left: 10px;
    color: #f5c842;
    font-size: 12px;
  }
  html.nmg-mobile-ui-ready body.nmg-normal-chapter .nmg-mobile-settings.is-open > .nmg-mobile-settings-toggle::after,
  html.nmg-mobile-ui-ready body.nmg-normal-chapter #toc.nmg-mobile-toc-open > .nmg-mobile-toc-toggle::after {
    content: "▲";
  }
  html.nmg-mobile-ui-ready body.nmg-normal-chapter .nmg-mobile-settings-summary {
    display: block;
    margin: 5px 3px 0;
    color: rgba(240, 232, 208, 0.78);
    font-size: 12px;
    line-height: 1.4;
  }
  html.nmg-mobile-ui-ready body.nmg-normal-chapter .nmg-mobile-settings.is-open > .nmg-mobile-settings-summary {
    display: none;
  }
  html.nmg-mobile-ui-ready body.nmg-normal-chapter .nmg-mobile-settings-panel {
    display: none !important;
  }
  html.nmg-mobile-ui-ready body.nmg-normal-chapter .nmg-mobile-settings.is-open > .nmg-mobile-settings-panel {
    display: block !important;
    margin-top: 8px;
  }
  html.nmg-mobile-ui-ready body.nmg-normal-chapter .nmg-mobile-settings-panel > .nmg-filter {
    margin: 0 0 8px !important;
    padding: 10px !important;
  }
  html.nmg-mobile-ui-ready body.nmg-normal-chapter .nmg-mobile-settings-panel > .nmg-check-all-controls {
    margin: 8px 0 !important;
  }
  html.nmg-mobile-ui-ready body.nmg-normal-chapter .nmg-mobile-settings-panel > .nmg-detail-controls {
    margin: 8px 0 0 !important;
    padding: 9px !important;
  }

  html.nmg-mobile-ui-ready body.nmg-normal-chapter #toc {
    display: block !important;
    width: auto !important;
    margin: 8px 0 12px !important;
    padding: 0 !important;
    border: 1px solid rgba(245, 200, 66, 0.35);
    border-radius: 7px;
    overflow: hidden;
  }
  html.nmg-mobile-ui-ready body.nmg-normal-chapter #toc .toc-checkbox,
  html.nmg-mobile-ui-ready body.nmg-normal-chapter #toc .toc-title {
    display: none !important;
  }
  html.nmg-mobile-ui-ready body.nmg-normal-chapter #toc .toc-content {
    display: none !important;
    margin: 0 !important;
    padding: 8px 12px 10px !important;
  }
  html.nmg-mobile-ui-ready body.nmg-normal-chapter #toc.nmg-mobile-toc-open .toc-content {
    display: block !important;
  }

  html.nmg-mobile-ui-ready body.nmg-normal-chapter .nmg-mobile-resume-wrap.is-visible {
    display: block;
    margin: 8px 0;
  }
  body.nmg-normal-chapter .nmg-mobile-resume-button {
    width: 100%;
    min-height: 42px;
    padding: 8px 12px;
    border: 1px solid rgba(245, 200, 66, 0.4);
    border-radius: 7px;
    background: rgba(245, 200, 66, 0.08);
    color: #f5e090;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
  }

  body.nmg-normal-chapter .entry-content > h2:first-of-type {
    margin-top: 12px !important;
  }
  body.nmg-normal-chapter .entry-content h2,
  body.nmg-normal-chapter .nmg-item,
  body.nmg-normal-chapter #toc,
  body.nmg-normal-chapter .nmg-mobile-settings {
    scroll-margin-top: 76px;
  }

  html.nmg-mobile-ui-ready body.nmg-normal-chapter .nmg-mobile-quickbar {
    position: fixed;
    left: 50%;
    bottom: calc(var(--nmg-mobile-menu-height, 0px) + env(safe-area-inset-bottom) + 6px);
    transform: translateX(-50%);
    display: flex;
    width: min(300px, calc(100vw - 24px));
    min-height: 42px;
    padding: 4px;
    gap: 4px;
    border: 1px solid rgba(245, 200, 66, 0.45);
    border-radius: 9px;
    background: rgba(26, 42, 74, 0.96);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.28);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.16s ease;
    z-index: 30;
  }
  html.nmg-mobile-ui-ready body.nmg-normal-chapter .nmg-mobile-quickbar.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  body.nmg-normal-chapter .nmg-mobile-quickbar button {
    flex: 1;
    min-height: 36px;
    padding: 6px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #f5e090;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
  }
  body.nmg-normal-chapter .nmg-mobile-quickbar button:hover,
  body.nmg-normal-chapter .nmg-mobile-quickbar button:focus-visible,
  body.nmg-normal-chapter .nmg-mobile-settings-toggle:focus-visible,
  body.nmg-normal-chapter .nmg-mobile-toc-toggle:focus-visible,
  body.nmg-normal-chapter .nmg-mobile-resume-button:focus-visible {
    outline: 2px solid #f5c842;
    outline-offset: 2px;
  }
}

@media screen and (max-width: 767px) and (orientation: landscape) {
  html.nmg-mobile-ui-ready body.nmg-normal-chapter .nmg-mobile-quickbar {
    width: min(280px, calc(100vw - 20px));
  }
}


/* NMG カテゴリー色分け試験: nmg-category-colors-enabled があるページのみ */
body.nmg-category-colors-enabled {
  --nmg-item-color: #2563eb;
  --nmg-item-bg: #eff6ff;
  --nmg-item-label-color: #1d4ed8;
  --nmg-item-wash: rgba(37, 99, 235, 0.12);
  --nmg-item-checked: rgba(37, 99, 235, 0.65);
  --nmg-monster-color: #d97706;
  --nmg-monster-bg: #fff7ed;
  --nmg-monster-label-color: #92400e;
  --nmg-monster-wash: rgba(217, 119, 6, 0.12);
  --nmg-monster-checked: rgba(217, 119, 6, 0.65);
  --nmg-other-color: #64748b;
  --nmg-other-bg: #f8fafc;
  --nmg-other-label-color: #475569;
  --nmg-other-wash: rgba(100, 116, 139, 0.12);
  --nmg-other-checked: rgba(100, 116, 139, 0.65);
}

body.nmg-category-colors-enabled .nmg-item {
  --nmg-category-color: var(--nmg-other-color);
  --nmg-category-bg: var(--nmg-other-bg);
  --nmg-category-label-color: var(--nmg-other-label-color);
  --nmg-category-wash: var(--nmg-other-wash);
  --nmg-category-checked: var(--nmg-other-checked);
  border-left: 4px solid var(--nmg-category-color) !important;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

body.nmg-category-colors-enabled .nmg-item[data-type~="collection"] {
  --nmg-category-color: var(--nmg-item-color);
  --nmg-category-bg: var(--nmg-item-bg);
  --nmg-category-label-color: var(--nmg-item-label-color);
  --nmg-category-wash: var(--nmg-item-wash);
  --nmg-category-checked: var(--nmg-item-checked);
}

body.nmg-category-colors-enabled .nmg-item[data-type~="monster"] {
  --nmg-category-color: var(--nmg-monster-color);
  --nmg-category-bg: var(--nmg-monster-bg);
  --nmg-category-label-color: var(--nmg-monster-label-color);
  --nmg-category-wash: var(--nmg-monster-wash);
  --nmg-category-checked: var(--nmg-monster-checked);
}

body.nmg-category-colors-enabled .nmg-item:hover {
  border-left-color: var(--nmg-category-color) !important;
  background: linear-gradient(90deg, var(--nmg-category-wash), rgba(245, 200, 66, 0.06) 34%) !important;
}

body.nmg-category-colors-enabled .nmg-category-label {
  display: inline-block;
  margin: 0 0.18em 0 0.42em;
  padding: 0.02em 0.42em;
  border: 1px solid var(--nmg-category-color);
  border-radius: 7px;
  background: var(--nmg-category-bg);
  color: var(--nmg-category-label-color);
  font-size: 0.8em;
  font-weight: 700;
  line-height: 1.45;
  white-space: nowrap;
  vertical-align: 0.06em;
}

body.nmg-category-colors-enabled .nmg-item.is-checked {
  opacity: 1 !important;
  border-left-color: var(--nmg-category-checked) !important;
}

body.nmg-category-colors-enabled .nmg-item.is-checked .nmg-text,
body.nmg-category-colors-enabled .nmg-item.is-checked .nmg-detail,
body.nmg-category-colors-enabled .nmg-item.is-checked .nmg-check {
  opacity: 0.46;
}

body.nmg-category-colors-enabled .nmg-item.is-checked .nmg-category-label {
  opacity: 0.68;
}

@media screen and (max-width: 480px) {
  body.nmg-category-colors-enabled .nmg-item {
    border-left-width: 4px !important;
  }
  body.nmg-category-colors-enabled .nmg-category-label {
    font-size: 0.78em;
    padding-inline: 0.34em;
  }
}
