/* ============================================
   NagaraFit研究所 共通CSS
   ============================================ */

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

:root {
  --cream:   #FFF9EF;
  --cream2:  #FFF3DC;
  --ink:     #2A2118;
  --ink2:    #5C4A35;
  --ink3:    #9C8570;
  --yellow:  #F7C948;
  --yellow2: #FFE082;
  --red:     #E8604A;
  --green:   #4A9B6F;
  --green2:  #D4EDE0;
  --blue:    #5B8EC4;
  --blue2:   #D6E8F7;
  --paper:   #FEFCF5;
  --radius:  12px;
  --shadow:  4px 4px 0 var(--ink);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Zen Maru Gothic', sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.85;
  overflow-x: hidden;
  font-weight: 400;
}

body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  opacity: 0.5;
}

/* ─── NAV ─── */
.nav {
  position: fixed; top:0; left:0; right:0; z-index:200;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
  padding: 0 32px;
  height: 60px;
  display: flex; align-items:center; justify-content:space-between;
}
.nav-logo {
  font-family: 'Yomogi', cursive;
  font-size: 1.2rem; color: var(--ink);
  text-decoration: none;
  display: flex; align-items:center; gap:8px;
}
.nav-logo .stamp {
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 6px;
  padding: 1px 8px;
  font-size: 0.75rem;
  transform: rotate(-2deg);
  display: inline-block;
}
.nav-links { display:flex; gap:4px; list-style:none; }
.nav-links a {
  font-size: 0.78rem; color: var(--ink2);
  text-decoration: none; padding: 5px 12px;
  border-radius: 4px; transition: background 0.15s;
}
.nav-links a:hover { background: var(--cream2); }
.nav-links a.active { background: var(--yellow); color: var(--ink); font-weight:700; }
.nav-cta {
  font-family: 'Yomogi', cursive;
  background: var(--red); color: white;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 7px 18px;
  font-size: 0.82rem;
  text-decoration: none;
  transform: rotate(-1deg);
  display: inline-block;
  box-shadow: 3px 3px 0 var(--ink);
  transition: all 0.15s;
}
.nav-cta:hover { transform: rotate(0deg) translateY(-1px); box-shadow: 4px 4px 0 var(--ink); }

/* ─── BREADCRUMB ─── */
.breadcrumb {
  padding: 72px 40px 0;
  max-width: 1180px;
  margin: 0 auto;
  position: relative; z-index:1;
}
.breadcrumb ol {
  list-style: none;
  display: flex; flex-wrap:wrap; gap:4px;
  align-items: center;
  font-size: 0.75rem; color: var(--ink3);
  font-family: 'Yomogi', cursive;
}
.breadcrumb li::after { content: ' ›'; margin-left:4px; }
.breadcrumb li:last-child::after { content: ''; }
.breadcrumb a { color: var(--ink3); text-decoration:none; }
.breadcrumb a:hover { color: var(--blue); text-decoration:underline; }

/* ─── PAGE HERO (固定・カテゴリページ) ─── */
.page-hero {
  padding: 80px 40px 60px;
  max-width: 1180px;
  margin: 0 auto;
  position: relative; z-index:1;
}
.page-eyebrow {
  display: inline-block;
  font-family: 'Yomogi', cursive;
  font-size: 0.75rem; color: var(--ink2);
  border: 1.5px solid var(--ink2);
  padding: 3px 12px; border-radius:100px;
  margin-bottom: 14px;
}
.page-hero h1 {
  font-family: 'Shippori Mincho', serif;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 600; line-height: 1.5;
  margin-bottom: 14px;
}
.page-hero .lead {
  font-size: 0.95rem; color: var(--ink2);
  max-width: 680px; line-height: 2.1;
}

/* ─── ARTICLE LAYOUT ─── */
.article-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 40px 80px;
  position: relative; z-index:1;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
}
.article-body { min-width: 0; }
.article-body h2 {
  font-family: 'Shippori Mincho', serif;
  font-size: 1.25rem; font-weight:600;
  margin: 40px 0 14px;
  padding: 10px 16px;
  background: var(--cream2);
  border-left: 4px solid var(--yellow);
  border-radius: 0 8px 8px 0;
  line-height: 1.5;
}
.article-body h3 {
  font-size: 1rem; font-weight:700;
  margin: 28px 0 10px;
  display: flex; align-items:center; gap:8px;
}
.article-body h3::before {
  content: '';
  display: inline-block;
  width: 10px; height: 10px;
  background: var(--yellow);
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  flex-shrink: 0;
}
.article-body p { font-size: 0.9rem; margin-bottom: 16px; line-height: 2; }
.article-body ul, .article-body ol {
  padding-left: 1.4em;
  margin-bottom: 16px;
}
.article-body li { font-size: 0.88rem; line-height: 2; margin-bottom: 4px; }
.article-body strong { background: linear-gradient(transparent 60%, var(--yellow2) 60%); }

/* メモ風ボックス */
.memo-box {
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 24px 0;
  box-shadow: var(--shadow);
  position: relative;
}
.memo-box::before {
  content: attr(data-label);
  position: absolute; top:-12px; left:14px;
  background: var(--yellow);
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  font-family: 'Yomogi', cursive;
  font-size: 0.72rem;
  padding: 1px 8px;
}
.memo-box p { margin-bottom: 0; font-size:0.88rem; }

/* 注意ボックス */
.caution-box {
  background: #FFF3F0;
  border: 2px solid var(--red);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 0.85rem;
}
.caution-box::before { content: '⚠️ '; }

/* チェックリスト */
.check-list { list-style: none; padding-left: 0 !important; }
.check-list li {
  display: flex; gap:10px; align-items:baseline;
  padding: 6px 0;
  border-bottom: 1px dashed #ddd;
  font-size: 0.88rem !important;
}
.check-list li::before {
  content: '✓';
  width: 20px; height: 20px;
  background: var(--yellow);
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  display: flex; align-items:center; justify-content:center;
  font-size: 0.72rem; flex-shrink:0;
  margin-top: 2px;
}

