:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --accent: #10b981;
  --accent-bg: #ecfdf5;

  /* ツール固有カラー */
  --discount-text: #dc2626;
  --discount-bg: #fef2f2;
  --win-bg: #ecfdf5;
  --win-border: #10b981;
  --win-text: #047857;
  --gray-bg: #f8fafc;
  --gold-1: #f59e0b;
  --gold-2: #d97706;
  --silver-1: #94a3b8;
  --silver-2: #64748b;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  background-color: var(--bg);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* レイアウト */
.wrapper {
  max-width: 680px;
  margin: 0 auto;
  padding: 24px 16px;
  flex: 1;
  width: 100%;
}

.container {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

/* ナビゲーション */
#site-nav, .top-nav, .header-nav {
  padding-top: 4px;
}
.wrapper #site-nav, .wrapper .header-nav {
  margin-bottom: 24px;
}

.back-link {
  color: var(--primary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: opacity 0.15s ease;
}
.back-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* ヘッダー */
header {
  text-align: center;
  padding: 4px 0 6px;
}
header h1 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
}
header p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* トップページ専用ヘッダー */
.site-header {
  margin-bottom: 32px;
  padding-top: 12px;
}
.site-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
}
.site-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* カード共通 */
.card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  border: 1px solid var(--border);
}
.wrapper .card {
  padding: 28px 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.card-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 入力・フォーム共通 */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}
.input-group:last-child {
  margin-bottom: 0;
}
.input-group label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}
.input-group input {
  width: 100%;
  padding: 10px 12px;
  font-size: 1.15rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  outline: none;
  background: #f8fafc;
  -webkit-appearance: none;
  font-weight: 600;
  color: var(--text-main);
}
.input-group input:focus {
  border-color: var(--primary);
  background: #ffffff;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.input-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 10px;
}

/* ボタン共通 */
.btn-action {
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: background 0.15s ease;
}
.btn-action:active {
  background: var(--primary-hover);
}

.btn-clear {
  background: #e2e8f0;
  color: #475569;
  border: none;
  border-radius: 8px;
  padding: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
}
.btn-clear:active {
  background: #cbd5e1;
}

.btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* 折りたたみガイド共通 */
details.guide-box {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.82rem;
  color: var(--text-muted);
}
details.guide-box summary {
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
details.guide-box summary::-webkit-details-marker {
  display: none;
}
details.guide-box summary::after {
  content: "＋";
  font-size: 0.9rem;
  color: var(--text-muted);
}
details.guide-box[open] summary::after {
  content: "−";
}
details.guide-box ol {
  margin: 10px 0 0 18px;
  line-height: 1.6;
}
details.guide-box li {
  margin-bottom: 4px;
}

/* 広告バナー */
.ad-banner {
  min-height: 90px;
  background: #e2e8f0;
  border: 1px dashed #94a3b8;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* フッター共通 */
footer, #site-footer {
  margin-top: auto;
  padding: 24px 16px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: #ffffff;
  width: 100%;
}
.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-bottom: 12px;
}
.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--primary);
  text-decoration: underline;
}
.copyright {
  font-size: 0.75rem;
  color: #94a3b8;
}

/* ----------------------------------------------------
   トップページ (index.html) スタイル
---------------------------------------------------- */
.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tool-grid {
  display: grid;
  gap: 14px;
}
.tool-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  text-decoration: none;
  color: inherit;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.tool-card:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37,99,235,0.08);
}
.tool-info h3 {
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}
.tool-info p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.4;
}
.badge {
  font-size: 0.72rem;
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-active {
  background: #ecfdf5;
  color: #059669;
}
.about-box {
  margin-top: 40px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-muted);
}
.about-box h4 {
  font-size: 0.95rem;
  color: var(--text-main);
  margin-bottom: 8px;
}

/* ----------------------------------------------------
   文字数カウント (counter) スタイル
---------------------------------------------------- */
textarea {
  width: 100%;
  height: 160px;
  padding: 12px;
  font-size: 1rem;
  line-height: 1.5;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  outline: none;
  background: #f8fafc;
  resize: vertical;
  color: var(--text-main);
}
textarea:focus {
  border-color: var(--primary);
  background: #ffffff;
}
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.stat-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
}
.stat-box.highlight {
  background: #eff6ff;
  border-color: #bfdbfe;
}
.stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}
.stat-val {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 2px;
}
.stat-box.highlight .stat-val {
  color: var(--primary);
}
.stat-unit {
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 2px;
  color: var(--text-muted);
}
.speech-box {
  background: var(--accent-bg);
  border: 1px solid #a7f3d0;
  border-radius: 12px;
  padding: 14px;
  text-align: center;
}
.speech-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #065f46;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.speech-time {
  font-size: 1.8rem;
  font-weight: 900;
  color: #047857;
  margin: 6px 0 2px;
}
.speech-sub {
  font-size: 0.75rem;
  color: #059669;
  line-height: 1.4;
}

