/**
 * ことばゲート - 共通コンポーネント（全ページで読み込み）
 * レイアウト・ボタン・フォーム・パネル・アラート等
 */

/* Layout */
.main { flex: 1; padding: 28px 0 40px; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 26px;
}

/* Section (dashboard / account) */
.section + .section { margin-top: 14px; }
.divider { height: 1px; background: var(--border); margin: 24px 0; }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.title { margin: 0; font-size: 14px; font-weight: 800; }
.desc { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.pill {
  font-size: 12px; padding: 6px 10px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--muted); background: #f9fafb; white-space: nowrap;
}
.pill.ok { color: var(--accent2); border-color: rgba(37,99,235,.22); background: rgba(37,99,235,.06); }
.pill.bad { color: var(--danger); border-color: rgba(185,28,28,.22); background: rgba(185,28,28,.06); }

.codebox {
  border: 1px solid var(--border);
  background: #f9fafb;
  border-radius: 12px;
  padding: 20px 20px;
  min-height: 72px;
  font-family: var(--mono);
  font-size: 12px;
  overflow: auto;
  white-space: pre;
}
.input-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.input-row .input {
  flex: 1;
  min-width: 180px;
  padding: 14px 16px;
  min-height: 48px;
}
.input-row .btn { flex-shrink: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 16px; }
.row.end { justify-content: flex-end; }
.hint { color: var(--muted); font-size: 12px; margin-top: 12px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.btn:hover { border-color: var(--border2); background: #f9fafb; }
.btn-primary { border-color: rgba(37,99,235,.25); background: rgba(37,99,235,.08); color: var(--accent2); }
.btn-primary:hover { background: rgba(37,99,235,.12); }
.btn-danger { border-color: rgba(185,28,28,.25); background: rgba(185,28,28,.06); color: var(--danger); }
.btn-danger:hover { background: rgba(185,28,28,.10); }

/* Form */
.input {
  width: 100%; padding: 12px 14px;
  border-radius: 10px; border: 1px solid var(--border);
  background: var(--panel);
  font-size: 13px; outline: none;
}
.input:focus { border-color: rgba(37,99,235,.45); box-shadow: 0 0 0 4px rgba(37,99,235,.10); }
.field { margin-top: 16px; }
.label { display: block; font-size: 12px; color: var(--muted); margin: 0 0 10px; }
.actions { margin-top: 18px; }
.actions .btn { width: 100%; }

/* Alert (現在のドメインなど) */
.alert { border: 1px solid var(--border); background: #f9fafb; padding: 16px 18px; border-radius: 12px; font-size: 13px; margin: 0 0 14px; }
.alert.bad { border-color: rgba(185,28,28,.18); background: rgba(185,28,28,.06); }
.alert.ok { border-color: rgba(37,99,235,.18); background: rgba(37,99,235,.06); }

/* Auth pages (login, register, forgot, etc.) */
.auth-panel { max-width: 520px; margin: 0 auto; }
.auth-head { margin-bottom: 12px; }
.page-title { margin: 0; font-size: 16px; font-weight: 900; }
.page-desc { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.links { margin-top: 12px; display: flex; justify-content: space-between; gap: 12px; font-size: 13px; flex-wrap: wrap; }
.links a { color: var(--muted); }
.links a:hover { text-decoration: underline; }

/* Account page（ログイン後：ダッシュボードとフォントサイズ統一） */
.panel .page-title { font-size: 14px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.section-title { margin: 0; font-size: 14px; font-weight: 900; }
.section-desc { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.account-section { margin-bottom: 14px; }
.account-form { margin-top: 4px; }
.account-form .field { margin-top: 16px; }
.account-form .account-actions { margin-top: 18px; }
.account-actions {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
}
