/* 社内ポータル 共通スタイル
   トンマナ: WithComi受講生ページデザインガイド準拠
   （水色統一・アクセントはピンクのみ・オレンジ赤緑禁止・角丸12px・Material Symbols） */

:root {
  --青: #5BA8D4;
  --青中: #7BBDE0;
  --青淡: #A8D4EC;
  --青超淡: #EAF3FA;
  --紺: #3A5A7C;
  --灰青: #5A7A94;
  --ピンク: #F2909F;
  --白: #FFFFFF;
  --角丸: 12px;
  --影: 0 1px 3px rgba(28, 53, 87, 0.06);
  --影強: 0 6px 20px rgba(28, 53, 87, 0.12);
  --ヘッダー高さ: 56px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: hidden; /* SPで横スクロールさせない */
}

body {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 16px;
  line-height: 1.8;
  color: var(--紺);
  background: var(--青超淡);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

.英字 { font-family: 'Poppins', 'Noto Sans JP', sans-serif; }

.material-symbols-rounded {
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
  user-select: none;
}

/* ---- 背景の装飾サークル（ガイド準拠・タブレット以下は非表示） ---- */
.装飾サークル {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
.装飾サークル.右上 {
  top: -120px; right: -120px; width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(168, 212, 236, 0.35), rgba(168, 212, 236, 0));
}
.装飾サークル.左下 {
  bottom: -140px; left: -140px; width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(123, 189, 224, 0.25), rgba(123, 189, 224, 0));
}
@media (max-width: 768px) {
  .装飾サークル { display: none; }
}

/* ---- ヘッダー ---- */
.ポータルヘッダー {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--ヘッダー高さ);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--青淡);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 100;
}
.ポータルヘッダー .ロゴ {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--青);
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.ポータルヘッダー .ロゴ .ページ名 {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--灰青);
  border-left: 1px solid var(--青淡);
  padding-left: 10px;
}
.ハンバーガー {
  width: 44px; height: 44px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--紺);
  border-radius: var(--角丸);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.ハンバーガー:hover { background: var(--青超淡); }
.ハンバーガー .material-symbols-rounded { font-size: 28px; }

/* ---- ドロワーメニュー ----
   z-indexはページ内オーバーレイ類（チャットのフローティング通話アイコン・長押しメニュー等）より上の1000/1001。
   ドロワーより上に出すべき全画面オーバーレイ（通話・拡大表示・ログイン）は1100以上を使う */
.メニュー背景 {
  position: fixed;
  inset: 0;
  background: rgba(58, 90, 124, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  z-index: 1000;
}
.メニュー背景.開 { opacity: 1; pointer-events: auto; }

/* メニュー表示中は下のコンテンツのタップ・クリックを完全に受け付けない
   （iOSでキーボード起因の表示ズレがあっても、下の要素が誤反応しないための保険） */
body.メニュー開中 .本体,
body.メニュー開中 .チャット全体 {
  pointer-events: none;
}

.ドロワー {
  position: fixed;
  top: 0; right: 0;
  width: min(300px, 82vw);
  height: 100dvh;
  background: var(--白);
  box-shadow: var(--影強);
  transform: translateX(105%);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  padding: 20px 16px calc(16px + env(safe-area-inset-bottom));
  border-radius: var(--角丸) 0 0 var(--角丸);
}
.ドロワー.開 { transform: translateX(0); }

/* アイコン写真（顔）は出さない: 名前＋役割ラベルだけの表示（写真が見えるのはトークルーム関連のみ） */
.ドロワー .プロフィール {
  display: flex;
  align-items: center;
  padding: 12px 12px 16px;
  border-bottom: 1px solid var(--青超淡);
  margin-bottom: 12px;
}
.ドロワー .プロフィール .名前 { font-weight: 700; font-size: 15px; }
.ドロワー .プロフィール .補足 { font-size: 12px; color: var(--灰青); }

.メニュー項目 {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 14px;
  border-radius: var(--角丸);
  color: var(--紺);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  transition: background 0.18s, transform 0.18s;
  border: none;
  background: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  font-family: inherit;
}
.メニュー項目:hover { background: var(--青超淡); transform: translateX(2px); }
.メニュー項目.現在 { background: var(--青超淡); color: var(--青); font-weight: 700; }
.メニュー項目 .material-symbols-rounded { color: var(--青); font-size: 24px; }
.メニュー項目 .英名 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.メニュー区切り { border: none; border-top: 1px solid var(--青超淡); margin: 10px 4px; }
.メニュー下部 { margin-top: auto; }

/* ---- レイアウト ---- */
.本体 {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin: 0 auto;
  padding: calc(var(--ヘッダー高さ) + 24px) 24px 48px;
}
@media (max-width: 768px) {
  .本体 { padding: calc(var(--ヘッダー高さ) + 16px) 16px 32px; }
}

/* ---- カード ---- */
.カード {
  background: var(--白);
  border-radius: var(--角丸);
  box-shadow: var(--影);
  padding: 24px;
  position: relative;
}
.カード + .カード { margin-top: 16px; }
@media (max-width: 400px) {
  .カード { padding: 18px 15px; }
}

.見出し {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.見出し .material-symbols-rounded { color: var(--青); }

/* ---- ボタン ---- */
.ボタン {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 100px;
  background: linear-gradient(135deg, var(--青), var(--青中));
  color: var(--白);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 15px;
  font-weight: 700;
  padding: 12px 28px;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(91, 168, 212, 0.35);
  transition: transform 0.18s, box-shadow 0.18s, opacity 0.18s;
}
.ボタン:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(91, 168, 212, 0.45); }
.ボタン:active { transform: translateY(0); }
.ボタン:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.ボタン.控えめ {
  background: var(--白);
  color: var(--青);
  border: 2px solid var(--青淡);
  box-shadow: none;
}
.ボタン.控えめ:hover { background: var(--青超淡); }
.ボタン.小 { font-size: 13px; padding: 8px 18px; }

/* ---- フォーム ---- */
.項目ラベル {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--灰青);
  margin: 14px 0 6px;
}
.入力 {
  width: 100%;
  border: 2px solid var(--青淡);
  border-radius: var(--角丸);
  padding: 12px 14px;
  font-size: 16px;
  font-family: inherit;
  color: var(--紺);
  background: var(--白);
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.入力:focus { border-color: var(--青); box-shadow: 0 0 0 3px rgba(91, 168, 212, 0.15); }
.入力::placeholder { color: #A8BCCB; }
select.入力 { appearance: none; }

/* ---- メッセージ表示 ---- */
.お知らせ {
  border-radius: var(--角丸);
  padding: 12px 16px;
  font-size: 14px;
  margin: 12px 0 0;
  display: none;
}
.お知らせ.表示 { display: block; animation: ふわっ 0.3s ease; }
.お知らせ.成功 { background: var(--青超淡); color: var(--紺); border-left: 4px solid var(--青); }
.お知らせ.失敗 { background: #FDEef1; color: #B4556A; border-left: 4px solid var(--ピンク); }

@keyframes ふわっ {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- バッジ ---- */
.バッジ {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  border-radius: 100px;
  padding: 2px 10px;
  background: var(--青超淡);
  color: var(--青);
}
.バッジ.ピンク { background: #FDEef1; color: var(--ピンク); }
