/**
 * Custom CSS
 *
 * This file is for your custom styles.
 * You can add any CSS rules here to customize the Ghost theme.
 *
 * Note: Changes made directly to this file may be overwritten during theme updates.
 * It's recommended to use the Code Injection feature in Ghost for persistent customizations.
 */

/* Your custom CSS goes below this line */

/**
 * Custom CSS (整理版)
 * 最終更新: 2026-01-19
 */

/* =========================================================
   0) Typography / 日本語フォント
   ========================================================= */
:root {
  --font-jp: hiragino-kaku-gothic-pron,
             "Hiragino Kaku Gothic ProN",
             "Yu Gothic", Meiryo, sans-serif;
}

body {
  font-family: Inter, var(--font-jp);
}

.gh-content,
.content {
  line-height: 1.9;
}

div.post-card-author-bio {
  line-height: 1.7;
}

h1, h2, h3, h4, h5, h6,
h1.post-title {
  font-family: Inter, var(--font-jp) !important;
}

/* 見出しh2の装飾 */
.gh-content h2,
.content h2 {
  font-size: 24px;
  padding-bottom: 0.6em;
  margin-top: 2.2em;
  margin-bottom: 1.2em;
  border-bottom: 1.5px solid var(--color-background-300);
}

/* =========================================================
   1) Nav / タグ表示（フォントウェイト）
   ========================================================= */

/* 強すぎる可能性があるので、必要に応じて修正検討 */
nav a,
span.label {
  font-weight: 600 !important;
}

a.nav-link,
a.post-tag,
span.label.label-light,
span.label.label-dark {
  font-weight: 300 !important;
}

/* =========================================================
   2) Post Header / 記事ページのタイトル周り
   ========================================================= */

/* タイトル基本 */
.post-header .post-title {
  margin: 0 0 1rem;
  line-height: 1.32;
}

/* 強すぎる可能性があるため、必要に応じて修正検討 */
h1 {
  font-size: clamp(30px, 3.2vw, 34px) !important;
}

/* meta */
.post-meta {
  margin: 0;
  font-size: 14px;
  opacity: 0.85;
}

time.post-meta-date,
a.post-tag {
  color: var(--color-secondary);
}

/* ヘッダー内の著者アバターが被るのを防ぐ */
.post-header .post-meta li,
.post-header .post-meta .post-meta-author,
.post-header .post-meta .author,
.post-header .post-meta .avatar,
.post-header .post-meta img {
  position: static !important;
}

/* メタ行は横並びで整列 */
.post-header .post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* ヘッダーを2段構造に */
.post-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}

.post-header-row {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* 自作 post-meta2 */
.post-meta2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0;
}

.post-author {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.post-author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  object-fit: cover;
}

.post-author-name {
  font-weight: 600;
}

.post-meta-sep {
  opacity: 0.6;
}

.post-header-buttons {
  display: flex;
  gap: 0.6rem;
}

/* 記事ページだけ：contentの縦gapを縮める */
.post-template-default article#content.content {
  gap: var(--spacing-9);
}

/* 記事ページ：タイトルブロック左寄せ */
.post-template-default header.post-header {
  align-items: flex-start !important;
  text-align: left;
}

/* 記事ページ：タイトルを本文列に合わせる */
.post-template-default article#content.content > header.post-header {
  grid-column: 2 !important;
  justify-self: start !important;
  width: min(100%, var(--container--width)) !important;
  max-width: none !important;
}

.post-template-default article#content.content > header.post-header.container {
  transform: none !important;
  margin: 0 !important;
}

/* =========================================================
   3) Author card / 著者カード
   ========================================================= */
/* サイドバーの author card を消す */
aside.post-sidebar .post-card-author {
  display: none !important;
}

/* 本文下の author card を常に表示 */
.post-content-wrapper > .post-card-author {
  display: flex !important;
  background-color: var(--color-background-mono-100);
}

/* 著者カードの本文を省略 */
.card.card-author .card-author-content > p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}

/* =========================================================
   4) Post Tags / モバイル時のタグ周り
   ========================================================= */
@media (max-width: 991px) {
  .post-has-sidebar .post-content-grid + .post-content-grid {
    margin-top: var(--spacing-9);
  }

  .post-tags {
    margin-top: var(--spacing-4);
  }

  .post-template-default .post-tags {
    margin-bottom: calc(var(--layout--gap) * 0.5);
  }
}

/* =========================================================
   5) Post Featured Image / アイキャッチ
   ========================================================= */
/* 記事ページ */
.post-template-default .post-media {
  width: clamp(320px, 86vw, 760px);
  margin: 0 auto;
  margin-top: 0;
}