/* ----------------------------------------------------
   セール割引・消費税計算 (discount) スタイル
---------------------------------------------------- */
.quick-tags {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-top: 6px;
}
.tag-btn {
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}
.tag-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}
.tax-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 4px;
}
.tax-btn {
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  text-align: center;
}
.tax-btn.active {
  background: var(--text-main);
  border-color: var(--text-main);
  color: #ffffff;
}
.result-box {
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.result-box.highlight {
  border-color: #93c5fd;
  background: #eff6ff;
}
.result-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}
.result-price {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--text-main);
  margin: 4px 0;
  letter-spacing: -0.5px;
}
.result-price span {
  font-size: 1.1rem;
  font-weight: 700;
  margin-left: 2px;
}
.result-saved {
  display: inline-block;
  background: var(--discount-bg);
  color: var(--discount-text);
  font-size: 0.88rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid #fca5a5;
}

/* ----------------------------------------------------
   単価比較ツール (price-compare) スタイル
---------------------------------------------------- */
.card.winner {
  background: var(--win-bg);
  border-color: var(--win-border);
}
.card .badge {
  background: #e2e8f0;
  color: #475569;
}
.card.winner .badge {
  background: var(--win-border);
  color: #ffffff;
  font-weight: 700;
}
.point-row {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--gray-bg);
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px dashed #cbd5e1;
}
.point-row label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}
.point-input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}
.point-input-wrap input {
  width: 72px;
  padding: 6px 8px;
  font-size: 0.95rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  outline: none;
  background: #ffffff;
  text-align: right;
  font-weight: 600;
}
.point-input-wrap input:focus {
  border-color: var(--primary);
}
.sub-real {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}
.card.winner .sub-real {
  color: var(--win-text);
}
.unit-price {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.unit-price strong {
  font-size: 1.15rem;
  color: var(--text-main);
}
.card.winner .unit-price strong {
  color: var(--win-text);
}
.result-text {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}
.result-diff {
  font-size: 0.85rem;
  color: var(--win-text);
  font-weight: 600;
  margin-top: 4px;
}

/* ----------------------------------------------------
   コイン・ダイス・乱数 (random) スタイル
---------------------------------------------------- */
.tab-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: #e2e8f0;
  padding: 4px;
  border-radius: 10px;
}
.tab-btn {
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 10px 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}
.tab-btn.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}
.panel {
  display: none;
  flex-direction: column;
  gap: 14px;
}
.panel.active {
  display: flex;
}
.btn-roll {
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 14px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(37,99,235,0.25);
  transition: all 0.15s ease;
  width: 100%;
}
.btn-roll:active {
  transform: scale(0.98);
  background: var(--primary-hover);
}
.btn-roll:disabled {
  background: #94a3b8;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
.history-box {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  min-height: 22px;
}
.history-badge {
  background: #f1f5f9;
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
}
.coin-stage {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 800px;
}
.coin {
  width: 100px;
  height: 100px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 1.2s cubic-bezier(0.15, 0.9, 0.35, 1.2);
}
.coin-face {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 900;
  color: #ffffff;
  backface-visibility: hidden;
  box-shadow: inset 0 0 0 6px rgba(255,255,255,0.4), 0 6px 14px rgba(0,0,0,0.15);
  border: 3px dashed rgba(255,255,255,0.6);
}
.coin-front {
  background: radial-gradient(circle, #fcd34d, var(--gold-2));
}
.coin-back {
  background: radial-gradient(circle, #cbd5e1, var(--silver-2));
  transform: rotateY(180deg);
}
.coin-sub {
  font-size: 0.65rem;
  letter-spacing: 1px;
  margin-top: -2px;
  opacity: 0.9;
}
.dice-stage {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dice-box {
  width: 90px;
  height: 90px;
  background: #ffffff;
  border: 4px solid var(--primary);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--primary);
  box-shadow: 0 8px 20px rgba(37,99,235,0.15);
  transition: all 0.2s;
}
.dice-box.rolling {
  animation: diceRoll 0.8s ease-in-out infinite;
}
@keyframes diceRoll {
  0% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(-25deg) scale(1.1) translateY(-10px); }
  50% { transform: rotate(25deg) scale(0.95) translateY(5px); }
  75% { transform: rotate(-15deg) scale(1.05) translateY(-5px); }
  100% { transform: rotate(0deg) scale(1); }
}
.dice-type-selector {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-top: 6px;
}
.dice-type-btn {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
}
.dice-type-btn.active {
  background: var(--text-main);
  color: #ffffff;
  border-color: var(--text-main);
}
.range-inputs {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.range-inputs input {
  width: 100%;
  padding: 8px 10px;
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  outline: none;
}
.range-inputs input:focus {
  border-color: var(--primary);
  background: #ffffff;
}
.random-display {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -1px;
}

/* ----------------------------------------------------
   スマート割り勘 (warikan) スタイル
---------------------------------------------------- */
.round-selector {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 4px;
}
.round-btn {
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  text-align: center;
}
.round-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}
.stepper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.stepper {
  display: flex;
  align-items: center;
  gap: 8px;
}
.step-btn {
  width: 38px;
  height: 38px;
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
}
.step-btn:active {
  background: #e2e8f0;
}
.step-count {
  font-size: 1.2rem;
  font-weight: 700;
  min-width: 24px;
  text-align: center;
}
.discount-input-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.discount-input-wrap input {
  width: 76px;
  padding: 6px 8px;
  font-size: 0.95rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  text-align: right;
  font-weight: 600;
}
.result-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.result-row {
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.result-row.drinker {
  border-color: #93c5fd;
  background: #eff6ff;
}
.result-row.non-drinker {
  border-color: #a7f3d0;
  background: var(--accent-bg);
}
.result-label {
  display: flex;
  flex-direction: column;
}
.result-label-main {
  font-size: 0.95rem;
  font-weight: 700;
}
.result-label-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.result-amount {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
}
.result-amount span {
  font-size: 0.85rem;
  font-weight: 600;
  margin-left: 2px;
}
.summary-info {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 600;
}
.summary-diff {
  color: #059669;
}
.btn-action.btn-warikan-copy {
  background: #10b981;
}
.btn-action.btn-warikan-copy:active {
  background: #059669;
}

/* ----------------------------------------------------
   固定ページ (privacy, terms, contact) スタイル
---------------------------------------------------- */
.card h1 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 16px;
}
.card h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-top: 24px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 4px;
}
.card p, .card ul {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.7;
}
.card ul {
  padding-left: 20px;
}
.card li {
  margin-bottom: 4px;
}
p.intro {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.5;
}
.iframe-container {
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
}
iframe {
  width: 100%;
  height: 750px;
  border: none;
}

/* ----------------------------------------------------
   解説記事・開発者ブログ用スタイル (.article-*)
---------------------------------------------------- */
.article-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px;
  flex: 1;
  width: 100%;
}

