/* ============== 基本変数 ============== */
:root{
  --track-w: min(760px, 92%);
  --radius: 14px;
  --shadow: 0 8px 24px rgba(0,0,0,.08);
  --meta: #6b6b6b;
  --bot-bg: #ffffff;
  --user-bg:#eefaf2;
  --footer-h: 44px;
  --chat-width: min(980px, 96vw);
  --chat-height: clamp(420px, 70dvh, 500px);
  --chrome-gap: 24px;   /* JSが実寸で上書き */
}

/* ============== ベース ============== */
html,body{ height:100%; }
body{
  margin:0;
  padding-bottom: calc(var(--footer-h) + max(12px, env(safe-area-inset-bottom, 0px)));
  font-family:"LINE Seed JP","Zen Kaku Gothic New","Noto Sans JP",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  background: linear-gradient(180deg, #e8f5e9, #a5d6a7);
  display:flex; flex-direction:column; align-items:center;
  overflow:auto !important; /* ページ全体は固定。中身だけスクロール */
}

/* 背景動画 */
#bg-video{
  position:fixed; inset:0; width:100vw; height:100vh; object-fit:cover;
  background: linear-gradient(180deg, #e8f5e9, #a5d6a7);
  z-index:-1 !important; pointer-events:none !important;
}

/* ============== チャット本体 ============== */
.chat-area{
  width: var(--track-w);
  height: clamp(360px, 58dvh, 640px);
  min-height: 360px;
  margin: 2rem auto;
  background: rgba(255,255,255,0.8);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  display:flex; flex-direction:column;
  position:relative; z-index:1500;
}

/* 中身だけ縦スクロール */
.chat-track{
  flex:1 1 auto;
  display:flex; flex-direction:column; gap:10px;
  max-height: 100%;
  min-height: 0;
  overflow-y:auto;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  scrollbar-gutter:stable;
  padding:12px 16px 8px;
  padding-bottom:24px;                 /* フェールセーフ最小値。JSが上書き */
  scroll-padding-bottom: var(--chrome-gap, 24px);
  position:relative; z-index:1501;
}

/* 吹き出し */
.msg{
  max-width:80%;
  padding:12px 14px;
  border-radius:16px;
  line-height:1.8;
  box-shadow:var(--shadow);
  white-space:pre-wrap; word-wrap:break-word;
  animation:bubble-in .120s ease-out both;
}
.msg.bot{  align-self:flex-start; background:var(--bot-bg); }
.msg.user{ align-self:flex-end;   background:var(--user-bg); }
.meta{ display:block; margin-top:6px; font-size:.8rem; color:var(--meta); text-align:right; }
@keyframes bubble-in{ from{opacity:0; transform:translateY(6px)} to{opacity:1; transform:none} }

/* 最初の挨拶だけコンパクト＆中央寄せ */
.msg.bot.greet{
  align-self:center !important; text-align:center;
  white-space:normal; line-height:1.45; padding:8px 10px;
  max-width:72%; margin:6px auto;
}
.msg.bot.greet .meta{ display:none !important; }
.msg.bot.greet p{ margin:0; }

/* 入力欄 */
#chatform{ display:flex; gap:8px; margin:30px auto 32px; width:var(--track-w); position:relative; z-index:1502; }
#userInput{
  flex:1; padding:12px;
  border-radius:10px; border:1.5px solid #cfd9cf;
  font-size:1rem; outline:none;
  transition: box-shadow .2s ease, border-color .2s ease;
}
#userInput:focus{ border-color:#4caf50; box-shadow:0 0 0 3px rgba(76,175,80,.18); }
button{
  background:#4caf50; color:#1b3d1b; border:none; border-radius:10px; padding:12px 20px;
  cursor:pointer; font-weight:700; font-size:1rem;
  transition: background .2s ease, transform .06s ease, box-shadow .2s ease;
  box-shadow:0 6px 16px rgba(0,0,0,.15);
}
button:hover{ background:#388e3c; }
button:active{ transform:translateY(1px); box-shadow:0 4px 12px rgba(0,0,0,.12); }

/* ============== 固定UI（PCの既定） ============== */
.credits-footer{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;

  height: auto;
  min-height: var(--footer-h);

  /* バー自体は画面いっぱい。中身だけ footer-inner に任せる */
  display: flex;
  justify-content: center;
  align-items: center;

  z-index: 1001;
  background: rgba(255,255,255,0.65);
  backdrop-filter: blur(6px);
  padding: 6px 12px 10px;
  border-top: 1px solid rgba(0,0,0,0.06);
}

/* フッターの“中身の箱”だけ幅を絞る ＋ 左寄せ */
.footer-inner{
  width: var(--track-w);      /* チャットと同じ幅 */
  max-width: var(--track-w);
  margin: 0 auto;

  display: flex;
  flex-direction: column;
  align-items: flex-start;    /* 左寄せ */
  gap: 4px;
  text-align: left;           /* 文字も左寄せ */
}

/* 上段（コピーライト＋AI説明） */
.footer-main{
  font-weight: 600;
}

/* 下段（reCAPTCHA の注意書き） */
.recaptcha-note{
  font-size: 0.75rem;
  line-height: 1.5;
  opacity: 0.9;
  word-break: break-word;
}

/* reCAPTCHA のリンク */
.recaptcha-note a{
  color: #2e7d32;
  text-decoration: underline;
}

/* --- フッターの中身のレイアウト調整 --- */

/* 上段（コピーライト＋AI説明） */
.footer-main{
  margin-bottom: 6px;
  font-weight: 600;
}

/* 下段（reCAPTCHA の注意書き） */
.recaptcha-note{
  font-size: 0.75rem;
  line-height: 1.5;
  opacity: 0.9;
  word-break: break-word;    /* スマホで長いURLがはみ出さないように */
}

/* reCAPTCHA のリンク */
.recaptcha-note a{
  color: #2e7d32;
  text-decoration: underline;
}

/* 左：履歴 / 中央：サンクス / 右：サウンド */
.floating, .thanks-fab-center, .unmute{
  z-index:2000; min-width:110px; white-space:nowrap;
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  padding:10px 14px; border-radius:999px; border:none; cursor:pointer; font-weight:700;
  color:#1b3d1b; background:#ffffffcc; backdrop-filter: blur(6px); box-shadow:0 6px 16px rgba(0,0,0,.18);
}
.floating{ position:fixed; left:0px;  bottom:calc(var(--footer-h) + 40px + env(safe-area-inset-bottom, 0px)); }
.unmute  { position:fixed; right:0px; bottom:calc(var(--footer-h) + 40px + env(safe-area-inset-bottom, 0px)); }
.thanks-fab-center{
  position:fixed; left:50%; transform:translateX(-65%);
  bottom:calc(var(--footer-h) + 40px + env(safe-area-inset-bottom, 0px));
  font-size:1.2rem; transition: transform .3s ease;
}
.thanks-fab-center:hover{ transform:translateX(-50%) scale(1.1); }

/* ============== モーダル/パネル ============== */
.history-panel{
  position:fixed; left:12px; bottom:64px; z-index:2100;
  width:min(560px, 92vw); max-height:70vh; overflow:auto;
  background:#ffffffee; backdrop-filter:blur(8px);
  border-radius:14px; box-shadow:0 12px 28px rgba(0,0,0,.2);
  padding:10px 12px; transform:translateY(12px); opacity:0; pointer-events:none;
  transition: transform .18s ease, opacity .18s ease;
}
.history-panel.open{ transform:translateY(0); opacity:1; pointer-events:auto; }
.history-header{ display:flex; align-items:center; gap:8px; padding:4px 2px 8px; }
.history-actions{ margin-left:auto; display:flex; gap:8px; }
.ghost{ border:1px solid #d9e3da; background:#fff; border-radius:999px; padding:6px 10px; cursor:pointer; }
.history-list{ display:flex; flex-direction:column; gap:8px; }
.h-item{ border:1px solid #eef2ec; border-radius:12px; padding:8px 10px; background:#fff; }
.h-item.user{ background:#f6fbf7; }
.h-meta{ font-size:.78rem; color:#6c7a6c; margin-bottom:4px; }
.h-text{ line-height:1.7; }
.h-empty{ color:#7c8a7c; text-align:center; padding:18px; }
.history-tip{ font-size:.78rem; color:#6c7a6c; margin:10px 2px 2px; }

.thanks-modal{
  position:fixed; inset:0; display:none; align-items:center; justify-content:center;
  z-index:3000; background:rgba(0,0,0,0.45); -webkit-backdrop-filter:blur(2px); backdrop-filter:blur(2px);
  opacity:0; transition:opacity .18s ease; pointer-events:none;
}
.thanks-modal.open{ display:flex; opacity:1; pointer-events:auto; }
.thanks-content{
  width:min(560px, 92vw); max-height:min(78vh, 720px); overflow:auto;
  background:#fff; border-radius:16px; box-shadow:0 20px 50px rgba(0,0,0,.18);
  padding:18px 20px 16px; transform-origin:center; animation:thanksZoom .22s ease;
}
@keyframes thanksZoom{ from{ transform:scale(.97);} to{ transform:scale(1);} }
.thanks-content h2{ margin:4px 2px 12px; font-size:1.25rem; line-height:1.2; }
.thanks-content p{ margin:10px 2px; line-height:1.8; color:#37463a; }
.thanks-content a{ color:#2e7d32; text-decoration:none; border-bottom:1px dashed rgba(46,125,50,.35); }
.thanks-content a:hover{ border-bottom-style:solid; }
#closeThanks{
  margin-top:12px; appearance:none; border:1px solid rgba(46,125,50,.25);
  background:#f1faf3; padding:8px 14px; border-radius:999px; font-size:.95rem; cursor:pointer;
  transition: transform .08s ease, background .12s ease, border-color .12s ease;
}
#closeThanks:hover{ background:#e6f6ea; } #closeThanks:active{ transform:translateY(1px); }
#closeThanks:focus{ outline:2px solid rgba(46,125,50,.35); outline-offset:2px; }
@media (prefers-reduced-motion: reduce){ *,*::before,*::after{ animation:none !important; transition:none !important; } }

/* ============== モバイル（<=600px）：フッター内に3つを横並び、固定しない ============== */
@media (max-width:600px){

  /* フッターは通常フローへ（固定解除） */
  .credits-footer{
    position: static !important;
    padding-bottom: max(8px, env(safe-area-inset-bottom, 0px));
    font-size: 12px; line-height: 1.2;
  }

  /* フッターの先頭に置くアクション行（JSで .footer-actions を生成） */
  .footer-actions{
    display:grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap:10px;
    align-items:center; justify-content:center;
    padding:8px 12px 6px;
  }

  /* 行内に入ったら完全に通常フロー化（固定/変形/最小幅を解除） */
  .footer-actions > #historyBtn,
  .footer-actions > #thanksBtn,
  .footer-actions > #soundBtn,
  .footer-actions > .floating,
  .footer-actions > .thanks-fab-center,
  .footer-actions > .unmute{
    position: static !important;
    transform: none !important;
    left:auto !important; right:auto !important; bottom:auto !important;

    display:flex !important; align-items:center; justify-content:center; gap:8px;

    width:100% !important; max-width:none !important; min-width:0 !important;
    height:44px; padding:10px 12px;
    white-space:nowrap; overflow:visible;
  }

  /* ボタン内のアイコンが潰れないように */
  .footer-actions > * svg,
  .footer-actions > * img,
  .footer-actions > * .icon{
    flex:0 0 auto; max-height:1.0em;
  }

  /* 入力欄は前面に（被り防止） */
  #chatform{ z-index:900; }
}

/* ============== ユーティリティ ============== */
.chat-area, #chatform, .chat-track{ position:relative; }

/* ==== iOS Safari の入力フォーカス自動ズームを防止 ==== */
/* iOS 系だけを狙うガード（他環境には副作用なし） */
@supports (-webkit-touch-callout: none) {
  @media (max-width: 600px) {
    /* 入力系は 16px 以上にしてズームを抑止 */
    input[type="text"],
    input[type="search"],
    input[type="email"],
    input[type="number"],
    input[type="tel"],
    input[type="url"],
    textarea,
    select {
      font-size: 16px !important;
      line-height: 1.35;
    }
    /* 入力フォーム全体の基準文字サイズも16pxに揃える（見た目はほぼ変化なし） */
    #chatform { font-size: 16px; }
  }
}

/* ==== フッター内ボタンのアイコンが過度に大きくならないように明示 ==== */
@media (max-width: 600px) {
  .footer-actions > * {
    /* ボタン内テキストの基準サイズ（必要なら 14〜16 の範囲で微調整） */
    font-size: 15px;
  }
  .footer-actions > * svg,
  .footer-actions > * img,
  .footer-actions > * .icon {
    height: 1.2em;       /* 文字サイズ基準で相対固定 */
    width: auto;
    max-width: 1.6em;    /* 予防線：横に広がりすぎない */
    flex: 0 0 auto;
  }
}

/* 念のため：画像/SVGのデフォルトスケールを安全側に */
img, svg { max-width: 100%; height: auto; }

/* ===== iOSの入力ズーム抑止（念のため） ===== */
@supports (-webkit-touch-callout: none) {
  @media (max-width: 600px) {
    #chatform, #chatform input, #chatform textarea, #chatform select { font-size: 16px !important; }
  }
}

/* ===== モバイル（<=600px）用：フッターと3ボタンを整える ===== */
@media (max-width: 600px){
  /* フッターは固定解除して“普通のブロック”に。高さは中身に合わせる */
  .credits-footer{
    position: static !important;
    display: block !important;
    height: auto !important;
    padding: 8px 12px 10px !important;
    text-align: center;
    line-height: 1.3;
  }

  /* 3ボタンの行：横3グリッド */
  .footer-actions{
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-inline: 0px; gap: 10px;
    align-items: center;
    justify-content: center;
    justify-items: center;  /* ← 追加：各セル内を中央寄せ */
    margin-bottom: 16px;       /* コピーライトとの間隔 */
    width: 100%;
  }

  /* デスクトップ用の fixed/translate/min-width を完全解除し、コンパクト化 */
  .footer-actions > #historyBtn,
  .footer-actions > #thanksBtn,
  .footer-actions > #soundBtn,
  .footer-actions > .floating,
  .footer-actions > .thanks-fab-center,
  .footer-actions > .unmute{
    position: static !important;
    transform: none !important;
    left: auto !important; right: auto !important; bottom: auto !important;

    display: inline-flex !important;
    align-items: center; justify-content: center; gap: 6px;

    width: 100% !important; max-width: none !important; min-width: 0 !important;
    height: 40px;                      /* ← 少し小さめに */
    padding: 8px 10px !important;      /* ← 余白も控えめに */
    font-size: 14px !important;        /* ← 文字と絵文字の基準サイズ */
    white-space: nowrap; overflow: visible;
    box-shadow: 0 4px 12px rgba(0,0,0,.12); /* 影も控えめに */
  }

  /* 先頭絵文字（chat.patch.js が .icon-emoji を付けます）をさらに小さく */
  .footer-actions .icon-emoji{
    font-size: 1.05em;    /* ボタン文字比で少しだけ大きい（見やすさ確保） */
    line-height: 1;
    display: inline-block;
  }

  /* img / svg アイコンも過度に大きくならないように */
  .footer-actions > * img,
  .footer-actions > * svg,
  .footer-actions > * .icon{
    height: 1.1em; width: auto; max-width: 1.6em; flex: 0 0 auto;
  }
}

.seseragi-icon{ flex:0 0 auto; align-self:center; margin-bottom:8px; }
.seseragi-icon img{ width: clamp(180px, 40vw, 320px); height:auto; }

/* 念のため：キーボード対応がある環境なら、その値を優先（将来のSafari向け） */
@supports (bottom: env(keyboard-inset-height)) {
  .footer {
    bottom: max(env(keyboard-inset-height), env(safe-area-inset-bottom));
  }
}

/* Aboutページ用 */
.about-main{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 16px 32px;
  font-family: "LINE Seed JP", "Zen Kaku Gothic New", system-ui, -apple-system, sans-serif;
}

.about-title{
  font-size: 1.8rem;
  margin-bottom: 24px;
  text-align: center;
}

.about-container{
  max-width: 720px;
  width: 100%;
  line-height: 1.9;
  font-size: 1rem;
}

.about-section + .about-section{
  margin-top: 24px;
}

.about-section p{
  margin-bottom: 12px;
}

.about-note{
  font-size: 0.9rem;
  opacity: 0.85;
}

.about-subtitle{
  font-size: 1.2rem;
  margin-bottom: 12px;
  border-left: 4px solid rgba(0, 128, 128, 0.4);
  padding-left: 8px;
}

.character-block{
  margin-top: 16px;
  margin-bottom: 8px;
}

.character-name{
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.about-closing{
  margin-top: 16px;
}

/* Aboutページの背景 */
.about-main{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 16px 32px;
  font-family: "LINE Seed JP", "Zen Kaku Gothic New", system-ui, -apple-system, sans-serif;
}

body{
  background-image: url("assets/seseragi_noon.jpg");
  background-size: 100% auto; /* 横幅だけ合わせる → 縦は自動縮小 */
  background-repeat: no-repeat;
  background-position: center top;
  background-attachment: fixed;
  background-color: #cfe7d4;
}

/* カード全体（タイトル＋本文） */
.about-container{
  max-width: 720px;
  width: 100%;
  line-height: 1.9;
  font-size: 1rem;

  background: rgba(255, 255, 255, 0.85);
  padding: 24px;
  border-radius: 18px;
}

/* タイトルはカードの中で中央寄せ */
.about-title{
  font-size: 1.8rem;
  margin: 0 0 24px;
  text-align: center;
}

/* ===== reCAPTCHA バッジ非表示（規約文言はフッターで表示済み） ===== */
.grecaptcha-badge {
  visibility: hidden;
}

/* --- Hamburger / Drawer Nav --- */
.hamburger{
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 9999;

  width: 44px;
  height: 44px;

  padding: 0;                 /* ← 追加：これが本命 */
  box-sizing: border-box;     /* ← ついでに安定 */
  border: 0;

  border-radius: 14px;
  background: rgba(0,0,0,.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  display: flex;               /* ← gridから変更 */
  flex-direction: column;
  justify-content: center;     /* ← 縦中央 */
  align-items: center;         /* ← 横中央 */
  gap: 4px;                    /* ← 線の間隔を gap で管理 */
  place-items: center;

  cursor: pointer;

  appearance: none;           /* ← おまけ：標準見た目の影響を減らす */
  -webkit-appearance: none;   /* ← おまけ */
}

.hamburger span{
  display: block;
  width: 22px;
  height: 3pt;                 /* ← 太くする（超重要） */
  background: rgba(255,255,255,.92);
  border-radius: 0;
  box-shadow:none;
}

.nav-overlay{
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(0,0,0,.35);
}

.nav-drawer{
  position: fixed;
  top: 0;
  left: -320px;
  width: 300px;
  height: 100%;
  z-index: 11000; /* ← ここだけ上げる（追加/変更） */
  padding: 14px;

  background: rgba(10,10,12,72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  box-shadow: 18px 0 40px rgba(0,0,0,35);
  transition: left .22s ease;
  border-right: 1px solid rgba(255,255,255,10);
  border-left: none;
}
.nav-drawer.open{ left: 0; }


.nav-head{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.nav-title{
  font-weight: 700;
  letter-spacing: .06em;
  color: rgba(255,255,255,.92);
}
.nav-close{
  width: 42px;
  height: 42px;
  padding: 0;                 /* ← 念のため */
  border: 0;
  border-radius: 14px;

  background: rgba(255,255,255,.10);
  color: rgba(255,255,255,.92);

  display: flex;              /* ← ここ重要 */
  align-items: center;        /* ← 縦中央 */
  justify-content: center;    /* ← 横中央 */

  font-size: 22px;
  line-height: 1;             /* ← ベースライン殺す */

  border: 0;
  border-radius: 14px;
  background: rgba(255,255,255,.10);
  color: rgba(255,255,255,.92);
  font-size: 24px;
  cursor:pointer;
}

.nav-link{
  display: flex;                 /* ← ここ重要 */
  align-items: center;           /* ← 縦中央 */
  gap: 10px;                     /* ← アイコンと文字の間 */
  
  padding: 12px 14px;
  margin-top: 8px;
  border-radius: 14px;

  text-decoration: none;
  color: rgba(255,255,255,.92);
  background: rgba(255,255,255,.08);

  font-size: 15px;
  line-height: 1;                /* ← ベースライン暴れ防止 */
}

.nav-link:hover{
  background: rgba(255,255,255,.12);
}

form.readonly {
  opacity: 0.6;
  pointer-events: none;
}

.entrance-actions{
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.entrance-actions .cta{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(20, 80, 40, .55);
  color: rgba(255,255,255,.95);
  backdrop-filter: blur(10px);
}

.entrance-actions .cta.secondary{
  background: rgba(255,255,255,.18);
}

/* 入口ページ：中央寄せ */
.chat-area.entrance{
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

/* 中央パネル */
.entrance-panel{
  width: min(760px, 92vw);
  display: grid;
  gap: 16px;
  justify-items: center;
}

/* カード本体 */
.entrance-card{
  width: 100%;
  background: rgba(255,255,255,.22);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 18px;
  padding: 18px 18px 16px;
  backdrop-filter: blur(10px);
}

/* タイトルと本文 */
.entrance-title{
  margin: 0 0 10px;
  font-size: 22px;
}

.entrance-text{
  margin: 0 0 14px;
  line-height: 1.8;
}

/* ボタン群 */
.entrance-actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.entrance-actions .cta{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(20, 80, 40, .55);
  color: rgba(255,255,255,.95);
  backdrop-filter: blur(10px);
}

.entrance-actions .cta.secondary{
  background: rgba(255,255,255,.18);
}

/* 入口ではチャット用UIを隠す */
.chat-area.entrance + #chatform,
.chat-area.entrance ~ #historyBtn,
.chat-area.entrance ~ #soundBtn,
.chat-area.entrance ~ #thanksBtn,
.chat-area.entrance ~ #historyPanel,
.chat-area.entrance ~ #thanksPanel{
  display: none !important;
}

/* 入口カードの文字を中央寄せ */
.entrance-card{
  text-align: center;
}

.entrance-text{
  margin: 0 0 14px;
  line-height: 1.9;
  text-wrap: pretty; /* 対応ブラウザだけ効く */
}

/* ボタンの視認性UP */
.entrance-actions .cta{
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(15, 65, 35, .78);   /* 濃くして背景に勝つ */
  color: rgba(255,255,255,.98);
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
  min-height: 44px;                    /* タップしやすい */
}

/* サブボタン：白系で分ける */
.entrance-actions .cta.secondary{
  background: rgba(255,255,255,.78);
  color: rgba(20,20,20,.92);
  border: 1px solid rgba(255,255,255,.60);
}

/* hover */
.entrance-actions .cta:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0,0,0,.22);
}

.entrance-card{
  background: rgba(255,255,255,.30);
  border: 1px solid rgba(255,255,255,.22);
}

.entrance-actions{
  margin-top: 28px;   /* ←ここが効く。24〜36pxで好み調整 */
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center; /* 横方向も中央 */
}

.entrance-card{
  display: flex;
  flex-direction: column;
  align-items: center;
}

.entrance-spacer{
  flex: 1;
}

/* 初期状態でoverlayが見える事故を強制で潰す */
#navOverlay[hidden] { display: none !important; }
#navOverlay { display: none; }
#navDrawer.open + #navOverlay,
#navOverlay.is-open { display: block; }

/* 吹き出しボタン */
.entrance-actions .cta{
  position: relative;
  border-radius: 18px;
  padding: 12px 16px;
  box-shadow: 0 10px 22px rgba(0,0,0,.16);
}

/* 三角しっぽ（左下） */
.entrance-actions .cta::after{
  content:"";
  position:absolute;
  left: 26px;
  bottom: -10px;
  width: 0;
  height: 0;
  border: 10px solid transparent;
  border-top-color: rgba(15, 65, 35, .78);  /* ←主ボタン色と合わせる */
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.10));
}

/* 白い吹き出し側のしっぽ */
.entrance-actions .cta.secondary::after{
  border-top-color: rgba(255,255,255,.78); /* ←secondaryの背景色と合わせる */
}


@media (max-width: 480px){
  .entrance-actions{
    flex-direction: column;
    align-items: center;
  }
  .entrance-actions .cta{
    width: min(320px, 86vw);
  }
  .entrance-actions .cta::after{
    left: 28px; /* 幅が揃うのでtail位置も調整 */
  }
}

/* secondary（白吹き出し）を軽くする */
.entrance-actions .cta.secondary{
  box-shadow: 0 6px 14px rgba(0,0,0,.10);
  border: 1px solid rgba(0,0,0,.06);
  padding: 11px 15px;
}

/* nav内ボタンをaっぽく */
.nav-link-btn{
  width: 100%;
  text-align: left;
  border: 0;
  cursor: pointer;
  font: inherit;
}

