/*
Theme Name: Cocoon Child Blue Matome
Description: 公式告知・記事サムネイル・反応まとめ用Cocoon子テーマ
Template: cocoon-master
Version: 0.6.5
Requires PHP: 8.0
*/

:root {
  --bm-navy: #102a43;
  --bm-cyan: #2bafd0;
  --bm-sky: #eaf7fb;
  --bm-paper: #f7f9fc;
  --bm-ink: #17212b;
  --bm-muted: #607484;
  --bm-border: #c9d7e2;
  --bm-amber: #e9a23b;
  --bm-blue: #1670c5;
  --bm-green: #18a878;
  --bm-purple: #7556d8;
  --bm-radius: 10px;
  --bm-space: 8px;
}

* { box-sizing: border-box; }
.bm-launch-note { padding: 24px; background: var(--bm-sky); border: 1px solid var(--bm-border); border-radius: 10px; }
.bm-launch-note h2 { font-size: clamp(20px, 3vw, 28px); margin: 16px 0; }
.bm-launch-note p { line-height: 1.9; }
.bm-widget h2 { font-size: 16px; margin-top: 0; }
.bm-widget .search-form { display: flex; flex-wrap: wrap; gap: 8px; }
.bm-widget input[type="search"] { width: 100%; max-width: 100%; min-width: 0; padding: 10px; }
.bm-widget label { min-width: 0; max-width: 100%; }
html { color-scheme: light; }
body {
  margin: 0;
  background: var(--bm-paper);
  color: var(--bm-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  line-height: 1.75;
}
a { color: #075ea8; text-underline-offset: 3px; }
a:hover, a:focus-visible { color: #003f73; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

.bm-top-rule { height: 5px; background: var(--bm-cyan); }
.bm-site-header { background: #fff; border-bottom: 1px solid var(--bm-border); }
.bm-header-inner, .bm-shell, .bm-footer-inner {
  width: min(1400px, calc(100% - 40px));
  margin-inline: auto;
}
.bm-header-inner { min-height: 108px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.bm-brand { color: var(--bm-navy); text-decoration: none; flex-shrink: 0; }
.bm-brand strong { display: block; font-size: clamp(24px, 3vw, 39px); line-height: 1.2; letter-spacing: .02em; }
.bm-brand small { display: block; margin-top: 7px; color: #38556d; font-size: 13px; }
.bm-nav ul { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.bm-nav a { display: block; padding: 10px 12px; color: var(--bm-ink); font-weight: 700; text-decoration: none; border-radius: 7px; white-space: nowrap; }
.bm-nav a:hover, .bm-nav a:focus-visible { background: var(--bm-sky); color: var(--bm-navy); }
.bm-nav .bm-policy-link { margin-left: 8px; color: #075ea8; border: 1px solid #075ea8; }
.bm-menu-toggle { display: none; border: 0; background: transparent; color: var(--bm-navy); font-size: 30px; }
.bm-info-bar { margin: 0; padding: 13px 20px; background: var(--bm-sky); color: var(--bm-navy); text-align: center; font-weight: 700; border-bottom: 1px solid #cbe9f1; }

.bm-shell { display: grid; grid-template-columns: minmax(0, 2.05fr) minmax(270px, .95fr); gap: 28px; padding-block: 28px 48px; }
.bm-main { min-width: 0; }
.bm-section { margin-bottom: 32px; }
.bm-section-title { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding-bottom: 8px; color: var(--bm-navy); font-size: 24px; line-height: 1.35; border-bottom: 2px solid var(--bm-navy); }
.bm-section-title::before { content: ""; width: 6px; height: 29px; background: var(--bm-cyan); border-radius: 3px; }
.bm-featured { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.bm-topic-card {
  min-height: 145px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  color: var(--bm-ink);
  background: #fff;
  border: 1px solid var(--bm-border);
  border-top: 9px solid var(--category-color, var(--bm-blue));
  border-radius: var(--bm-radius);
  text-decoration: none;
}
.bm-topic-card h3 { margin: 0; font-size: 19px; line-height: 1.55; }
.bm-badge { display: inline-flex; width: fit-content; padding: 2px 8px; color: #fff; background: var(--category-color, var(--bm-blue)); border-radius: 5px; font-size: 12px; font-weight: 700; }
.bm-badge--spoiler { color: #4d3100; background: #ffd992; }

.bm-article-list { display: grid; gap: 12px; }
.bm-article-card { display: grid; grid-template-columns: 132px minmax(0, 1fr); min-height: 150px; background: #fff; border: 1px solid var(--bm-border); border-radius: var(--bm-radius); overflow: hidden; }
.bm-article-card__block { display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, color-mix(in srgb, var(--category-color) 80%, #fff), var(--category-color)); font-size: 36px; font-weight: 800; }
.bm-article-card__body { padding: 17px 20px; }
.bm-article-card__meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 7px; color: var(--bm-muted); font-size: 12px; }
.bm-demo { padding: 1px 7px; border: 1px solid var(--bm-border); border-radius: 4px; background: #f3f6f8; }
.bm-article-card h2 { margin: 0 0 6px; color: var(--bm-ink); font-size: 20px; line-height: 1.45; }
.bm-article-card h2 a { color: inherit; text-decoration: none; }
.bm-article-card p { margin: 0; color: #435564; font-size: 14px; }
.bm-card-link { display: inline-block; margin-top: 8px; font-weight: 700; text-decoration: none; }

.bm-sidebar { display: grid; align-content: start; gap: 12px; }
.bm-widget, .bm-rakuten { background: #fff; border: 1px solid var(--bm-border); border-radius: var(--bm-radius); overflow: hidden; }
.bm-widget summary, .bm-widget h2, .bm-widget-heading { margin: 0; padding: 12px 16px; color: var(--bm-navy); font-size: 18px; font-weight: 800; border-bottom: 1px solid var(--bm-border); }
.bm-widget summary { cursor: default; list-style: none; }
.bm-widget summary::-webkit-details-marker { display: none; }
.bm-widget ul, .bm-rakuten ul { margin: 0; padding: 8px 16px 12px 34px; }
.bm-widget li { margin: 5px 0; }
.bm-widget a { color: var(--bm-ink); text-decoration: none; }
.bm-widget-heading { display: flex; align-items: center; justify-content: space-between; }
.bm-widget-heading h2 { padding: 0; border: 0; font-size: 18px; }
.bm-widget-heading span { padding: 2px 7px; color: #754900; background: #ffebb9; border-radius: 4px; font-size: 12px; font-weight: 800; }
.bm-rakuten li { margin-bottom: 12px; }
.bm-rakuten a { display: grid; grid-template-columns: 64px 1fr; gap: 10px; color: var(--bm-ink); text-decoration: none; }
.bm-rakuten img { width: 64px; height: 64px; object-fit: contain; }
.bm-rakuten small { display: block; color: var(--bm-muted); }
.bm-rakuten p, .bm-rakuten__empty { margin: 8px 16px 14px; font-size: 12px; color: var(--bm-muted); }

.bm-single { background: #fff; padding: 28px clamp(18px, 4vw, 42px); border: 1px solid var(--bm-border); border-radius: var(--bm-radius); }
.bm-single h1 { margin-top: 0; color: var(--bm-navy); font-size: clamp(26px, 4vw, 38px); line-height: 1.45; }
.bm-summary { padding: 20px; background: var(--bm-sky); border-left: 5px solid var(--bm-cyan); border-radius: 0 8px 8px 0; }
.bm-response { margin: 14px 0; padding: 16px 18px; background: #f7f9fc; border: 1px solid var(--bm-border); border-left: 4px solid var(--category-color, var(--bm-cyan)); border-radius: 7px; }
.bm-response p { margin: 0; }
.bm-response cite { display: block; margin-top: 7px; color: var(--bm-muted); font-size: 12px; font-style: normal; }
.bm-source, .bm-source-ad, .bm-related { margin-top: 24px; }
.bm-source-ad { padding: 12px; background: #fff8e8; border: 1px solid #efd49d; }
.bm-related { padding-top: 12px; border-top: 2px solid var(--bm-navy); }

.bm-site-footer { color: #edf7fb; background: var(--bm-navy); }
.bm-footer-inner { padding: 26px 0; text-align: center; }
.bm-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin-bottom: 16px; }
.bm-footer-links a { color: #fff; }
.bm-disclaimer { margin: 0; padding-top: 14px; border-top: 1px solid #547087; font-size: 13px; }

.category-official { --category-color: #1670c5; }
.category-event { --category-color: #d68118; }
.category-guide { --category-color: #18a878; }
.category-battle { --category-color: #008d9d; }
.category-character { --category-color: #7556d8; }
.category-device { --category-color: #5e6f7b; }
.category-chat { --category-color: #e58a00; }
.category-goods { --category-color: #b75f9b; }

@media (max-width: 1200px) {
  .bm-menu-toggle { display: block; }
  .bm-nav { display: none; position: absolute; inset: 108px 20px auto; z-index: 10; padding: 10px; background: #fff; border: 1px solid var(--bm-border); border-radius: 8px; }
  .bm-nav.is-open { display: block; }
  .bm-nav ul { display: grid; }
  .bm-nav .bm-policy-link { margin-left: 0; }
  .bm-featured { grid-auto-flow: column; grid-auto-columns: minmax(280px, 85%); grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .bm-topic-card { scroll-snap-align: start; }
}

@media (max-width: 900px) {
  .bm-shell { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .bm-header-inner, .bm-shell, .bm-footer-inner { width: min(100% - 28px, 1400px); }
  .bm-header-inner { min-height: 132px; }
  .bm-brand { flex-shrink: 1; min-width: 0; }
  .bm-nav { top: 132px; }
  .bm-brand strong { max-width: 280px; font-size: 28px; }
  .bm-info-bar { text-align: left; font-size: 13px; }
  .bm-shell { padding-top: 22px; gap: 22px; }
  .bm-section-title { font-size: 22px; }
  .bm-article-card { grid-template-columns: 7px minmax(0, 1fr); min-height: 0; }
  .bm-article-card__block { font-size: 0; }
  .bm-article-card__body { padding: 15px 16px; }
  .bm-article-card h2 { font-size: 18px; }
  .bm-article-card p { display: none; }
  .bm-sidebar { gap: 8px; }
  .bm-widget summary { cursor: pointer; }
  .bm-footer-links { font-size: 12px; }
}

.bm-search-form { display:flex; gap:8px; padding:12px; }
.bm-search-form input { flex:1; min-width:0; border:1px solid var(--bm-border); border-radius:6px; }
.bm-search-form button { flex-shrink:0; padding:8px 12px; color:white; background:var(--bm-navy); border:0; border-radius:6px; }
.bm-ad-unit { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--bm-border); }
.bm-ad-unit > p { color: var(--bm-muted); font-size: 12px; }