.article-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 28px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

@media (max-width: 600px) {
  .article-card {
    padding: 22px 16px;
  }
}

.article-header {
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 18px;
}

.article-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.4;
  margin-bottom: 12px;
}

.article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.category-badge {
  display: inline-block;
  background: #eff6ff;
  color: var(--primary);
  border: 1px solid #bfdbfe;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}

.category-badge.dev {
  background: #fdf2f8;
  color: #db2777;
  border-color: #fbcfe8;
}

.category-badge.guide {
  background: #ecfdf5;
  color: #059669;
  border-color: #a7f3d0;
}

.article-body {
  font-size: 0.95rem;
  line-height: 1.8;
  color: #334155;
}

.article-body h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 36px;
  margin-bottom: 14px;
  padding-left: 12px;
  border-left: 4px solid var(--primary);
}

.article-body h3 {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 24px;
  margin-bottom: 10px;
}

.article-body p {
  margin-bottom: 16px;
}

.article-body ul, .article-body ol {
  margin: 14px 0 18px 22px;
  line-height: 1.7;
}

.article-body li {
  margin-bottom: 6px;
}

/* ポイントまとめハイライト枠 */
.highlight-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 18px 20px;
  margin: 26px 0;
}

.highlight-box-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #166534;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.highlight-box p {
  font-size: 0.88rem;
  color: #15803d;
  margin-bottom: 0;
  line-height: 1.6;
}

.highlight-box ul {
  margin: 8px 0 0 20px;
  color: #15803d;
  font-size: 0.88rem;
}

.highlight-box li {
  margin-bottom: 4px;
}

/* アクション誘導ボックス (CTA) */
.action-cta {
  background: #f8fafc;
  border: 2px solid #bfdbfe;
  border-radius: 14px;
  padding: 18px 16px;
  margin: 28px 0 16px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.05);
}

.action-cta h4 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 8px;
}

.action-cta p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--primary);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  transition: all 0.2s ease;
}

.btn-cta:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

/* 記事前後ナビゲーション */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