/* ─── SIDEBAR ─── */
.sidebar { position: sticky; top: 80px; }
.sidebar-card {
  background: white;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.sidebar-card h3 {
  font-family: 'Yomogi', cursive;
  font-size: 0.82rem;
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: 8px;
  margin-bottom: 14px;
}
.sidebar-card h3::before { display:none; }
.sidebar-links { list-style:none; display:flex; flex-direction:column; gap:8px; }
.sidebar-links a {
  font-size: 0.8rem; color: var(--blue);
  text-decoration: none;
  display: flex; align-items:center; gap:6px;
  padding: 6px 0;
  border-bottom: 1px dashed #eee;
  transition: gap 0.15s;
}
.sidebar-links a:hover { gap: 10px; }
.sidebar-links a::before { content: '→'; font-family:'Yomogi',cursive; }

/* ─── CATEGORY PAGE ─── */
.cat-hero-band {
  padding: 68px 0 0;
  background: var(--cream2);
  border-bottom: 2px solid var(--ink);
}
.cat-hero-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 48px 40px;
  display: flex; align-items:center; gap:32px;
}
.cat-hero-icon {
  font-size: 4rem;
  width: 100px; height: 100px;
  background: white;
  border: 2px solid var(--ink);
  border-radius: 20px;
  display: flex; align-items:center; justify-content:center;
  box-shadow: var(--shadow);
  flex-shrink: 0;
}
.cat-hero-text {}
.cat-hero-text .eyebrow {
  font-family: 'Yomogi', cursive;
  font-size: 0.75rem; color: var(--ink2);
  display: block; margin-bottom:8px;
}
.cat-hero-text h1 {
  font-family: 'Shippori Mincho', serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600; line-height:1.5; margin-bottom:8px;
}
.cat-hero-text p { font-size:0.88rem; color:var(--ink2); line-height:2; }

/* ─── CARD GRID ─── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px,1fr));
  gap: 22px;
  margin-top: 40px;
}
.article-card {
  background: white;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none; color: var(--ink);
  transition: all 0.15s;
  box-shadow: 4px 4px 0 var(--ink);
}
.article-card:hover { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 var(--ink); }
.article-card .thumb {
  height: 130px;
  display: flex; align-items:center; justify-content:center;
  font-size: 3rem;
  border-bottom: 2px solid var(--ink);
}
.thumb-y { background: #FFFBE6; }
.thumb-g { background: #F0FAF3; }
.thumb-b { background: #EEF4FF; }
.thumb-r { background: #FFF3F0; }
.thumb-p { background: #F8F0FF; }
.thumb-o { background: #FFF5E6; }
.article-card .card-body { padding: 18px 20px; }
.card-cat {
  font-family: 'Yomogi', cursive;
  font-size: 0.68rem;
  border: 1.5px solid currentColor;
  padding: 2px 10px; border-radius:100px;
  display: inline-block; margin-bottom:8px;
}
.cat-ex { color: var(--red); }
.cat-hb { color: var(--green); }
.cat-fo { color: var(--blue); }
.cat-bc { color: #9B4A9B; }
.article-card h3 { font-size:0.88rem; font-weight:500; line-height:1.75; }
.article-card .card-meta { margin-top:10px; font-family:'Yomogi',cursive; font-size:0.72rem; color:var(--ink3); }

/* ─── SECTION ─── */
.section { padding: 64px 40px; position:relative; z-index:1; }
.container { max-width: 1320px; margin:0 auto; }
.section-eyebrow {
  font-family: 'Yomogi', cursive;
  display: inline-block; font-size:0.8rem; color:var(--ink2);
  border-bottom: 2px solid var(--ink2);
  padding-bottom: 2px; margin-bottom:10px;
}
.section-title {
  font-family: 'Shippori Mincho', serif;
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 600; line-height:1.5;
}

/* ─── CTA INLINE ─── */
.cta-inline {
  background: var(--ink);
  border-radius: var(--radius);
  padding: 32px 36px;
  margin: 40px 0;
  text-align: center;
  position: relative; overflow:hidden;
}
.cta-inline h3 {
  font-family: 'Shippori Mincho', serif;
  font-size: 1.15rem; color: white; margin-bottom:10px; font-weight:600;
}
.cta-inline h3::before { display:none; }
.cta-inline p { color:rgba(255,255,255,0.7); font-size:0.84rem; margin-bottom:18px; }
.btn-cta {
  display: inline-flex; align-items:center; gap:8px;
  background: var(--yellow); color: var(--ink);
  border: 2px solid var(--ink);
  padding: 12px 28px; border-radius: 8px;
  font-size: 0.9rem; font-weight:800;
  text-decoration: none;
  box-shadow: 3px 3px 0 rgba(255,255,255,0.2);
  transition: all 0.15s;
  font-family: 'Zen Maru Gothic', sans-serif;
}
.btn-cta:hover { transform: translate(-2px,-2px); box-shadow: 5px 5px 0 rgba(255,255,255,0.3); }

/* ─── CTA BAND (ページ末尾) ─── */
.cta-band {
  background: var(--ink);
  padding: 72px 40px;
  text-align: center;
  position: relative; overflow:hidden; z-index:1;
}
.cta-band h2 {
  font-family: 'Shippori Mincho', serif;
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  color: white; line-height:1.6; margin-bottom:12px; font-weight:600;
}
.cta-band p { color:rgba(255,255,255,0.7); font-size:0.9rem; margin-bottom:28px; }
.cta-band .btn-cta { font-size:1rem; padding:14px 36px; }
.cta-sub { margin-top:16px; color:rgba(255,255,255,0.4); font-size:0.78rem; font-family:'Yomogi',cursive; }

/* ─── FOOTER ─── */
footer {
  background: var(--cream);
  border-top: 2px solid var(--ink);
  padding: 56px 40px 32px;
  position: relative; z-index:1;
}
.footer-inner { max-width: 1320px; margin:0 auto; }
.footer-top {
  display: grid; grid-template-columns:2fr 1fr 1fr 1fr; gap:40px;
  margin-bottom: 40px;
}
.flogo {
  font-family: 'Yomogi', cursive;
  font-size: 1.2rem; color:var(--ink);
  text-decoration: none;
  display: flex; align-items:center; gap:8px;
  margin-bottom: 12px;
}
.flogo .stamp { background:var(--yellow); border:2px solid var(--ink); border-radius:5px; padding:1px 8px; font-size:0.75rem; transform:rotate(-2deg); display:inline-block; }
.footer-brand p { font-size:0.8rem; color:var(--ink2); line-height:2; }
.footer-col h2 {
  font-family:'Yomogi',cursive; font-size:0.8rem; color:var(--ink);
  margin-bottom:14px; border-bottom:1.5px solid var(--ink); padding-bottom:6px;
}
.footer-col ul { list-style:none; display:flex; flex-direction:column; gap:9px; }
.footer-col a { font-size:0.78rem; color:var(--ink2); text-decoration:none; transition:color 0.15s; }
.footer-col a:hover { color:var(--red); }
.footer-bottom {
  border-top:1.5px dashed var(--ink2);
  padding-top:20px; text-align:center;
  font-family:'Yomogi',cursive; font-size:0.78rem; color:var(--ink3);
}

