/*
Theme Name: BTC Analyze v2
Theme URI: https://btc-analyze.com
Description: Clean editorial cryptocurrency media theme — light-first, dark-mode ready
Version: 2.0.0
Author: Bitcoin Analyze
Text Domain: btc-theme-v2
*/

/* ==========================================================================
   1. Design Tokens
   ========================================================================== */
:root {
  color-scheme: light;

  --bg: #ffffff;
  --bg-soft: #f6f8fa;
  --card: #ffffff;
  --border: #e5e9f0;
  --border-strong: #d3dae4;

  --ink: #101828;
  --text: #344054;
  --muted: #667085;

  --brand: #f7931a;
  --brand-deep: #c2570b;
  --brand-soft: #fff4e6;
  --navy: #0f2043;

  --link: #c2570b;
  --link-hover: #9a4207;

  --font-sans: 'Noto Sans JP', 'Inter', -apple-system, BlinkMacSystemFont, 'Hiragino Kaku Gothic ProN', sans-serif;
  --font-en: 'Inter', -apple-system, sans-serif;

  --container: 1200px;
  --header-h: 64px;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-md: 0 6px 16px -6px rgba(16, 24, 40, 0.12);
  --shadow-lg: 0 12px 32px -8px rgba(16, 24, 40, 0.18);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;

    --bg: #0b1220;
    --bg-soft: #0e1729;
    --card: #121c30;
    --border: #1e2a41;
    --border-strong: #2a3854;

    --ink: #f1f5f9;
    --text: #c4cede;
    --muted: #8b98ad;

    --brand: #f7a53a;
    --brand-deep: #f7a53a;
    --brand-soft: rgba(247, 147, 26, 0.12);
    --navy: #16305e;

    --link: #f0b064;
    --link-hover: #f7c78d;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 6px 16px -6px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 12px 32px -8px rgba(0, 0, 0, 0.6);
  }
}

/* 手動テーマ切替（data-theme はOS設定より優先） */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1220; --bg-soft: #0e1729; --card: #121c30;
  --border: #1e2a41; --border-strong: #2a3854;
  --ink: #f1f5f9; --text: #c4cede; --muted: #8b98ad;
  --brand: #f7a53a; --brand-deep: #f7a53a; --brand-soft: rgba(247, 147, 26, 0.12);
  --navy: #16305e; --link: #f0b064; --link-hover: #f7c78d;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 6px 16px -6px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 32px -8px rgba(0, 0, 0, 0.6);
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff; --bg-soft: #f6f8fa; --card: #ffffff;
  --border: #e5e9f0; --border-strong: #d3dae4;
  --ink: #101828; --text: #344054; --muted: #667085;
  --brand: #f7931a; --brand-deep: #c2570b; --brand-soft: #fff4e6;
  --navy: #0f2043; --link: #c2570b; --link-hover: #9a4207;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-md: 0 6px 16px -6px rgba(16, 24, 40, 0.12);
  --shadow-lg: 0 12px 32px -8px rgba(16, 24, 40, 0.18);
}

/* ==========================================================================
   2. Reset / Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

html { background: var(--bg); }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  background: transparent;
  -webkit-font-smoothing: antialiased;
}

/* 3Dネットワーク背景キャンバス（全ページ・コンテンツの背面） */
.btc-bg-canvas {
  position: fixed; inset: 0; z-index: -1;
  width: 100vw; height: 100vh;
  pointer-events: none;
}
/* コンテンツ面はキャンバスより手前で、カード等が背景を透かさないようにする */
.btc-content-area, .btc-hero, .btc-footer, .btc-header, .btc-ticker { position: relative; z-index: 1; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); }

h1, h2, h3, h4, h5, h6 {
  color: var(--ink);
  line-height: 1.45;
  margin: 0 0 0.6em;
  font-weight: 700;
  overflow-wrap: anywhere;
}

p { margin: 0 0 1.2em; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.btc-container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .btc-container { padding: 0 16px; } }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--navy); color: #fff; padding: 8px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* ==========================================================================
   3. Header
   ========================================================================== */
.btc-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.btc-header-inner {
  display: flex; align-items: center; gap: 28px;
  height: var(--header-h);
}

.btc-logo { display: inline-flex; align-items: center; gap: 9px; flex-shrink: 0; }
.btc-logo-icon { display: inline-flex; width: 26px; height: 26px; }
.btc-logo-icon svg { width: 100%; height: 100%; }
.btc-logo-text {
  font-family: var(--font-en);
  font-size: 1.18rem; font-weight: 700; letter-spacing: -0.02em;
  color: var(--ink);
}
.btc-logo-accent { color: var(--brand-deep); }

