@charset "utf-8";

/* ====================================
   CSS Variables (テーマ設定：モダンカラー)
   ==================================== */
:root {
  /* カラーパレット：鮮やかで少しテック感のある色味へ */
  --primary-color: #007aff;       /* メインの青 */
  --primary-gradient: linear-gradient(135deg, #007aff 0%, #00c6ff 100%); /* グラデーション */
  --accent-color: #34c759;        /* アクセントの緑 */
  --accent-gradient: linear-gradient(135deg, #34c759 0%, #32d74b 100%);
  
  --text-main: #1d1d1f;           /* 真っ黒ではなく深いグレー */
  --text-sub: #86868b;            /* 落ち着いたサブテキスト */
  --bg-body: #f5f5f7;             /* Apple風の明るいグレー背景 */
  --date-color: #6e6e73;
  
  /* カード設定：境界線をなくし、影で浮かせる「Soft UI」 */
  --card-bg: rgba(255, 255, 255, 0.85); /* 少し透ける白 */
  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-blur: blur(20px);       /* 強めのすりガラス */
  --card-radius: 20px;            /* 角丸を大きく滑らかに */
  
  /* 影：広がりを持たせて「浮遊感」を出す */
  --card-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.08), 0 0 2px rgba(0, 0, 0, 0.05);
  --hover-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.15);
}

/* ====================================
   0. 不要な要素の削除
   ==================================== */
#globalheader-container,
#footer,
.footer-action-wrapper,
.service-footer,
#footer-inner,
.google-auto-placed {
  display: none !important;
}

/* ====================================
   1. 基本設定 & 背景装飾
   ==================================== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro JP", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  font-size: 16px;
  line-height: 2.0;
  letter-spacing: 0.05em;
  color: var(--text-main);
  background-color: var(--bg-body);
  
  /* モダンなメッシュグラデーション背景 */
  background-image: 
    radial-gradient(circle at 10% 10%, rgba(0, 122, 255, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 90%, rgba(52, 199, 89, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.8) 0%, transparent 100%);
  background-attachment: fixed;
  margin: 0; padding: 0;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
a:hover { 
  opacity: 0.8;
  text-shadow: 0 0 15px rgba(0,122,255,0.2); 
}

/* レイアウト枠（サイズは維持） */
#content { width: 100%; }

#blog-title-inner, #content-inner {
  width: 96%;
  max-width: 1380px;
  margin: 0 auto;
}

#content-inner {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 30px;
  padding-top: 20px;
}

#wrapper, #box2 { 
  float: none !important; 
  width: auto !important; 
}
#box2 { width: 100% !important; }

/* ====================================
   2. ヘッダー
   ==================================== */
#blog-title {
  padding: 50px 0 25px;
  text-align: center;
}
#title { margin: 0; }

/* タイトル：グラデーション文字で今風に */
#title a {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, #333 30%, #555 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #333; /* fallback */
  text-shadow: none;
}
#blog-description {
  margin-top: 10px;
  font-size: 16px;
  color: var(--text-sub);
  font-weight: 500;
}

/* ====================================
   3. グローバルメニュー（フロストガラス風）
   ==================================== */
#menu {
  position: sticky;
  top: 10px;
  z-index: 999;
  
  /* すりガラス効果 */
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
  
  width: 96%; max-width: 840px;
  margin: 0 auto 40px;
  padding: 6px;
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px;
}
#menu li a {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-sub);
  padding: 10px 20px;
  border-radius: 30px;
  transition: all 0.3s ease;
}
#menu li a:hover {
  background: var(--primary-gradient);
  color: #fff;
  box-shadow: 0 4px 15px rgba(0, 122, 255, 0.3);
  transform: translateY(-1px);
}

/* ====================================
   4. パンくずリスト
   ==================================== */
#top-box {
  text-align: center;
  grid-column: 1;
  margin-bottom: 10px;
  font-size: 13px;
}
#top-box .breadcrumb-inner {
  justify-content: center;
}
#top-box a { color: var(--text-sub); font-weight: 500; }
#top-box a:hover { color: var(--primary-color); text-decoration: none; }

/* ====================================
   5. 記事カードデザイン (アーカイブページ)
   ==================================== */