/* ─── ANIMATIONS ─── */
@keyframes fadeUp { from{opacity:0;transform:translateY(18px)} to{opacity:1;transform:translateY(0)} }
.fade-up { animation: fadeUp 0.6s both; }
.fade-up-1 { animation: fadeUp 0.6s 0.1s both; }
.fade-up-2 { animation: fadeUp 0.6s 0.25s both; }
.fade-up-3 { animation: fadeUp 0.6s 0.4s both; }

/* ─── RESPONSIVE ─── */
/* 900〜1050px：サイドバーを細くして2カラム維持 */
@media (max-width:1050px) and (min-width:901px) {
  .article-wrap { grid-template-columns:1fr 240px; gap:32px; }
}
@media (max-width:900px) {
  .nav-links { display:none; }
  .nav { padding:0 20px; }
  .article-wrap { grid-template-columns:1fr; padding:0 20px 60px; }
  .sidebar { position:static; }
  .cat-hero-inner { flex-direction:column; padding:32px 20px; }
  .footer-top { grid-template-columns:1fr 1fr; }
  .section { padding:48px 20px; }
  .breadcrumb { padding:72px 20px 0; }
  .page-hero { padding:48px 20px 40px; }
}
@media (max-width:540px) {
  .footer-top { grid-template-columns:1fr; }
  .card-grid { grid-template-columns:1fr; }
}

/* ════════════════════════════════════════════════════
   TOP PAGE (index.html) STYLES
   ════════════════════════════════════════════════════ */

/* ─── HERO ─── */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
  padding: 100px 60px 60px;
  background: var(--cream);
  position: relative;
  overflow: hidden;
}
.hero-blob1 {
  position: absolute; top: -80px; right: -80px;
  width: 400px; height: 400px; border-radius: 50%;
  background: var(--yellow); opacity: 0.18; pointer-events: none;
}
.hero-blob2 {
  position: absolute; bottom: -60px; left: -60px;
  width: 300px; height: 300px; border-radius: 50%;
  background: var(--green); opacity: 0.12; pointer-events: none;
}
.hero-left { position: relative; z-index: 1; }
.hero-sticky {
  display: inline-block;
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 6px;
  padding: 4px 14px;
  font-family: 'Yomogi', cursive;
  font-size: 0.78rem;
  margin-bottom: 20px;
  box-shadow: 2px 2px 0 var(--ink);
  transform: rotate(-1deg);
}
.hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.35;
  margin-bottom: 24px;
}
.scribble {
  position: relative;
  display: inline-block;
  color: var(--red);
}
.scribble::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 3px;
  background: var(--red);
  border-radius: 2px;
  transform: rotate(-1deg);
}
.hero-balloon {
  background: white;
  border: 2px solid var(--ink);
  border-radius: 16px;
  padding: 18px 22px;
  font-size: 0.88rem;
  line-height: 2;
  margin-bottom: 28px;
  box-shadow: 3px 3px 0 var(--ink);
  position: relative;
}
.hero-balloon::before {
  content: '';
  position: absolute;
  top: -12px; left: 28px;
  border: 8px solid transparent;
  border-bottom-color: var(--ink);
}
.hero-balloon::after {
  content: '';
  position: absolute;
  top: -8px; left: 30px;
  border: 7px solid transparent;
  border-bottom-color: white;
}
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }
.btn-main {
  background: var(--ink);
  color: white;
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 14px 28px;
  font-family: 'Zen Maru Gothic', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  box-shadow: 4px 4px 0 var(--yellow);
  transition: all 0.15s;
  display: inline-block;
}
.btn-main:hover { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 var(--yellow); }
.btn-sub {
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 14px 22px;
  font-family: 'Yomogi', cursive;
  font-size: 0.88rem;
  color: var(--ink);
  text-decoration: none;
  background: transparent;
  transition: all 0.15s;
  display: inline-block;
}
.btn-sub:hover { background: var(--cream2); }

/* ─── HERO RIGHT / MEMO ─── */
.hero-right {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 20px;
}
.memo-stack { position: relative; width: 280px; height: 310px; }
.memo {
  position: absolute;
  width: 260px;
  background: white;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 22px;
  box-shadow: 4px 4px 0 var(--ink);
}
.memo-back2 { top: 10px; left: 20px; transform: rotate(4deg); height: 260px; background: var(--cream2); }
.memo-back1 { top: 5px; left: 10px; transform: rotate(-2deg); height: 265px; }
.memo-main { top: 0; left: 0; z-index: 2; }
.memo-title { font-family: 'Yomogi',cursive; font-size: 0.82rem; font-weight: 700; margin-bottom: 14px; border-bottom: 1.5px dashed var(--ink2); padding-bottom: 10px; }
.memo-item { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 0.85rem; }
.check {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--yellow);
  border: 2px solid var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.65rem; flex-shrink: 0;
}
.memo-date { font-family: 'Yomogi',cursive; font-size: 0.72rem; color: var(--ink3); margin-top: 12px; text-align: right; }
.stamp-done {
  position: absolute;
  bottom: 20px; right: -10px;
  width: 64px; height: 64px;
  z-index: 3;
  transform: rotate(12deg);
}

/* ─── MARQUEE ─── */
.marquee-wrap {
  overflow: hidden;
  background: var(--ink);
  padding: 10px 0;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}