.btc-nav { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.btc-nav::-webkit-scrollbar { display: none; }
.btc-nav-list {
  display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; white-space: nowrap;
}
.btc-nav-list a {
  display: block; padding: 8px 13px;
  font-size: 0.9rem; font-weight: 500; color: var(--text);
  border-radius: var(--radius-full);
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.btc-nav-list a:hover { background: var(--bg-soft); color: var(--ink); }

.btc-header-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.btc-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: 0; background: transparent;
  color: var(--text); border-radius: var(--radius-full); cursor: pointer;
}
.btc-icon-btn:hover { background: var(--bg-soft); color: var(--ink); }

/* Header search dropdown */
.btc-header-search {
  display: none;
  border-top: 1px solid var(--border);
  padding: 14px 0;
  background: var(--bg);
}
.btc-header-search.open { display: block; }

/* Mobile menu */
.btc-mobile-toggle { display: none; }
@media (max-width: 900px) {
  .btc-nav { display: none; }
  .btc-mobile-toggle { display: inline-flex; }
  body.menu-open .btc-nav {
    display: block; position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 12px 16px 16px; box-shadow: var(--shadow-md);
  }
  body.menu-open .btc-nav-list { flex-direction: column; gap: 2px; white-space: normal; }
  body.menu-open .btc-nav-list a { padding: 11px 14px; font-size: 1rem; }
}

/* ==========================================================================
   4. Layout
   ========================================================================== */
.btc-content-area {
  display: grid; grid-template-columns: minmax(0, 1fr) 316px; gap: 44px;
  padding-top: 36px; padding-bottom: 72px;
}
@media (max-width: 1024px) {
  .btc-content-area { grid-template-columns: 1fr; gap: 48px; }
}

.btc-section-title {
  font-size: 1.35rem; letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 22px;
}
.btc-section-title::before {
  content: ""; width: 5px; height: 1.15em; border-radius: 3px;
  background: linear-gradient(180deg, var(--brand), #ffb95e);
}

/* ==========================================================================
   5. Hero (front page)
   ========================================================================== */
.btc-hero { padding: 36px 0 8px; }
.btc-hero-grid {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 28px;
}
@media (max-width: 900px) { .btc-hero-grid { grid-template-columns: 1fr; } }

.btc-hero-main {
  position: relative; display: block; border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--border); background: var(--card);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}
.btc-hero-main:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.btc-hero-main-thumb { aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-soft); }
.btc-hero-main-thumb img { width: 100%; height: 100%; object-fit: cover; }
.btc-hero-main-body { padding: 20px 24px 24px; }
.btc-hero-main-title { font-size: 1.32rem; line-height: 1.5; margin: 8px 0 6px; color: var(--ink); }
.btc-hero-main:hover .btc-hero-main-title { color: var(--brand-deep); }

.btc-hero-list { display: flex; flex-direction: column; gap: 14px; }
.btc-hero-item {
  display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 14px;
  align-items: center;
  padding: 10px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--card);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btc-hero-item:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.btc-hero-item-thumb {
  aspect-ratio: 16 / 10; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-soft);
}
.btc-hero-item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.btc-hero-item-title {
  font-size: 0.94rem; font-weight: 600; line-height: 1.55; color: var(--ink); margin: 2px 0 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.btc-hero-item:hover .btc-hero-item-title { color: var(--brand-deep); }

/* ==========================================================================
   6. Cards
   ========================================================================== */
.btc-card-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); gap: 24px;
}

.btc-card {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); background: var(--card);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease), border-color 0.25s var(--ease);
}
.btc-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: var(--border-strong); }
.btc-card-link { display: block; color: inherit; }

.btc-card-thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-soft); }
.btc-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s var(--ease); }
.btc-card:hover .btc-card-thumb img { transform: scale(1.04); }
.btc-card-thumb-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--navy), #1b3a75);
  display: flex; align-items: center; justify-content: center;
}
.btc-card-thumb-placeholder::after {
  content: "₿"; font-size: 2.6rem; color: rgba(255, 255, 255, 0.28); font-weight: 700;
}