.page-archive .archive-entries {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)) !important;
  gap: 20px;
  padding: 10px 0;
}

/* カード：枠線をなくし、影と角丸で表現 */
.page-archive .archive-entry {
  display: flex !important;
  flex-direction: column;
  position: relative;
  
  background-color: var(--card-bg); /* 少し透ける */
  backdrop-filter: blur(10px);
  
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(255,255,255,0.6); /* 極薄の白枠 */
  
  padding: 25px;
  height: 100%;
  box-sizing: border-box;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  margin-bottom: 0 !important;
}

/* ホバー時にふわっと浮く */
.page-archive .archive-entry:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: var(--hover-shadow);
  z-index: 2;
}

/* 要素の並び順 (変更なし) */
.page-archive .archive-date {
  order: 1;
  text-align: center;
  font-size: 14px;
  color: var(--text-sub);
  margin-bottom: 10px;
  font-weight: 600;
  display: block;
}
.page-archive .archive-date a::before {
  font-family: "blogicon";
  content: "\f043";
  margin-right: 5px;
  color: #999;
}

.page-archive .entry-title {
  order: 2;
  font-size: 18px !important;
  font-weight: 800; /* より太くモダンに */
  text-align: center;
  line-height: 1.5;
  margin: 0 0 15px 0 !important;
  color: var(--text-main);
}

.page-archive .categories {
  order: 3;
  text-align: center;
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}
/* カテゴリタグ：ピル型でフラットに */
.page-archive .categories a {
  font-size: 11px;
  background: rgba(0,0,0,0.04);
  color: var(--text-sub);
  padding: 5px 12px;
  border-radius: 20px;
  text-decoration: none;
  font-weight: 600;
  transition: 0.2s;
}
.page-archive .categories a:hover {
  background: var(--primary-color);
  color: #fff;
}
.page-archive .categories a::before {
  content: "\f022";
  font-family: "blogicon";
  margin-right: 4px;
  opacity: 0.5;
}

.page-archive .entry-thumb-link {
  order: 4;
  margin-top: auto;
  width: 100%;
  display: block;
}
.page-archive .entry-thumb {
  width: 100% !important;
  height: 140px !important;
  object-fit: cover;
  border-radius: 12px; /* 画像の角丸 */
  margin: 0 !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08); /* 画像にも影 */
}

.page-archive .entry-description { display: none !important; }

.page-archive .archive-entry .hatena-star-container, 
.page-archive .archive-entry .star-container {
  position: absolute;
  top: 15px;
  right: 15px;
  margin: 0;
  order: 0;
  opacity: 0.6; /* 少し薄くして主張を抑える */
}


/* ====================================
   6. 記事個別ページ (Float Design)
   ==================================== */
article {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(255,255,255,0.6);
  padding: 40px;
  margin-bottom: 40px;
}

