/* ==========================================================
   Coin Map トップページ専用CSS（page-top.php 用・刷新案 2026-09-25）
   スマホ優先。すべて #cm-top 配下に閉じ込め、Cocoonのstyle.cssと衝突させない
   ========================================================== */
:root {
  --cm-navy: #12141b;
  --cm-navy-2: #1a1d26;
  --cm-navy-line: #2a2e3a;
  --cm-gold: #e8a83c;
  --cm-gold-dark: #b97d14;
  --cm-bg: #f3f4f7;
  --cm-card: #ffffff;
  --cm-line: #e2e5eb;
  --cm-text: #151821;
  --cm-soft: #5d6574;
  --cm-green: #0f9d6b;
  --cm-red: #d9423a;
  --cm-blue: #3d63f0;
  --cm-radius: 12px;
  --cm-font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
}
#cm-top, #cm-top * { box-sizing: border-box; }
#cm-top {
  background: var(--cm-bg);
  color: var(--cm-text);
  font-family: var(--cm-font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
#cm-top a { color: inherit; text-decoration: none; }
#cm-top ul, #cm-top ol { margin: 0; padding: 0; list-style: none; }
#cm-top h1, #cm-top h2, #cm-top h3, #cm-top p { margin: 0; }
#cm-top img { display: block; max-width: 100%; height: auto; }
#cm-top :focus-visible { outline: 2px solid var(--cm-gold); outline-offset: 2px; border-radius: 4px; }
#cm-top .cm-wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }

/* ---------- ヘッダー ---------- */
#cm-top .cm-header { background: var(--cm-navy); color: #fff; position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--cm-navy-line); }
#cm-top .cm-header .cm-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 0 12px; }
#cm-top .cm-logo { height: 46px; }
#cm-top .cm-logo { font-weight: 800; letter-spacing: .08em; font-size: 17px; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
#cm-top .cm-logo i { width: 10px; height: 10px; border-radius: 50%; background: var(--cm-gold); display: inline-block; }
#cm-top .cm-nav { display: flex; gap: 2px; order: 3; width: calc(100% + 16px); margin: 0 -16px 0 -10px; padding-bottom: 8px; overflow-x: auto; scrollbar-width: none; }
#cm-top .cm-nav::-webkit-scrollbar { display: none; }
#cm-top .cm-nav a { font-size: 13px; padding: 6px 10px; border-radius: 6px; white-space: nowrap; color: #c9cdd6; }
#cm-top .cm-nav a:hover { background: var(--cm-navy-2); color: #fff; }
#cm-top .cm-search { display: none; }
#cm-top .cm-search input { width: 200px; height: 34px; border-radius: 8px; border: 1px solid var(--cm-navy-line); background: var(--cm-navy-2); color: #fff; padding: 0 10px; font-size: 13px; }

/* ---------- ファーストビュー ---------- */
#cm-top .cm-fv { background: linear-gradient(180deg, var(--cm-navy) 0%, #1b2030 100%); color: #fff; padding: 16px 0 20px; }
#cm-top .cm-fv-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 12px; }
#cm-top .cm-fv h1 { font-size: 19px; line-height: 1.4; font-weight: 800; }
#cm-top .cm-fv h1 em { font-style: normal; color: var(--cm-gold); }
#cm-top .cm-updated { font-size: 12px; color: #9aa1af; white-space: nowrap; }
#cm-top .cm-updated b { color: #fff; font-weight: 600; }
#cm-top .cm-money { display: grid; gap: 10px; }
#cm-top .cm-mcard { position: relative; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; background: var(--cm-navy-2); border: 1px solid var(--cm-navy-line); border-radius: var(--cm-radius); padding: 12px 14px; transition: border-color .15s, transform .15s; }
#cm-top .cm-mcard:hover { border-color: var(--cm-gold); transform: translateY(-1px); }
#cm-top .cm-mcard.is-hot { border-color: rgba(232,168,60,.7); background: linear-gradient(135deg, #2a2415 0%, var(--cm-navy-2) 60%); }
#cm-top .cm-micon { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; font-size: 22px; background: rgba(232,168,60,.14); }
#cm-top .cm-mcard .cm-mlabel { font-size: 11px; font-weight: 700; color: var(--cm-gold); letter-spacing: .04em; }
#cm-top .cm-mcard h2 { font-size: 15px; line-height: 1.35; font-weight: 700; }
#cm-top .cm-mcard .cm-mdesc { font-size: 12px; color: #aab0bd; line-height: 1.45; margin-top: 2px; }
#cm-top .cm-mcard .cm-mgo { font-size: 20px; color: var(--cm-gold); }
#cm-top .cm-mcard .cm-mbtn { display: none; }
#cm-top .cm-mcard a.cm-stretch::after { content: ""; position: absolute; inset: 0; border-radius: var(--cm-radius); }
#cm-top .cm-mcard .cm-maff { position: relative; z-index: 2; }

/* ---------- 共通セクション ---------- */
#cm-top .cm-sec { padding: 24px 0 8px; }
#cm-top .cm-sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
#cm-top .cm-sec-head h2 { font-size: 19px; font-weight: 800; line-height: 1.3; padding-left: 10px; border-left: 4px solid var(--cm-gold); }
#cm-top .cm-more { font-size: 13px; font-weight: 600; color: var(--cm-blue); white-space: nowrap; }
#cm-top .cm-note { font-size: 11px; color: var(--cm-soft); line-height: 1.6; margin-top: 8px; }
#cm-top .cm-pr { display: inline-block; font-size: 10px; font-weight: 700; color: var(--cm-soft); border: 1px solid var(--cm-line); border-radius: 4px; padding: 0 5px; margin-left: 6px; vertical-align: middle; }

/* ---------- 取引所ランキング ---------- */
#cm-top .cm-rank { display: grid; gap: 10px; }
#cm-top .cm-rrow { background: var(--cm-card); border: 1px solid var(--cm-line); border-radius: var(--cm-radius); padding: 12px; display: grid; grid-template-columns: 30px 1fr; grid-template-areas: "no main" "btn btn"; gap: 10px 10px; align-items: center; }
#cm-top .cm-rrow.is-1 { border: 2px solid var(--cm-gold); box-shadow: 0 4px 16px rgba(232,168,60,.15); }
#cm-top .cm-rno { grid-area: no; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; background: #eef0f4; color: var(--cm-soft); }
#cm-top .is-1 .cm-rno { background: var(--cm-gold); color: #fff; }
#cm-top .is-2 .cm-rno { background: #9aa3b2; color: #fff; }
#cm-top .is-3 .cm-rno { background: #c0845a; color: #fff; }
#cm-top .cm-rmain { grid-area: main; display: flex; align-items: center; gap: 10px; min-width: 0; }
#cm-top .cm-rlogo { width: 88px; height: 36px; flex: none; display: grid; place-items: center; background: #fff; border: 1px solid var(--cm-line); border-radius: 8px; padding: 4px 6px; }
#cm-top .cm-rlogo img { max-height: 24px; width: auto; object-fit: contain; }
#cm-top .cm-rinfo { min-width: 0; }
#cm-top .cm-rname { font-weight: 800; font-size: 15px; line-height: 1.3; }
#cm-top .cm-rname small { font-size: 10px; font-weight: 700; color: var(--cm-soft); background: #eef0f4; border-radius: 4px; padding: 1px 5px; margin-left: 4px; vertical-align: 2px; }
#cm-top .cm-stars { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--cm-soft); }
#cm-top .cm-star { position: relative; display: inline-block; font-size: 14px; letter-spacing: 1px; color: #d7dbe2; line-height: 1; }
#cm-top .cm-star::before { content: "★★★★★"; }
#cm-top .cm-star span { position: absolute; left: 0; top: 0; overflow: hidden; white-space: nowrap; color: var(--cm-gold); }
#cm-top .cm-star span::before { content: "★★★★★"; }
#cm-top .cm-stars b { color: var(--cm-text); font-size: 13px; }
#cm-top .cm-rpoint { font-size: 12px; color: var(--cm-soft); line-height: 1.4; margin-top: 2px; }
#cm-top .cm-rperk { display: inline-block; font-size: 11px; font-weight: 700; color: var(--cm-red); background: #fdeeed; border-radius: 4px; padding: 1px 6px; margin-top: 3px; }
#cm-top .cm-rbtns { grid-area: btn; display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; }
#cm-top .cm-btn { display: flex; align-items: center; justify-content: center; height: 42px; border-radius: 8px; font-size: 13px; font-weight: 700; text-align: center; line-height: 1.2; padding: 0 8px; }
#cm-top .cm-btn-sub { background: #fff; border: 1px solid var(--cm-line); color: var(--cm-text); }
#cm-top .cm-btn-cta { background: var(--cm-gold); color: #1a1405; box-shadow: 0 2px 0 var(--cm-gold-dark); }
#cm-top .cm-btn-cta:hover { filter: brightness(1.05); }

/* ---------- 2カラム（新着＋人気） ---------- */
#cm-top .cm-cols { display: grid; gap: 8px; }
#cm-top .cm-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
#cm-top .cm-post { display: grid; grid-template-columns: 112px 1fr; gap: 10px; background: var(--cm-card); border: 1px solid var(--cm-line); border-radius: 10px; padding: 8px; align-items: start; }
#cm-top .cm-thumb { position: relative; aspect-ratio: 16/9; border-radius: 6px; overflow: hidden; background: var(--cm-navy-2); }
#cm-top .cm-thumb img { width: 100%; height: 100%; object-fit: cover; }
#cm-top .cm-thumb.is-empty { display: grid; place-items: center; color: var(--cm-gold); font-size: 11px; font-weight: 700; text-align: center; padding: 4px; }
#cm-top .cm-post h3 { font-size: 13.5px; font-weight: 700; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
#cm-top .cm-meta { display: flex; gap: 6px; align-items: center; font-size: 11px; color: var(--cm-soft); margin-top: 4px; }
#cm-top .cm-cat { font-weight: 700; color: var(--cm-blue); }
#cm-top .cm-new { font-size: 10px; font-weight: 800; color: #fff; background: var(--cm-red); border-radius: 3px; padding: 0 4px; }

#cm-top .cm-side-box { background: var(--cm-card); border: 1px solid var(--cm-line); border-radius: var(--cm-radius); padding: 14px; }
#cm-top .cm-side-box h2 { font-size: 16px; font-weight: 800; margin-bottom: 8px; padding-left: 10px; border-left: 4px solid var(--cm-gold); }
#cm-top .cm-pop li + li { border-top: 1px solid var(--cm-line); }
#cm-top .cm-pop a { display: grid; grid-template-columns: 22px 72px 1fr; gap: 8px; align-items: center; padding: 8px 0; }
#cm-top .cm-pop .cm-pno { font-weight: 800; font-size: 16px; color: var(--cm-gold); text-align: center; }
#cm-top .cm-pop .cm-thumb { border-radius: 5px; }
#cm-top .cm-pop span.t { font-size: 13px; font-weight: 700; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- カテゴリ別 ---------- */
#cm-top .cm-catgrid { display: grid; gap: 12px; }
#cm-top .cm-catbox { background: var(--cm-card); border: 1px solid var(--cm-line); border-radius: var(--cm-radius); padding: 14px; }
#cm-top .cm-catbox-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
#cm-top .cm-catbox h3 { font-size: 15px; font-weight: 800; }
#cm-top .cm-catbox li + li { border-top: 1px solid var(--cm-line); }
#cm-top .cm-catbox li a { display: grid; grid-template-columns: 80px 1fr; gap: 10px; align-items: center; padding: 8px 0; }
#cm-top .cm-catbox li span.t { font-size: 13px; font-weight: 600; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- サービスから探す ---------- */
#cm-top .cm-svc { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
#cm-top .cm-svc a { display: flex; align-items: center; gap: 8px; background: var(--cm-card); border: 1px solid var(--cm-line); border-radius: 10px; padding: 8px 10px; font-size: 13px; font-weight: 700; min-height: 48px; }
#cm-top .cm-svc a:hover { border-color: var(--cm-gold); }
#cm-top .cm-svc-logo { width: 64px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 6px; overflow: hidden; }
#cm-top .cm-svc-logo img { max-width: 60px; max-height: 26px; width: auto; object-fit: contain; }
#cm-top .cm-svc-logo.is-dark { background: var(--cm-navy); }
#cm-top .cm-svc-logo.is-text { background: rgba(232,168,60,.16); color: var(--cm-gold-dark); font-weight: 800; font-size: 15px; }
#cm-top .cm-svc small { display: block; font-size: 10px; color: var(--cm-soft); font-weight: 600; }
#cm-top .cm-svc-group { font-size: 12px; font-weight: 800; color: var(--cm-soft); margin: 14px 0 6px; }

/* ---------- 注意書き（Cocoonフッターの上） ---------- */
#cm-top .cm-disclaimer { padding: 24px 0 96px; }
#cm-top .cm-disclaimer p { font-size: 11px; color: var(--cm-soft); line-height: 1.7; border-top: 1px solid var(--cm-line); padding-top: 14px; }

/* スマホ下部固定CTA */
#cm-top .cm-fixcta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: rgba(18,20,27,.96); padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); display: flex; gap: 8px; align-items: center; }
#cm-top .cm-fixcta p { color: #fff; font-size: 12px; line-height: 1.35; flex: 1; }
#cm-top .cm-fixcta p b { color: var(--cm-gold); }
#cm-top .cm-fixcta .cm-btn { height: 40px; padding: 0 14px; white-space: nowrap; }

/* ==========================================================
   タブレット以上
   ========================================================== */
@media (min-width: 640px) {
  #cm-top .cm-money { grid-template-columns: repeat(3, 1fr); }
  #cm-top .cm-mcard { grid-template-columns: 1fr; align-content: start; gap: 8px; padding: 16px; }
  #cm-top .cm-mcard .cm-mgo { display: none; }
  #cm-top .cm-mcard .cm-mbtn { display: flex; margin-top: 4px; }
  #cm-top .cm-grid { grid-template-columns: repeat(2, 1fr); }
  #cm-top .cm-post { grid-template-columns: 1fr; padding: 0; overflow: hidden; }
  #cm-top .cm-post .cm-thumb { border-radius: 0; }
  #cm-top .cm-post .cm-pbody { padding: 8px 12px 12px; }
  #cm-top .cm-svc { grid-template-columns: repeat(4, 1fr); }
  #cm-top .cm-catgrid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  #cm-top { font-size: 16px; }
  #cm-top .cm-header .cm-wrap { flex-wrap: nowrap; height: 60px; }
  #cm-top .cm-logo { height: auto; }
  #cm-top .cm-nav { order: 0; width: auto; margin: 0 0 0 auto; padding: 0; }
  #cm-top .cm-nav a { font-size: 14px; }
  #cm-top .cm-search { display: block; }
  #cm-top .cm-fv { padding: 28px 0 32px; }
  #cm-top .cm-fv h1 { font-size: 26px; }
  #cm-top .cm-mcard h2 { font-size: 18px; }
  #cm-top .cm-mcard .cm-mdesc { font-size: 13px; }
  #cm-top .cm-rrow { grid-template-columns: 36px minmax(0,1fr) 300px; grid-template-areas: "no main btn"; padding: 14px 18px; }
  #cm-top .cm-rno { width: 36px; height: 36px; font-size: 16px; }
  #cm-top .cm-rlogo { width: 120px; height: 44px; }
  #cm-top .cm-rlogo img { max-height: 28px; }
  #cm-top .cm-rname { font-size: 17px; }
  #cm-top .cm-rpoint { font-size: 13px; }
  #cm-top .cm-rbtns { grid-template-columns: 1fr 1.4fr; }
  #cm-top .cm-cols { grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
  #cm-top .cm-grid { grid-template-columns: repeat(3, 1fr); }
  #cm-top .cm-side { position: sticky; top: 76px; }
  #cm-top .cm-catgrid { grid-template-columns: repeat(3, 1fr); }
  #cm-top .cm-svc { grid-template-columns: repeat(6, 1fr); }
  #cm-top .cm-fixcta { display: none; }
  #cm-top .cm-disclaimer { padding-bottom: 32px; }
}

/* ==========================================================
   Cocoonの外枠をトップだけ全幅・余白なしにする（page-top.php 使用ページ限定）
   ========================================================== */
body.page-template-page-top-php .content { margin-top: 0; }
body.page-template-page-top-php .content-in { max-width: none; width: 100%; padding: 0; margin: 0; display: block; }
body.page-template-page-top-php .main { width: 100%; max-width: none; padding: 0; margin: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
body.page-template-page-top-php #sidebar { display: none; }
body.page-template-page-top-php #cm-top { overflow-x: clip; }
@media (max-width: 959px) { body.page-template-page-top-php #footer { padding-bottom: 72px; } }
#cm-top .cm-prline { font-size: 11px; color: #9aa1af; margin: -4px 0 10px; }

/* ---------- 2026-09-25 仕上げ：Cocoonの白ヘッダーをトップだけ隠し、紺バー1本に統合 ---------- */
body.page-template-page-top-php #header-container,
body.page-template-page-top-php #navi { display: none; }
#cm-top .cm-header .cm-wrap { flex-wrap: nowrap; height: 52px; gap: 0 10px; }
#cm-top .cm-logo { height: auto; font-size: 14px; letter-spacing: .02em; color: #fff; flex: none; }
#cm-top .cm-tagline { display: none; }
#cm-top .cm-nav { order: 0; flex: 1 1 auto; min-width: 0; width: auto; margin: 0; padding: 0; justify-content: flex-start; }
#cm-top .cm-nav a { font-size: 12px; padding: 6px 7px; }
@media (min-width: 960px) {
  #cm-top .cm-header .cm-wrap { height: 60px; gap: 0 16px; }
  #cm-top .cm-logo { font-size: 17px; }
  #cm-top .cm-nav { justify-content: flex-end; }
  #cm-top .cm-nav a { font-size: 14px; padding: 6px 10px; }
}
@media (min-width: 1140px) {
  #cm-top .cm-tagline { display: block; font-size: 11px; color: #9aa1af; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
}
/* スマホ：トップではCocoonの下メニューを出さず、MEXC登録バーだけにする */
@media (max-width: 959px) {
  body.page-template-page-top-php .mobile-footer-menu-buttons { display: none !important; }
}

#cm-top .cm-logo-sub, #cm-top .cm-nav .cm-l { display: none; }
#cm-top .cm-nav { flex: 0 1 auto; margin-left: auto; }
@media (min-width: 960px) {
  #cm-top .cm-logo-sub, #cm-top .cm-nav .cm-l { display: inline; }
  #cm-top .cm-nav { flex: none; }
  #cm-top .cm-tagline { flex: 0 1 auto; }
}

/* 2026-10-05 トップのランキングを CEX／PerpDEX に分割：追加分（page-top.css の末尾に追記） */
#cm-top .cm-rlogo-txt { font-size: 12px; font-weight: 800; color: var(--cm-text); letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#cm-top .cm-air { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; margin-top: 4px; font-size: 11px; line-height: 1.4; color: var(--cm-soft); }
#cm-top .cm-air-k { font-weight: 700; color: #1d5fa8; background: #e9f1fb; border-radius: 4px; padding: 1px 6px; }
#cm-top .cm-air-v { font-weight: 800; color: #1d5fa8; letter-spacing: 1px; }
#cm-top .cm-air-t { flex-basis: 100%; }
#cm-top .cm-air.is-0 .cm-air-k { color: #6b7280; background: #eef0f4; }
#cm-top .cm-air.is-0 .cm-air-v { font-weight: 700; color: #6b7280; background: #eef0f4; border-radius: 4px; padding: 1px 6px; letter-spacing: 0; }
@media (min-width: 640px) { #cm-top .cm-air-t { flex-basis: auto; } }

/* 2026-10-12 トップ3枠をそろえて強調（カード比較を最も目立たせる） */
#cm-top .cm-mcard { border: 1px solid rgba(232,168,60,.75); background: linear-gradient(135deg, #2a2415 0%, var(--cm-navy-2) 60%); grid-template-columns: 52px 1fr; }
#cm-top .cm-mcard .cm-micon { width: 52px; height: 52px; font-size: 28px; background: rgba(232,168,60,.2); }
#cm-top .cm-mcard .cm-mgo { display: none; }
#cm-top .cm-mcard .cm-mbtn { display: flex; margin-top: 8px; }
#cm-top .cm-mcard .cm-btn-sub { background: var(--cm-gold); border: 0; color: #1a1405; box-shadow: 0 2px 0 var(--cm-gold-dark); }
#cm-top .cm-mcard:hover .cm-btn-sub { filter: brightness(1.05); }
#cm-top .cm-mcard.is-feature { border: 2px solid var(--cm-gold); background: linear-gradient(135deg, #6b4f17 0%, #3a2e14 45%, var(--cm-navy-2) 100%); padding: 16px 14px; box-shadow: 0 4px 16px rgba(232,168,60,.25); }
#cm-top .cm-mcard.is-feature h2 { font-size: 17px; }
#cm-top .cm-mcard.is-feature .cm-mdesc { color: #e3e6ee; }
#cm-top .cm-mcard .cm-mbadge { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: var(--cm-gold); color: #1a1405; font-size: 10px; font-weight: 700; letter-spacing: 0; vertical-align: 1px; }
@media (min-width: 640px) {
  #cm-top .cm-money { grid-template-columns: 1.35fr 1fr 1fr; align-items: stretch; }
  #cm-top .cm-mcard { grid-template-columns: 1fr; }
  #cm-top .cm-mcard .cm-micon { width: 56px; height: 56px; font-size: 30px; }
  #cm-top .cm-mcard .cm-mbtn { margin-top: auto; }
  #cm-top .cm-mcard.is-feature h2 { font-size: 20px; }
}
#cm-top .cm-rpoint .cm-rhook { font-weight: 700; color: var(--cm-ink, inherit); }
