/* 【最新版のstyle.css】 */

/* 全体の余白と高さ指定 */
html {
  margin: 0;
  padding: 0;
  height: 100%;
}

/* 全体の背景やレイアウトの基本設定 */
body {
  margin: 0;  /* ページ全体の余白をゼロにして表示領域を最大化 */
  padding: 0;  /* コンテンツの内側余白もゼロにして整える */
  font-family: "Helvetica Neue", "Arial", "Meiryo", sans-serif;  /* 優先フォントを指定して可読性を確保 */
  font-weight: normal;  /* 通常の文字の太さに設定（boldを避ける） */
  width: 100vw;  /* 幅を画面の100vwに指定 */
  height: 100vh;  /* 高さを画面の100vhに指定（フッターなどを考慮） */
  display: flex;   /* 子要素のレイアウトを指定できるようにする */
  flex-direction: column; /*子要素を縦方向に並べる */
  position: relative; /* 各要素のz-indexを有効にするため */
  padding: 0; 
  margin: 0;
  overflow-x: hidden;
  overflow-y: hidden;
  z-index: auto;  /* 各要素のz-indexを有効にするため */

  /* border: 2px dashed rgba(0, 0, 255, 0.5);  */
}


/* ヘッダー部分（ロゴやボタン含む） */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;      /* center→flex-start */
  padding: 0px 0px;
  box-sizing: border-box;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 50px;         /* 必要に応じてここで高さ調整 */
  z-index: 10;

  /* border: 2px dashed red; */
}

/* ヘッダー左の縦並び（ロゴやボタン） */
.left-controls {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;  /* ← ここを center → flex-start に変更！ */
  align-items: flex-start;      /* ← これで左寄せ */
  padding: 0px 10px;             /* 任意で微調整 */
  
  /* border: 2px dashed red;  */
}

/* 右上のコントロール（背景変更など） */
.right-controls {
  display: flex;
  align-items: center;       /* ← 中央揃えに変更！ */
  gap: 16px;
  position: absolute;        /* ← ここを追加！ */
  top: 15px;
  right: 20px;
  /* border: 2px dashed red;  */
}


/* ロゴ画像設定 */
.logo-img {
  max-width: 100%;     /* ← 幅は画像のアスペクト比に従う */
  width:200px;
  height: auto;
  display: block;   /* ← インラインからブロック要素に */
  margin-top: 12px;
  /* border: 2px dashed red; */
  position: relative;       /* z-indexのために必要 */
  z-index: 999;      /* 上に出すための順序指定 */
}




/* 🎯 ログ全体の縦位置・サイズを調整するラッパー。ログエリアとのレイアウト調整用（表示に直接影響なし） */
.log-area-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  box-sizing: border-box;
  padding-top: 85px;
  padding-bottom: 0;
  position: relative;
}

/* ログ表示の吹き出しエリア */
#logArea {
  position: fixed;
  top: 80%;
  left: 0;
  right: 0;
  margin: auto;
  transform: translateY(-50%);
  width: 65vw;
  max-width: 900px;
  height: 30vh;
  min-height: 30vh;
  max-height: 30vh;
  background-color: rgba(41, 41, 41, 0.85);
  padding: 0.5em 1em;
  border-radius: 25px;
  color: #fff;
  text-align: left;  /* 左寄せ */
  line-height: 0.85;  /* 0.85 */
  overflow-y: auto;
  overflow-wrap: break-word; /* new */
  word-break: break-all; /* new */
  box-sizing: border-box; /* new */
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  box-shadow: 0 12px 28px rgba(0,0,0,0.4);
  font-family: "Helvetica Neue", "Arial", "Meiryo", sans-serif;
  font-size: 48px;
  font-weight: bold;
  text-shadow: 2px 2px 4px #000;
}

/* ログ全体のラッパー */
.log-line-wrapper {
  margin-top: auto;
  margin-bottom: auto;
}

/* ログ表示エリア（logArea）内の1行ずつのテキスト要素に対して、行間や余白を詰めて視認性を高めるため */
.log-line {
  display: inline-block;
  line-height: 0.9; /* 必要なら 0.95 や 0.9 まで下げる */
  margin: -6px 0; /* 行間を物理的に詰める */
}

/* ✅ ログ内の <p> 要素の上下余白を最小限にして、行と行の間を詰めて視認性を高めるため */
#logArea p {
  margin: 4px 0;
  padding: 0;
}

/* 認識中テキストの強調表示 */
.recognizing {
  color: white;
  -webkit-text-stroke: 0.5px black;
  font-size: 1.2em;
  line-height: 1.4;      /* 潰れ防止に余裕を持たせる */
  margin: 0.4em 0;
  font-weight: bold;
  text-shadow: 2px 2px 2px #000;
  display: block;
}

/* 送信中のインジケーター */
/* ✅ 「認識中...」の見た目は recognizing クラスと併用すると表示が安定した */
#loading-indicator {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  max-width: 100%;
}


/* ログイン黒モーダル */
.modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.70);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* ログイン黒モーダル */
.modal-content {
  background-color: rgb(0, 0, 0, 0.85);
  color: white;
  padding: 2rem;
  max-width: 600px;
  width: 90%;
  text-align: center;
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}

