/*
 * front-page.css
 * 霧島茜のレトロゲーム部屋 - トップページ専用スタイル
 *
 * セクション一覧：
 *  0. カスタムフォント
 *  1. カラー変数・リセット
 *  2. ヘッダー・ナビ
 *  3. ヒーロー（ウェルカム + プロフカード）
 *  4. ゲーム紹介 / プレイ日記
 *  5. アーカイブ
 *  6. 茜が愛するゲームたち
 *  7. フッター
 *  8. レスポンシブ（スマホ）
 */

/* =====================================================
   0. カスタムフォント
   ===================================================== */

@font-face {
  font-family: 'RabbitAndFullMoon';
  src: url('../RabbitandFullMoonFree-Regular.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}


/* =====================================================
   1. カラー変数・リセット
   ===================================================== */

:root {
  --akane:       #C0392B;   /* メインの茜色 */
  --akane-light: #E74C3C;   /* 明るい茜 */
  --akane-pale:  #FADBD8;   /* 薄い茜（背景・ボーダー） */
  --akane-deep:  #7B241C;   /* 濃い茜（影・グラデ端） */
  --pink:        #F1948A;   /* やわらかピンク */
  --pink-light:  #FDECEA;   /* 薄いピンク（ホバー背景） */
  --pink-bright: #FF6B9D;   /* アクセントのビビッドピンク */
  --white:       #FFFAF9;   /* 背景白（わずかに暖色） */
  --cream:       #FFF5F3;   /* カード内背景 */
  --dot-gray:    #E8D0CC;   /* 区切り線・非アクティブ */
  --text-dark:   #3D0C0C;   /* メインテキスト */
  --text-mid:    #9B3A3A;   /* サブテキスト・日付 */
  --shadow-r:    #C0392B33; /* 茜色ドロップシャドウ */
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { background: var(--white); }

body {
  background: var(--white) !important;
  background-image: radial-gradient(circle, var(--akane-pale) 1.5px, transparent 1.5px) !important;
  background-size: 22px 22px !important;
  font-family: 'Noto Sans JP', sans-serif !important;
  color: var(--text-dark) !important;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpolygon points='4,2 4,18 8,14 11,21 13,20 10,13 16,13' fill='%23C0392B' stroke='%23fff' stroke-width='1.5'/%3E%3C/svg%3E"), auto;
  padding: 0 !important;
  margin: 0 !important;
}

/* SWELLのレイアウトを無効化 */
#page, #wrapper, .l-wrap, .l-header, .l-main, .l-contents,
.l-sidebar, .l-footer, #header, #main, #sidebar, #footer,
.site-header, .site-footer, .site-main { all: unset !important; }

body.admin-bar .akane-header { margin-top: 32px; }

/* アニメーション定義 */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes badge-pulse {
  0%, 100% { background: var(--pink-bright); }
  50%       { background: var(--akane); }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}


/* =====================================================
   2. ヘッダー・ナビ
   ===================================================== */

/* ヘッダー全体のラッパー（イラストのはみ出し用） */
.akane-header-wrap {
  position: relative;
  /* padding-top はfunctions.phpのカスタマイザー設定で制御されます */
}

.akane-header {
  background: linear-gradient(120deg, var(--akane) 0%, var(--akane-light) 50%, var(--pink-bright) 100%);
  border-radius: 0 0 40px 40px;
  box-shadow: 0 8px 36px var(--shadow-r);
  position: relative;
  overflow: visible;
  min-height: 130px;
}

/* 上部の白いストライプ装飾 */
.akane-header::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 7px;
  border-radius: 0;
  background: repeating-linear-gradient(90deg, #fff5 0, #fff5 12px, transparent 12px, transparent 24px);
  z-index: 1;
}

/* ドットパターン装飾 */
.akane-header::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: radial-gradient(circle, #fff2 1.5px, transparent 1.5px);
  background-size: 20px 20px;
  border-radius: 0 0 40px 40px;
  pointer-events: none;
}

/* ------------------------------------------------
   ヘッダー内レイアウト
   PC：[スペーサー250px] [タイトル中央] [ナビ右]
   タブレット〜：ナビが折り返し
   スマホ：縦積み
   ------------------------------------------------ */

.akane-header__inner {
  position: relative;
  z-index: 2;
  padding: 18px 16px 16px 0;
  display: grid;
  grid-template-columns: 250px 1fr auto;
  align-items: end;
  gap: 0;
  min-height: 130px;
}

.akane-header-illust {
  position: absolute;
  left: 20px;
  bottom: -14px;
  width: 250px;
  z-index: 10;
  pointer-events: none;
}
.akane-header-illust img {
  width: 250px;
  height: auto;
  display: block;
  filter: drop-shadow(0px 0px 8px rgba(220,120,60,0.3));
}

/* grid 1列目：スペーサー */
.akane-header-spacer { display: block; }

/* タイトル（grid 2列目）*/
.akane-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding-bottom: 4px;
}
.akane-site-title {
  font-family: 'DotGothic16', monospace;
  font-size: 26px;
  color: #fff;
  text-shadow: 2px 2px 0 var(--akane-deep);
  line-height: 1.4;
  letter-spacing: 2px;
  text-align: center;
  white-space: nowrap;
}
.akane-site-sub {
  font-family: 'DotGothic16', monospace;
  font-size: 11px;
  color: #ffc8d8;
  display: block;
  letter-spacing: 3px;
  text-align: center;
  white-space: nowrap;
}

/* ナビ（grid 3列目）*/
.akane-nav {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap; /* 折り返しを許可してはみ出し防止 */
  gap: 5px;
  justify-content: flex-end;
  align-items: center;
  padding-right: 10px;
  padding-bottom: 4px;
  overflow: visible;
}
.akane-nav a {
  font-family: 'DotGothic16', monospace;
  font-size: 11px;
  color: var(--akane);
  text-decoration: none;
  padding: 5px 12px;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 2px 10px #0002;
  transition: all 0.18s;
  font-weight: 700;
  white-space: nowrap;
}
.akane-nav a:hover  { background: var(--pink-bright); color: #fff; transform: translateY(-2px) scale(1.06); }
.akane-nav a.active { background: var(--akane-deep); color: #fff; }

/* =====================================================
   ヘッダー レスポンシブ（functions.phpのインラインCSSと連携）
   ===================================================== */

/* タブレット（601〜900px） */
@media (max-width: 900px) and (min-width: 601px) {
  /* ヘッダーgrid：スペーサーを縮小してタイトル・ナビに余裕を与える */
  .akane-header__inner {
    grid-template-columns: 160px 1fr auto;
    padding-left: 0;
    align-items: center;
  }
  .akane-header-illust      { width: 160px; }
  .akane-header-illust img  { width: 160px; }

  .akane-site-title { font-size: 18px !important; letter-spacing: 1px; }
  .akane-site-sub   { font-size: 9px !important; letter-spacing: 2px; }

  /* ナビ：横並び・小さめサイズ */
  .akane-nav {
    flex-wrap: wrap !important;
    flex-direction: row !important;
    justify-content: flex-end;
    gap: 3px;
    padding-right: 6px;
  }
  .akane-nav a {
    font-size: 9px !important;
    padding: 3px 8px !important;
    white-space: nowrap;
  }

  /* ウィジェット検索バー */
  #search-8,
  [id^="search-"] {
    max-width: 200px !important;
    left: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* スマホ（480px以下）：縦積み */
@media (max-width: 480px) {
  .akane-header-spacer { display: none; }
  .akane-logo          { padding-bottom: 0; }
  .akane-site-title    { font-size: 14px !important; letter-spacing: 1px; }
  .akane-site-sub      { font-size: 8px !important; }
  .akane-nav {
    justify-content: center;
    padding-right: 0;
    padding-bottom: 0;
    gap: 3px;
  }
  .akane-nav a { font-size: 9px !important; padding: 3px 8px !important; }
}

.akane-deco-bar {
  height: 14px;
  background: repeating-linear-gradient(90deg,
    var(--pink-bright) 0,  var(--pink-bright) 14px,
    var(--pink)        14px, var(--pink)       28px,
    var(--akane-pale)  28px, var(--akane-pale) 42px,
    var(--pink)        42px, var(--pink)        56px);
  border-radius: 0 0 12px 12px;
  margin: 0 4px;
}


/* =====================================================
   3. ヒーロー（ウェルカム + プロフカード）
   ===================================================== */

.akane-hero {
  max-width: 900px; margin: 28px auto 0; padding: 0 20px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: start;
}
.akane-hero__left { display: flex; flex-direction: column; }

.akane-welcome-badge {
  display: inline-block; font-family: 'DotGothic16', monospace; font-size: 11px;
  background: var(--pink-bright); color: #fff; padding: 5px 16px; border-radius: 999px;
  margin-bottom: 12px; box-shadow: 0 2px 8px var(--shadow-r);
  animation: badge-pulse 2s ease-in-out infinite; align-self: flex-start;
}
.akane-hero-title {
  font-family: 'DotGothic16', monospace; font-size: 26px; color: var(--akane);
  text-shadow: 3px 3px 0 var(--akane-pale); line-height: 1.5; margin-bottom: 10px;
}
.akane-hero-desc {
  font-size: 13px; color: var(--text-mid); line-height: 1.9;
  background: #fff; border-left: 5px solid var(--pink-bright);
  padding: 12px 16px; border-radius: 0 16px 16px 0; box-shadow: 0 2px 10px var(--shadow-r);
}

.akane-prof-card {
  background: #fff; border: 3px solid var(--akane-pale); border-radius: 24px;
  padding: 20px 16px 16px; position: relative; box-shadow: 0 6px 24px var(--shadow-r); text-align: center;
}
.akane-prof-card::before {
  content: '✦ PROFILE ✦'; font-family: 'DotGothic16', monospace; font-size: 10px;
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--pink-bright); color: #fff; padding: 3px 14px; border-radius: 999px; white-space: nowrap;
}
.akane-avatar {
  width: 90px;
  height: 90px;
  margin: 8px auto 12px;
  display: block;
  border-radius: 50%;
  box-shadow: 0 4px 16px var(--shadow-r);
  image-rendering: pixelated;
  /* 背景色が茜色なのでそのまま表示 */
}

/* =====================================================
   アクセスカウンター＋キャラ育成ウィジェット
   ===================================================== */

/* ウィジェット全体：コンパクトに横並び */
.akane-counter-box {
  background: #fff;
  border: 2px solid var(--akane-pale);
  border-radius: 14px;
  padding: 14px 18px;
  margin-top: 16px;
  box-shadow: 0 2px 10px var(--shadow-r);
  display: flex;
  align-items: center;
  gap: 18px;
}

/* 左側：育成キャラ */
.counter-left {
  flex-shrink: 0;
  text-align: center;
}

/* 育成キャラ画像 */
.counter-chara {
  width: 80px;
  height: 80px;
  display: block;
  image-rendering: pixelated;
  cursor: pointer;
  transition: transform 0.15s;
  margin: 0 auto 4px;
}
.counter-chara:hover { transform: scale(1.12) rotate(-4deg); }
.counter-chara.bounce { animation: charaBounce 0.4s ease; }
@keyframes charaBounce {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.2) translateY(-5px); }
  60%  { transform: scale(0.95) translateY(2px); }
  100% { transform: scale(1); }
}

/* 育成レベルテキスト */
.counter-lv {
  font-family: 'DotGothic16', monospace;
  font-size: 10px;
  color: var(--text-mid);
  display: block;
  text-align: center;
  margin-top: 4px;
}

/* 右側：カウンターとおやつ */
.counter-right { flex: 1; }

/* カウンター数字（DotGothic16 = ようこそと同じフォント） */
.counter-number {
  font-family: 'DotGothic16', monospace;
  font-size: 22px;
  color: var(--akane);
  letter-spacing: 4px;
  display: block;
  line-height: 1;
  margin-bottom: 4px;
}

/* 〇〇人目のお客様！（点滅） */
.counter-label {
  font-family: 'DotGothic16', monospace;
  font-size: 10px;
  color: var(--pink-bright);
  display: block;
  margin-bottom: 6px;
  /* step-end で1秒ごとに点滅 */
  animation: blink 1.2s step-end infinite;
}

/* おやつボタン群 */
.counter-snacks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

/* おやつボタン（差し替え可能） */
.snack-btn {
  font-family: 'DotGothic16', monospace;
  font-size: 9px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1.5px solid var(--akane-pale);
  background: var(--cream);
  color: var(--text-dark);
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 3px;
}
.snack-btn:hover { border-color: var(--akane); background: var(--akane-pale); transform: scale(1.05); }

/* おやつリアクション吹き出し */
.snack-bubble {
  position: absolute;
  font-family: 'DotGothic16', monospace;
  font-size: 10px;
  background: var(--pink-bright);
  color: #fff;
  padding: 3px 8px;
  border-radius: 999px;
  pointer-events: none;
  animation: bubbleUp 1.2s ease forwards;
  white-space: nowrap;
  z-index: 10;
}
@keyframes bubbleUp {
  0%   { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-40px); }
}
.akane-prof-name { font-family: 'DotGothic16', monospace; font-size: 15px; color: var(--akane); margin-bottom: 8px; }
.akane-prof-memo { font-family: 'DotGothic16', monospace; font-size: 11px; color: var(--text-mid); margin-bottom: 14px; line-height: 1.6; background: var(--cream); border-radius: 12px; padding: 8px 12px; }

.akane-prof-btns   { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.akane-prof-toggle { font-family: 'DotGothic16', monospace; font-size: 12px; background: var(--cream); color: var(--text-dark); border: 2px solid var(--akane-pale); padding: 6px 16px; border-radius: 999px; cursor: pointer; transition: all 0.18s; }
.akane-prof-toggle:hover { border-color: var(--akane); background: var(--akane-pale); }

.akane-prof-slide { overflow: hidden; max-height: 0; opacity: 0; transition: max-height 0.4s ease, opacity 0.3s ease; }
.akane-prof-slide.open { max-height: 300px; opacity: 1; }
.akane-prof-slide-inner { background: var(--cream); border-radius: 14px; padding: 12px 14px; margin-top: 8px; text-align: left; }
.akane-prof-slide-inner p     { font-size: 12px; color: var(--text-dark); line-height: 1.8; }
.akane-prof-slide-inner p + p { margin-top: 6px; }


/* =====================================================
   4. ゲーム紹介 / プレイ日記
   ===================================================== */

.akane-main {
  max-width: 900px; margin: 28px auto 0; padding: 0 20px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
.akane-card {
  background: #fff; border: 2.5px solid var(--akane-pale); border-radius: 20px;
  box-shadow: 0 4px 20px var(--shadow-r); overflow: hidden; animation: fadeInUp 0.5s ease both;
}
.akane-card:nth-child(1) { animation-delay: 0.1s; }
.akane-card:nth-child(2) { animation-delay: 0.2s; }

.akane-card-title {
  font-family: 'DotGothic16', monospace; font-size: 14px; color: #fff;
  background: linear-gradient(90deg, var(--akane) 0%, var(--pink-bright) 100%);
  padding: 8px 18px; display: flex; align-items: center; gap: 8px;
}

.akane-entry-list { padding: 12px; }
.akane-entry-item {
  display: block; text-decoration: none; padding: 10px 14px; margin-bottom: 8px;
  background: var(--cream); border-left: 4px solid var(--pink-bright);
  border-radius: 0 16px 16px 0; box-shadow: 0 2px 8px var(--shadow-r); transition: all 0.15s;
}
.akane-entry-item:last-child { margin-bottom: 0; }
.akane-entry-item:hover      { border-left-color: var(--akane); transform: translateX(4px); box-shadow: 0 4px 14px var(--shadow-r); }

.akane-entry-meta  { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; flex-wrap: wrap; }
.akane-entry-date  { font-family: 'DotGothic16', monospace; font-size: 10px; color: var(--text-mid); }
.akane-entry-title { font-size: 12px; font-weight: 700; color: var(--text-dark); line-height: 1.5; }

.akane-plat     { font-family: 'DotGothic16', monospace; font-size: 9px; padding: 2px 7px; border-radius: 999px; font-weight: 900; color: #fff; }
.akane-plat.fc  { background: linear-gradient(135deg, #E53935, #B71C1C); }
.akane-plat.sfc { background: linear-gradient(135deg, #8E24AA, #4A148C); }
.akane-plat.gb  { background: linear-gradient(135deg, #43A047, #1B5E20); }
.akane-plat.md  { background: linear-gradient(135deg, #1E88E5, #0D47A1); }

.akane-new   { font-family: 'DotGothic16', monospace; font-size: 9px; background: var(--pink-bright); color: #fff; padding: 1px 7px; border-radius: 999px; animation: badge-pulse 1.5s ease-in-out infinite; }
.akane-stars { display: flex; gap: 1px; margin-top: 4px; }
.akane-star  { width: 13px; height: 13px; }

.akane-more   { text-align: center; padding: 10px 0 14px; }
.akane-more a { font-family: 'DotGothic16', monospace; font-size: 12px; text-decoration: none; background: var(--pink-bright); color: #fff; padding: 7px 20px; border-radius: 999px; box-shadow: 0 3px 10px var(--shadow-r); transition: all 0.18s; }
.akane-more a:hover { background: var(--akane); transform: translateY(-2px); color: #fff; }


/* =====================================================
   5. アーカイブ
   ===================================================== */

.game-lib      { max-width: 900px; margin: 28px auto 0; padding: 0 20px; }
.game-lib-card { background: #fff; border: 2.5px solid var(--akane-pale); border-radius: 20px; box-shadow: 0 4px 20px var(--shadow-r); overflow: hidden; animation: fadeInUp 0.5s ease 0.3s both; }
.game-lib-title {
  font-family: 'DotGothic16', monospace; font-size: 14px; color: #fff;
  background: linear-gradient(90deg, var(--akane) 0%, var(--pink-bright) 100%);
  padding: 8px 18px; display: flex; align-items: center; gap: 8px;
}

/* パンくず */
.lib-breadcrumb { display: flex; align-items: center; gap: 6px; padding: 10px 16px 0; flex-wrap: wrap; min-height: 36px; }
.lib-breadcrumb-item { font-family: 'DotGothic16', monospace; font-size: 11px; color: var(--text-mid); cursor: pointer; padding: 3px 10px; border-radius: 999px; transition: all 0.15s; }
.lib-breadcrumb-item:hover  { background: var(--akane-pale); color: var(--akane); }
.lib-breadcrumb-item.active { color: var(--akane); font-weight: 700; }
.lib-breadcrumb-sep { font-size: 10px; color: var(--dot-gray); }

/* ステージ */
.lib-stage      { display: none; padding: 14px 16px 16px; animation: fadeInUp 0.25s ease both; }
.lib-stage.show { display: block; }

/* 戻るボタン */
.lib-back-btn { font-family: 'DotGothic16', monospace; font-size: 11px; color: var(--text-mid); cursor: pointer; padding: 4px 12px; border-radius: 999px; border: 1.5px solid var(--dot-gray); background: transparent; transition: all 0.15s; margin-bottom: 12px; display: inline-block; }
.lib-back-btn:hover { border-color: var(--akane); color: var(--akane); background: var(--akane-pale); }

/* ステージ1：ハードボタン */
.lib-hw-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center; /* PC：中央揃え */
}
.lib-hw-btn  {
  width: 150px;
  background: var(--cream);
  border: 2.5px solid var(--akane-pale);
  border-radius: 18px;
  padding: 16px 10px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.18s;
  font-family: 'DotGothic16', monospace;
  box-sizing: border-box;
}
.lib-hw-btn:hover     { border-color: var(--akane); background: var(--akane-pale); transform: translateY(-3px); box-shadow: 0 6px 16px var(--shadow-r); }
.lib-hw-btn .hw-icon  { font-size: 28px; display: block; margin-bottom: 6px; }
.lib-hw-btn .hw-icon-img {
  width: 56px;
  height: 56px;
  display: block;
  margin: 0 auto 6px;
  object-fit: contain;
  image-rendering: pixelated;
}
.lib-hw-btn .hw-name  { font-size: 12px; color: var(--text-dark); display: block; word-break: keep-all; }
.lib-hw-btn .hw-badge { display: inline-block; font-size: 9px; padding: 2px 8px; border-radius: 999px; margin-top: 4px; color: #fff; font-weight: 700; }
.hw-fc  { background: linear-gradient(135deg, #E53935, #B71C1C); }
.hw-sfc { background: linear-gradient(135deg, #8E24AA, #4A148C); }
.hw-gb  { background: linear-gradient(135deg, #43A047, #1B5E20); }
.hw-md  { background: linear-gradient(135deg, #1E88E5, #0D47A1); }

/* ステージ2：ジャンルボタン */
.lib-genre-grid { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.lib-genre-btn  { font-family: 'DotGothic16', monospace; font-size: 12px; padding: 16px 20px; border-radius: 18px; border: 2.5px solid var(--akane-pale); background: var(--cream); color: var(--text-dark); cursor: pointer; transition: all 0.18s; font-weight: 700; min-width: 100px; text-align: center; }
.lib-genre-btn:hover      { border-color: var(--akane); background: var(--akane-pale); transform: translateY(-2px); box-shadow: 0 4px 12px var(--shadow-r); }
.lib-genre-btn .genre-icon { font-size: 28px; display: block; margin-bottom: 6px; }

/* ステージ3：作品ボタン */
.lib-work-grid { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.lib-work-btn  { font-family: 'DotGothic16', monospace; font-size: 12px; padding: 8px 18px; border-radius: 999px; border: 2px solid var(--akane-pale); background: var(--cream); color: var(--text-dark); cursor: pointer; transition: all 0.18s; font-weight: 700; }
.lib-work-btn:hover             { border-color: var(--akane); background: var(--akane-pale); transform: translateY(-2px); box-shadow: 0 3px 10px var(--shadow-r); }
.lib-work-btn.has-series        { border-color: var(--pink); background: #fff; }
.lib-work-btn.has-series::after { content: ' ▶'; font-size: 10px; color: var(--pink); }

/* ステージ4：シリーズ絞り込みボタン */
.lib-series-filter-area  { margin-bottom: 14px; }
.lib-series-filter-label { font-family: 'DotGothic16', monospace; font-size: 11px; color: var(--text-mid); margin-bottom: 8px; }
.lib-series-grid         { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.lib-series-tag-btn      { font-family: 'DotGothic16', monospace; font-size: 11px; padding: 6px 16px; border-radius: 999px; border: 2px solid var(--pink); background: #fff; color: var(--text-dark); cursor: pointer; transition: all 0.18s; }
.lib-series-tag-btn:hover,
.lib-series-tag-btn.active { background: var(--akane); color: #fff; border-color: var(--akane); }

/* ステージ4：記事タイトルリスト（2列） */
.lib-title-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.lib-title-btn  { font-family: 'DotGothic16', monospace; font-size: 12px; padding: 8px 10px; border-radius: 10px; border: none; border-left: 3px solid var(--akane-pale); background: transparent; color: var(--text-dark); cursor: pointer; transition: all 0.15s; text-decoration: none; display: block; text-align: left; line-height: 1.6; }
.lib-title-btn:hover          { border-left-color: var(--pink-bright); background: var(--pink-light); transform: translateX(3px); }
.lib-title-btn.has-post       { border-left-color: var(--akane); font-weight: 700; }
.lib-title-btn.has-post::before { content: '▶ '; }


/* =====================================================
   6. 茜が愛するゲームたち
   ===================================================== */

.akane-fav      { max-width: 900px; margin: 28px auto 40px; padding: 0 20px; }
.akane-fav-card { background: #fff; border: 2px solid var(--akane-pale); border-radius: 20px; box-shadow: 0 3px 14px var(--shadow-r); overflow: hidden; animation: fadeInUp 0.5s ease 0.4s both; }
.akane-fav-title { font-family: 'DotGothic16', monospace; font-size: 14px; color: #fff; background: linear-gradient(90deg, var(--akane) 0%, var(--pink-bright) 100%); padding: 8px 18px; display: flex; align-items: center; gap: 6px; }
.akane-fav-grid  { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 12px; }
.akane-fav-box   { background: var(--cream); border: 2px solid var(--akane-pale); border-radius: 14px; padding: 8px 6px; text-align: center; font-family: 'DotGothic16', monospace; font-size: 9px; color: var(--text-dark); transition: all 0.18s; text-decoration: none; display: block; line-height: 1.5; }
.akane-fav-box:hover { border-color: var(--akane); background: var(--akane-pale); transform: translateY(-3px) scale(1.03); box-shadow: 0 6px 16px var(--shadow-r); color: var(--text-dark); }

/* ドット絵プレースホルダー（完成後は <img> に差し替え） */
.akane-fav-box .fav-img  { width: 32px; height: 32px; margin: 0 auto 4px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.akane-fav-box .fav-name { display: block; margin-bottom: 3px; }
.akane-fav-box .fav-plat { display: inline-block; font-size: 8px; padding: 1px 6px; border-radius: 999px; color: #fff; font-weight: 700; }
.fav-gp-fc  { background: linear-gradient(135deg, #E53935, #B71C1C); }
.fav-gp-sfc { background: linear-gradient(135deg, #8E24AA, #4A148C); }
.fav-gp-gb  { background: linear-gradient(135deg, #43A047, #1B5E20); }
.fav-gp-md  { background: linear-gradient(135deg, #1E88E5, #0D47A1); }


/* =====================================================
   7. フッター
   ===================================================== */

/* キリ番ポップアップ */
.kiriban-popup {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(192,57,43,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  animation: fadeInUp 0.4s ease;
}
.kiriban-inner {
  background: #fff;
  border: 4px solid var(--akane);
  border-radius: 20px;
  padding: 28px 32px;
  text-align: center;
  box-shadow: 0 8px 32px var(--shadow-r);
  display: flex; flex-direction: column; gap: 10px;
}
.kiriban-title { font-family: 'DotGothic16', monospace; font-size: 18px; color: var(--akane); }
.kiriban-num   { font-family: 'DotGothic16', monospace; font-size: 32px; color: var(--pink-bright); animation: badge-pulse 1s ease-in-out infinite; }
.kiriban-msg   { font-family: 'DotGothic16', monospace; font-size: 12px; color: var(--text-mid); line-height: 1.8; }
.kiriban-inner button { font-family: 'DotGothic16', monospace; font-size: 12px; background: var(--akane); color: #fff; border: none; padding: 8px 24px; border-radius: 999px; cursor: pointer; margin-top: 4px; }
.kiriban-inner button:hover { background: var(--pink-bright); }

.akane-footer      { background: linear-gradient(135deg, var(--akane-deep), var(--akane)); color: var(--akane-pale); font-family: 'DotGothic16', monospace; font-size: 11px; text-align: center; padding: 20px; border-radius: 28px 28px 0 0; margin-top: 40px; }
.akane-footer-deco { color: var(--pink); font-size: 16px; display: block; margin-bottom: 8px; letter-spacing: 6px; animation: blink 1s step-end infinite; }
.akane-footer-privacy { margin: 0 0 10px; }
.akane-footer-privacy a { color: var(--akane-pale); font-size: 10px; text-decoration: underline; opacity: 0.8; }
.akane-footer-privacy a:hover { opacity: 1; }


/* =====================================================
   8. レスポンシブ（スマホ 600px以下）
   ===================================================== */

@media (max-width: 600px) {
  .akane-hero, .akane-main  { grid-template-columns: 1fr; }

  /* ヘッダー padding-top はfunctions.phpで制御 */
  .akane-header             { min-height: 100px; overflow: hidden; }

  /* gridを1列に・左パディングはイラスト幅分のみ */
  .akane-header__inner {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    padding: 8px 8px 10px 110px; /* 左: イラスト(100px)+left(10px) */
    min-height: 90px;
    gap: 5px;
    align-items: center;
    justify-items: center;
  }
  .akane-header-spacer      { display: none; }

  /* イラスト */
  .akane-header-illust      { width: 100px; left: 8px; bottom: -14px; }
  .akane-header-illust img  { width: 100px; }

  /* タイトル */
  .akane-logo               { padding-bottom: 0; }
  .akane-site-title         { font-size: 13px; letter-spacing: 1px; white-space: nowrap; }
  .akane-site-sub           { font-size: 8px; letter-spacing: 1px; }

  /* ナビ：横並び折り返し・中央揃え */
  .akane-nav {
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding-right: 0;
    padding-bottom: 0;
    gap: 3px;
    max-width: 100%;
  }
  .akane-nav a              { font-size: 9px; padding: 3px 8px; white-space: nowrap; }

  /* その他 */
  .lib-hw-grid              { gap: 10px; }
  .lib-hw-btn               { width: calc(50% - 5px); padding: 12px 6px 10px; }
  .lib-hw-btn .hw-icon      { font-size: 24px; }
  .lib-hw-btn .hw-name      { font-size: 11px; }
  .akane-fav-grid           { grid-template-columns: repeat(2, 1fr); }
}


/* =====================================================
   9. ウィジェットエリア
   ===================================================== */

.akane-widget-area {
  max-width: 900px;
  margin: 20px auto 0;
  padding: 0 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: flex-start;
}

.akane-widget-item {
  background: #fff;
  border: 2px solid var(--akane-pale);
  border-radius: 18px;
  padding: 16px 20px;
  box-shadow: 0 3px 14px var(--shadow-r);
  min-width: 200px;
  flex: 1;
  max-width: 420px;
}

.akane-widget-title {
  font-family: 'DotGothic16', monospace;
  font-size: 13px;
  color: #fff;
  background: linear-gradient(90deg, var(--akane) 0%, var(--pink-bright) 100%);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 12px;
  display: inline-block;
}

/* 検索フォーム */
.akane-widget-item .search-form {
  display: flex;
  gap: 6px;
}
.akane-widget-item .search-field {
  flex: 1;
  border: 2px solid var(--akane-pale);
  border-radius: 999px;
  padding: 6px 14px;
  font-family: 'DotGothic16', monospace;
  font-size: 12px;
  outline: none;
  color: var(--text-dark);
}
.akane-widget-item .search-field:focus {
  border-color: var(--pink-bright);
}
.akane-widget-item .search-submit {
  background: var(--akane);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 6px 16px;
  font-family: 'DotGothic16', monospace;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.akane-widget-item .search-submit:hover {
  background: var(--pink-bright);
}

/* カレンダー */
.akane-widget-item .wp-calendar-table {
  width: 100%;
  font-family: 'DotGothic16', monospace;
  font-size: 11px;
  border-collapse: collapse;
}
.akane-widget-item .wp-calendar-table th {
  background: var(--cream);
  color: var(--text-mid);
  padding: 4px;
  text-align: center;
}
.akane-widget-item .wp-calendar-table td {
  text-align: center;
  padding: 4px;
  border-radius: 6px;
}
.akane-widget-item .wp-calendar-table td a {
  color: var(--akane);
  font-weight: 700;
  text-decoration: none;
  background: var(--akane-pale);
  border-radius: 999px;
  padding: 2px 6px;
}
.akane-widget-item .wp-calendar-table td#today {
  background: var(--pink-bright);
  color: #fff;
  border-radius: 6px;
}
.akane-widget-item .wp-calendar-nav {
  display: flex;
  justify-content: space-between;
  font-family: 'DotGothic16', monospace;
  font-size: 11px;
  margin-top: 8px;
}
.akane-widget-item .wp-calendar-nav a {
  color: var(--akane);
  text-decoration: none;
}

@media (max-width: 600px) {
  .akane-widget-area  { padding: 0 14px; }
  .akane-widget-item  { min-width: 100%; }
}

/* =====================================================
   検索バー
   ===================================================== */
#search-8,
[id^="search-"] {
  max-width: 250px !important;
  width: 250px !important;
  padding: 0 !important;
  position: relative !important;
  right: 0 !important;
  margin-left: auto !important;
  margin-right: auto !important;
  transform: translateX(-80px) !important;
}
#search-8 .c-searchForm,
[id^="search-"] .c-searchForm {
  display: flex;
}
#search-8 .c-searchForm__s,
[id^="search-"] .c-searchForm__s {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 0px solid transparent;
  outline: none;
}
#search-8 .c-searchForm__s:focus,
[id^="search-"] .c-searchForm__s:focus {
  border-color: pink;
}
#search-8 .c-searchForm__submit,
[id^="search-"] .c-searchForm__submit {
  padding: 6px 10px;
  border-radius: 999px;
  border: 2px solid transparent;
  outline: none;
}
@media (max-width: 480px) {
  #search-8,
  [id^="search-"] {
    position: relative !important;
    left: 0 !important;
    transform: none !important;
    max-width: 280px !important;
    width: 280px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* =====================================================
   ヒーロー左側を少し上に
   ===================================================== */
.akane-hero__left {
  margin-top: -60px;
}