@media (max-width: 480px) {
  .post-nav {
    grid-template-columns: 1fr;
  }
}

.post-nav-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.2s;
}

.post-nav-item:hover {
  border-color: var(--primary);
  background: #f8fafc;
}

.post-nav-item.next {
  text-align: right;
}

.post-nav-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
}

.post-nav-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
}

/* 月別アーカイブ枠 */
.archive-box {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-top: 24px;
}

.archive-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.archive-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.archive-item a {
  display: inline-block;
  background: #f1f5f9;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.15s;
}

.archive-item a:hover {
  background: var(--primary);
  color: #ffffff;
}

/* ----------------------------------------------------
   デザイン案確認用スイッチャー (.pattern-switcher)
---------------------------------------------------- */
.pattern-switcher {
  background: #1e293b;
  color: #f8fafc;
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 0.8rem;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}
.pattern-switcher-header {
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.pattern-switcher-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pattern-switcher-links a {
  display: inline-block;
  background: #334155;
  color: #e2e8f0;
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.15s;
}
.pattern-switcher-links a:hover,
.pattern-switcher-links a.active {
  background: var(--primary);
  color: #ffffff;
}

/* ----------------------------------------------------
   目次コンポーネント (TOC)
---------------------------------------------------- */
.toc-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 24px 0;
}
.toc-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.toc-list li {
  margin-bottom: 6px;
}
.toc-list a {
  color: #475569;
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.15s;
}
.toc-list a:hover {
  color: var(--primary);
  text-decoration: underline;
}
.toc-list .toc-sub {
  margin-left: 18px;
  font-size: 0.82rem;
  margin-top: 4px;
}

/* ----------------------------------------------------
   ステップ・フローコンポーネント (.step-*)
---------------------------------------------------- */
.step-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 28px 0;
}
.step-card {
  display: flex;
  gap: 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  position: relative;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
@media (max-width: 540px) {
  .step-card {
    flex-direction: column;
    gap: 10px;
  }
}
.step-badge {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: #ffffff;
  border-radius: 12px;
  font-size: 1.2rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-content {
  flex: 1;
}
.step-heading {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
}
.step-desc {
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.6;
}

/* ----------------------------------------------------
   Before / After 比較カード (.compare-*)
---------------------------------------------------- */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 24px 0;
}
@media (max-width: 560px) {
  .compare-grid {
    grid-template-columns: 1fr;
  }
}
.compare-card {
  border-radius: 10px;
  padding: 16px;
  border: 1px solid var(--border);
  background: #ffffff;
}
.compare-card.bad {
  border-color: #fca5a5;
  background: #fff5f5;
}
.compare-card.good {
  border-color: #86efac;
  background: #f0fdf4;
}
.compare-card-title {
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.compare-card.bad .compare-card-title {
  color: #b91c1c;
}
.compare-card.good .compare-card-title {
  color: #15803d;
}
.compare-card p {
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 0;
}

/* ----------------------------------------------------
   テーブル・早見表スタイル (.data-table)
---------------------------------------------------- */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 20px 0;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}
.data-table th, .data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.data-table th {
  background: #f1f5f9;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
}
.data-table tr:last-child td {
  border-bottom: none;
}
.data-table tr:hover td {
  background: #f8fafc;
}

/* ----------------------------------------------------
   コードブロック (.code-block)
---------------------------------------------------- */
.code-block {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 8px;
  margin: 20px 0;
  overflow: hidden;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.code-header {
  background: #1e293b;
  padding: 8px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.code-block pre {
  padding: 14px;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0;
}

/* ----------------------------------------------------
   著者情報ボックス (.author-box)
---------------------------------------------------- */
.author-box {
  display: flex;
  gap: 14px;
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin: 28px 0;
}
.author-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}
.author-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
}
.author-role {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.author-bio {
  font-size: 0.82rem;
  color: #475569;
  margin-top: 4px;
  line-height: 1.4;
}

/* ----------------------------------------------------
   タイムライン (.timeline)
---------------------------------------------------- */
.timeline {
  position: relative;
  padding-left: 28px;
  margin: 28px 0;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: #cbd5e1;
}
.timeline-item {
  position: relative;
  margin-bottom: 22px;
}
.timeline-item:last-child {
  margin-bottom: 0;
}
.timeline-dot {
  position: absolute;
  left: -28px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid #ffffff;
  box-shadow: 0 0 0 2px var(--primary);
}
.timeline-date {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 2px;
}
.timeline-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
}
.timeline-body {
  font-size: 0.85rem;
  color: #475569;
  line-height: 1.5;
}

/* ----------------------------------------------------
   タグ一覧 (.tag-list)
---------------------------------------------------- */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}
.tag-item {
  background: #f1f5f9;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  text-decoration: none;
}
.tag-item:hover {
  background: #e2e8f0;
  color: var(--text-main);
}

