/*
Theme Name: Bike Matome Theme CD A
Theme URI: https://bikematome.local/cd-a/
Author: Bike Matome Team
Description: Claude Design A案 NewsGrid を反映したバイクまとめ別テーマ。
Version: 1.0.4
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
Text Domain: bikematome-theme-cd-a
*/

:root {
  --bmt-ink: #111827;
  --bmt-text: #1f2937;
  --bmt-muted: #64748b;
  --bmt-faint: #94a3b8;
  --bmt-page: #f3f5f8;
  --bmt-card: #ffffff;
  --bmt-border: #dfe5ee;
  --bmt-border-strong: #cbd5e1;
  --bmt-blue: #1558d6;
  --bmt-blue-2: #0f47af;
  --bmt-navy: #1f4f82;
  --bmt-navy-2: #245f9c;
  --bmt-red: #d82418;
  --bmt-green: #0f8a64;
  --bmt-orange: #c97500;
  --bmt-wrap: 1280px;
  --bmt-sidebar: 280px;
  --bmt-radius: 8px;
  --bmt-shadow: 0 10px 26px rgba(15, 23, 42, 0.10);
}

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

html {
  margin: 0;
  background: #ffffff !important;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--bmt-text) !important;
  background: #ffffff !important;
  background-image: none !important;
  font-family: "Noto Sans JP", "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-size: 15px;
  line-height: 1.75;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--bmt-blue); }
img { display: block; max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; }

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

.bmt-site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--bmt-border);
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.bmt-header-shell,
.bmt-header-inner {
  background: #ffffff;
}

.bmt-header-inner,
.bmt-container,
.bmt-footer-inner {
  width: 100%;
  max-width: var(--bmt-wrap);
  margin: 0 auto;
}

.bmt-header-inner {
  display: grid;
  grid-template-columns: auto minmax(280px, 420px);
  gap: 28px;
  align-items: center;
  padding: 14px 22px;
}

.bmt-logo {
  display: inline-flex;
  flex-direction: column;
  color: var(--bmt-navy);
  line-height: 1;
}

.bmt-logo-main {
  color: var(--bmt-navy);
  font-family: Impact, "Arial Narrow", sans-serif;
  font-size: clamp(1.85rem, 4vw, 2.45rem);
  font-weight: 900;
  letter-spacing: 0.04em;
}

.bmt-logo-main span { color: var(--bmt-blue); }

.bmt-logo-sub {
  margin-top: 4px;
  color: var(--bmt-muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.bmt-search {
  display: flex;
  min-width: 0;
  border: 2px solid var(--bmt-blue);
  border-radius: 6px;
  overflow: hidden;
  background: #ffffff;
}

.bmt-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 10px 14px;
  color: var(--bmt-text);
  background: #ffffff;
}

.bmt-search button {
  border: 0;
  padding: 0 18px;
  color: #ffffff;
  background: var(--bmt-blue);
  font-weight: 800;
}

.bmt-nav {
  display: flex;
  overflow-x: auto;
  padding: 0 22px;
  background: var(--bmt-navy);
}

.bmt-menu { display: contents; margin: 0; padding: 0; list-style: none; }
.bmt-menu li { display: inline-flex; }

.bmt-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 16px;
  color: rgba(255, 255, 255, 0.82);
  background: transparent;
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
}

.bmt-nav a:hover,
.bmt-nav a.is-current,
.bmt-menu .current-menu-item > a {
  color: #ffffff;
  background: var(--bmt-blue);
}

.bmt-breaking {
  display: flex;
  gap: 14px;
  align-items: center;
  overflow: hidden;
  padding: 7px 22px;
  color: rgba(255, 255, 255, 0.88);
  background: var(--bmt-navy-2);
  font-size: 0.8rem;
  white-space: nowrap;
}

.bmt-breaking span {
  border-radius: 3px;
  padding: 2px 8px;
  color: #ffffff;
  background: var(--bmt-red);
  font-weight: 900;
}

.bmt-breaking a { color: rgba(255, 255, 255, 0.88); }
.bmt-breaking i { color: rgba(255, 255, 255, 0.35); font-style: normal; }