/* ログイン黒モーダル */
.modal-content h3 {
  margin-top: 0;
  font-size: 1.5rem;
}

/* ログイン黒モーダル */
.modal-content p {
  margin: 1rem 0;
  line-height: 1.4;
}

/* Googleで続行ボタン */
.google-login-button {
  display: flex;
  align-items: center;
  max-width: 165px;
  background-color: white;
  color: #3c4043;
  border: 1px solid #dadce0;
  border-radius: 24px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Roboto', sans-serif;
  cursor: pointer;
  transition: box-shadow 0.3s ease;
}

.google-login-button:hover {
  box-shadow: 0 1px 3px rgba(60, 64, 67, 0.3);
}

.google-icon {
  width: 20px;
  height: 20px;
  margin-right: 12px;
}

.button-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center; /* ← これが横中央揃えの決め手！ */
  margin-top: 10px;
}

/* ✅ 「非表示」制御の共通クラス。modalや残り時間Pad等で使用。最重要級ユーティリティクラス。 */
.hidden {
  display: none;
}


/**
 * 以下、アカウントエリア設定
 */
#accountArea {
  display: flex;
  align-items: center;
  margin-top: 8px;
}


/* 残り時間切れのポップアップ表示 */
#remainingTimePad {
  display: none;                        /* 初期状態では非表示（JSで表示制御） */
  background: rgba(0, 0, 0, 0.85);     /* 半透明の黒背景で視認性UP */
  color: white;                       /* 白文字でコントラストを確保 */
  padding: 1em;                         /* テキスト周囲に余白を確保 */
  border-radius: 8px;                   /* 角を丸めて柔らかい印象に */
  position: fixed;                      /* 画面スクロールに関係なく固定表示 */
  top: 119px;                           /* 画面上から119pxの位置に配置 */
  left: 14px;                           /* 左から14pxの位置に配置 */
  z-index: 9999;                        /* 他の要素の上に重ねる（最前面） */
}

/* プラン変更誘導ボタン */
.planLinkBtn {
  margin-top: 8px;             /* 🔸改行との間に余白を追加 */
  background-color: #6366f1; /* ボタンの背景を明るい青にして視認性UP */
  color: white;              /* 白文字でコントラスト確保 */
  border: none;                /* デフォルトの線を消してミニマルに */
  padding: 6px 10px;            /* クリックしやすくするための余白 */
  border-radius: 6px;          /* 角丸でやわらかい印象に */
  font-weight: 400;           /* 視線を集めやすいように太字 */
  cursor: pointer;             /* マウスホバー時にクリック感を演出 */
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);  /* 立体感を出す影 */
  transition: background-color 0.2s ease; /* ホバー時の色変化を滑らかに */
}

/* ✅ プラン変更ボタンにマウスを重ねた際、色を少し濃くして視認性とクリック感を向上 */
.planLinkBtn:hover {
background-color: #4f46e5;;   /* ホバー時に少し濃くしてインタラクションを示す */
}


/* Chattee開始ボタン */
#toggleBtn {
  margin: 10px 5px 0px 5px;
  font-size: 16px;
}

/* ▶Chattee開始／🔳停止ボタン共通スタイル */
.linear-button {
  background-color: rgba(41, 41, 41, 0.85);
  color: #ffffff;
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.linear-button:hover,
.linear-button:focus {
  color: white;
  background-color: rgba(179, 178, 178, 0.85);
}
.linear-button:disabled {
  background-color: rgba(179, 178, 178, 0.85);
  color: white;
  cursor: default;
}


/* 「ここをクリック！」パッド */
#clickHerePad {
  position: fixed;                      /* 画面上で固定 */
  top: 78px;                            /* remainingTimePad と同じ高さ */
  left: 159px;                           /* ボタン右に来るよう調整（pxは要調整） */
  background: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 0.4em 0.8em;
  border-radius: 6px;
  font-size: 0.9rem;
  white-space: nowrap;
  z-index: 9999;
}



/* 小さめ注意書き */
.terms-note {
  font-size: 12px;
  color: #aaa;
  margin-bottom: 10px;
  text-align: center;
}
.terms-note a {
  color: #ccc;
  text-decoration: underline;
}



/* 📱 スマホ画面幅時のレイアウト切り替え。ログ領域の幅・文字サイズ調整。Chatteeのモバイル非対応方針なら「中〜小」扱い。 */
@media (max-width: 768px) {
/* ここに書いたCSSは「画面幅768px以下（スマホサイズ）」のときだけ適用される */
#logArea {
    width: 90%;
    font-size: 20px;
    height: auto;
}

/* ヘッダー部分（ロゴやボタン含む） */
.top-bar {
flex-direction: column;
    align-items: flex-start;
}

/* 右上のコントロール（背景変更など） */
.controls {
    margin-top: 10px;
}

/* Chattee開始ボタン */
#toggleBtn {
    margin-left: 0;
    margin-right: auto;
}

.cover-modal {
    width: 90vw;
    max-width: none;
    right: 5vw;
    left: 5vw;
    top: 60px;
    padding: 10px;
  }

.cover-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  }

}