/* ----------------------------------------------------
   引用ブロック (blockquote)
---------------------------------------------------- */
blockquote.quote-box {
  background: #f8fafc;
  border-left: 4px solid #94a3b8;
  border-radius: 0 8px 8px 0;
  padding: 14px 18px;
  margin: 20px 0;
  font-style: italic;
  color: #475569;
}
blockquote.quote-box p {
  margin-bottom: 4px;
}
.quote-author {
  font-size: 0.8rem;
  font-style: normal;
  font-weight: 700;
  color: var(--text-muted);
  text-align: right;
}

/* ----------------------------------------------------
   FAQ アコーディオン (.faq-list, .faq-item)
---------------------------------------------------- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 24px 0;
}
.faq-item {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.faq-item:hover {
  border-color: #cbd5e1;
}
.faq-item summary {
  padding: 14px 18px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  background: #f8fafc;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::after {
  content: '▼';
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after {
  transform: rotate(180deg);
}
.faq-answer {
  padding: 16px 18px;
  font-size: 0.88rem;
  line-height: 1.7;
  color: #334155;
  border-top: 1px solid var(--border);
  background: #ffffff;
}
.faq-answer p:last-child {
  margin-bottom: 0;
}

/* ====================================================
   デザインテーマ別スタイル定義 (Theme Variants)
   スマホでの見やすさを最優先にした5種類の見た目・トンマナ
==================================================== */

/* デザイン解説バナー */
.design-info-banner {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.design-info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  flex-wrap: wrap;
  gap: 6px;
}
.design-info-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  background: #1e293b;
  color: #ffffff;
}
.design-info-title {
  font-size: 1.02rem;
  font-weight: 800;
  color: #0f172a;
}
.design-info-desc {
  font-size: 0.82rem;
  color: #475569;
  line-height: 1.5;
  margin-bottom: 8px;
}
.design-info-features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.design-info-feature-item {
  background: #f1f5f9;
  font-size: 0.72rem;
  font-weight: 600;
  color: #334155;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
}

/* ----------------------------------------------------
   【解説案1: Modern Clean】 王道クリーン・信頼のブルー
---------------------------------------------------- */
body[data-theme="modern-clean"] {
  background: #f8fafc;
  color: #0f172a;
}
body[data-theme="modern-clean"] .article-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
body[data-theme="modern-clean"] .article-title {
  color: #0f172a;
  font-weight: 800;
}
body[data-theme="modern-clean"] .article-body h2 {
  border-left: 4px solid #2563eb;
  padding-left: 12px;
  color: #1e293b;
}
body[data-theme="modern-clean"] .highlight-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
}
body[data-theme="modern-clean"] .highlight-box-title {
  color: #1e40af;
}
body[data-theme="modern-clean"] .btn-cta {
  background: #2563eb;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

/* ----------------------------------------------------
   【解説案2: Warm Lifestyle】 温かみ・北欧ナチュラル・アイボリー
---------------------------------------------------- */
body[data-theme="warm-lifestyle"] {
  background: #f7f4ed;
  color: #292524;
}
body[data-theme="warm-lifestyle"] .article-card {
  background: #ffffff;
  border: 1px solid #e7e0d3;
  border-radius: 20px;
  box-shadow: 0 3px 12px rgba(120, 113, 108, 0.07);
}
body[data-theme="warm-lifestyle"] .article-title {
  color: #1c1917;
  font-weight: 800;
}
body[data-theme="warm-lifestyle"] .article-body h2 {
  border-left: none;
  border-bottom: 2px solid #f59e0b;
  padding-left: 0;
  padding-bottom: 6px;
  color: #78350f;
}
body[data-theme="warm-lifestyle"] .category-badge.guide {
  background: #fef3c7;
  color: #b45309;
  border-color: #fde68a;
}
body[data-theme="warm-lifestyle"] .highlight-box {
  background: #fefce8;
  border: 1px solid #fef08a;
  border-radius: 16px;
}
body[data-theme="warm-lifestyle"] .highlight-box-title {
  color: #854d0e;
}
body[data-theme="warm-lifestyle"] .highlight-box p,
body[data-theme="warm-lifestyle"] .highlight-box ul {
  color: #713f12;
}
body[data-theme="warm-lifestyle"] .action-cta {
  background: #fffbeb;
  border: 2px dashed #fde68a;
  border-radius: 18px;
}
body[data-theme="warm-lifestyle"] .btn-cta {
  background: #d97706;
  border-radius: 999px;
  padding: 14px 32px;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.25);
}
body[data-theme="warm-lifestyle"] .btn-cta:hover {
  background: #b45309;
}