.bmt-main {
  min-height: 70vh;
  background: var(--bmt-page) !important;
}

.bmt-container { padding-left: 22px; padding-right: 22px; }
.bmt-section { padding: 24px 0; background: var(--bmt-page); }
.bmt-page-hero { padding-top: 30px; padding-bottom: 14px; }
.bmt-page-hero .bmt-container, .bmt-single-wrap { max-width: 980px; }

.bmt-hero {
  border-bottom: 1px solid var(--bmt-border);
  background: #ffffff;
}

.bmt-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  padding: 22px;
  background: #ffffff;
}

.bmt-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 58%) minmax(0, 42%);
  overflow: hidden;
  border: 1px solid var(--bmt-border);
  border-radius: var(--bmt-radius);
  background: #ffffff;
  box-shadow: var(--bmt-shadow);
}

.bmt-hero-card::before,
.bmt-hero-card::after {
  content: none;
  display: none;
}

.bmt-hero-image,
.bmt-hero-placeholder {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
}

.bmt-hero-placeholder,
.bmt-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(15, 23, 42, 0.35);
  background: #e8edf4;
  font-family: Consolas, monospace;
  font-size: 0.8rem;
  line-height: 1.7;
  text-align: center;
}

.bmt-hero-body {
  position: relative;
  align-self: center;
  padding: clamp(24px, 5vw, 40px);
  color: var(--bmt-text);
  background: #ffffff;
}

.bmt-hero-body .bmt-title-xl,
.bmt-hero-body .bmt-lead,
.bmt-hero-date { color: var(--bmt-text); }

.bmt-title-xl,
.bmt-article-title {
  margin: 10px 0;
  color: var(--bmt-ink);
  line-height: 1.42;
  letter-spacing: -0.03em;
}

.bmt-title-xl { max-width: 680px; font-size: clamp(1.55rem, 3.2vw, 2.2rem); font-weight: 900; }
.bmt-article-title { font-size: clamp(1.55rem, 3vw, 2.25rem); font-weight: 900; }
.bmt-lead { max-width: 720px; margin: 0 0 16px; color: var(--bmt-muted); font-size: 0.94rem; }
.bmt-hero-date { color: var(--bmt-faint); font-size: 0.78rem; }

.bmt-badge-row,
.bmt-card-badges,
.bmt-news-row-meta,
.bmt-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.bmt-topic-badge,
.bmt-kicker,
.bmt-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 3px;
  padding: 2px 8px;
  color: #ffffff;
  background: var(--badge-color, var(--bmt-blue));
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bmt-topic-badge.is-pickup { --badge-color: var(--bmt-red); }

.bmt-cta-row,
.bmt-article-footer { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.bmt-button,
.bmt-readmore,
.bmt-section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  font-weight: 800;
}

.bmt-button {
  border: 1px solid var(--bmt-blue);
  padding: 9px 22px;
  color: #ffffff;
  background: var(--bmt-blue);
  box-shadow: 0 2px 8px rgba(21, 88, 214, 0.22);
}

