/*
Theme Name: Cocoon Child
Template:   cocoon-master
*/

/* ========================================
   モテ作 トップページ カスタムCSS
   ======================================== */

.motesaku-top * { box-sizing: border-box; }
.motesaku-top {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  background: #fff;
  font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
}

/* --- ヘッダー --- */
.ms-header {
  background: #fff;
  border-bottom: 2px solid #C9A84C;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ms-logo-wrap { display: flex; align-items: center; gap: 10px; }
.ms-logo-icon {
  width: 36px; height: 36px;
  background: #C9A84C;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.ms-logo-icon i { font-size: 18px; color: #fff; }
.ms-logo-main { font-size: 18px; font-weight: 500; color: #6B5010; }
.ms-logo-sub  { font-size: 10px; color: #C9A84C; margin-top: 1px; }
.ms-nav { display: flex; gap: 18px; }
.ms-nav a { font-size: 12px; color: #666; text-decoration: none; }
.ms-nav a:hover { color: #C9A84C; }

/* --- ヒーロー --- */
.ms-hero { background: #FFFDF5; border-bottom: 1px solid #EDD98A; padding: 28px 24px; }
.ms-hero-inner { display: flex; gap: 20px; align-items: center; }
.ms-hero-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F5E6C8, #EDD98A);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  border: 2px solid #C9A84C;
  overflow: hidden;
}
.ms-hero-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ms-hero-avatar i   { font-size: 38px; color: #C9A84C; }
.ms-hero-text { flex: 1; }
.ms-hero-name { font-size: 15px; font-weight: 500; color: #6B5010; margin-bottom: 4px; }
.ms-hero-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.ms-badge      { font-size: 10px; background: #F5E6C8; color: #8B6914; padding: 3px 9px; border-radius: 12px; }
.ms-badge-gold { background: #C9A84C; color: #fff; }
.ms-hero-desc      { font-size: 12px; color: #666; line-height: 1.7; }
.ms-hero-highlight { color: #8B6914; font-weight: 500; }

/* --- キャッチバー --- */
.ms-catch-bar { background: #6B5010; padding: 14px 24px; text-align: center; }
.ms-catch-bar p    { font-size: 14px; color: #EDD98A; letter-spacing: 0.5px; }
.ms-catch-bar span { color: #fff; font-weight: 500; }

/* --- セクション共通 --- */
.ms-section { padding: 20px 24px; }
.ms-section-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 500; color: #8B6914;
  margin-bottom: 14px; padding-bottom: 8px;
  border-bottom: 1.5px solid #EDD98A;
}
.ms-section-title i { font-size: 16px; color: #C9A84C; }

/* stretch link（リンク全体クリック対応） */
.ms-featured-main,
.ms-featured-sub { position: relative; }
.ms-stretch-link {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 1;
}
.ms-featured-main:hover,
.ms-featured-sub:hover { opacity: 0.85; }

/* --- 注目記事 --- */
.ms-featured-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 12px; }
.ms-featured-main {
  background: #FFFDF5; border: 0.5px solid #EDD98A;
  border-radius: 8px; overflow: hidden;
  display: block;
}
.ms-featured-img {
  width: 100%; height: 120px;
  background: linear-gradient(135deg, #F5E6C8, #EDD98A);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.ms-featured-img img { width: 100%; height: 100%; object-fit: cover; }
.ms-featured-img i   { font-size: 40px; color: #C9A84C; }
.ms-featured-body { padding: 10px 12px; }
.ms-featured-cat   { font-size: 10px; color: #C9A84C; margin-bottom: 4px; }
.ms-featured-title { font-size: 13px; font-weight: 500; color: #333; line-height: 1.5; }
.ms-featured-sub-list { display: flex; flex-direction: column; gap: 8px; }
.ms-featured-sub {
  background: #FFFDF5; border: 0.5px solid #EDD98A;
  border-radius: 8px; padding: 10px;
  display: flex; gap: 8px; align-items: center;
  text-decoration: none;
}
.ms-featured-sub:hover { opacity: 0.85; }
.ms-sub-img {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, #F5E6C8, #EDD98A);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
}
.ms-sub-img img { width: 100%; height: 100%; object-fit: cover; }
.ms-sub-img i   { font-size: 18px; color: #C9A84C; }
.ms-sub-cat   { font-size: 10px; color: #C9A84C; }
.ms-sub-title { font-size: 11px; color: #333; line-height: 1.4; }

/* --- カテゴリ --- */
.ms-cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ms-cat-card {
  background: #FFFDF5; border: 0.5px solid #EDD98A;
  border-radius: 8px; padding: 12px 8px;
  text-align: center; text-decoration: none; display: block;
}
.ms-cat-card:hover { background: #F5E6C8; }
.ms-cat-card i { font-size: 22px; color: #C9A84C; margin-bottom: 6px; display: block; }
.ms-cat-name  { font-size: 11px; color: #8B6914; }
.ms-cat-count { font-size: 10px; color: #999; margin-top: 2px; }

/* --- ランキング --- */
.ms-rank-list { display: flex; flex-direction: column; gap: 8px; }
.ms-rank-item {
  display: flex; align-items: center; gap: 12px;
  background: #FFFDF5; border: 0.5px solid #EDD98A;
  border-radius: 8px; padding: 10px 12px;
}
.ms-rank-num {
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 500; flex-shrink: 0;
}
.ms-rank-1 { background: #C9A84C; color: #fff; }
.ms-rank-2 { background: #B0B0B0; color: #fff; }
.ms-rank-3 { background: #CD8B5A; color: #fff; }
.ms-rank-info { flex: 1; }
.ms-rank-app  { font-size: 13px; font-weight: 500; color: #333; }
.ms-rank-desc { font-size: 11px; color: #999; }
.ms-rank-btn {
  font-size: 11px; background: #C9A84C; color: #fff;
  padding: 5px 12px; border-radius: 12px; border: none;
  cursor: pointer; flex-shrink: 0;
  text-decoration: none; display: inline-block;
}
.ms-rank-btn:hover { background: #a8872e; color: #fff; }

/* --- 著者自己紹介 --- */
.ms-voice-box {
  background: #FFFDF5;
  border-left: 3px solid #C9A84C;
  border-radius: 0 8px 8px 0;
  padding: 14px 16px;
}
.ms-voice-name { font-size: 11px; color: #C9A84C; font-weight: 500; margin-bottom: 6px; }
.ms-voice-text { font-size: 12px; color: #666; line-height: 1.7; }
.ms-voice-text em { color: #8B6914; font-style: normal; font-weight: 500; }

/* --- フッター --- */
.ms-footer { background: #6B5010; padding: 16px 24px; text-align: center; }
.ms-footer p { font-size: 11px; color: #EDD98A; }

/* --- レスポンシブ --- */
@media (max-width: 600px) {
  .ms-nav { display: none; }
  .ms-hero-inner { flex-direction: column; text-align: center; }
  .ms-hero-badges { justify-content: center; }
  .ms-featured-grid { grid-template-columns: 1fr; }
  .ms-cat-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ========================================
   フロントページ: Cocoon標準UIを非表示
   ======================================== */

/* Cocoon標準ヘッダー（ロゴ・グローバルナビ）を非表示 */
.home #header,
.home .header-container { display: none !important; }

/* サイドバーを非表示 */
.home #sidebar,
.home .sidebar { display: none !important; }

/* コンテンツをフル幅・中央寄せ */
.home #content,
.home .content-in {
  max-width: 860px !important;
  margin: 0 auto !important;
  padding: 0 !important;
}
.home #primary,
.home .main {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  padding: 0 !important;
}
.home .wrap { padding-top: 0 !important; }

/* Cocoonが自動生成する記事カード・ページネーションを非表示 */
.home .main > *:not(.motesaku-top) { display: none !important; }
.home .motesaku-top { display: block !important; }

/* サブ記事レイアウトを強制 */
.ms-featured-sub {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
}
.ms-sub-text {
  flex: 1 !important;
  min-width: 0 !important;
}
.ms-sub-cat,
.ms-sub-cat a  { color: #C9A84C !important; font-size: 10px !important; display: inline !important; }
.ms-sub-cat a + a::before { content: ', '; color: #C9A84C; }
.ms-sub-title  { color: #333    !important; font-size: 11px !important; display: block !important; margin-top: 2px !important; }
.ms-featured-cat,
.ms-featured-cat a { color: #C9A84C !important; font-size: 10px !important; }
.ms-featured-title { color: #333    !important; }