.post-template-default .post-media .post-featured-image {
  width: 100%;
  margin: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 16px;
}

.post-template-default .post-media .post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 固定ページ/共通 */
.content .post-media {
  width: clamp(320px, 86vw, 760px);
  margin: 0 auto;
  margin-top: 0;
}

.content .post-media .post-featured-image {
  width: 100%;
  margin: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 16px;
}

.content .post-media .post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* =========================================================
   6) Home cards / 最新記事カードのタイトル省略
   ========================================================= */
.card-post .card-post-title > a {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* =========================================================
   7) Featured / トップのFeaturedスライダー
   ========================================================= */
/* 広い時だけ横長 */
@media (min-width: 992px) {
  .card-post-featured {
    aspect-ratio: 24 / 3;
  }
}

/* featured下の余白だけ縮める */
.section-featured {
  margin-bottom: calc(var(--layout--gap) * -1 + var(--spacing-6));
}

/* Swiperの掴むカーソルをやめてクリック優勢に */
.section-featured .swiper,
.section-featured .swiper-wrapper,
.section-featured .swiper-slide {
  cursor: pointer !important;
}

.section-featured a {
  cursor: pointer;
}

/* カード全面リンク */
.section-featured .card-post-featured {
  position: relative;
}

.section-featured .card-post-link-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
}

/* タグ行は overlay より上に置くが、余白クリックは透過させる */
.section-featured .card-post-tags {
  position: relative;
  z-index: 6;
  pointer-events: none; /* 余白はクリックを拾わない */
}

/* タグ文字だけはクリックできるように戻す */
.section-featured .card-post-tags a {
  pointer-events: auto;
}

/* 他の個別リンクも overlay より上 */
.section-featured .card-post-title a,
.section-featured .card-post-meta a,
.section-featured .card-post-avatars a {
  position: relative;
  z-index: 6;
}

/* =========================================================
   8) 細々としたもの / テーブル設定、リンク設定
   ========================================================= */

@media (max-width: 768px) {
  .post-content table,
  .gh-content table,
  .kg-content table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

.post-content th,
.gh-content th,
.kg-content th {
  font-weight: 600;
}

.gh-content a,
.post-content a,
.kg-content a { color: var(--ghost-accent-color); }

.gh-content a:hover,
.post-content a:hover,
.kg-content a:hover { opacity: 0.65; }


:not(pre)>code, pre {
    background-color: var(--color-background-mono-100);
}

.toc a {
    color: var(--color-secondary);
}

/* 著者カード上の余白を詰める（clampのデカいgapを無効化） */
.post-content-wrapper > .post-card-author{
  margin: 16px auto 0 !important;
}


/* =========================================================
   9) CTAの調整
   ========================================================= */

/* 記事末CTA：幅と余白を整える */
#biz-cta {
  max-width: 760px;
  margin: 40px auto 24px;
  padding: 28px 24px;
  border-radius: 16px;
}

/* 見出し：少し引き締め */
#biz-cta h2 {
  font-size: 22px;
  line-height: 1.35;
  margin-top: 20px;
  margin-bottom: 10px;
}

/* 説明文：読みやすく */
#biz-cta p {
  font-size: 15px;
  line-height: 1.75;
  margin: 0 auto 16px;
  max-width: 46em;
}

/* ボタン：押せる感を出す */
#biz-cta .button,
#biz-cta a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  font-size: 16px;
  border-radius: 999px;
}

/* スマホ：カード余白を少し減らして視認性UP */
@media (max-width: 480px) {
  #biz-cta {
    margin: 28px auto 16px;
    padding: 22px 16px;
  }
  #biz-cta h2 {
    font-size: 20px;
  }
}

/* =========================================================
   10) Lightning Addressボックスの調整
   ========================================================= */

.lightning-address-box {
  margin: 32px auto;
  padding: 24px;
  border: 1.5px solid var(--color-background-mono-200);
  border-radius: 16px;
}

.lightning-address-message {
  margin: 8px 0 16px;
  line-height: 1.7;
}
.lightning-address-message {
  opacity: 0.85;
  font-size: 0.95em;
}


.lightning-address-wrap {
  max-width: 100%;
  overflow-x: auto;                 /* ここで横スクロール */
  -webkit-overflow-scrolling: touch;
  padding: 6px 0;                   /* スクロール時の指当たりを少し良く */
}

.lightning-address-value {
  display: inline-flex;             /* ピルは内容幅のまま */
  align-items: center;

  padding: 14px 20px;
  min-height: 44px;
  border-radius: 999px;
  background: var(--color-background-mono-100);
  font-weight: 500;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;

  white-space: nowrap;              /* 改行しない */
}