.btc-card-body { padding: 16px 18px 18px; }
.btc-card-title {
  font-size: 1.02rem; line-height: 1.55; margin: 0 0 8px; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.btc-card:hover .btc-card-title { color: var(--brand-deep); }
.btc-card-excerpt {
  font-size: 0.86rem; color: var(--muted); line-height: 1.7; margin: 0 0 10px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.btc-card-meta { display: flex; align-items: center; gap: 10px; font-size: 0.78rem; color: var(--muted); }

.btc-chip {
  display: inline-block; padding: 3px 10px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em;
  color: var(--brand-deep); background: var(--brand-soft);
  border-radius: var(--radius-full);
}

/* ==========================================================================
   7. Category pills nav
   ========================================================================== */
.btc-cat-nav { padding: 20px 0 4px; }
.btc-cat-nav-inner { display: flex; gap: 8px; flex-wrap: wrap; }
.btc-cat-pill {
  display: inline-block; padding: 7px 16px;
  font-size: 0.86rem; font-weight: 600;
  color: var(--text); background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius-full);
  transition: all 0.18s var(--ease);
}
.btc-cat-pill:hover {
  color: var(--brand-deep); border-color: var(--brand);
  background: var(--brand-soft);
}
.btc-cat-pill-primary {
  background: var(--navy); border-color: var(--navy); color: #ffffff;
}
.btc-cat-pill-primary:hover { background: var(--brand); border-color: var(--brand); color: #0f2043; }

/* ==========================================================================
   8. Article
   ========================================================================== */
.btc-breadcrumb {
  font-size: 0.8rem; color: var(--muted); margin-bottom: 18px;
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
}
.btc-breadcrumb a { color: var(--muted); }
.btc-breadcrumb a:hover { color: var(--brand-deep); }
.btc-breadcrumb-sep { color: var(--border-strong); }
.btc-breadcrumb-current {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 320px;
}

.btc-article-header { margin-bottom: 24px; }
.btc-article-title { font-size: 1.75rem; line-height: 1.5; letter-spacing: -0.01em; margin: 10px 0 14px; }
@media (max-width: 640px) { .btc-article-title { font-size: 1.4rem; } }
.btc-article-meta { display: flex; flex-wrap: wrap; gap: 16px; font-size: 0.84rem; color: var(--muted); }
.btc-article-meta time { display: inline-flex; align-items: center; gap: 5px; }

.btc-featured-img { margin: 0 0 32px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.btc-featured-img img { width: 100%; }

/* --- Article body typography --- */
.btc-article-body { font-size: 1.02rem; line-height: 2; color: var(--text); letter-spacing: 0.015em; }
@media (min-width: 900px) { .btc-article-body { font-size: 1.06rem; } }
.btc-article-body p { margin-bottom: 1.5em; }

/* 日本語の文節改行・詰め（対応ブラウザのみ・progressive enhancement） */
h1, h2, h3, .btc-card-title, .btc-hero-main-title, .btc-hero-item-title {
  font-feature-settings: "palt";
  word-break: auto-phrase;
}

/* 強調にマーカー風の下線ハイライト */
.btc-article-body strong {
  background: linear-gradient(transparent 64%, rgba(247, 147, 26, 0.3) 64%);
  padding: 0 1px;
}

.btc-article-body h2 {
  font-size: 1.38rem; margin: 2.4em 0 1em;
  padding-bottom: 12px; border-bottom: 2px solid var(--border);
  position: relative;
}
.btc-article-body h2::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 64px; height: 2px; background: var(--brand);
}
.btc-article-body h3 { font-size: 1.16rem; margin: 2em 0 0.8em; padding-left: 14px; border-left: 4px solid var(--brand); }
.btc-article-body h4 { font-size: 1.04rem; margin: 1.8em 0 0.7em; }

.btc-article-body a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--link) 45%, transparent); }
.btc-article-body a:hover { text-decoration-color: var(--link-hover); }

.btc-article-body ul, .btc-article-body ol { padding-left: 1.6em; margin: 0 0 1.4em; }
.btc-article-body li { margin-bottom: 0.45em; }
.btc-article-body li::marker { color: var(--brand); }

.btc-article-body blockquote {
  margin: 1.6em 0; padding: 18px 22px;
  background: var(--bg-soft); border-left: 4px solid var(--brand);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text);
}
.btc-article-body blockquote p:last-child { margin-bottom: 0; }

