/* ==========================================
   PACE ACADEMY / JOURNAL POST STYLING
========================================== */

.post-page {
  padding-bottom: 8rem;
}

.post-article {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 1.5rem 0;
}

/* ---------- 戻るリンク & メタ ---------- */
.post-breadcrumbs {
  margin-bottom: 2rem;
}

.post-breadcrumbs a {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: #777;
  text-decoration: none;
  transition: color 0.15s ease;
}

.post-breadcrumbs a:hover {
  color: var(--accent, #1599a6);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.post-badge {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  background: #f0f4f7;
  color: #333;
  padding: 3px 8px;
  border-radius: 2px;
  font-weight: 500;
}

.post-date {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: #888;
}

/* ---------- タイトル & リード ---------- */
.post-title {
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  line-height: 1.22;
  letter-spacing: -0.015em;
  margin: 0 0 1.5rem;
  text-wrap: balance;
}

.post-lead {
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.85;
  color: #555;
  margin: 0 0 2.5rem;
  max-width: 36em;
  text-wrap: pretty;
}

/* ---------- 走行ログ・スペックバー (Telemetry) ---------- */
.run-telemetry {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1rem;
  padding: 1.4rem 1.5rem;
  background: #f8fafb;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  margin-bottom: 3.5rem;
}

.telemetry-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.telemetry-label {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: #888;
}

.telemetry-val {
  font-size: 1.15rem;
  font-weight: 600;
  color: #1a1a1a;
  letter-spacing: 0.02em;
}

.telemetry-val small {
  font-size: 0.75rem;
  font-weight: 400;
  color: #666;
}

.telemetry-gear .telemetry-val {
  color: var(--accent, #1599a6);
}

/* ---------- カバー画像 ---------- */
.post-cover {
  width: 100%;
  aspect-ratio: 3 / 2;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 4rem;
  background-color: #f0f0f0;
}

.post-cover-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e3eff5 0%, #d4e5ee 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6a8c9e;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
}

/* ---------- 本文タイポグラフィ ---------- */
.post-body {
  max-width: 680px;
  margin: 0 auto;
}

.post-body p {
  font-size: 1.05rem;
  line-height: 2.0;
  color: #2b2b2b;
  margin: 0 0 2rem;
  text-wrap: pretty;
  word-break: normal;
  overflow-wrap: break-word;
}

.post-body h2 {
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin: 4rem 0 1.5rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  text-wrap: balance;
}

.post-body blockquote {
  margin: 3rem 0;
  padding: 1.5rem 1.8rem;
  border-left: 2px solid var(--accent, #1599a6);
  background: #fbfdfe;
  font-size: 1.15rem;
  line-height: 1.8;
  color: #333;
  font-style: italic;
}

/* 挿入図版 */
.post-figure {
  margin: 3.5rem 0;
}

.figure-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #eaeff2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8da1ad;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  border-radius: 4px;
}

.post-figure figcaption {
  font-size: 0.8rem;
  color: #888;
  margin-top: 0.8rem;
  text-align: center;
}

/* ---------- ギア紹介カード ---------- */
.post-gear-card {
  margin: 4.5rem 0 2rem;
  padding: 1.8rem;
  background: #f7fafb;
  border: 1px solid rgba(21, 153, 166, 0.2);
  border-radius: 6px;
  display: flex;
  gap: 1.8rem;
  align-items: center;
}

.gear-card-image {
  flex-shrink: 0;
  width: 140px;
  height: 95px;
  background: #eaf2f5;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.gear-card-image img {
  width: 90%;
  height: auto;
  object-fit: contain;
}

.gear-card-content {
  flex-grow: 1;
}

.gear-card-eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--accent, #1599a6);
  font-weight: 600;
  display: block;
  margin-bottom: 0.3rem;
}

.gear-card-name {
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
}

.gear-card-desc {
  font-size: 0.88rem !important;
  line-height: 1.6 !important;
  color: #666 !important;
  margin-bottom: 1.2rem !important;
}

.gear-card-actions {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.gear-buy-btn {
  display: inline-block;
  padding: 7px 14px;
  background: #111;
  color: #fff;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  border-radius: 2px;
  transition: background 0.15s ease;
}

.gear-buy-btn:hover {
  background: var(--accent, #1599a6);
}

.gear-diag-link {
  font-size: 0.8rem;
  color: #555;
  text-decoration: none;
  transition: color 0.15s ease;
}

.gear-diag-link:hover {
  color: #111;
  text-decoration: underline;
}

/* ---------- 記事ナビゲーション（PREV / NEXT） ---------- */
.post-footer {
  max-width: 680px;
  margin: 5rem auto 0;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.post-nav-item {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

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

.nav-label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: #999;
}

.post-nav-item a {
  font-size: 0.92rem;
  line-height: 1.5;
  color: #222;
  text-decoration: none;
  transition: color 0.15s ease;
}

.post-nav-item a:hover {
  color: var(--accent, #1599a6);
}

/* ---------- モバイル対応 ---------- */
@media (max-width: 600px) {
  .post-article {
    padding-top: 2rem;
  }

  .run-telemetry {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
    padding: 1.2rem;
  }

  .post-gear-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.2rem;
  }

  .gear-card-image {
    width: 100%;
    height: 120px;
  }

  .post-nav {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }

  .post-nav-next {
    text-align: left;
  }
}

/* Brand logo */
.site-logo img { display: block; width: 200px; height: auto; }
@media (max-width: 760px) {
  .site-logo img { width: 170px; }
}

/* Auto journal post */
.post-cover-auto { overflow:hidden; }
.post-cover-auto img { display:block; width:100%; height:100%; object-fit:contain; object-position:center; }
.journal-loading-message { padding:160px 24px; text-align:center; color:#6c7f8d; }
@media (max-width:760px){ .post-cover-auto img{height:100%;min-height:0;} }

/* Journal list return controls */
.journal-back-link { display:inline-flex; align-items:center; min-height:44px; }
.post-action-links { display:flex; flex-wrap:wrap; gap:10px 24px; }
.journal-back-bottom { margin:56px 0 28px; display:flex; flex-wrap:wrap; gap:12px; justify-content:center; }
.journal-back-button {
  display:inline-flex; align-items:center; justify-content:center;
  min-height:48px; padding:0 28px; border:1px solid #086bc7;
  border-radius:999px; color:#086bc7; text-decoration:none;
  font-weight:700; letter-spacing:.04em;
}
.journal-back-button:hover { background:#086bc7; color:#fff; }