/* ----------------------------------------------------
   【解説案3: App & Card Pop】 アプリライク・高コントラスト
---------------------------------------------------- */
body[data-theme="app-pop"] {
  background: #eef2f6;
  color: #111827;
}
body[data-theme="app-pop"] .article-card {
  background: #ffffff;
  border: 2px solid #cbd5e1;
  border-radius: 16px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}
body[data-theme="app-pop"] .article-title {
  color: #0f172a;
  font-weight: 900;
  letter-spacing: -0.5px;
}
body[data-theme="app-pop"] .article-body h2 {
  border-left: none;
  background: #f1f5f9;
  padding: 10px 14px;
  border-radius: 8px;
  color: #0f172a;
  border-left: 6px solid #059669;
}
body[data-theme="app-pop"] .category-badge.guide {
  background: #ecfdf5;
  color: #059669;
  border: 2px solid #a7f3d0;
  font-weight: 800;
}
body[data-theme="app-pop"] .highlight-box {
  background: #ffffff;
  border: 2px solid #10b981;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.1);
}
body[data-theme="app-pop"] .highlight-box-title {
  color: #065f46;
}
body[data-theme="app-pop"] .highlight-box p,
body[data-theme="app-pop"] .highlight-box ul {
  color: #047857;
}
body[data-theme="app-pop"] .action-cta {
  background: #ecfdf5;
  border: 2px solid #6ee7b7;
  border-radius: 16px;
}
body[data-theme="app-pop"] .btn-cta {
  background: #059669;
  font-size: 1.05rem;
  font-weight: 800;
  border-radius: 12px;
  padding: 16px 28px;
  box-shadow: 0 6px 16px rgba(5, 150, 105, 0.35);
  border-bottom: 4px solid #047857;
}
body[data-theme="app-pop"] .btn-cta:active {
  transform: translateY(2px);
  border-bottom-width: 2px;
}

/* ----------------------------------------------------
   【解説案4: Flat Minimal】 洗練スイス・フラットミニマル
---------------------------------------------------- */
body[data-theme="flat-minimal"] {
  background: #ffffff;
  color: #18181b;
  line-height: 1.85;
}
body[data-theme="flat-minimal"] .article-container {
  max-width: 680px;
}
body[data-theme="flat-minimal"] .article-card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 16px 8px;
}
body[data-theme="flat-minimal"] .article-header {
  border-bottom: 2px solid #18181b;
  padding-bottom: 20px;
}
body[data-theme="flat-minimal"] .article-title {
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: -0.8px;
  color: #18181b;
}
body[data-theme="flat-minimal"] .article-body h2 {
  border-left: none;
  padding-left: 0;
  font-size: 1.35rem;
  font-weight: 800;
  margin-top: 42px;
  border-bottom: 1px solid #e4e4e7;
  padding-bottom: 8px;
  color: #18181b;
}
body[data-theme="flat-minimal"] .category-badge {
  background: #18181b;
  color: #ffffff;
  border: none;
  border-radius: 4px;
}
body[data-theme="flat-minimal"] .highlight-box {
  background: #f4f4f5;
  border: none;
  border-left: 3px solid #18181b;
  border-radius: 0;
  padding: 18px 20px;
}
body[data-theme="flat-minimal"] .highlight-box-title {
  color: #18181b;
}
body[data-theme="flat-minimal"] .highlight-box p,
body[data-theme="flat-minimal"] .highlight-box ul {
  color: #3f3f46;
}
body[data-theme="flat-minimal"] .action-cta {
  background: #fafafa;
  border: 1px solid #18181b;
  border-radius: 4px;
  box-shadow: none;
}
body[data-theme="flat-minimal"] .btn-cta {
  background: #18181b;
  color: #ffffff;
  border-radius: 4px;
  box-shadow: none;
}
body[data-theme="flat-minimal"] .btn-cta:hover {
  background: #27272a;
}