.btc-article-body table {
  width: 100%; border-collapse: collapse; margin: 1.6em 0;
  font-size: 0.92rem; display: block; overflow-x: auto;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.btc-article-body th {
  background: var(--navy); color: #fff; font-weight: 600;
  padding: 11px 14px; text-align: left; white-space: nowrap;
}
.btc-article-body td { padding: 11px 14px; border-top: 1px solid var(--border); }
.btc-article-body tr:nth-child(even) td { background: var(--bg-soft); }

.btc-article-body code {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 0.88em;
  background: var(--bg-soft); border: 1px solid var(--border);
  padding: 2px 6px; border-radius: 5px;
}
.btc-article-body pre {
  background: #0f172a; color: #e2e8f0; padding: 18px 20px;
  border-radius: var(--radius-sm); overflow-x: auto; line-height: 1.6;
}
.btc-article-body pre code { background: none; border: 0; padding: 0; color: inherit; }

.btc-article-body img { border-radius: var(--radius-sm); margin: 1.4em auto; }
.btc-article-body hr { border: 0; border-top: 1px solid var(--border); margin: 2.5em 0; }

/* 目次 (in-content TOC list) */
.btc-article-body .btc-toc,
.btc-article-body #toc {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 24px; margin: 1.8em 0;
}

/* ==========================================================================
   9. Tags / Share / Author / Related / PrevNext
   ========================================================================== */
.btc-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 36px 0 0; }
.btc-tag {
  font-size: 0.8rem; padding: 5px 13px; border-radius: var(--radius-full);
  background: var(--bg-soft); color: var(--muted); border: 1px solid var(--border);
}
.btc-tag:hover { color: var(--brand-deep); border-color: var(--brand); background: var(--brand-soft); }

.btc-share {
  display: flex; align-items: center; gap: 10px;
  margin: 28px 0; padding: 16px 20px;
  background: var(--bg-soft); border-radius: var(--radius);
}
.btc-share-label { font-size: 0.84rem; font-weight: 600; color: var(--muted); margin-right: 4px; }
.btc-share-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--radius-full);
  background: var(--card); border: 1px solid var(--border); color: var(--text);
  cursor: pointer; transition: all 0.18s var(--ease);
}
.btc-share-btn:hover { color: var(--brand-deep); border-color: var(--brand); transform: translateY(-2px); }
.btc-share-btn.copied { color: #fff; background: #16a34a; border-color: #16a34a; }

.btc-author-box {
  display: flex; gap: 18px; align-items: flex-start;
  padding: 22px 24px; margin: 28px 0;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--card);
}
.btc-author-avatar img { border-radius: var(--radius-full); }
.btc-author-name { font-size: 1rem; margin: 0 0 4px; }
.btc-author-bio { font-size: 0.87rem; color: var(--muted); margin: 0; line-height: 1.7; }

.btc-prevnext {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 36px 0 0;
}
@media (max-width: 640px) { .btc-prevnext { grid-template-columns: 1fr; } }
.btc-prevnext-link {
  display: block; padding: 16px 18px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--card);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btc-prevnext-link:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.btc-prevnext-dir { font-size: 0.76rem; color: var(--muted); display: block; margin-bottom: 6px; }
.btc-prevnext-title {
  font-size: 0.92rem; font-weight: 600; color: var(--ink); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.btc-prevnext-link:hover .btc-prevnext-title { color: var(--brand-deep); }
.btc-prevnext-next { text-align: right; }

.btc-related { margin: 48px 0 0; }
.btc-related-title { font-size: 1.2rem; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.btc-related-title::before {
  content: ""; width: 5px; height: 1.1em; border-radius: 3px;
  background: linear-gradient(180deg, var(--brand), #ffb95e);
}
.btc-related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 760px) { .btc-related-grid { grid-template-columns: 1fr; } }
.btc-related-card {
  display: block; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); background: var(--card);
  transition: box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}
.btc-related-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.btc-related-thumb { aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-soft); }
.btc-related-thumb img { width: 100%; height: 100%; object-fit: cover; }
.btc-related-body { padding: 12px 14px 14px; }
.btc-related-body h4 {
  font-size: 0.88rem; font-weight: 600; line-height: 1.55; margin: 0 0 6px; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.btc-related-card:hover h4 { color: var(--brand-deep); }
.btc-related-body time { font-size: 0.76rem; color: var(--muted); }

/* ==========================================================================
   10. Sidebar
   ========================================================================== */
.btc-sidebar { display: flex; flex-direction: column; gap: 24px; }
@media (min-width: 1025px) {
  .btc-sidebar-sticky { position: sticky; top: calc(var(--header-h) + 24px); }
}

.btc-widget {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--card); padding: 20px 22px;
}
.btc-widget-title {
  font-size: 0.98rem; margin: 0 0 16px;
  display: flex; align-items: center; gap: 9px;
}
.btc-widget-title::before {
  content: ""; width: 4px; height: 1.05em; border-radius: 2px; background: var(--brand);
}