.entry-header {
  margin-bottom: 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 日付 */
.date {
  order: -1;
  margin-bottom: 15px;
  font-size: 15px;
  font-weight: 600;
  color: var(--date-color);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.date a {
  color: inherit !important;
  text-decoration: none;
  pointer-events: none;
}
.date a::before { content: none !important; }

/* 更新日：グラデーションアイコン */
.date-last-updated {
  display: inline-flex;
  align-items: center;
  color: var(--primary-color);
}
.date-last-updated::before {
  font-family: "blogicon";
  margin-right: 6px;
  font-weight: normal;
  font-size: 16px;
  
  /* アイコンをグラデーションに */
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.date-last-updated svg { display: none !important; }

/* 記事タイトル */
.entry-title {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.5;
  margin: 0 0 25px;
  color: var(--text-main);
}

.entry-categories {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}
.entry-categories a {
  font-size: 14px;
  font-weight: 600;
  background: rgba(0,0,0,0.04);
  color: var(--text-sub);
  padding: 8px 20px;
  border-radius: 24px;
  transition: 0.3s;
}
.entry-categories a:hover {
  background: var(--primary-gradient);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,122,255,0.3);
}

/* ====================================
   7. 記事本文（モダンタイポグラフィ）
   ==================================== */
.entry-content {
  font-size: 17px;
  font-weight: 500;
  color: #333; /* 読みやすさ重視で少し濃く */
  line-height: 1.9;
}

.entry-content p { margin: 2.2em 0; }
.entry-content ul, .entry-content ol { margin: 2em 0; padding-left: 1.5em; }
.entry-content li { margin-bottom: 12px; }

/* --- 目次（Glassmorphism） --- */
.table-of-contents {
  background: rgba(255,255,255,0.5); /* 半透明 */
  border: 1px solid rgba(0,122,255,0.2);
  border-radius: 20px;
  padding: 25px 30px;
  margin: 40px 0;
  position: relative;
  box-shadow: 0 10px 30px -10px rgba(0, 122, 255, 0.1);
}
.table-of-contents::before {
  content: "CONTENTS";
  display: inline-block;
  background: var(--primary-gradient);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 4px 16px;
  border-radius: 20px;
  margin-bottom: 15px;
  box-shadow: 0 4px 10px rgba(0,122,255,0.2);
}
.table-of-contents ul { list-style: none !important; padding: 0; margin: 0; }
.table-of-contents li { margin-bottom: 8px; font-size: 15px; font-weight: 600; }
.table-of-contents a {
  display: inline-block;
  color: var(--text-main);
  text-decoration: none;
  border-bottom: 1px dashed #ccc;
  padding-bottom: 2px;
  transition: all 0.2s;
}
.table-of-contents a:hover {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
  background: transparent;
  padding-left: 0;
}
.table-of-contents ul ul { margin-top: 5px; }
.table-of-contents ul ul li {
  font-size: 14px;
  font-weight: normal;
  padding-left: 20px;
  position: relative;
}
.table-of-contents ul ul li::before {
  content: "•";
  color: var(--accent-color);
  position: absolute;
  left: 5px;
  font-size: 1.2em;
}

/* --- 見出しデザイン（モダン化） --- */

/* H3: グラデーションの左線と薄い背景 */
.entry-content h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
  background: linear-gradient(90deg, rgba(0,122,255,0.06) 0%, rgba(0,0,0,0) 100%);
  border-left: 6px solid;
  border-image: var(--primary-gradient) 1;
  padding: 15px 20px;
  margin: 3.5em 0 1.5em;
  /* border-radius非対応のborder-imageの代わりにbox-shadowで擬似表現も可だがシンプルに */
  box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

/* H4: 下線グラデーション */
.entry-content h4 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
  padding: 8px 0 8px 30px;
  margin: 2.5em 0 1.2em;
  border-bottom: 2px solid #eee; /* ベース */
  position: relative;
  background: none;
}
/* 下線のアクセント */
.entry-content h4::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100px;
  height: 2px;
  background: var(--accent-gradient);
}
/* アイコン */
.entry-content h4::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 22px; height: 22px;
  background: var(--accent-gradient);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

.entry-content h5 {
  font-size: 18px;
  font-weight: 700;
  margin: 2em 0 1em;
  border-left: 4px solid #ddd;
  padding-left: 12px;
  color: var(--text-sub);
}

.entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1); /* 影をリッチに */
  margin: 30px 0;
}

.entry-content blockquote {
  background: rgba(0,0,0,0.02);
  border-left: 4px solid #ccc;
  padding: 20px;
  color: var(--text-sub);
  font-style: italic;
  margin: 30px 0;
  border-radius: 0 12px 12px 0;
}

/* ====================================
   8. サイドバー (Clean & Simple)
   ==================================== */
.hatena-module {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(255,255,255,0.6);
  padding: 25px;
  margin-bottom: 25px;
}
.hatena-module-title {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 20px;
  border-bottom: none; /* 線を消す */
  padding-bottom: 10px;
  color: var(--text-main);
  position: relative;
}
/* タイトル下のグラデーションバー */
.hatena-module-title::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  background: var(--primary-gradient);
  border-radius: 2px;
  margin-top: 8px;
}