.bmt-button:hover { color: #ffffff; background: var(--bmt-blue-2); }
.bmt-button.is-ghost, .bmt-button.is-outline { color: var(--bmt-blue); background: #ffffff; box-shadow: none; }
.bmt-button.is-subtle { border-color: #c9d8f4; color: var(--bmt-blue); background: #edf4ff; box-shadow: none; }

.bmt-hero-side { display: flex; flex-direction: column; gap: 10px; }
.bmt-hero-sub {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  min-height: 104px;
  overflow: hidden;
  border: 1px solid var(--bmt-border);
  border-radius: var(--bmt-radius);
  background: #ffffff;
}
.bmt-hero-sub-media { overflow: hidden; background: var(--bmt-page); }
.bmt-hero-sub-image { width: 100%; height: 100%; min-height: 104px; object-fit: cover; }
.bmt-hero-sub-body { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 10px 14px; }
.bmt-hero-sub-title, .bmt-news-row-title, .bmt-card-title { margin: 0; color: var(--bmt-ink); font-weight: 800; line-height: 1.55; }
.bmt-hero-sub-title { display: -webkit-box; margin-top: 5px; overflow: hidden; font-size: 0.9rem; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }

.bmt-maker-strip { border-bottom: 1px solid var(--bmt-border); background: #ffffff; }
.bmt-maker-strip-inner { display: flex; gap: 10px; align-items: center; padding-top: 16px; padding-bottom: 16px; }
.bmt-maker-strip strong { flex-shrink: 0; color: var(--bmt-muted); font-size: 0.82rem; }
.bmt-maker-card {
  display: flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: space-between;
  min-width: 130px;
  border: 1px solid var(--bmt-border-strong);
  border-radius: var(--bmt-radius);
  padding: 8px 14px;
  color: #ffffff;
  background: var(--maker-color, var(--bmt-navy));
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}
.bmt-maker-card:hover { color: #ffffff; transform: translateY(-2px); box-shadow: var(--bmt-shadow); }
.bmt-maker-card span { font-size: 1.15rem; font-weight: 900; letter-spacing: 0.08em; }
.bmt-maker-card em { color: rgba(255,255,255,0.78); font-style: normal; }
.bmt-maker-card.is-all { flex: 0.5 0 150px; justify-content: center; background: var(--bmt-navy); font-size: 0.78rem; font-weight: 900; }

.bmt-layout { display: grid; grid-template-columns: minmax(0, 1fr) var(--bmt-sidebar); gap: 20px; }
.bmt-main-column { min-width: 0; }
.bmt-section-head { display: flex; align-items: stretch; gap: 0; margin-bottom: 14px; }
.bmt-section-head-spaced { margin-top: 24px; }
.bmt-section-title, .bmt-widget-title {
  display: flex;
  align-items: center;
  border-left: 5px solid var(--bmt-blue);
  margin: 0;
  padding: 8px 16px;
  color: var(--bmt-ink);
  background: #ffffff;
  font-size: 1rem;
  font-weight: 900;
}
.bmt-section-head::after { content: ""; flex: 1; background: #e8edf4; }
.bmt-section-more { border-bottom: 1px solid var(--bmt-border); padding: 8px 0 8px 12px; color: var(--bmt-blue); background: var(--bmt-page); font-size: 0.8rem; white-space: nowrap; }

.bmt-news-list,
.bmt-widget,
.bmt-card,
.bmt-article,
.bmt-panel,
.bmt-empty-state,
.bmt-search-panel,
.bmt-comments {
  border: 1px solid var(--bmt-border);
  border-radius: var(--bmt-radius);
  color: var(--bmt-text);
  background: #ffffff;
  box-shadow: 0 1px 5px rgba(15, 23, 42, 0.06);
}

.bmt-news-list { padding: 0 14px; }
.bmt-news-row { display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 13px; border-bottom: 1px solid var(--bmt-border); padding: 12px 0; background: transparent; }
.bmt-news-row:last-child { border-bottom: 0; }
.bmt-news-row.is-large { grid-template-columns: 150px minmax(0, 1fr); gap: 16px; margin: 0 -14px; padding: 16px 14px; background: #fbfcff; }
.bmt-news-row-media { overflow: hidden; border: 1px solid var(--bmt-border); border-radius: 6px; background: var(--bmt-page); }
.bmt-news-row-image { width: 100%; height: 82px; object-fit: cover; }
.bmt-news-row.is-large .bmt-news-row-image { height: 112px; }
.bmt-news-row-meta, .bmt-meta-line { color: var(--bmt-faint); font-size: 0.74rem; }
.bmt-news-row-title { margin-top: 5px; font-size: 0.95rem; }
.bmt-news-row.is-large .bmt-news-row-title { font-size: 1.08rem; }
.bmt-excerpt { display: -webkit-box; margin: 5px 0 0; overflow: hidden; color: var(--bmt-muted); font-size: 0.84rem; line-height: 1.72; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.bmt-news-row.is-large .bmt-excerpt { -webkit-line-clamp: 3; }
.bmt-readmore { margin-top: 7px; color: var(--bmt-blue); font-size: 0.8rem; }
.bmt-center-link { margin-top: 14px; text-align: center; }

.bmt-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.bmt-special-grid .bmt-card { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 10px; padding: 10px; }
.bmt-card { overflow: hidden; transition: transform 0.18s, box-shadow 0.18s; }
.bmt-card:hover { transform: translateY(-2px); box-shadow: var(--bmt-shadow); }
.bmt-card-image { width: 100%; height: 150px; object-fit: cover; background: var(--bmt-page); }
.bmt-special-grid .bmt-card-image { width: 78px; height: 58px; border: 1px solid var(--bmt-border); border-radius: 5px; }
.bmt-card-body { padding: 12px 13px 14px; }
.bmt-special-grid .bmt-card-body { padding: 0; }
.bmt-card-title { margin-top: 6px; font-size: 0.9rem; }
.bmt-special-grid .bmt-card-title { display: -webkit-box; overflow: hidden; font-size: 0.8rem; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.bmt-special-grid .bmt-excerpt, .bmt-special-grid .bmt-readmore, .bmt-special-grid .bmt-meta-line { display: none; }

.bmt-sidebar { display: flex; flex-direction: column; gap: 16px; }
.bmt-widget { overflow: hidden; }
.bmt-widget-title { font-size: 0.9rem; }
.bmt-ranking { counter-reset: ranking; }
.bmt-ranking-item { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 9px; border-bottom: 1px solid var(--bmt-border); padding: 12px 14px; background: transparent; }
.bmt-ranking-item:last-child { border-bottom: 0; }
.bmt-ranking-item::before { counter-increment: ranking; content: counter(ranking); color: var(--bmt-faint); font-size: 1.3rem; font-weight: 900; line-height: 1; }
.bmt-ranking-item:nth-child(1)::before { color: var(--bmt-red); }
.bmt-ranking-item:nth-child(2)::before { color: var(--bmt-orange); }
.bmt-ranking-item:nth-child(3)::before { color: #777777; }
.bmt-ranking-item h3 { margin: 0; color: var(--bmt-text); font-size: 0.82rem; line-height: 1.6; }
.bmt-tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px; }
.bmt-tag-cloud a { border: 1px solid var(--bmt-border); border-radius: 999px; padding: 5px 10px; color: var(--bmt-text); background: var(--bmt-page); font-size: 0.78rem; }
.bmt-ad-box { display: grid; min-height: 180px; place-items: center; color: var(--bmt-faint); background: #e8edf4; text-align: center; }
.bmt-ad-box small { display: block; margin-top: 6px; }
.bmt-model-section { padding-top: 0; }

.bmt-archive-list { display: grid; gap: 14px; }
.bmt-archive-card { display: grid; grid-template-columns: 220px minmax(0, 1fr); overflow: hidden; }
.bmt-sidebar-links { display: grid; gap: 8px; margin-top: 14px; }
.bmt-sidebar-links .bmt-news-mini { border: 1px solid var(--bmt-border); border-radius: 6px; padding: 9px 11px; color: var(--bmt-text); background: #ffffff; font-weight: 800; }

.bmt-article { padding: clamp(26px, 5vw, 42px); }
.bmt-article-header { margin-bottom: 22px; }
.bmt-single-image { overflow: hidden; border: 1px solid var(--bmt-border); border-radius: var(--bmt-radius); margin: 20px 0; background: var(--bmt-page); }
.bmt-single-featured { width: 100%; max-height: 520px; object-fit: cover; }
.bmt-content { color: var(--bmt-text); background: transparent; font-size: 1rem; }
.bmt-content > *:first-child { margin-top: 0; }
.bmt-content h2, .bmt-content h3 { color: var(--bmt-ink); line-height: 1.45; }
.bmt-content p { margin: 0 0 1.2em; }
.bmt-content a { color: var(--bmt-blue); text-decoration: underline; }
.bmt-article-footer { border-top: 1px solid var(--bmt-border); margin-top: 28px; padding-top: 18px; }
.bmt-result-count { margin: 0; color: var(--bmt-muted); }
.bmt-empty-state { padding: 28px; text-align: center; }
.bmt-search-panel { padding: 18px; }
.bmt-search-panel .search-form { display: flex; gap: 8px; }
.bmt-search-panel .search-field { width: 100%; border: 1px solid var(--bmt-border); border-radius: 6px; padding: 10px 12px; color: var(--bmt-text); background: #ffffff; }
.bmt-search-panel .search-submit { border: 0; border-radius: 6px; padding: 10px 16px; color: #ffffff; background: var(--bmt-blue); font-weight: 900; }

.bmt-comments { margin-top: 22px; padding: 20px; }
.bmt-comment-list { margin: 0 0 20px; padding-left: 20px; }
.bmt-comments input, .bmt-comments textarea { width: 100%; border: 1px solid var(--bmt-border); border-radius: 6px; padding: 10px 12px; color: var(--bmt-text); background: #ffffff; }
.bmt-comments .submit { width: auto; border: 0; border-radius: 6px; padding: 10px 18px; color: #ffffff; background: var(--bmt-green); font-weight: 900; cursor: pointer; }

.bmt-footer {
  border-top: 1px solid var(--bmt-border);
  color: var(--bmt-muted);
  background: #ffffff;
}
.bmt-footer-inner { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; padding: 30px 22px 18px; }
.bmt-footer-brand p { margin: 12px 0 0; color: var(--bmt-muted); font-size: 0.8rem; }
.bmt-footer-logo .bmt-logo-main { color: var(--bmt-navy); font-size: 1.7rem; }
.bmt-footer-logo .bmt-logo-sub { color: var(--bmt-muted); }
.bmt-footer-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.bmt-footer-nav strong { display: block; border-bottom: 1px solid var(--bmt-border); margin-bottom: 10px; padding-bottom: 7px; color: var(--bmt-faint); font-size: 0.74rem; letter-spacing: 0.12em; }
.bmt-footer-nav a { display: block; margin-bottom: 7px; color: var(--bmt-muted); font-size: 0.82rem; }
.bmt-copyright { grid-column: 1 / -1; border-top: 1px solid var(--bmt-border); margin: 0; padding-top: 14px; color: var(--bmt-faint); font-size: 0.74rem; }

.nav-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.nav-links a, .nav-links span { border: 1px solid var(--bmt-border); border-radius: 6px; padding: 7px 11px; background: #ffffff; font-weight: 800; }
.nav-links .current { color: #ffffff; background: var(--bmt-blue); }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid rgba(245, 158, 11, 0.85); outline-offset: 4px; }

@media (max-width: 1100px) {
  .bmt-hero-grid, .bmt-layout { grid-template-columns: 1fr; }
  .bmt-hero-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bmt-sidebar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .bmt-header-inner, .bmt-footer-inner, .bmt-footer-nav { grid-template-columns: 1fr; }
  .bmt-maker-strip-inner { flex-wrap: wrap; }
  .bmt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bmt-sidebar { grid-template-columns: 1fr; }
  .bmt-archive-card { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .bmt-header-inner, .bmt-container, .bmt-footer-inner { padding-left: 14px; padding-right: 14px; }
  .bmt-nav, .bmt-breaking { padding-left: 14px; padding-right: 14px; }
  .bmt-search { width: 100%; }
  .bmt-hero-grid { padding: 14px; }
  .bmt-hero-card { grid-template-columns: 1fr; }
  .bmt-hero-image, .bmt-hero-placeholder { min-height: 220px; }
  .bmt-hero-side, .bmt-grid, .bmt-special-grid .bmt-card { grid-template-columns: 1fr; }
  .bmt-hero-sub { grid-template-columns: 98px minmax(0, 1fr); }
  .bmt-news-row, .bmt-news-row.is-large { grid-template-columns: 1fr; }
  .bmt-news-row-image, .bmt-news-row.is-large .bmt-news-row-image { height: 180px; }
  .bmt-maker-card { flex-basis: calc(50% - 8px); }
  .bmt-button { width: 100%; }
  .bmt-article { padding: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
