/* CSS変数定義 */
:root {
  --primary-color: #009fe8;
  --primary-hover: #0084c4;
  --text-primary: #333;
  --text-secondary: #555;
  --text-light: #777; /* WCAG AA準拠の改善版 */
  --bg-primary: #fff;
  --bg-secondary: #f8f9fa;
  --bg-dark: #1a1a1a;
  --border-radius: 20px;
  --shadow-default: 0 10px 30px rgba(0, 0, 0, 0.1);
  --transition-default: all 0.3s ease;
  --focus-outline: 3px solid #0066cc;
  --focus-outline-offset: 2px;
}

/* 基本スタイル・リセット */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  /* ベースフォントサイズをレスポンシブに設定 */
  font-size: clamp(14px, 2.5vw, 18px);
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
}

.container {
  max-width: 1400px;
  margin: 0 auto;
}

/* フォーカススタイル改善 */
*:focus {
  outline: none;
  outline-offset: 0;
}

button:focus,
a:focus {
  outline: none;
  outline-offset: 0;
}

/* アニメーション無効化対応 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* スクリーンリーダー専用テキスト */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* エラーメッセージスタイル */
.error-message {
  color: #d32f2f;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: block;
}

.group.error input,
.group.error textarea {
  border-color: #d32f2f;
  background-color: #fff5f5;
}

/* 成功メッセージスタイル */
.success-message {
  background: #4caf50;
  color: white;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  text-align: center;
  font-weight: 600;
  opacity: 0;
  transform: translateY(-10px);
  transition: var(--transition-default);
}

.success-message.show {
  opacity: 1;
  transform: translateY(0);
}

/* レスポンシブ改行用のクラス */
.br-mobile {
  display: none;
}

.br-desktop {
  display: block;
}
