/* ===============================
   基本設定
=============================== */
html { scroll-behavior: smooth; }
body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  margin: 0;
  background-color: #f9f9f9;
  font-size: 14px;
}
a { color: #1500ff; text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; padding: 0; }

/* ===============================
   レイアウト
=============================== */
.container { margin: 0 auto; padding: 0; }
main { width: 65%; margin: 0 auto; padding: 20px; }

/* ===============================
   ヘッダー & ナビゲーション
=============================== */
:root{
  --header-h: 54px;      /* ヘッダー高さ（PC） */
  --nav-font: 15px;      /* ナビ文字サイズ */
  --nav-pad-y: 4px;      /* ナビ上下の余白 */
  --nav-pad-x: 16px;     /* ナビ左右の余白 */
}

/* ===============================
  ヘッダー／ナビ
=============================== */
header{
  height:var(--header-h);
  padding:0 20px 0 0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  background:#fff;
  width:100%;
  box-sizing:border-box;
  position:relative;
  z-index:1000;
}
.header-left a{
  display:flex;
  align-items:center;
  height:var(--header-h);
  line-height:0;
}
.header-logo{
  height:var(--header-h);
  width:auto;
  display:block;
  transition:filter .3s;
}
.header-logo:hover{ filter:brightness(85%); }

/* =============================
   共通ヘッダーナビ設定（全ページ統一）
   ============================= */

/* ▼ ナビゲーション全体 */
.header-nav {
  display: flex;
  align-items: center;
  background-color: #01b04a;
  height: 30px;                    /* ✅ 高さを30pxに固定 */
  white-space: nowrap;
  overflow-x: auto;                /* モバイルで横スクロール対応 */
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0 10px;
  box-sizing: border-box;
}
.header-nav::-webkit-scrollbar {
  display: none;                   /* スクロールバー非表示 */
}

/* ▼ 各ボタン */
.nav-button {
  color: white;
  text-decoration: none;
  font-weight: bold;
  font-size: 13px;
  padding: 4px 10px;               /* 高さ30pxに合わせて上下を小さめに */
  border-radius: 4px;
  transition: background-color 0.3s ease;
  flex-shrink: 0;                  /* スクロール時に潰れないように */
  margin-right: 14px;              /* ボタン間の間隔 */
  line-height: 1;                  /* ✅ 縦方向中央寄せを安定させる */
  box-sizing: border-box;
}
.nav-button:last-child{ 
  margin-right:0; 
}
.nav-button:hover{
  background:#008000;
  text-decoration:none;
}

/* =============================
   モバイル版
   ============================= */
@media (max-width: 768px) {
  header{ height:40px; padding:0 10px 0 0; }
  .header-logo{ height:40px; }
  .header-nav{ justify-content:flex-start; height:30px; padding-left:10px; }
  .nav-button{ font-size:13px; padding:4px 8px; margin-right:10px; }

  main {
    width: 95%;
    padding: 10px;
  }
}

/* =============================
   PC版
   ============================= */
@media (min-width: 769px) {
  .header-nav {
    justify-content: center;       /* 中央寄せ */
    overflow-x: visible;
  }

  .nav-button {
    margin-right: 16px;            /* PCでは少し広め */
  }
}

/* アカウント設定タイトルを keibarace と同じデザインに揃える */
.settings-page-title {
    font-size: 24px;
    margin: 0px 0 20px 0; /* keibarace の h1 近似値 */
    text-align: center;
    color: #1e1e1e;
    font-weight: bold;
}

main {
  max-width: 700px;
}

h1 {
  text-align: center;
  color: #1e1e1e;
  margin-bottom: 20px;
}

.card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  padding: 20px;
  margin-bottom: 20px;
}

.card h2 {
  font-size: 18px;
  color: #333;
  border-left: 4px solid #01b04a;
  padding-left: 10px;
  margin-bottom: 15px;
}

.form-group,
.form-row {
  margin-bottom: 16px;
}

.form-group label,
.form-row label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  display: block;
}

.form-group input,
.form-row input {
  width: 100%;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

/* プロフィールカード用の微調整 */
.profile-card {
  margin-bottom: 20px;
}

/* ユーザー名・メールアドレスのボタン行を統一 */
.form-actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* カード内の区切り線（ユーザー名とメールアドレスの間） */
.card-divider {
  border: none;
  border-top: 1px solid #eee;
  margin: 16px 0;
}

/* 既存の .form-group / input などはそのまま利用 */

label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
}

input {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
}

.btn {
  display: inline-block;
  background-color: #01b04a;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 12px;
  transition: background 0.3s;
}

.btn:hover {
  background-color: #008000;
}

.btn-danger {
  background-color: #c0392b;
}

.btn-danger:hover {
  background-color: #a5281c;
}

.placeholder-card {
  background: #f2f2f2;
  color: #777;
  text-align: center;
  padding: 20px;
  border-radius: 12px;
  font-size: 14px;
}

.danger-zone {
  border: 1px solid #c0392b;
  background: #fff5f5;
  border-radius: 8px;
  padding: 15px;
  color: #c0392b;
}

footer {
  text-align: center;
  color: #777;
  font-size: 12px;
  margin: 30px 0 10px;
}

/* ===============================
   メールアドレス変更エリアのスタイル
=============================== */

/* 現在のメールアドレスと変更ボタンのグループ */
.email-display-group {
  display: flex;
  flex-direction: column; /* 縦並びにする */
  gap: 10px;              /* 要素間の隙間 */
  margin-bottom: 10px;
}

/* 読み取り専用inputのスタイル（背景グレー） */
#currentEmailDisplay {
  background-color: #f0f0f0;
  color: #555;
  border: 1px solid #ccc;
}

/* 編集エリア（初期は非表示だがJSで制御） */
.email-edit-area {
  display: none; /* JSでblockに切り替え */
  background: #f9f9f9;
  padding: 15px;
  border-radius: 8px;
  margin-top: 10px;
  border: 1px solid #ddd;
}

/* 注釈テキスト */
.note-text {
  font-size: 12px;
  color: #666;
  margin-bottom: 8px;
  margin-top: 0;
}

/* 小さいボタン用のクラス */
.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  width: fit-content; /* ボタンの幅を文字数に合わせる */
}

/* 編集エリア内のキャンセルリンク */
.edit-area-footer {
  margin-top: 10px;
  text-align: right;
}
.edit-area-footer a {
  font-size: 12px;
  color: #999;
  text-decoration: underline;
  cursor: pointer;
}