/* ----------------------------------------------------
   【解説案5: Dark Slate】 シック・ダークモード・夜間対応
---------------------------------------------------- */
body[data-theme="dark-slate"] {
  background: #0b0f19;
  color: #cbd5e1;
}
body[data-theme="dark-slate"] .article-card {
  background: #131b2e;
  border: 1px solid #1e293b;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}
body[data-theme="dark-slate"] .article-header {
  border-color: #1e293b;
}
body[data-theme="dark-slate"] .article-title {
  color: #f8fafc;
}
body[data-theme="dark-slate"] .article-meta {
  color: #94a3b8;
}
body[data-theme="dark-slate"] .article-body {
  color: #cbd5e1;
}
body[data-theme="dark-slate"] .article-body h2 {
  border-left: 4px solid #38bdf8;
  color: #f1f5f9;
}
body[data-theme="dark-slate"] .article-body h3 {
  color: #e2e8f0;
}
body[data-theme="dark-slate"] .category-badge.guide {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.3);
}
body[data-theme="dark-slate"] .category-badge.dev {
  background: rgba(244, 114, 182, 0.15);
  color: #f472b6;
  border-color: rgba(244, 114, 182, 0.3);
}
body[data-theme="dark-slate"] .highlight-box {
  background: #1e293b;
  border: 1px solid #334155;
}
body[data-theme="dark-slate"] .highlight-box-title {
  color: #38bdf8;
}
body[data-theme="dark-slate"] .highlight-box p,
body[data-theme="dark-slate"] .highlight-box ul {
  color: #94a3b8;
}
body[data-theme="dark-slate"] .action-cta {
  background: #111827;
  border: 1px solid #1e293b;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}
body[data-theme="dark-slate"] .action-cta h4 {
  color: #f8fafc;
}
body[data-theme="dark-slate"] .btn-cta {
  background: #0284c7;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}
body[data-theme="dark-slate"] .data-table th {
  background: #1e293b;
  color: #f1f5f9;
  border-color: #334155;
}
body[data-theme="dark-slate"] .data-table td {
  border-color: #1e293b;
  color: #cbd5e1;
}
body[data-theme="dark-slate"] .data-table tr:hover td {
  background: #1a233a;
}
body[data-theme="dark-slate"] .faq-item {
  background: #131b2e;
  border-color: #1e293b;
}
body[data-theme="dark-slate"] .faq-item summary {
  background: #1a233a;
  color: #f1f5f9;
}
body[data-theme="dark-slate"] .faq-answer {
  background: #131b2e;
  color: #cbd5e1;
  border-color: #1e293b;
}
body[data-theme="dark-slate"] .author-box {
  background: #131b2e;
  border-color: #1e293b;
}
body[data-theme="dark-slate"] .author-name {
  color: #f8fafc;
}
body[data-theme="dark-slate"] .author-bio {
  color: #94a3b8;
}

/* ----------------------------------------------------
   開発者ブログ向けテーマスタイル
---------------------------------------------------- */

/* 【ブログ案1: Modern Tech】 GitHub & Zenn風 */
body[data-theme="tech-modern"] {
  background: #f6f8fa;
  color: #1f2328;
}
body[data-theme="tech-modern"] .article-card {
  background: #ffffff;
  border: 1px solid #d0d7de;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(31, 35, 40, 0.04);
}
body[data-theme="tech-modern"] .article-title {
  color: #1f2328;
}
body[data-theme="tech-modern"] .article-body h2 {
  border-left: 4px solid #0969da;
  color: #1f2328;
}
body[data-theme="tech-modern"] .category-badge.dev {
  background: #ddf4ff;
  color: #0969da;
  border-color: #54aeff66;
}

/* 【ブログ案2: Editorial Magazine / Note風】 上質マガジン・エッセイ */
body[data-theme="editorial-note"] {
  background: #faf8f5;
  color: #2b2b2b;
  font-family: "Georgia", "游明朝", "Yu Mincho", "Hiragino Mincho ProN", serif;
  line-height: 1.95;
}
body[data-theme="editorial-note"] .article-card {
  background: #ffffff;
  border: 1px solid #ebe5df;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  padding: 36px 30px;
}
body[data-theme="editorial-note"] .article-title {
  font-family: "Georgia", "游明朝", "Yu Mincho", serif;
  font-size: 1.7rem;
  letter-spacing: 0.5px;
  color: #1a1a1a;
}
body[data-theme="editorial-note"] .article-body h2 {
  font-family: "Georgia", "游明朝", "Yu Mincho", serif;
  border-left: none;
  padding-left: 0;
  text-align: center;
  position: relative;
  margin: 40px 0 20px;
  font-weight: 700;
  color: #1a1a1a;
}
body[data-theme="editorial-note"] .article-body h2::after {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: #a87954;
  margin: 8px auto 0;
}
body[data-theme="editorial-note"] blockquote.quote-box {
  background: #f5f2eb;
  border-left: 4px solid #a87954;
  color: #4a453e;
}

/* 【ブログ案3: Notion Document Style】 Notion風ドキュメント */
body[data-theme="notion-style"] {
  background: #ffffff;
  color: #37352f;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, "Apple Color Emoji", Arial, sans-serif;
}
body[data-theme="notion-style"] .article-container {
  max-width: 700px;
}
body[data-theme="notion-style"] .article-card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 10px 4px;
}
body[data-theme="notion-style"] .article-header {
  border-bottom: 1px solid #ececed;
}
body[data-theme="notion-style"] .article-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: #37352f;
}
body[data-theme="notion-style"] .article-body h2 {
  border-left: none;
  padding-left: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: #37352f;
}
body[data-theme="notion-style"] .highlight-box {
  background: #f7f6f3;
  border: none;
  border-radius: 6px;
}
body[data-theme="notion-style"] .highlight-box-title {
  color: #37352f;
}
body[data-theme="notion-style"] .highlight-box p,
body[data-theme="notion-style"] .highlight-box ul {
  color: #5f5e5b;
}