.marquee-track {
  display: flex;
  gap: 0;
  white-space: nowrap;
  animation: marquee 28s linear infinite;
}
.marquee-item {
  font-family: 'Yomogi', cursive;
  font-size: 0.82rem;
  color: white;
  padding: 0 32px;
}
.marquee-item::after { content: '✦'; margin-left: 32px; opacity: 0.4; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ─── ABOUT SECTION ─── */
.about-section { background: var(--cream2); }
.about-inner {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 40px;
  align-items: start;
}
.about-avatar { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.avatar-frame {
  width: 120px; height: 120px;
  border-radius: 50%;
  background: var(--yellow);
  border: 3px solid var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
  box-shadow: 4px 4px 0 var(--ink);
}
.avatar-name {
  font-family: 'Yomogi', cursive;
  font-size: 0.82rem;
  text-align: center;
  line-height: 1.6;
}
.about-body { font-size: 0.9rem; line-height: 2.1; margin-bottom: 16px; }
.about-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.about-tag {
  font-family: 'Yomogi', cursive;
  font-size: 0.75rem;
  border: 1.5px solid var(--ink);
  border-radius: 100px;
  padding: 3px 12px;
  background: white;
}

/* ─── HOW TO START ─── */
.how-section { background: var(--cream); }
.section-header { text-align: center; margin-bottom: 40px; }
.section-title { font-size: clamp(1.4rem, 3vw, 2rem); margin-top: 8px; }
.section-lead { font-size: 0.88rem; color: var(--ink2); margin-top: 10px; }
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.how-card {
  border: 2px solid var(--ink);
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: 4px 4px 0 var(--ink);
}
.how-card h3 { font-size: 1rem; margin-bottom: 10px; }
.how-card h3::before { display: none; }
.how-card p { font-size: 0.84rem; color: var(--ink2); line-height: 1.9; margin-bottom: 16px; }
.card-y { background: #FFFBE6; }
.card-r { background: #FFF0ED; }
.card-g { background: #F0FAF4; }
.how-num {
  font-family: 'Shippori Mincho', serif;
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--ink);
  opacity: 0.12;
  line-height: 1;
  margin-bottom: 8px;
}
.how-links { display: flex; flex-direction: column; gap: 6px; }
.how-link {
  font-size: 0.82rem;
  color: var(--ink);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 1px dashed var(--ink2);
  transition: color 0.15s;
}
.how-link:hover { color: var(--red); }
.how-link::before { content: '→ '; font-family: 'Yomogi', cursive; }

/* ─── SLANT BAND ─── */
.slant-band {
  background: var(--ink);
  color: white;
  padding: 64px 60px;
  clip-path: polygon(0 6%, 100% 0, 100% 94%, 0 100%);
}
.slant-inner {
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.slant-text h2 {
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  color: white;
  margin-bottom: 16px;
  line-height: 1.5;
}
.slant-text h2::before { display: none; }
.slant-text p { font-size: 0.88rem; color: rgba(255,255,255,0.7); line-height: 2; margin-bottom: 24px; }
.feature-list { display: flex; flex-direction: column; gap: 12px; }
.fi { display: flex; align-items: center; gap: 12px; font-size: 0.88rem; color: rgba(255,255,255,0.9); }
.fi-dot { font-size: 1.1rem; }
.hand-chart { background: rgba(255,255,255,0.06); border-radius: 12px; padding: 24px; }
.chart-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.chart-label { font-family: 'Yomogi',cursive; font-size: 0.75rem; color: rgba(255,255,255,0.8); width: 80px; flex-shrink: 0; line-height: 1.4; }
.chart-bar-wrap { flex: 1; background: rgba(255,255,255,0.1); border-radius: 4px; height: 16px; overflow: hidden; }
.chart-bar { height: 100%; background: var(--yellow); border-radius: 4px; transition: width 1s ease; }
.chart-val { font-family: 'Yomogi',cursive; font-size: 0.78rem; color: var(--yellow); width: 36px; text-align: right; }

/* ─── CATEGORIES SECTION ─── */
.cat-section { background: var(--cream); }
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.cat-card {
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: 24px 20px;
  background: white;
  box-shadow: 3px 3px 0 var(--ink);
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.15s;
}
.cat-card:hover { transform: translate(-2px,-2px); box-shadow: 5px 5px 0 var(--ink); }
.cat-icon { font-size: 1.8rem; }
.cat-card h3 { font-size: 0.95rem; font-weight: 700; }
.cat-card h3::before { display: none; }
.cat-card p { font-size: 0.78rem; color: var(--ink2); line-height: 1.6; margin: 0; }

/* ─── WORRY SECTION ─── */
.worry-section { background: var(--cream2); }
.worry-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.worry-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: white;
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: 18px 20px;
  text-decoration: none;
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  transition: all 0.15s;
}
.worry-card:hover { transform: translate(-2px,-2px); box-shadow: 5px 5px 0 var(--ink); }
.worry-ico { font-size: 1.6rem; flex-shrink: 0; }
.worry-card strong { display: block; font-size: 0.9rem; font-weight: 700; margin-bottom: 4px; }
.worry-card span { font-size: 0.78rem; color: var(--ink2); line-height: 1.7; }

/* ─── VOICE SECTION ─── */
.voice-section { background: var(--cream); }
.voice-header { text-align: left; }
.voice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.voice-card {
  background: white;
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: 22px;
  box-shadow: 3px 3px 0 var(--ink);
  font-size: 0.86rem;
  line-height: 1.9;
}
.voice-card p { margin-bottom: 16px; }
.voice-card em { font-style: normal; background: linear-gradient(transparent 60%, var(--yellow) 60%); }
.voice-from { display: flex; align-items: center; gap: 10px; border-top: 1px dashed var(--ink2); padding-top: 12px; }
.voice-avatar { font-size: 1.4rem; }
.voice-name { font-family: 'Yomogi',cursive; font-size: 0.72rem; color: var(--ink2); }

/* ─── RECENT POSTS ─── */
.posts-section { background: var(--cream2); }
.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .posts-grid { grid-template-columns: 1fr 1fr; } }
.post-card {
  background: white;
  border: 2px solid var(--ink);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 3px 3px 0 var(--ink);
  transition: all 0.15s;
}
.post-card:hover { transform: translate(-2px,-2px); box-shadow: 5px 5px 0 var(--ink); }
.post-card a { text-decoration: none; color: var(--ink); display: block; }
.post-thumb {
  height: 100px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.4rem;
}
.pt-y { background: #FFF9D6; }
.pt-r { background: #FFE8E4; }
.pt-g { background: #E8F7EE; }
.pt-b { background: #E4EFFF; }
.pt-p { background: #F3E8FF; }
.post-body { padding: 14px 16px 18px; }
.post-cat {
  font-family: 'Yomogi',cursive;
  font-size: 0.68rem;
  border-radius: 100px;
  padding: 2px 10px;
  border: 1.5px solid currentColor;
  display: inline-block;
  margin-bottom: 8px;
}
.pc-ex { color: #B86A10; }
.pc-hb { color: #4A9B6F; }
.post-title { font-size: 0.84rem; font-weight: 700; line-height: 1.6; margin-bottom: 6px; }
.post-meta { font-family: 'Yomogi',cursive; font-size: 0.72rem; color: var(--ink3); }

/* ─── CTA SECTION ─── */
.cta-section {
  background: var(--ink);
  color: white;
  text-align: center;
  padding: 72px 40px;
}
.cta-section h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: white;
  margin-bottom: 14px;
  line-height: 1.6;
}
.cta-section h2::before { display: none; }
.cta-section p { color: rgba(255,255,255,0.7); font-size: 0.9rem; margin-bottom: 28px; }
.cta-sub { font-family: 'Yomogi',cursive; font-size: 0.75rem; color: rgba(255,255,255,0.45); margin-top: 12px; }

/* ─── FOOTER heading override ─── */
.footer-col-heading {
  font-family: 'Yomogi',cursive;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1.5px dashed var(--ink2);
}
.footer-col-heading::before { display: none; }

/* ─── TOP PAGE RESPONSIVE ─── */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding: 90px 24px 48px; min-height: auto; gap: 32px; }
  .hero-right { align-items: flex-start; }
  .how-grid { grid-template-columns: 1fr; }
  .slant-band { clip-path: none; padding: 48px 24px; }
  .slant-inner { grid-template-columns: 1fr; gap: 32px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .worry-grid { grid-template-columns: 1fr; }
  .voice-grid { grid-template-columns: 1fr; }
  .about-inner { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  .cat-grid { grid-template-columns: 1fr 1fr; }
  .posts-grid { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════════════════
   ABOUT PAGE — TIMELINE
   ════════════════════════════════════════════════════ */
.timeline { display: flex; flex-direction: column; gap: 0; margin: 28px 0; }
.tl-item { display: flex; gap: 20px; padding-bottom: 28px; position: relative; }
.tl-item::before { content: ''; position: absolute; left: 17px; top: 36px; bottom: 0; width: 2px; background: var(--yellow); }
.tl-item:last-child::before { display: none; }
.tl-dot { width: 36px; height: 36px; border-radius: 50%; background: var(--yellow); border: 2px solid var(--ink); display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; box-shadow: 2px 2px 0 var(--ink); }
.tl-body h3 { font-size: 0.9rem; font-weight: 700; margin-bottom: 4px; }
.tl-body h3::before { display: none; }
.tl-body p { font-size: 0.82rem; color: var(--ink2); margin-bottom: 0; line-height: 1.9; }
.tl-year { font-family: 'Yomogi',cursive; font-size: 0.72rem; color: var(--ink3); margin-bottom: 4px; display: block; }

/* ════════════════════════════════════════════════════
   CONTACT PAGE — FORM
   ════════════════════════════════════════════════════ */
.contact-form-wrap { background: white; border: 2px solid var(--ink); border-radius: 16px; padding: 36px; box-shadow: var(--shadow); margin: 28px 0; }
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-family: 'Yomogi',cursive; font-size: 0.82rem; margin-bottom: 7px; color: var(--ink); }
.form-label .req { background: var(--red); color: white; font-size: 0.65rem; padding: 1px 6px; border-radius: 3px; margin-left: 6px; }
.form-input, .form-textarea, .form-select { width: 100%; padding: 12px 14px; border: 2px solid var(--ink); border-radius: 8px; font-family: 'Zen Maru Gothic',sans-serif; font-size: 0.88rem; background: var(--cream); color: var(--ink); transition: border-color 0.15s; outline: none; }
.form-input:focus, .form-textarea:focus { border-color: var(--yellow); background: white; }
.form-textarea { height: 160px; resize: vertical; line-height: 1.8; }
.form-btn { background: var(--ink); color: white; border: 2px solid var(--ink); border-radius: 10px; padding: 14px 40px; font-size: 0.95rem; font-weight: 700; font-family: 'Zen Maru Gothic',sans-serif; cursor: pointer; box-shadow: var(--shadow); transition: all 0.15s; width: 100%; }
.form-btn:hover { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 var(--ink); }
.contact-note { background: var(--cream2); border: 1.5px dashed var(--ink2); border-radius: 8px; padding: 14px 18px; margin: 16px 0; font-size: 0.82rem; color: var(--ink2); line-height: 1.9; }

/* ════════════════════════════════════════════════════
   FAQ PAGE
   ════════════════════════════════════════════════════ */
.faq-list { display: flex; flex-direction: column; gap: 16px; margin: 24px 0; }
.faq-item { background: white; border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden; box-shadow: 3px 3px 0 var(--ink); }
.faq-q { padding: 16px 20px; font-weight: 700; font-size: 0.9rem; display: flex; align-items: baseline; gap: 12px; cursor: pointer; background: var(--cream2); line-height: 1.6; }
.faq-q::before { content: 'Q'; font-family: 'Yomogi',cursive; color: var(--red); font-size: 1.1rem; flex-shrink: 0; }
.faq-a { padding: 14px 20px 18px; font-size: 0.86rem; color: var(--ink2); line-height: 2; border-top: 1.5px dashed var(--ink2); display: flex; gap: 12px; align-items: baseline; }
.faq-a::before { content: 'A'; font-family: 'Yomogi',cursive; color: var(--green); font-size: 1.1rem; flex-shrink: 0; }

/* ════════════════════════════════════════════════════
   START PAGE — PROFILE & STEPS
   ════════════════════════════════════════════════════ */
.profile-card { background: var(--cream2); border: 2px solid var(--ink); border-radius: 16px; padding: 32px; display: grid; grid-template-columns: 120px 1fr; gap: 28px; align-items: start; box-shadow: var(--shadow); margin: 32px 0; }
.profile-avatar { width: 100px; height: 100px; border-radius: 50%; background: var(--yellow); border: 2px solid var(--ink); display: flex; align-items: center; justify-content: center; font-size: 2.8rem; box-shadow: 3px 3px 0 var(--ink); }
.profile-name { font-family: 'Yomogi',cursive; font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.profile-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.profile-tag { font-family: 'Yomogi',cursive; font-size: 0.72rem; border: 1.5px solid var(--ink); padding: 2px 10px; border-radius: 100px; background: white; }
.step-flow { display: flex; flex-direction: column; gap: 16px; margin: 28px 0; }
.step-item { display: flex; gap: 16px; align-items: flex-start; background: white; border: 2px solid var(--ink); border-radius: var(--radius); padding: 18px 20px; box-shadow: 3px 3px 0 var(--ink); text-decoration: none; color: var(--ink); transition: all 0.15s; }
.step-item:hover { transform: translate(-2px,-2px); box-shadow: 5px 5px 0 var(--ink); }
.step-num { width: 36px; height: 36px; background: var(--yellow); border: 2px solid var(--ink); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: 'Yomogi',cursive; font-size: 0.9rem; font-weight: 700; flex-shrink: 0; }
.step-body h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 4px; }
.step-body h3::before { display: none; }
.step-body p { font-size: 0.82rem; color: var(--ink2); margin-bottom: 0; line-height: 1.8; }
@media (max-width: 600px) {
  .profile-card { grid-template-columns: 1fr; }
}
@keyframes floatB { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }
.about-text { flex: 1; }

/* ════════════════════════════════════════════════════
   MEGA MENU NAVIGATION
   ════════════════════════════════════════════════════ */

/* ─── nav overrides for mega ─── */
.nav { position: relative; z-index: 1000; }
.nav-links { position: static; }
.nav-links > li {
  position: relative;
  display: flex;
  align-items: center;
}
/* has-mega の li は static にし、mega-menu を nav 基準で配置する
   → left:50%/right:0 が nav 幅を基準になり viewport 外にはみ出ない */
.nav-links > li.has-mega {
  position: static;
}
.nav-links > li > a {
  display: flex; align-items: center; gap: 4px; padding: 6px 12px;
}
.nav-links > li.has-mega > a::after {
  content: '▾';
  font-size: 0.65rem;
  opacity: 0.5;
  transition: transform 0.2s;
}
.nav-links > li.has-mega:hover > a::after { transform: rotate(180deg); }

/* ─── MEGA MENU PANEL ─── */
.mega-menu {
  display: none;
  position: absolute;
  /* top: 100% でナビに隙間なく接続し、padding-top で視覚的な間隔を作る         */
  /* top: calc(100% + 12px) だとカーソルが隙間を通るとhoverが切れて消える問題あり */
  top: 100%;            /* liのすぐ下から始まり隙間ゼロ */
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border: 2px solid var(--ink);
  border-radius: 16px;
  box-shadow: 6px 6px 0 var(--ink);
  padding: 28px 28px 28px; /* 上の余白は ::before ブリッジの分 */
  width: min(960px, 96vw);
  z-index: 2000;
  animation: megaFadeIn 0.15s ease both;
}
/* ── 透明ブリッジ: li と mega-menu の間をマウスが通過できるよう
      mega-menu の上に 20px の透明エリアを張り出す ── */
.nav-links > li.has-mega .mega-menu::before {
  content: '';
  position: absolute;
  top: -20px;       /* 上に20px張り出す */
  left: 0;
  right: 0;
  height: 20px;
  background: transparent;
}
@keyframes megaFadeIn { from{opacity:0;transform:translateX(-50%) translateY(-8px)} to{opacity:1;transform:translateX(-50%) translateY(0)} }

/* 右端カテゴリ（食事・体のケア）は右寄せ。viewport外にはみ出さないよう right:0 */
.nav-links > li:nth-last-child(-n+2) .mega-menu {
  left: auto; right: 0; transform: none;
}
@keyframes megaFadeInR { from{opacity:0;transform:translateY(-8px)} to{opacity:1;transform:translateY(0)} }
.nav-links > li:nth-last-child(-n+2):hover .mega-menu { animation: megaFadeInR 0.15s ease both; }

.nav-links > li.has-mega:hover .mega-menu,
.nav-links > li.has-mega:focus-within .mega-menu { display: flex; flex-direction: column; gap: 20px; }

/* 矢印: mega-menu の ::after で実装（::before はブリッジ用） */
.nav-links > li.has-mega .mega-menu::after {
  content: '';
  position: absolute;
  top: 8px; left: 50%; transform: translateX(-50%);
  border: 7px solid transparent;
  border-bottom-color: var(--ink);
  pointer-events: none;
}
.nav-links > li:nth-last-child(-n+2) .mega-menu::after { left: auto; right: 40px; transform: none; }

/* ─── MEGA MENU COLUMNS ─── */
/* mega-cols は下部で定義 */

.mega-col {
  min-width: 0;  /* グリッド列がコンテンツ幅で広がるのを防ぐ */
  overflow: hidden;
}
.mega-col h4 {
  font-family: 'Yomogi', cursive;
  font-size: 0.72rem;
  color: var(--ink3);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1.5px dashed var(--ink2);
  white-space: nowrap;
}
.mega-col ul { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.mega-col ul li a {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 0.73rem;
  color: var(--ink2);
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
  white-space: normal;
  word-break: break-all;
  overflow-wrap: break-word;
  line-height: 1.35;
}
.mega-col ul li a:hover { background: var(--cream2); color: var(--red); }

/* ─── MEGA FOOTER (全記事リンク) ─── */
.mega-footer {
  border-top: 1.5px solid var(--cream2);
  padding-top: 14px;
  display: flex;
  justify-content: flex-end;
}
.mega-footer a {
  font-family: 'Yomogi', cursive;
  font-size: 0.78rem;
  color: var(--ink);
  text-decoration: none;
  background: var(--cream2);
  border: 1.5px solid var(--ink);
  border-radius: 100px;
  padding: 4px 16px;
  transition: all 0.15s;
}
.mega-footer a:hover { background: var(--ink); color: white; }

/* ─── MOBILE HAMBURGER ─── */
.nav-toggle-input { display: none; }
.nav-hamburger {
  display: none;
  cursor: pointer;
  font-size: 1.4rem;
  padding: 4px 8px;
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  background: transparent;
  line-height: 1;
  user-select: none;
}

@media (max-width: 900px) {
  .nav-hamburger { display: block; }
  .nav-links { 
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--cream);
    flex-direction: column;
    align-items: flex-start;
    padding: 80px 28px 40px;
    gap: 0;
    overflow-y: auto;
    z-index: 1500;
  }
  .nav-toggle-input:checked ~ .nav-links { display: flex; }
  .nav-links > li { width: 100%; border-bottom: 1px dashed var(--ink2); }
  .nav-links > li > a {
    padding: 14px 0;
    font-size: 1rem;
    justify-content: space-between;
  }
  /* mobile: accordion */
  .mega-menu {
    position: static;
    transform: none;
    width: 100%;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0 0 16px 12px;
    background: var(--cream2);
    border-left: 3px solid var(--yellow);
    margin-bottom: 8px;
  }
  .mega-menu::before { display: none; }
  .nav-links > li.has-mega:hover .mega-menu,
  .nav-links > li.has-mega:focus-within .mega-menu { display: flex; }
  .nav-links > li.has-mega > a::after { content: '▾'; }
  .mega-cols.col2, .mega-cols.col3, .mega-cols.col4 { grid-template-columns: 1fr 1fr; }
  .mega-col h4 { font-size: 0.68rem; margin-top: 12px; }
  .mega-col ul li a { font-size: 0.78rem; white-space: normal; }
  .mega-footer { justify-content: flex-start; }
  /* close button */
  .nav-toggle-input:checked ~ .nav-links::before {
    content: '✕';
    position: fixed;
    top: 18px; right: 20px;
    font-size: 1.3rem;
    cursor: pointer;
    z-index: 1600;
  }
}

/* ════════════════════════════════════════════════════
   CATEGORY PAGE — SUBCATEGORY SECTIONS
   ════════════════════════════════════════════════════ */
.subcat-section { margin-bottom: 52px; }
.subcat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ink);
}
.subcat-icon { font-size: 1.4rem; }
.subcat-title { font-size: 1rem; font-weight: 700; }
.subcat-title::before { display: none; }
.subcat-count {
  font-family: 'Yomogi', cursive;
  font-size: 0.72rem;
  color: var(--ink3);
  margin-left: auto;
}

/* dense card grid for category pages */
.card-grid-dense {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.article-card-sm {
  display: flex;
  align-items: center;
  gap: 12px;
  background: white;
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 12px 14px;
  text-decoration: none;
  color: var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  transition: all 0.15s;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.5;
}
.article-card-sm:hover { transform: translate(-2px,-2px); box-shadow: 4px 4px 0 var(--ink); color: var(--red); }
.article-card-sm .sm-icon { font-size: 1.3rem; flex-shrink: 0; }

/* category page hero */
.cat-stat-band {
  display: flex;
  gap: 24px;
  background: var(--cream2);
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 16px 24px;
  margin: 20px 0 40px;
  flex-wrap: wrap;
}
.cat-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.cat-stat-num { font-family: 'Shippori Mincho',serif; font-size: 1.8rem; font-weight: 600; color: var(--red); line-height: 1; }
.cat-stat-label { font-family: 'Yomogi',cursive; font-size: 0.68rem; color: var(--ink3); }
.cat-stat-divider { width: 1px; background: var(--ink2); opacity: 0.2; align-self: stretch; }

@media(max-width:600px) {
  .card-grid-dense { grid-template-columns: 1fr; }
  .mega-cols.col2, .mega-cols.col3, .mega-cols.col4 { grid-template-columns: 1fr; }
}

/* ── mega-menu 新構造対応 ─────────────────────────── */
/* mega-cols は最大4列。幅880px内で各列が十分な幅を確保 */
.mega-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media(max-width:1320px) { .mega-cols { grid-template-columns: repeat(3, 1fr); } }
@media(max-width:900px)  { .mega-cols { grid-template-columns: repeat(2, 1fr); } }

/* mega-icon（絵文字スパン） */
.mega-icon { display: inline-block; width: 1.4em; text-align: center; margin-right: 3px; flex-shrink: 0; }

/* ── jump-tags（カテゴリページのサブカテゴリへのジャンプリンク） ── */
.jump-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 36px;
}
.jump-tag {
  font-family: 'Yomogi', cursive;
  font-size: 0.78rem;
  color: var(--ink);
  text-decoration: none;
  border: 1.5px solid var(--ink2);
  border-radius: 100px;
  padding: 5px 14px;
  background: white;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.jump-tag:hover {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}

/* ── スマホメガメニュー改善 ─────────────────────────── */
@media(max-width:900px) {
  .mega-cols { grid-template-columns: 1fr 1fr !important; }
  .mega-col h4 { font-size: 0.68rem; margin-top: 10px; }
  .mega-col ul li a { font-size: 0.78rem; }
}
@media(max-width:540px) {
  .mega-cols { grid-template-columns: 1fr !important; }
  .jump-tag { font-size: 0.72rem; padding: 4px 10px; }
}

/* ══════════════════════════════════════════════════════
   MENU LINKS BLOCK — 記事内の誘導リンクグリッド
   ══════════════════════════════════════════════════════ */
.menu-links-block {
  margin: 36px 0;
  background: var(--cream2);
  border: 2px solid var(--ink);
  border-radius: 16px;
  padding: 20px 24px 24px;
}
.menu-links-title {
  font-family: 'Yomogi', cursive;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.menu-links-title::before { display: none; }
.menu-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
}
.menu-link-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1.5px solid var(--ink2);
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
  background: white;
  font-family: 'Zen Maru Gothic', sans-serif;
  font-size: 0.8rem;
  line-height: 1.3;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.menu-link-card:hover {
  background: var(--yellow);
  border-color: var(--ink);
  transform: translateY(-1px);
}
.menu-link-card .mlc-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}
@media(max-width:600px) {
  .menu-links-grid { grid-template-columns: 1fr 1fr; }
  .menu-link-card { font-size: 0.75rem; padding: 8px 10px; }
}


/* ─── ナビ検索 ─── */
.nav-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.nav-search-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: white;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 5px 12px;
  font-family: 'Yomogi', cursive;
  font-size: 0.78rem;
  color: var(--ink2);
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: 2px 2px 0 var(--ink);
  white-space: nowrap;
}
.nav-search-btn:hover,
.nav-search-btn[aria-expanded="true"] {
  background: var(--cream2);
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}
.nav-search-btn .search-icon { font-size: 0.9rem; }

/* ドロップダウン */
.nav-search-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: white;
  border: 2.5px solid var(--ink);
  border-radius: 14px;
  box-shadow: 5px 5px 0 var(--ink);
  padding: 14px;
  z-index: 1000;
  width: 300px;
  flex-direction: column;
  gap: 10px;
}
.nav-search-dropdown.open { display: flex; }
.nav-search-dropdown::before {
  content: '';
  position: absolute;
  top: -8px; right: 22px;
  width: 14px; height: 14px;
  background: white;
  border-left: 2px solid var(--ink);
  border-top: 2px solid var(--ink);
  transform: rotate(45deg);
}
.nav-search-input-row {
  display: flex;
  border: 2px solid var(--ink);
  border-radius: 8px;
  overflow: hidden;
}
.nav-search-input-row input[type="text"] {
  flex: 1;
  border: none;
  outline: none;
  padding: 8px 12px;
  font-family: 'Zen Maru Gothic', sans-serif;
  font-size: 0.82rem;
  color: var(--ink);
  background: transparent;
  min-width: 0;
}
.nav-search-input-row input[type="text"]::placeholder { color: var(--ink3); }
.nav-search-input-row button[type="button"] {
  background: var(--yellow);
  border: none;
  border-left: 2px solid var(--ink);
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.15s;
}
.nav-search-input-row button[type="button"]:hover { background: #f0bc30; }
.nav-search-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.nav-search-quick-label {
  font-size: 0.67rem;
  color: var(--ink3);
  font-family: 'Yomogi', cursive;
  width: 100%;
}
.nav-quick-tag {
  font-size: 0.7rem;
  background: var(--cream2);
  border: 1.5px solid var(--ink3);
  border-radius: 100px;
  padding: 2px 10px;
  color: var(--ink2);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.12s;
  font-family: 'Zen Maru Gothic', sans-serif;
}
.nav-quick-tag:hover {
  background: var(--yellow2);
  border-color: var(--ink);
  color: var(--ink);
}
@media (max-width: 900px) {
  .nav-search-wrap { display: none; }
}

/* ─── サイドバー検索ウィジェット ─── */
.sidebar-search .sidebar-search-form {
  display: flex;
  border: 2px solid var(--ink);
  border-radius: 8px;
  overflow: hidden;
  margin: 8px 0 6px;
  box-shadow: 2px 2px 0 var(--ink);
}
.sidebar-search .sidebar-search-form input {
  flex: 1;
  border: none;
  outline: none;
  padding: 8px 10px;
  font-family: 'Zen Maru Gothic', sans-serif;
  font-size: 0.8rem;
  color: var(--ink);
  background: white;
  min-width: 0;
}
.sidebar-search .sidebar-search-form input::placeholder {
  color: var(--ink3);
  font-size: 0.75rem;
}
.sidebar-search .sidebar-search-form button {
  background: var(--yellow);
  border: none;
  border-left: 2px solid var(--ink);
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.15s;
  flex-shrink: 0;
}
.sidebar-search .sidebar-search-form button:hover {
  background: #f0bc30;
}
.sidebar-search-link {
  font-family: 'Yomogi', cursive;
  font-size: 0.72rem;
  color: var(--blue);
  text-decoration: none;
  display: block;
}
.sidebar-search-link:hover { text-decoration: underline; }

/* ─── ナビ検索ドロップダウン JS ─── */
/* (JS is inlined at bottom of common nav behavior — see script block in build) */

/* ─── テーブル（data-table） ─── */
.table-wrap {
  position: relative;
  margin: 1.4em 0;
  border-radius: var(--radius);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  overflow: hidden;           /* 角丸をはみ出させない */
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  line-height: 1.6;
}
/* ヘッダー行 */
.data-table thead tr {
  background: var(--yellow);
  border-bottom: 2px solid var(--ink);
}
.data-table th {
  padding: 9px 14px;
  text-align: left;
  font-weight: 700;
  color: var(--ink);
  border-right: 1px solid rgba(0,0,0,.15);
}
.data-table th:last-child { border-right: none; }

/* データ行 */
.data-table td {
  padding: 8px 14px;
  border-right: 1px solid rgba(0,0,0,.1);
  border-bottom: 1px solid rgba(0,0,0,.1);
  vertical-align: top;
  color: var(--ink2);
}
.data-table td:last-child  { border-right: none; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table td:first-child {
  font-weight: 600;
  color: var(--ink);
  width: 1%;          /* shrink-wrap: 内容幅に縮む */
  white-space: nowrap; /* 第1列は1行に保つ */
}
.data-table th:first-child {
  width: 1%;
  white-space: nowrap;
}
.data-table tbody tr:nth-child(even) {
  background: rgba(255,215,0,.07);
}

/* ── スマホ：横スクロールなし・罫線で読む ── */
@media (max-width: 600px) {
  .data-table {
    font-size: 0.78rem;
  }
  .data-table th,
  .data-table td {
    padding: 6px 10px;
    /* セル内は通常折り返し */
    word-break: break-word;
  }
  /* 第1列（ラベル）は背景色で識別しやすくする */
  .data-table td:first-child {
    background: rgba(255,215,0,.18);
    border-right: 2px solid rgba(0,0,0,.18);
    white-space: normal; /* スマホでは折り返し許可 */
    width: auto;
  }
  .data-table th:first-child {
    border-right: 2px solid rgba(0,0,0,.2);
    white-space: normal;
    width: auto;
  }
  /* 行の境界を少し太くして視認しやすく */
  .data-table td {
    border-bottom: 1px solid rgba(0,0,0,.18);
  }
  .data-table th {
    border-bottom: 2px solid var(--ink);
  }
}

/* ════════════════════════════════════════════
   収益化ブロック: AdSense / アフィリエイト
   ════════════════════════════════════════════ */

/* AdSense スロットコンテナ */
.ad-slot {
  margin: 32px 0;
  text-align: center;
  min-height: 90px;
  background: rgba(0,0,0,.02);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink3);
  font-size: 0.72rem;
  font-family: 'Yomogi', cursive;
}
.ad-slot--rect {
  min-height: 250px;
}

/* アフィリエイト商品ブロック */
.affiliate-block {
  margin: 36px 0;
  padding: 20px 22px;
  background: var(--yellow-pale, #fffde7);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 3px 3px 0 var(--ink);
}
.affiliate-block-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink);
}
.affiliate-block-header .ab-badge {
  background: var(--red);
  color: #fff;
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 100px;
  font-family: 'Yomogi', cursive;
}
.affiliate-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.affiliate-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #fff;
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  padding: 14px;
  font-size: 0.82rem;
  box-shadow: 2px 2px 0 var(--ink);
}
.affiliate-card .ac-name {
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
}
.affiliate-card .ac-price {
  font-family: 'Yomogi', cursive;
  font-size: 0.75rem;
  color: var(--ink2);
}
.affiliate-card .ac-note {
  font-size: 0.72rem;
  color: var(--ink3);
  line-height: 1.5;
}
.affiliate-card .ac-buttons {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.affiliate-card .ac-btn {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
  border: 1.5px solid var(--ink);
  transition: all 0.15s;
}
.affiliate-card .ac-btn:hover {
  transform: translate(-1px,-1px);
  box-shadow: 2px 2px 0 var(--ink);
}
.affiliate-card .ac-btn--amazon {
  background: #FF9900;
  color: #222;
}
.affiliate-card .ac-btn--rakuten {
  background: #BF0000;
  color: #fff;
}
.affiliate-card .ac-btn--yahoo {
  background: #FF0033;
  color: #fff;
}
.affiliate-disclosure {
  font-size: 0.68rem;
  color: var(--ink3);
  margin-top: 10px;
  font-family: 'Yomogi', cursive;
}