/* リストアイテム */
.hatena-module-recent-entries .hatena-urllist li,
.hatena-module-related-entries .hatena-urllist li,
.hatena-module-entries-access-ranking .hatena-urllist li {
  display: flex;
  align-items: flex-start;
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(0,0,0,0.03); /* 線を薄く */
  padding-bottom: 15px;
}
.hatena-module-archive .hatena-urllist li,
.hatena-module-category .hatena-urllist li,
.hatena-module-links .hatena-urllist li {
  display: block;
  margin-bottom: 8px;
  border-bottom: 1px dashed rgba(0,0,0,0.1);
  padding-bottom: 8px;
}

.urllist-image {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 10px;
  margin-right: 12px;
  background: #eee;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.urllist-title-link {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  transition: color 0.2s;
}
.urllist-date-link a {
  font-size: 11px;
  color: #aaa;
}

.hatena-module-archive a,
.hatena-module-category a {
  display: block;
  color: var(--text-sub);
  transition: all 0.3s ease;
}
.hatena-module-archive a:hover,
.hatena-module-category a:hover {
  color: var(--primary-color);
  padding-left: 6px;
  background: rgba(0, 122, 255, 0.05);
  border-radius: 6px;
}
.hatena-urllist li a:hover .urllist-title-link {
  color: var(--primary-color);
  text-decoration: none;
}

/* ====================================
   9. レスポンシブ対応 (変更なし)
   ==================================== */
@media screen and (max-width: 1024px) {
  #content-inner {
    display: block;
    max-width: 96%;
  }
  .page-archive .archive-entries {
    grid-template-columns: repeat(auto-fit, minmax(45%, 1fr)) !important;
  }
}

@media screen and (max-width: 768px) {
  article { padding: 25px 20px; }
  #menu {
    justify-content: flex-start;
    overflow-x: auto;
    white-space: nowrap;
    padding: 10px;
  }
  .entry-content h3 {
    font-size: 20px;
    padding: 12px 15px;
  }
}

@media screen and (max-width: 480px) {
  .page-archive .archive-entries {
    grid-template-columns: 1fr !important;
  }
}

/* ====================================
   10. 追加機能 & 装飾
   ==================================== */

/* --- A. スクロールバーのカスタマイズ --- */
/* (Google Chrome, Edge, Safari用) */
::-webkit-scrollbar {
  width: 14px; /* スクロールバーの幅 */
}
::-webkit-scrollbar-track {
  background: transparent; /* 背景は透過 */
}
::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.15); /* つまみの色（薄いグレー） */
  border-radius: 20px;       /* 丸くする */
  border: 4px solid transparent; /* 余白を作るテクニック */
  background-clip: content-box;
  transition: background-color 0.3s;
}
::-webkit-scrollbar-thumb:hover {
  background-color: var(--primary-color); /* ホバー時にメインカラー（青）へ */
}

/* --- B. テキスト選択時の色 --- */
/* サイトの雰囲気に合わせて選択色を変更 */
::selection {
  background: rgba(0, 122, 255, 0.2); /* 青の薄い背景 */
  color: #000;
}

/* --- C. 上に戻るボタンのデザイン --- */
/* ※HTMLの追加が必要です（手順2参照） */
#scroll-top-btn {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 50px;
  height: 50px;
  
  /* デザイン：グラスモーフィズム + グラデーション */
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%; /* 完全な円 */
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0.8;
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  cursor: pointer;
  text-decoration: none;
}

/* 矢印アイコン（CSSで描画） */
#scroll-top-btn::after {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  border-top: 3px solid var(--primary-color);
  border-left: 3px solid var(--primary-color);
  transform: rotate(45deg);
  margin-top: 4px; /* 位置微調整 */
}

/* ホバー時の動き */
#scroll-top-btn:hover {
  opacity: 1;
  transform: translateY(-5px); /* ふわっと浮く */
  background: var(--primary-gradient); /* 背景を青グラデーションに */
  box-shadow: 0 15px 30px rgba(0, 122, 255, 0.3);
  border-color: transparent;
}
/* ホバー時に矢印を白くする */
#scroll-top-btn:hover::after {
  border-color: #fff;
}

/* モバイル調整：邪魔にならないよう少し小さく */
@media screen and (max-width: 768px) {
  #scroll-top-btn {
    width: 44px;
    height: 44px;
    bottom: 20px;
    right: 20px;
  }
}