/* 【ブログ案4: Cyber Dark】 VS Code風サイバーダーク */
body[data-theme="cyber-dark"] {
  background: #0e1117;
  color: #e6edf3;
}
body[data-theme="cyber-dark"] .article-card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}
body[data-theme="cyber-dark"] .article-title {
  color: #f0f6fc;
}
body[data-theme="cyber-dark"] .article-body h2 {
  border-left: 4px solid #a855f7;
  color: #f0f6fc;
}
body[data-theme="cyber-dark"] .category-badge.dev {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.35);
}
body[data-theme="cyber-dark"] .highlight-box {
  background: #1f242c;
  border: 1px solid #38404a;
}
body[data-theme="cyber-dark"] .highlight-box-title {
  color: #c084fc;
}
body[data-theme="cyber-dark"] .highlight-box p,
body[data-theme="cyber-dark"] .highlight-box ul {
  color: #94a3b8;
}

/* 【ブログ案5: Casual Friendly】 親しみやすい個人開発・ポップ */
body[data-theme="casual-friendly"] {
  background: #fdfbf7;
  color: #334155;
}
body[data-theme="casual-friendly"] .article-card {
  background: #ffffff;
  border: 2px solid #fde68a;
  border-radius: 22px;
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.08);
}
body[data-theme="casual-friendly"] .article-title {
  color: #1e293b;
  font-weight: 900;
}
body[data-theme="casual-friendly"] .article-body h2 {
  border-left: none;
  background: #fffbeb;
  padding: 8px 14px;
  border-radius: 999px;
  display: inline-block;
  color: #92400e;
  border: 1px solid #fef08a;
}
body[data-theme="casual-friendly"] .category-badge.dev {
  background: #fef3c7;
  color: #b45309;
  border-color: #fcd34d;
  font-weight: 800;
}
body[data-theme="casual-friendly"] .highlight-box {
  background: #fffbeb;
  border: 2px dashed #fcd34d;
  border-radius: 16px;
}
body[data-theme="casual-friendly"] .highlight-box-title {
  color: #92400e;
}

/* ----------------------------------------------------
   各ツールページ内の解説ページ誘導カード (.tool-guide-card)
---------------------------------------------------- */
.tool-guide-card {
  margin-top: 14px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}
.tool-guide-card:hover {
  background: #dcfce7;
  border-color: #86efac;
  transform: translateY(-1px);
}
.tool-guide-card .guide-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}
.tool-guide-card .guide-text {
  flex: 1;
}
.tool-guide-card .guide-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #166534;
  line-height: 1.4;
}
.tool-guide-card .guide-sub {
  font-size: 0.72rem;
  color: #15803d;
  margin-top: 2px;
}
.tool-guide-card .guide-arrow {
  font-size: 0.9rem;
  color: #166534;
  font-weight: bold;
}

/* ----------------------------------------------------
   トップページのブログ・解説記事セクション用スタイル
---------------------------------------------------- */
.blog-banner-card {
  margin-top: 12px;
  background: #fffbeb;
  border: 2px dashed #fcd34d;
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}
.blog-banner-card:hover {
  background: #fef3c7;
  border-color: #f59e0b;
  transform: translateY(-1px);
}
.blog-banner-info h3 {
  font-size: 0.95rem;
  font-weight: 800;
  color: #92400e;
  display: flex;
  align-items: center;
  gap: 6px;
}
.blog-banner-info p {
  font-size: 0.78rem;
  color: #b45309;
  margin-top: 3px;
  line-height: 1.4;
}
.guide-article-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.guide-article-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 14px;
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: all 0.15s ease;
}
.guide-article-item:hover {
  border-color: var(--primary);
  background: #f8fafc;
}
.guide-article-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.4;
}
.guide-article-arrow {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: bold;
}