.btc-popular-list { display: flex; flex-direction: column; }
.btc-popular-item {
  display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px;
  padding: 10px 0; align-items: baseline;
  border-bottom: 1px solid var(--border);
}
.btc-popular-item:last-child { border-bottom: 0; padding-bottom: 0; }
.btc-popular-item:first-child { padding-top: 0; }
.btc-popular-num {
  font-family: var(--font-en); font-weight: 800; font-size: 1.05rem;
  color: var(--brand); font-style: italic;
}
.btc-popular-title {
  font-size: 0.88rem; font-weight: 500; color: var(--ink); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.btc-popular-item:hover .btc-popular-title { color: var(--brand-deep); }

/* 追従目次 */
.btc-toc-widget { max-height: calc(100vh - var(--header-h) - 60px); overflow-y: auto; }
.btc-toc-nav { display: flex; flex-direction: column; }
.btc-toc-link {
  font-size: 0.84rem; line-height: 1.6; color: var(--muted);
  padding: 7px 0 7px 14px; border-left: 2px solid var(--border);
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.btc-toc-link:hover { color: var(--brand-deep); }
.btc-toc-link.active { color: var(--ink); border-left-color: var(--brand); font-weight: 600; }

.btc-cat-list { list-style: none; margin: 0; padding: 0; }
.btc-cat-list li { border-bottom: 1px solid var(--border); }
.btc-cat-list li:last-child { border-bottom: 0; }
.btc-cat-list a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 2px; font-size: 0.9rem; color: var(--text);
}
.btc-cat-list a:hover { color: var(--brand-deep); }
.btc-cat-count {
  font-size: 0.75rem; color: var(--muted);
  background: var(--bg-soft); border-radius: var(--radius-full); padding: 1px 9px;
}

/* ==========================================================================
   11. Search form
   ========================================================================== */
.btc-search-form { display: flex; gap: 8px; }
.btc-search-input {
  flex: 1; min-width: 0; padding: 10px 16px;
  font-size: 0.92rem; font-family: inherit;
  color: var(--ink); background: var(--bg-soft);
  border: 1px solid var(--border); border-radius: var(--radius-full);
  transition: border-color 0.15s var(--ease);
}
.btc-search-input:focus { outline: none; border-color: var(--brand); background: var(--card); }
.btc-search-submit {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; flex-shrink: 0;
  border: 0; border-radius: var(--radius-full); cursor: pointer;
  background: var(--navy); color: #fff;
  transition: opacity 0.15s var(--ease);
}
.btc-search-submit:hover { opacity: 0.85; }

/* ==========================================================================
   12. Archive / Pagination / 404
   ========================================================================== */
.btc-archive-header { margin-bottom: 26px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.btc-archive-title { font-size: 1.5rem; margin: 0 0 6px; }
.btc-archive-desc { color: var(--muted); font-size: 0.92rem; margin: 0; }

.btc-pagination { margin-top: 44px; }
.btc-pagination .nav-links { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.btc-pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 42px; height: 42px; padding: 0 8px;
  font-size: 0.92rem; font-weight: 600;
  color: var(--text); background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  transition: all 0.15s var(--ease);
}
.btc-pagination .page-numbers:hover { border-color: var(--brand); color: var(--brand-deep); }
.btc-pagination .page-numbers.current { background: var(--navy); border-color: var(--navy); color: #fff; }
.btc-pagination .page-numbers.dots { border: 0; background: none; }

.btc-404 { text-align: center; padding: 80px 20px; }
.btc-404-code { font-family: var(--font-en); font-size: 5rem; font-weight: 800; color: var(--brand); margin: 0; line-height: 1; }
.btc-404 p { color: var(--muted); margin: 16px 0 28px; }
.btc-btn {
  display: inline-block; padding: 12px 28px;
  font-size: 0.94rem; font-weight: 700; color: #fff;
  background: var(--navy); border-radius: var(--radius-full);
  transition: opacity 0.15s var(--ease);
}
.btc-btn:hover { opacity: 0.85; color: #fff; }

/* ==========================================================================
   13. Page / Comments
   ========================================================================== */
.btc-page-title { font-size: 1.6rem; margin-bottom: 24px; padding-bottom: 14px; border-bottom: 2px solid var(--border); }

.btc-comments { margin-top: 48px; }
.btc-comments .comment-list { list-style: none; padding: 0; }
.btc-comments .comment-body {
  padding: 18px 20px; margin-bottom: 14px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--card);
}
.btc-comments input[type="text"], .btc-comments input[type="email"],
.btc-comments input[type="url"], .btc-comments textarea {
  width: 100%; padding: 10px 14px; font-family: inherit; font-size: 0.94rem;
  color: var(--ink); background: var(--bg-soft);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.btc-comments input[type="submit"] {
  padding: 11px 28px; font-weight: 700; color: #fff; font-size: 0.94rem;
  background: var(--navy); border: 0; border-radius: var(--radius-full); cursor: pointer;
}

/* Contact Form 7 */
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 textarea {
  width: 100%; padding: 11px 15px; font-family: inherit; font-size: 0.95rem;
  color: var(--ink); background: var(--bg-soft);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.wpcf7 input:focus, .wpcf7 textarea:focus { outline: none; border-color: var(--brand); }
.wpcf7 input[type="submit"] {
  padding: 12px 32px; font-weight: 700; color: #fff; font-size: 0.95rem;
  background: var(--navy); border: 0; border-radius: var(--radius-full); cursor: pointer;
}

/* ==========================================================================
   14. Footer
   ========================================================================== */
.btc-footer {
  margin-top: 40px;
  background: var(--navy); color: #b7c3da;
}
@media (prefers-color-scheme: dark) {
  .btc-footer { background: #0a1120; border-top: 1px solid var(--border); }
}
:root[data-theme="dark"] .btc-footer { background: #0a1120; border-top: 1px solid var(--border); }
:root[data-theme="light"] .btc-footer { background: var(--navy); border-top: 0; }
.btc-footer-inner { padding: 52px 24px 28px; }
.btc-footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
  padding-bottom: 36px; border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
@media (max-width: 900px) { .btc-footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 560px) { .btc-footer-grid { grid-template-columns: 1fr; } }

.btc-footer .btc-logo-text { color: #fff; }
.btc-footer .btc-logo-accent { color: var(--brand); }
.btc-footer-desc { font-size: 0.86rem; line-height: 1.8; margin: 14px 0 18px; }
.btc-footer-social { display: flex; gap: 10px; }
.btc-footer-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08); color: #d5deee;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}
.btc-footer-social a:hover { background: var(--brand); color: #0f2043; }

.btc-footer-heading {
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.08em;
  color: #8ea2c7; text-transform: uppercase; margin: 0 0 14px;
}
.btc-footer-links { list-style: none; margin: 0; padding: 0; }
.btc-footer-links li { margin-bottom: 9px; }
.btc-footer-links a { font-size: 0.88rem; color: #cbd6ea; }
.btc-footer-links a:hover { color: var(--brand); }

.btc-footer-disclaimer {
  font-size: 0.76rem; line-height: 1.8; color: #8ea2c7;
  padding: 22px 0 0;
}
.btc-footer-disclaimer p { margin: 0; }
.btc-footer-copyright { padding-top: 14px; font-size: 0.78rem; color: #6d80a5; }
.btc-footer-copyright p { margin: 0; }

/* ==========================================================================
   15. Third-party overrides (Cookie Notice)
   ========================================================================== */
#cookie-notice { font-family: var(--font-sans) !important; }
.cookie-notice-container { background: var(--navy) !important; }
#cn-accept-cookie, #cn-refuse-cookie {
  border-radius: var(--radius-full) !important; font-weight: 700 !important;
}
#cn-accept-cookie { background: var(--brand) !important; color: #0f2043 !important; }

/* ==========================================================================
   16. Live features (ticker / market widget / progress / reveal / intro)
   ========================================================================== */
.btc-theme-toggle .btc-icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  .btc-theme-toggle .btc-icon-sun { display: none; }
  .btc-theme-toggle .btc-icon-moon { display: block; }
}
:root[data-theme="dark"] .btc-theme-toggle .btc-icon-sun { display: none; }
:root[data-theme="dark"] .btc-theme-toggle .btc-icon-moon { display: block; }
:root[data-theme="light"] .btc-theme-toggle .btc-icon-sun { display: block; }
:root[data-theme="light"] .btc-theme-toggle .btc-icon-moon { display: none; }

.btc-ticker {
  display: none;
  background: var(--navy); color: #dce5f5;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.btc-ticker.loaded { display: block; }
.btc-ticker-inner {
  display: flex; gap: 26px; align-items: center;
  padding: 8px 0; overflow-x: auto; scrollbar-width: none; white-space: nowrap;
}
.btc-ticker-inner::-webkit-scrollbar { display: none; }
.btc-ticker-item { display: inline-flex; align-items: baseline; gap: 8px; font-size: 0.82rem; }
.btc-ticker-sym { font-family: var(--font-en); font-weight: 800; color: #f7a53a; }
.btc-ticker-price { font-family: var(--font-en); font-weight: 600; color: #ffffff; }
.btc-ticker-chg { font-size: 0.76rem; font-weight: 700; }
.btc-ticker-chg.up { color: #4ade80; }
.btc-ticker-chg.down { color: #f87171; }

.btc-intro { padding: 4px 0 22px; }
.btc-intro-title { font-size: 1.06rem; font-weight: 700; color: var(--muted); margin: 0 0 2px; }
.btc-intro-lead { font-size: 0.85rem; color: var(--muted); margin: 0; }

.btc-mkt-rows { display: flex; flex-direction: column; }
.btc-mkt-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 8px 0; border-bottom: 1px solid var(--border);
  font-size: 0.86rem; color: var(--muted);
}
.btc-mkt-row strong { font-family: var(--font-en); font-size: 0.95rem; color: var(--ink); }
.btc-mkt-row strong.up { color: #16a34a; }
.btc-mkt-row strong.down { color: #dc2626; }
.btc-fng { padding-top: 12px; }
.btc-fng-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 0.82rem; color: var(--muted); margin-bottom: 8px;
}
.btc-fng-head strong { font-family: var(--font-en); font-size: 1.05rem; color: var(--ink); }
.btc-fng-label { font-size: 0.78rem; }
.btc-fng-bar {
  height: 8px; border-radius: var(--radius-full);
  background: linear-gradient(90deg, #ef4444, #eab308, #22c55e);
  position: relative; opacity: 0.35;
}
.btc-fng-fill {
  position: absolute; top: -3px; bottom: -3px; left: 0; width: 0;
  border-right: 3px solid var(--ink); transition: width 0.6s var(--ease);
}

.btc-progress {
  position: fixed; top: 0; left: 0; z-index: 200;
  height: 3px; width: 0;
  background: linear-gradient(90deg, var(--brand), #ffb95e);
}

.btc-reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
.btc-reveal.in { opacity: 1; transform: none; }

.btc-guide-callout {
  margin: 2.4em 0 0; padding: 20px 24px;
  border: 1px solid var(--border); border-left: 4px solid var(--brand);
  border-radius: var(--radius-sm); background: var(--bg-soft);
}
.btc-guide-callout-label {
  display: block; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.06em;
  color: var(--brand-deep); margin-bottom: 6px;
}
.btc-guide-callout-title {
  font-size: 1.05rem; font-weight: 700; color: var(--ink); text-decoration: none;
}
.btc-guide-callout-title:hover { color: var(--brand-deep); }
.btc-guide-callout-desc { font-size: 0.86rem; color: var(--muted); margin: 6px 0 0; line-height: 1.7; }

/* ==========================================================================
   17. Motion system v2.2
   ========================================================================== */
@keyframes btc-fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
@keyframes btc-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@keyframes btc-float {
  from { transform: translateY(0); }
  to { transform: translateY(-2.5px); }
}
@keyframes btc-pop {
  0% { transform: scale(0.85); opacity: 0.4; }
  60% { transform: scale(1.06); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes btc-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(247, 147, 26, 0.5); }
  50% { box-shadow: 0 0 0 5px rgba(247, 147, 26, 0); }
}
@keyframes btc-kenburns {
  from { transform: scale(1); }
  to { transform: scale(1.045); }
}
@keyframes btc-flash-up {
  0% { color: #4ade80; } 100% { color: inherit; }
}
@keyframes btc-flash-down {
  0% { color: #f87171; } 100% { color: inherit; }
}

@media (prefers-reduced-motion: no-preference) {
  /* 入場アニメ（ヒーロー段階表示） */
  .btc-intro { animation: btc-fade-up 0.55s var(--ease) both; }
  .btc-hero-main { animation: btc-fade-up 0.6s var(--ease) 0.08s both; }
  .btc-hero-item:nth-child(1) { animation: btc-fade-up 0.5s var(--ease) 0.16s both; }
  .btc-hero-item:nth-child(2) { animation: btc-fade-up 0.5s var(--ease) 0.24s both; }
  .btc-hero-item:nth-child(3) { animation: btc-fade-up 0.5s var(--ease) 0.32s both; }
  .btc-hero-item:nth-child(4) { animation: btc-fade-up 0.5s var(--ease) 0.40s both; }
  .btc-cat-nav-inner { animation: btc-fade-up 0.5s var(--ease) 0.45s both; }

  /* ロゴコインの浮遊 + ホバー回転 */
  .btc-logo-icon { animation: btc-float 2.6s ease-in-out infinite alternate; transition: transform 0.6s var(--ease); }
  .btc-logo:hover .btc-logo-icon { transform: rotateY(360deg); }

  /* テーマ切替の回転 */
  .btc-theme-toggle svg { transition: transform 0.45s var(--ease); }
  .btc-theme-toggle:hover svg { transform: rotate(40deg) scale(1.1); }

  /* アイキャッチのケンバーンズ */
  .btc-featured-img img { animation: btc-kenburns 14s ease-out forwards; }

  /* Fear&Greed マーカーのパルス */
  .btc-fng-fill { animation: btc-pulse 2.4s ease-in-out infinite; }
}

/* ヘッダー: スクロールでエレベーション */
.btc-header { transition: box-shadow 0.25s var(--ease), background 0.25s var(--ease); }
.btc-header.scrolled { box-shadow: var(--shadow-md); }

/* ティッカー: マーキー（JSでtrack複製） */
.btc-ticker .btc-container { overflow: hidden; }
.btc-ticker-inner { overflow: visible; }
.btc-ticker-track {
  display: inline-flex; gap: 26px; padding-right: 26px;
  animation: btc-marquee 28s linear infinite;
  will-change: transform;
}
.btc-ticker:hover .btc-ticker-track { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .btc-ticker-track { animation: none !important; }
}
.btc-ticker-price.flash-up { animation: btc-flash-up 1.2s ease-out; }
.btc-ticker-price.flash-down { animation: btc-flash-down 1.2s ease-out; }

/* マーケット数値のポップイン */
.btc-mkt-row strong.pop, .btc-fng-head strong.pop { animation: btc-pop 0.5s var(--ease); }

/* カードのシャインスイープ */
.btc-card-thumb::after, .btc-related-thumb::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.22) 50%, transparent 60%);
  transform: translateX(-110%);
  pointer-events: none;
}
.btc-related-thumb { position: relative; }
.btc-card:hover .btc-card-thumb::after,
.btc-related-card:hover .btc-related-thumb::after {
  transition: transform 0.7s var(--ease);
  transform: translateX(110%);
}

/* トップへ戻るボタン（JSで生成） */
.btc-top-btn {
  position: fixed; right: 22px; bottom: 22px; z-index: 150;
  width: 46px; height: 46px; border: 0; border-radius: var(--radius-full);
  background: var(--navy); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(14px); pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), background 0.2s var(--ease);
  box-shadow: var(--shadow-md);
}
.btc-top-btn.show { opacity: 1; transform: none; pointer-events: auto; }
.btc-top-btn:hover { background: var(--brand); color: #0f2043; }

/* スタッガー・リビール（JSがdelayを付与） */
.btc-reveal { will-change: opacity, transform; }

/* 3Dチルト */
.btc-tilt { transform-style: preserve-3d; }
.btc-tilt:not(:hover) { transition: transform 0.5s var(--ease); }

/* セクションタイトルのグラデーションテキスト */
.btc-section-title, .btc-related-title {
  background: linear-gradient(92deg, var(--ink) 55%, var(--brand-deep));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.btc-section-title::before, .btc-related-title::before { -webkit-text-fill-color: initial; }

/* ヒーローカード: 回転するグラデーション枠 */
@property --btc-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}
@keyframes btc-border-spin { to { --btc-angle: 360deg; } }
@media (prefers-reduced-motion: no-preference) {
  .btc-hero-main {
    border: 1px solid transparent;
    background:
      linear-gradient(var(--card), var(--card)) padding-box,
      conic-gradient(from var(--btc-angle), var(--border) 0%, var(--brand) 12%, var(--border) 30%, var(--border) 60%, #ffb95e 72%, var(--border) 88%) border-box;
    animation: btc-border-spin 7s linear infinite;
  }
}

/* ==========================================================================
   18. Utilities
   ========================================================================== */
.screen-reader-text {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
