/* ==========================================================================
   Kakutoku Design System
   共有されたFigmaデザインを完全再現したモダンEdTechスタイル
   ========================================================================== */

:root {
  /* Kakutoku ブランドカラー */
  --kt-bg: #faf7f2;              /* 柔らかなウォームアイボリー */
  --kt-card-bg: #ffffff;
  --kt-dark: #27272a;             /* メインテキスト */
  --kt-muted: #71717a;            /* サブテキスト */
  --kt-border: #f1ece4;           /* やさしい境界線 */
  --kt-border-subtle: #f4f0e8;
  
  /* ブランドグリーン */
  --kt-green: #345d4d;            /* Kakutokuのフォレストグリーン */
  --kt-green-hover: #2a4c3e;
  --kt-green-light: #e6f0eb;
  
  /* アクセントカラー */
  --kt-amber: #f59e0b;
  --kt-amber-light: #fef3c7;
  --kt-amber-text: #b45309;
  
  /* スペックタグ用パステルトーン */
  --kt-tag-green-bg: #e8f5ee;
  --kt-tag-green-text: #216a48;
  --kt-tag-amber-bg: #fff8eb;
  --kt-tag-amber-text: #9a5b13;
  --kt-tag-purple-bg: #f3f0fb;
  --kt-tag-purple-text: #5e3da8;
  --kt-tag-rose-bg: #fdf0f0;
  --kt-tag-rose-text: #9e2a2b;
  --kt-tag-blue-bg: #eef5fc;
  --kt-tag-blue-text: #1d5b96;
}

/* 基本リセット & タイポグラフィ */
* {
  box-sizing: border-box;
}

body {
  background-color: var(--kt-bg) !important;
  color: var(--kt-dark) !important;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "BIZ UDPGothic", "Yu Gothic", Meiryo, sans-serif !important;
  margin: 0;
  padding: 0;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ヘッダー */
.kt-header {
  background-color: var(--kt-bg);
  padding: 16px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}

.kt-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--kt-dark);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

.kt-logo-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background-color: var(--kt-green);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  font-weight: 800;
}

.kt-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.kt-nav a {
  text-decoration: none;
  color: #4b5563;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.kt-nav a:hover {
  color: var(--kt-green);
}

.kt-header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.kt-btn-login {
  color: #4b5563;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 8px 14px;
}

.kt-btn-primary {
  background-color: var(--kt-green);
  color: #ffffff !important;
  border: none;
  border-radius: 9999px;
  padding: 10px 22px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(52, 93, 77, 0.2);
}

.kt-btn-primary:hover {
  background-color: var(--kt-green-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(52, 93, 77, 0.3);
}

.kt-btn-secondary {
  background-color: #ffffff;
  color: var(--kt-dark) !important;
  border: 1.5px solid #e4e4e7;
  border-radius: 9999px;
  padding: 10px 22px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.18s ease;
}

.kt-btn-secondary:hover {
  background-color: #f4f4f5;
  border-color: #d4d4d8;
  transform: translateY(-1px);
}

/* メインコンテナ */
.kt-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 30px 20px 80px;
}

/* ヒーローセクション */
.kt-hero {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 40px;
  align-items: center;
  padding: 40px 0 60px;
}

@media (max-width: 960px) {
  .kt-hero {
    grid-template-columns: 1fr;
    padding: 20px 0 40px;
  }
}

.kt-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--kt-tag-green-bg);
  color: var(--kt-tag-green-text);
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 22px;
}

.kt-hero-title {
  font-size: 3.3rem;
  font-weight: 800;
  line-height: 1.22;
  color: var(--kt-dark);
  margin: 0 0 20px 0;
  letter-spacing: -0.02em;
}

@media (max-width: 640px) {
  .kt-hero-title {
    font-size: 2.3rem;
  }
}

.kt-hero-desc {
  font-size: 1.05rem;
  color: var(--kt-muted);
  line-height: 1.75;
  margin: 0 0 28px 0;
  max-width: 520px;
}

.kt-hero-cta {
  display: flex;
  gap: 14px;
  margin-bottom: 42px;
  flex-wrap: wrap;
}

.kt-hero-stats {
  display: flex;
  gap: 36px;
  border-top: 1px solid rgba(0,0,0,0.06);
  padding-top: 24px;
}

.kt-stat-item .stat-num {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--kt-dark);
  line-height: 1.2;
}

.kt-stat-item .stat-label {
  font-size: 0.8rem;
  color: var(--kt-muted);
  font-weight: 500;
  margin-top: 2px;
}

/* ヒーロー画像エリア */
.kt-hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.kt-hero-bg-shape {
  position: absolute;
  width: 95%;
  height: 95%;
  background-color: #dcece4;
  border-radius: 36px;
  z-index: 1;
}

.kt-hero-deco-circle {
  position: absolute;
  right: -15px;
  bottom: -15px;
  width: 90px;
  height: 90px;
  background-color: #f7d6cc;
  border-radius: 50%;
  z-index: 2;
  opacity: 0.85;
}

.kt-hero-img-wrap {
  position: relative;
  z-index: 3;
  width: 86%;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.08);
}

.kt-hero-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
}

/* フローティングバッジ */
.kt-float-badge-top {
  position: absolute;
  top: 12px;
  right: 18px;
  background: #ffffff;
  padding: 10px 16px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.kt-float-badge-top .f-label {
  font-size: 0.72rem;
  color: var(--kt-muted);
  font-weight: 600;
}

.kt-float-badge-top .f-val {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--kt-dark);
}

.kt-float-badge-bottom {
  position: absolute;
  bottom: 24px;
  left: 14px;
  background: #ffffff;
  padding: 10px 16px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  z-index: 4;
  width: 160px;
}

.kt-float-badge-bottom .f-title {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--kt-dark);
  margin-bottom: 6px;
}

.kt-progress-bar {
  width: 100%;
  height: 6px;
  background-color: #f1ece4;
  border-radius: 9999px;
  overflow: hidden;
}

.kt-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #d97706);
  border-radius: 9999px;
}

/* セクション共通見出し */
.kt-section-header {
  text-align: center;
  margin: 40px 0 36px;
}

.kt-section-tag {
  display: inline-block;
  background-color: var(--kt-amber-light);
  color: var(--kt-amber-text);
  padding: 4px 14px;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.kt-section-title {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--kt-dark);
  margin: 0 0 8px 0;
  letter-spacing: -0.01em;
}

.kt-section-sub {
  color: var(--kt-muted);
  font-size: 0.98rem;
  margin: 0;
}

/* 資格カードグリッド（Figma再現） */
.kt-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

@media (max-width: 820px) {
  .kt-grid {
    grid-template-columns: 1fr;
  }
}

.kt-card {
  background: var(--kt-card-bg);
  border-radius: 20px;
  border: 1px solid var(--kt-border);
  padding: 24px 26px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  transition: all 0.22s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  color: inherit;
}

.kt-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05);
  border-color: #e4ded4;
}

.kt-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

.kt-card-title-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.kt-icon-box {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.kt-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.kt-card-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--kt-dark);
  margin: 0;
  line-height: 1.2;
}

.kt-card-desc {
  font-size: 0.9rem;
  color: #52525b;
  line-height: 1.65;
  margin: 0 0 18px 0;
}

/* 3分割スペックタグ */
.kt-specs-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 1.1fr;
  gap: 8px;
  margin-top: auto;
}

.kt-spec-item {
  border-radius: 10px;
  padding: 8px 10px;
  text-align: left;
}

.kt-spec-label {
  font-size: 0.7rem;
  display: block;
  opacity: 0.85;
  margin-bottom: 2px;
  font-weight: 600;
}

.kt-spec-val {
  font-size: 0.88rem;
  font-weight: 800;
  display: block;
  white-space: nowrap;
}

/* フッター */
.kt-footer {
  text-align: center;
  padding: 40px 20px;
  border-top: 1px solid var(--kt-border);
  color: var(--kt-muted);
  font-size: 0.88rem;
  margin-top: 60px;
}

/* ==========================================================================
   学習画面（トレーニング・クイズ・ブックマーク）向け Kakutoku スタイル
   ========================================================================== */

body, body.with-header {
  background-color: #faf7f2 !important;
  color: #27272a !important;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "BIZ UDPGothic", "Yu Gothic", Meiryo, sans-serif !important;
}

/* ヘッダー */
header.header {
  background-color: #faf7f2 !important;
  border-bottom: 1px solid #e7dfd5 !important;
  box-shadow: 0 2px 8px rgba(45, 55, 48, 0.03) !important;
}
.header-nav a {
  color: #4b5851 !important;
  font-weight: 600 !important;
}
.header-nav a:hover, .header-nav a.active {
  color: #345d4d !important;
}

/* パンくず & 戻るナビゲーション */
.breadcrumb {
  background: transparent !important;
  padding: 1rem 0 !important;
  font-size: 0.9rem !important;
}
.breadcrumb a {
  color: #55625a !important;
  font-weight: 600 !important;
  text-decoration: none !important;
}
.breadcrumb a:hover {
  color: #345d4d !important;
}
.nav-back-bar {
  background: #ffffff !important;
  border: 1px solid #e7dfd5 !important;
  border-radius: 14px !important;
  padding: 10px 16px !important;
  margin-bottom: 20px !important;
  box-shadow: 0 2px 8px rgba(45, 55, 48, 0.02) !important;
}
.nav-back-link {
  color: #345d4d !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}
.nav-back-link:hover {
  text-decoration: underline !important;
}

/* カードコンポーネント */
.card, #setup-container, #quiz-container, #result-container, .reading-container, .quiz-card {
  background: #ffffff !important;
  border: 1px solid #e7dfd5 !important;
  border-radius: 20px !important;
  box-shadow: 0 4px 20px rgba(45, 55, 48, 0.04) !important;
  padding: 24px !important;
}

/* レベル選択ボタン */
.level-pill-btn {
  background: #ffffff !important;
  border: 1.5px solid #dcd5ca !important;
  border-radius: 16px !important;
  color: #334155 !important;
  transition: all 0.2s ease !important;
}
.level-pill-btn:hover {
  background: #f7f4ed !important;
  border-color: #345d4d !important;
  transform: translateY(-2px) !important;
}
.level-pill-btn.selected, .level-pill-btn.active {
  background: #345d4d !important;
  border-color: #345d4d !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(52, 93, 77, 0.28) !important;
}
.level-pill-btn.selected .pill-sub, .level-pill-btn.active .pill-sub {
  color: #d1e2da !important;
}

/* 出題数ボタン */
.count-pill-btn {
  background: #ffffff !important;
  border: 1.5px solid #dcd5ca !important;
  border-radius: 9999px !important;
  color: #334155 !important;
  padding: 8px 18px !important;
  font-weight: 700 !important;
  transition: all 0.2s ease !important;
}
.count-pill-btn:hover {
  background: #f7f4ed !important;
  border-color: #345d4d !important;
}
.count-pill-btn.selected, .count-pill-btn.active {
  background: #345d4d !important;
  border-color: #345d4d !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(52, 93, 77, 0.25) !important;
}

/* メインアクションボタン（スタートボタン） */
#start-btn, .btn-start, .btn-primary, .btn-submit {
  background: #345d4d !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 9999px !important;
  padding: 12px 28px !important;
  font-weight: 700 !important;
  font-size: 1.05rem !important;
  box-shadow: 0 4px 14px rgba(52, 93, 77, 0.25) !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}
#start-btn:hover, .btn-start:hover, .btn-primary:hover, .btn-submit:hover {
  background: #254337 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 18px rgba(52, 93, 77, 0.35) !important;
}

/* 4択クイズの選択肢ボタン */
.choice-btn, .option-btn {
  background: #ffffff !important;
  border: 1.5px solid #e0d8cc !important;
  border-radius: 14px !important;
  color: #27272a !important;
  padding: 14px 18px !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  text-align: left !important;
  margin-bottom: 10px !important;
  width: 100% !important;
  display: block !important;
  cursor: pointer !important;
  transition: all 0.18s ease !important;
  box-sizing: border-box !important;
}
.choice-btn:hover:not(:disabled), .option-btn:hover:not(:disabled) {
  background: #f7faf8 !important;
  border-color: #345d4d !important;
  transform: translateY(-1px) !important;
}
.choice-btn.correct, .option-btn.correct {
  background: #e8f5ee !important;
  border-color: #216a48 !important;
  color: #164e33 !important;
  font-weight: 700 !important;
}
.choice-btn.incorrect, .option-btn.incorrect {
  background: #fdf0f0 !important;
  border-color: #e57373 !important;
  color: #9e2a2b !important;
}

/* 解説ボックス */
.explanation-box, #explanation-card {
  background: #fcfbf9 !important;
  border: 1px solid #e7dfd5 !important;
  border-left: 4px solid #345d4d !important;
  border-radius: 14px !important;
  padding: 18px 20px !important;
  margin-top: 18px !important;
}

/* プログレスバー */
.progress-bar-fill, #progress-fill {
  background: #345d4d !important;
  border-radius: 9999px !important;
}

/* ==========================================================================
   Kakutoku ヘッダー & コンテナ幅レイアウト（サイド余白確保）
   ========================================================================== */

/* 共通コンテナ：画面横幅いっぱいに広がらず、左右に適切な余白を確保して中央寄せ */
.container {
  max-width: 1040px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 24px !important;
  padding-right: 24px !important;
  box-sizing: border-box !important;
  width: 100% !important;
}

/* Kakutoku ヘッダー */
header.kakutoku-header, .kakutoku-header, .kt-header {
  background-color: #faf7f2 !important;
  border-bottom: 1px solid #e7dfd5 !important;
  padding: 14px 0 !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 1000 !important;
  width: 100% !important;
  box-shadow: 0 2px 10px rgba(45, 55, 48, 0.03) !important;
}

.header-inner {
  max-width: 1040px !important;
  margin: 0 auto !important;
  padding: 0 24px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  box-sizing: border-box !important;
}

/* ロゴ */
.logo-link, .kt-logo {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  text-decoration: none !important;
  color: #1a231f !important;
  font-weight: 800 !important;
  font-size: 1.25rem !important;
}

.logo-mark, .kt-logo-icon {
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  background-color: #345d4d !important;
  color: #ffffff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 800 !important;
  font-size: 1.15rem !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
}

.logo-text {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-weight: 800 !important;
  font-size: 1.25rem !important;
  letter-spacing: -0.02em !important;
  color: #1a231f !important;
}

/* ナビゲーションリンク */
.nav-links, .kt-nav {
  display: flex !important;
  align-items: center !important;
  gap: 24px !important;
}

.nav-link, .kt-nav a {
  text-decoration: none !important;
  color: #55625a !important;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  transition: color 0.15s ease !important;
}

.nav-link:hover, .kt-nav a:hover, .nav-link.active {
  color: #345d4d !important;
}

/* ヘッダー右側のアクションボタン */
.header-actions, .kt-header-actions {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

.btn-pill {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  border-radius: 9999px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
  box-sizing: border-box !important;
  cursor: pointer !important;
  padding: 0.6rem 1.35rem !important;
  font-size: 0.9rem !important;
}

.btn-pill-primary {
  background-color: #345d4d !important;
  color: #ffffff !important;
  border: 1px solid #345d4d !important;
}

.btn-pill-primary:hover {
  background-color: #254337 !important;
  border-color: #254337 !important;
  transform: translateY(-1px) !important;
}

.btn-pill-outline {
  background-color: #ffffff !important;
  color: #345d4d !important;
  border: 1.5px solid #d5cdc3 !important;
}

.btn-pill-outline:hover {
  background-color: #f7f3ec !important;
  border-color: #345d4d !important;
}

/* ヒーローコンテナの調整 */
.hero-container {
  max-width: 1040px !important;
  margin: 0 auto !important;
}

/* 学習画面の幅調整 */
.with-header > .container {
  max-width: 1040px !important;
  margin: 0 auto !important;
  padding: 24px !important;
}

/* ==========================================================================
   Kakutoku ヒーローセクション完全対応CSS（画像サイズ制約 & フローティングバッジ）
   ========================================================================== */

.hero-section {
  padding: 40px 0 60px !important;
  width: 100% !important;
}

.hero-container {
  display: grid !important;
  grid-template-columns: 1.15fr 0.85fr !important;
  gap: 48px !important;
  align-items: center !important;
  max-width: 1040px !important;
  margin: 0 auto !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

@media (max-width: 960px) {
  .hero-container {
    grid-template-columns: 1fr !important;
    gap: 36px !important;
    padding: 20px 0 !important;
  }
}

.hero-content {
  display: flex !important;
  flex-direction: column !important;
  min-width: 0 !important; /* グリッド圧縮防止 */
}

.hero-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  background-color: #e8f5ee !important;
  color: #216a48 !important;
  padding: 6px 14px !important;
  border-radius: 9999px !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  width: fit-content !important;
  margin-bottom: 20px !important;
}

.hero-title {
  font-size: 2.9rem !important;
  font-weight: 800 !important;
  line-height: 1.22 !important;
  color: #1a231f !important;
  margin: 0 0 18px 0 !important;
  letter-spacing: -0.02em !important;
  white-space: normal !important;
}

@media (max-width: 640px) {
  .hero-title {
    font-size: 2.1rem !important;
  }
}

.hero-subtitle {
  font-size: 1.05rem !important;
  color: #6b7770 !important;
  line-height: 1.75 !important;
  margin: 0 0 28px 0 !important;
  max-width: 520px !important;
}

.hero-buttons {
  display: flex !important;
  gap: 14px !important;
  margin-bottom: 38px !important;
  flex-wrap: wrap !important;
}

.hero-stats {
  display: flex !important;
  gap: 36px !important;
  border-top: 1px solid #e7dfd5 !important;
  padding-top: 24px !important;
}

.stat-item {
  display: flex !important;
  flex-direction: column !important;
}

.stat-number {
  font-size: 1.85rem !important;
  font-weight: 800 !important;
  color: #1a231f !important;
  line-height: 1.2 !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
}

.stat-label {
  font-size: 0.82rem !important;
  color: #7b8881 !important;
  font-weight: 600 !important;
  margin-top: 2px !important;
}

/* ヒーロービジュアル（画像が巨大化しないよう厳格に制御） */
.hero-visual {
  position: relative !important;
  width: 100% !important;
  max-width: 440px !important;
  margin: 0 auto !important;
  min-width: 0 !important;
}

.hero-card-container {
  position: relative !important;
  width: 100% !important;
  background-color: #dceee5 !important;
  border-radius: 28px !important;
  padding: 16px !important;
  box-sizing: border-box !important;
  box-shadow: 0 10px 30px rgba(45, 55, 48, 0.07) !important;
}

.hero-image-wrapper {
  position: relative !important;
  width: 100% !important;
  height: 330px !important;
  border-radius: 20px !important;
  overflow: hidden !important;
  z-index: 1 !important;
}

.hero-img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

/* フローティングバッジ */
.hero-floating-badge {
  position: absolute !important;
  top: -10px !important;
  right: -10px !important;
  background: #ffffff !important;
  border: 1px solid #e7dfd5 !important;
  border-radius: 9999px !important;
  padding: 8px 16px !important;
  font-size: 0.88rem !important;
  font-weight: 700 !important;
  color: #1a231f !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08) !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  z-index: 3 !important;
  white-space: nowrap !important;
}

/* プログレスカード */
.hero-progress-card {
  position: absolute !important;
  bottom: -14px !important;
  left: -14px !important;
  background: #ffffff !important;
  border: 1px solid #e7dfd5 !important;
  border-radius: 16px !important;
  padding: 12px 18px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1) !important;
  z-index: 3 !important;
  min-width: 190px !important;
  box-sizing: border-box !important;
}

.progress-title-row {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-bottom: 6px !important;
  gap: 12px !important;
}

.course-name {
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  color: #1a231f !important;
}

.progress-pct {
  font-size: 0.85rem !important;
  font-weight: 800 !important;
  color: #345d4d !important;
}

.progress-track {
  width: 100% !important;
  height: 8px !important;
  background: #eef2ef !important;
  border-radius: 9999px !important;
  overflow: hidden !important;
}

.progress-fill {
  height: 100% !important;
  background: #345d4d !important;
  border-radius: 9999px !important;
}

.hero-deco-circle {
  position: absolute !important;
  bottom: -22px !important;
  right: -18px !important;
  width: 52px !important;
  height: 52px !important;
  background: #f87171 !important;
  opacity: 0.85 !important;
  border-radius: 50% !important;
  z-index: 0 !important;
}

/* 全ページ共通コンテナ幅制限 */
.container, main.container, .shikaku-container {
  max-width: 1040px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 24px !important;
  padding-right: 24px !important;
  box-sizing: border-box !important;
  width: 100% !important;
}

/* ==========================================================================
   各資格ページ（FP・簿記・ITパスポート・宅建・TOEIC・過去問・コラム・用語集）
   Kakutoku UI / 色味の完全踏襲スタイル
   ========================================================================== */

/* 背景とフォント */
body, body.with-header {
  background-color: #faf7f2 !important;
  color: #27272a !important;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "BIZ UDPGothic", "Yu Gothic", Meiryo, sans-serif !important;
  line-height: 1.7 !important;
}

/* ヘッダー */
header.header, .header, .kakutoku-header {
  background-color: #faf7f2 !important;
  border-bottom: 1px solid #e7dfd5 !important;
  box-shadow: 0 2px 10px rgba(45, 55, 48, 0.03) !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 1000 !important;
  padding: 12px 0 !important;
}

/* ヘッダーナビ */
.header-nav {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 16px !important;
  max-width: 1040px !important;
  margin: 0 auto !important;
  padding: 0 24px !important;
}

.header-nav a {
  color: #4b5851 !important;
  font-weight: 700 !important;
  font-size: 0.95rem !important;
  padding: 8px 16px !important;
  border-radius: 9999px !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
  background: transparent !important;
}

.header-nav a:hover, .header-nav a.active {
  background-color: #eef5f1 !important;
  color: #345d4d !important;
}

/* ヒーローヘッダー */
.hero-header {
  text-align: center !important;
  padding: 30px 0 20px !important;
}

.hero-header h1 {
  font-size: 2.2rem !important;
  font-weight: 800 !important;
  color: #1a231f !important;
  letter-spacing: -0.02em !important;
  margin-bottom: 8px !important;
}

.hero-header p {
  font-size: 1.05rem !important;
  color: #6b7770 !important;
  margin: 0 !important;
}

/* パンくずリスト */
.breadcrumb {
  background: transparent !important;
  padding: 12px 0 !important;
  font-size: 0.88rem !important;
}

.breadcrumb a {
  color: #55625a !important;
  font-weight: 600 !important;
  text-decoration: none !important;
}

.breadcrumb a:hover {
  color: #345d4d !important;
}

/* カードコンポーネントの刷新 */
.card, .shikaku-card {
  background: #ffffff !important;
  border: 1px solid #e7dfd5 !important;
  border-radius: 20px !important;
  box-shadow: 0 4px 16px rgba(45, 55, 48, 0.04) !important;
  padding: 24px !important;
  border-top: none !important; /* 古いベタ塗りトップボーダーを解除 */
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease !important;
}

.shikaku-card:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 14px 28px rgba(45, 55, 48, 0.08) !important;
  border-color: #345d4d !important;
}

.shikaku-card h3 {
  color: #1a231f !important;
  font-size: 1.25rem !important;
  font-weight: 800 !important;
  margin-bottom: 8px !important;
}

.shikaku-card p {
  color: #55625a !important;
  font-size: 0.93rem !important;
  line-height: 1.65 !important;
}

/* 主要カードアクションボタン（フォレストグリーンのピルボタン） */
.shikaku-card-btn, .btn-main-action {
  background: #345d4d !important;
  color: #ffffff !important;
  border: 1px solid #345d4d !important;
  border-radius: 9999px !important;
  padding: 10px 22px !important;
  font-weight: 700 !important;
  font-size: 0.95rem !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  box-shadow: 0 4px 12px rgba(52, 93, 77, 0.18) !important;
  transition: all 0.2s ease !important;
  cursor: pointer !important;
}

.shikaku-card-btn:hover, .btn-main-action:hover {
  background: #254337 !important;
  border-color: #254337 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 16px rgba(52, 93, 77, 0.28) !important;
}

/* バッジの刷新 */
.shikaku-card-badge, .badge {
  background: #e8f5ee !important;
  color: #216a48 !important;
  border-radius: 9999px !important;
  padding: 4px 12px !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  display: inline-block !important;
}

/* フッターの刷新 */
.site-footer {
  background: #ffffff !important;
  border-top: 1px solid #e7dfd5 !important;
  color: #55625a !important;
  padding: 40px 0 25px !important;
  margin-top: 50px !important;
}

.site-footer a {
  color: #4b5851 !important;
  text-decoration: none !important;
  font-weight: 600 !important;
}

.site-footer a:hover {
  color: #345d4d !important;
}

.footer-bottom {
  border-top: 1px solid #f2ede6 !important;
  color: #8a968f !important;
  font-size: 0.85rem !important;
  padding-top: 20px !important;
  margin-top: 25px !important;
  text-align: center !important;
}

/* 級ボタン（フォレストグリーン化） */
.grade-pill-btn {
  background: #345d4d !important;
  border: 1px solid #345d4d !important;
  color: #ffffff !important;
}
.grade-pill-btn:hover {
  background: #254337 !important;
  border-color: #254337 !important;
}

/* ==========================================================================
   hero-header & 全ての青色ボタン・バナーのフォレストグリーン化
   ========================================================================== */

/* hero-header（画像2枚目のバナー） */
.hero-header {
  text-align: center !important;
  padding: 30px 24px !important;
  background: linear-gradient(135deg, #345d4d, #254337) !important;
  border-radius: 20px !important;
  color: #ffffff !important;
  margin-bottom: 30px !important;
  box-shadow: 0 8px 24px rgba(52, 93, 77, 0.18) !important;
}

.hero-header h1 {
  font-size: 1.95em !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  margin: 0 !important;
  letter-spacing: -0.01em !important;
}

.hero-header p {
  font-size: 1.05em !important;
  color: #ffffff !important;
  opacity: 0.92 !important;
  margin-top: 8px !important;
}

/* 全ての青系ボタン・背景のフォレストグリーン上書き */
.btn-primary, .shikaku-card-btn,
.profile-intro p, .profile-section-title {
  border-color: #345d4d !important;
}

.profile-intro p {
  color: #345d4d !important;
}
.profile-section-title {
  border-bottom-color: #345d4d !important;
}
.skills-list .fas {
  color: #345d4d !important;
}

/* bad_selector removed */

/* ==========================================================================
   ボタンの視覚的ヒエラルキー（過剰な緑色の整理 & 小項目ボタンの最適化）
   ========================================================================== */

/* 1. 小項目のボタン：出題数選択ボタン（濃い緑を使わず、白背景 / 選択時は優しいミントグリーン） */
.count-btn, 
.count-pill-btn, 
.btn-count,
#count-container .level-pill-btn,
.level-badge-grid button,
.count-button-grid button {
  background: #ffffff !important;
  color: #334155 !important;
  border: 1.5px solid #dcd5ca !important;
  border-radius: 12px !important;
  padding: 8px 16px !important;
  font-weight: 700 !important;
  font-size: 0.95rem !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03) !important;
  transition: all 0.18s ease !important;
}

.count-btn:hover, 
.count-pill-btn:hover, 
#count-container .level-pill-btn:hover,
.count-button-grid button:hover {
  background: #f7f4ed !important;
  border-color: #8c9b93 !important;
  transform: translateY(-1px) !important;
}

/* 出題数ボタン（選択時）：濃いベタ塗りではなく、すっきりしたミントグリーン＋緑枠線 */
.count-btn.selected, 
.count-btn.active, 
.count-pill-btn.selected, 
.count-pill-btn.active,
#count-container .level-pill-btn.active,
#count-container .level-pill-btn.selected,
.count-button-grid button.selected {
  background: #e8f5ee !important;
  border: 2px solid #345d4d !important;
  color: #216a48 !important;
  font-weight: 800 !important;
  box-shadow: 0 2px 8px rgba(52, 93, 77, 0.15) !important;
  transform: none !important;
}

/* 2. 小項目のボタン：レベル・分野選択ボタン（通常は白背景 / 選択時は優しいミントグリーン） */
.level-pill-btn,
#level-container .level-pill-btn {
  background: #ffffff !important;
  color: #334155 !important;
  border: 1.5px solid #dcd5ca !important;
  border-radius: 14px !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03) !important;
  transition: all 0.18s ease !important;
}

.level-pill-btn:hover,
#level-container .level-pill-btn:hover {
  background: #f7f4ed !important;
  border-color: #8c9b93 !important;
  transform: translateY(-1px) !important;
}

.level-pill-btn.selected, 
.level-pill-btn.active,
#level-container .level-pill-btn.active,
#level-container .level-pill-btn.selected {
  background: #e8f5ee !important;
  border: 2px solid #345d4d !important;
  color: #216a48 !important;
  font-weight: 800 !important;
  box-shadow: 0 2px 8px rgba(52, 93, 77, 0.15) !important;
  transform: none !important;
}
.level-pill-btn.selected .pill-sub,
.level-pill-btn.active .pill-sub,
#level-container .level-pill-btn.active .pill-sub {
  color: #4b6b5b !important;
}

/* 3. 小項目のボタン：ブックマーク登録ボタン（添付画像準拠デザイン） */
.bookmark,
#bookmark,
.bookmark-btn,
.btn-bookmark,
button.bookmark-btn {
  background: #ffffff !important;
  color: #64748b !important;
  border: 1px solid #d5e2ed !important;
  border-radius: 9999px !important;
  padding: 5px 16px !important;
  font-weight: 600 !important;
  font-size: 0.88rem !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02) !important;
  cursor: pointer !important;
  transition: all 0.18s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
}

.bookmark:hover,
#bookmark:hover,
.bookmark-btn:hover {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #475569 !important;
}

/* ブックマーク登録済み（アクティブ）：淡いイエロー背景＋ゴールド枠線 */
.bookmark.active,
.bookmark.bookmarked,
#bookmark.active,
#bookmark.bookmarked,
.bookmark-btn.active,
.bookmark-btn.bookmarked {
  background: #fef9c3 !important;
  color: #b45309 !important;
  border: 1px solid #facc15 !important;
  box-shadow: 0 1px 4px rgba(234, 179, 8, 0.18) !important;
}

/* 4. 小項目のボタン：条件変更・戻る・選択解除ボタン（白背景・アウトラインピル） */
#backToWizardBtn,
.quit-quiz-btn,
.group-toggle-btn,
.mode-switch-btn,
.print-quiz-btn,
button.quit-quiz-btn,
button#backToWizardBtn,
button#printPracticeBtn,
.nav-back-link {
  background: #ffffff !important;
  color: #4b5851 !important;
  border: 1.5px solid #d5cdc3 !important;
  border-radius: 9999px !important;
  padding: 8px 18px !important;
  font-weight: 700 !important;
  font-size: 0.9rem !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03) !important;
  cursor: pointer !important;
  transition: all 0.18s ease !important;
}

#backToWizardBtn:hover,
.quit-quiz-btn:hover,
.group-toggle-btn:hover,
.print-quiz-btn:hover {
  background: #f7f4ed !important;
  border-color: #345d4d !important;
  color: #345d4d !important;
  transform: translateY(-1px) !important;
}

/* モード切替タブ（アクティブ時のみフォレストグリーン） */
.mode-switch-btn.active {
  background: #345d4d !important;
  border-color: #345d4d !important;
  color: #ffffff !important;
}

/* 5. 主要アクション（濃いフォレストグリーン #345d4d を使うべきボタン） */
/* - 各ページのトップのボタン（ヒーローCTA、ヘッダーマイページ）
   - 次のページに遷移するためのボタン（コース選択、大問・練習問題、開始、次へ） */
.course-btn-primary,
.grade-pill-btn,
.shikaku-card-btn,
.start-quiz-btn,
.start-train-btn,
#startPracticeBtn,
.next-question-btn,
#next-btn,
.btn-pill-primary,
#hero-start-btn,
.special-btn {
  background: #345d4d !important;
  color: #ffffff !important;
  border: 1px solid #345d4d !important;
  border-radius: 9999px !important;
  box-shadow: 0 4px 12px rgba(52, 93, 77, 0.18) !important;
  font-weight: 700 !important;
}

.course-btn-primary:hover,
.grade-pill-btn:hover,
.shikaku-card-btn:hover,
.start-quiz-btn:hover,
.start-train-btn:hover,
#startPracticeBtn:hover,
.next-question-btn:hover,
#next-btn:hover,
.btn-pill-primary:hover,
#hero-start-btn:hover,
.special-btn:hover {
  background: #254337 !important;
  border-color: #254337 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 16px rgba(52, 93, 77, 0.28) !important;
}

/* ブックマーク復習 & 選択し直すボタン（小項目・補助ボタン） */
.btn-study-sub,
a.btn-study-sub,
.btn-bookmark-review {
  background: #ffffff !important;
  color: #4b5851 !important;
  border: 1.5px solid #d5cdc3 !important;
  border-radius: 9999px !important;
  padding: 0.7rem 1.3rem !important;
  font-weight: 700 !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03) !important;
  transition: all 0.2s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  text-decoration: none !important;
}

.btn-study-sub:hover,
a.btn-study-sub:hover,
.btn-bookmark-review:hover {
  background: #f7f3ec !important;
  border-color: #345d4d !important;
  color: #345d4d !important;
  transform: translateY(-1px) !important;
}

/* 4択の選択肢ボタン（クイズ中）：白背景、ホバーで薄いミントグリーン */
.choice-btn, .quiz-option, .option-btn {
  background: #ffffff !important;
  color: #1e293b !important;
  border: 1.5px solid #e2ded7 !important;
  border-radius: 14px !important;
  padding: 13px 18px !important;
  font-weight: 600 !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.02) !important;
}

.choice-btn:hover:not(:disabled), .quiz-option:hover:not(.locked) {
  background: #f7faf8 !important;
  border-color: #345d4d !important;
  color: #1e293b !important;
}


/* ==========================================================================
   決定版：ボタン＆UI色味の最適化（小項目・選択肢・ブックマークの完全クリーン化）
   ========================================================================== */

/* --- 1. 問題の選択肢ボタン（画像1枚目）：通常時は白背景！濃い緑は絶対に使わない --- */
.reading-choice-btn,
.choice-btn,
.quiz-option,
.option-btn,
.quiz-options button,
.reading-choices-list button {
  background: #ffffff !important;
  color: #1e293b !important;
  border: 1.5px solid #e2ded7 !important;
  border-radius: 12px !important;
  padding: 12px 16px !important;
  font-size: 0.98rem !important;
  font-weight: 600 !important;
  text-align: left !important;
  width: 100% !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.02) !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

.reading-choice-btn:hover:not(:disabled),
.choice-btn:hover:not(:disabled),
.quiz-option:hover:not(.locked) {
  background: #f8fafc !important;
  border-color: #345d4d !important;
  color: #1e293b !important;
  transform: translateY(-1px) !important;
}

/* 選択肢ボタン内のレター記号（A, B, C, D） */
.choice-letter,
.quiz-option-letter {
  background: #eef2f6 !important;
  color: #475569 !important;
  border-radius: 50% !important;
  width: 26px !important;
  height: 26px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  flex-shrink: 0 !important;
}

/* 正解時：優しいペールミント */
.reading-choice-btn.correct,
.choice-btn.correct,
.quiz-option.correct,
.quiz-option.correct-choice {
  background: #e8f5ee !important;
  border-color: #216a48 !important;
  color: #164e33 !important;
  font-weight: 700 !important;
}
.reading-choice-btn.correct .choice-letter {
  background: #216a48 !important;
  color: #ffffff !important;
}

/* 不正解時：優しいペールローズ */
.reading-choice-btn.wrong,
.choice-btn.incorrect,
.quiz-option.wrong,
.quiz-option.wrong-choice {
  background: #fdf0f0 !important;
  border-color: #e57373 !important;
  color: #9e2a2b !important;
}

/* --- 2. ブックマークボタン（添付画像準拠：完全統一ピルデザイン） --- */
/* 未登録時（画像1枚目）：白背景、繊細な枠線、グレー文字・星 */
.bookmark-toggle-btn,
.bookmark,
#bookmark,
.bookmark-btn,
.btn-bookmark,
button.bookmark-btn,
button.bookmark-toggle-btn,
#currentBookmarkBtn,
#currentSingleBmBtn,
#currentTakkenBmBtn,
#currentPastBmBtn,
#currentFp1BmBtn,
#currentFp2BmBtn,
#currentFp3BmBtn,
.reading-q-bookmark,
.reading-q-head .nav-btn-secondary,
.reading-q-head button,
button.nav-btn-secondary {
  background: #ffffff !important;
  color: #64748b !important;
  border: 1px solid #d5e2ed !important;
  border-radius: 9999px !important;
  padding: 5px 16px !important;
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  transition: all 0.18s ease !important;
  text-decoration: none !important;
  line-height: 1.4 !important;
}

.bookmark-toggle-btn:hover,
.bookmark:hover,
#bookmark:hover,
.bookmark-btn:hover,
.reading-q-head .nav-btn-secondary:hover,
.reading-q-head button:hover,
button.nav-btn-secondary:hover {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #475569 !important;
}

/* 登録中・アクティブ時（画像2枚目）：淡いイエロー背景、ゴールド枠線、アンバー文字・星 */
.bookmark-toggle-btn.is-bookmarked,
.bookmark-toggle-btn.active,
.bookmark.active,
.bookmark.bookmarked,
#bookmark.active,
#bookmark.bookmarked,
.bookmark-btn.active,
.bookmark-btn.bookmarked,
button.is-bookmarked,
.reading-q-head .nav-btn-secondary.is-bookmarked,
.reading-q-head .nav-btn-secondary.active,
.reading-q-head .nav-btn-secondary:has(.fas),
button.nav-btn-secondary:has(.fas) {
  background: #fef9c3 !important;
  color: #b45309 !important;
  border: 1px solid #facc15 !important;
  font-weight: 700 !important;
  box-shadow: 0 1px 4px rgba(234, 179, 8, 0.18) !important;
}

.bookmark-toggle-btn.is-bookmarked:hover,
.bookmark-toggle-btn.active:hover,
button.is-bookmarked:hover {
  background: #fef08a !important;
  border-color: #eab308 !important;
  color: #92400e !important;
}

/* アイコン色 */
.bookmark-toggle-btn .fa-star,
.bookmark-btn .fa-star,
.nav-btn-secondary .fa-star {
  font-size: 0.92rem !important;
}
.bookmark-toggle-btn.is-bookmarked .fa-star,
.bookmark-toggle-btn.active .fa-star,
button.is-bookmarked .fa-star {
  color: #d97706 !important;
}

/* --- 3. 予想問題セット・回数選択ボタン（画像3枚目）：通常時は白背景！ --- */
.session-btn,
.session-selector-card button,
.session-grid button {
  background: #ffffff !important;
  color: #2d3748 !important;
  border: 1.5px solid #dcd5ca !important;
  border-radius: 14px !important;
  padding: 14px 18px !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03) !important;
  transition: all 0.2s ease !important;
  cursor: pointer !important;
  text-align: center !important;
}

.session-btn:hover,
.session-selector-card button:hover {
  background: #f7f4ed !important;
  border-color: #345d4d !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(45, 55, 48, 0.06) !important;
}

/* セット選択時（アクティブ）：上品なペールミントグリーン＋緑枠線 */
.session-btn.active,
.session-selector-card button.active {
  background: #e8f5ee !important;
  border: 2px solid #345d4d !important;
  color: #216a48 !important;
  font-weight: 800 !important;
  box-shadow: 0 4px 12px rgba(52, 93, 77, 0.15) !important;
}

/* --- 4. モード切り替えタブボタン（画像3枚目上部）：未選択は白！アクティブのみフォレストグリーン --- */
.mode-switch-btn {
  background: #ffffff !important;
  color: #64748b !important;
  border: 1.5px solid #dcd5ca !important;
  border-radius: 9999px !important;
  padding: 10px 20px !important;
  font-weight: 700 !important;
  font-size: 0.95rem !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.mode-switch-btn:hover {
  background: #f7f4ed !important;
  color: #345d4d !important;
}

.mode-switch-btn.active {
  background: #345d4d !important;
  color: #ffffff !important;
  border-color: #345d4d !important;
  box-shadow: 0 4px 12px rgba(52, 93, 77, 0.18) !important;
}

/* --- 5. プリントアウトボタン・条件変更ボタン：白背景アウトライン --- */
.print-quiz-btn,
#printPracticeBtn,
#printPastExamBtn,
#backToWizardBtn,
#backToSessionsBtn,
.quit-quiz-btn,
.group-toggle-btn,
.batch-check-btn {
  background: #ffffff !important;
  color: #4b5851 !important;
  border: 1.5px solid #d5cdc3 !important;
  border-radius: 9999px !important;
  padding: 10px 20px !important;
  font-weight: 700 !important;
  font-size: 0.92rem !important;
  cursor: pointer !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03) !important;
  transition: all 0.18s ease !important;
}

.print-quiz-btn:hover,
#printPracticeBtn:hover,
#printPastExamBtn:hover,
#backToWizardBtn:hover,
#backToSessionsBtn:hover,
.quit-quiz-btn:hover,
.group-toggle-btn:hover {
  background: #f7f4ed !important;
  border-color: #345d4d !important;
  color: #345d4d !important;
  transform: translateY(-1px) !important;
}

/* --- 6. 出題数ボタン：白背景／選択中はペールミント --- */
.count-btn,
.count-pill-btn {
  background: #ffffff !important;
  color: #334155 !important;
  border: 1.5px solid #dcd5ca !important;
  border-radius: 12px !important;
  font-weight: 700 !important;
}

.count-btn.selected,
.count-btn.active,
.count-pill-btn.selected,
.count-pill-btn.active {
  background: #e8f5ee !important;
  border: 2px solid #345d4d !important;
  color: #216a48 !important;
  font-weight: 800 !important;
}

/* --- 7. 主要アクションボタンのみ、濃いフォレストグリーン (#345d4d) を適用 --- */
.course-btn-primary,
.grade-pill-btn,
.shikaku-card-btn,
.start-quiz-btn,
.start-train-btn,
#startPracticeBtn,
#startPastExamBtn,
.start-btn,
.next-question-btn,
#next-btn,
.btn-pill-primary,
#hero-start-btn,
.special-btn {
  background: #345d4d !important;
  color: #ffffff !important;
  border: 1px solid #345d4d !important;
  border-radius: 9999px !important;
  box-shadow: 0 4px 12px rgba(52, 93, 77, 0.18) !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.course-btn-primary:hover,
.grade-pill-btn:hover,
.shikaku-card-btn:hover,
.start-quiz-btn:hover,
.start-train-btn:hover,
#startPracticeBtn:hover,
#startPastExamBtn:hover,
.next-question-btn:hover,
#next-btn:hover,
.btn-pill-primary:hover,
#hero-start-btn:hover,
.special-btn:hover {
  background: #254337 !important;
  border-color: #254337 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 16px rgba(52, 93, 77, 0.28) !important;
}

/* ==========================================================================
   ステップ1：出題分野選択画面（宅建スタイルへの完全統一）
   ========================================================================== */

/* 1. チェックボックス全体のaccent-colorをフォレストグリーンに統一 */
input[type="checkbox"],
.cat-checkbox,
.cat-group-check,
.category-item input[type="checkbox"],
.category-group h3 input[type="checkbox"],
.category-check-item input[type="checkbox"] {
  accent-color: #345d4d !important;
  cursor: pointer !important;
}

/* 2. サブグループカード（宅建・ITパスポート型） */
.category-group {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  padding: 16px !important;
}

.category-group h3 {
  border-bottom: 2px solid #e2e8f0 !important;
  color: #2d3748 !important;
  font-size: 1.05rem !important;
  font-weight: 700 !important;
}

.category-item label,
.category-item {
  color: #4a5568 !important;
  font-size: 0.92rem !important;
}

/* 3. 分野選択グリッドアイテム（FP・簿記型：青枠線や濃緑太枠を排除） */
.category-check-item,
.commercial-group .category-check-item,
.accounting-group .category-check-item,
.industrial-group .category-check-item,
.cost-group .category-check-item {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  color: #4a5568 !important;
  font-weight: 500 !important;
  padding: 14px 16px !important;
  box-shadow: none !important;
  transition: all 0.18s ease !important;
}

.category-check-item:hover,
.commercial-group .category-check-item:hover,
.accounting-group .category-check-item:hover,
.industrial-group .category-check-item:hover,
.cost-group .category-check-item:hover {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #2d3748 !important;
}

/* 選択時（selected）：どぎつい青や太い緑枠線を排除し、淡い背景と落ち着いた枠線 */
.category-check-item.selected,
.commercial-group .category-check-item.selected,
.accounting-group .category-check-item.selected,
.industrial-group .category-check-item.selected,
.cost-group .category-check-item.selected {
  background: #f4f8f5 !important;
  border: 1.5px solid #9bb5a8 !important;
  color: #2d3748 !important;
  font-weight: 600 !important;
}

/* 全分野一括選択バー（全分野からランダム出題） */
.category-check-item:first-child,
.category-checkbox-grid > label:first-child,
label[style*="grid-column: 1 / -1"] {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  color: #4a5568 !important;
}

.category-check-item:first-child.selected,
.category-checkbox-grid > label:first-child.selected,
label[style*="grid-column: 1 / -1"].selected {
  background: #f4f8f5 !important;
  border: 1.5px solid #9bb5a8 !important;
  color: #2d3748 !important;
}

/* ==========================================================================
   正解・不正解時の解説ボックススタイル（左側の濃い淵を排除し、均一で優しい色味に）
   ========================================================================== */

/* 共通：解説エリア（左側の濃いアクセント線を完全排除） */
.quiz-explanation-area,
.reading-exp-box,
.explanation-box,
#explanation-card,
#explanation-area {
  border-left: 1px solid #e2e8f0 !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 14px !important;
  padding: 20px 22px !important;
  margin-top: 18px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03) !important;
  transition: all 0.2s ease !important;
}

/* 正解時：全体が優しい緑色背景（2枚目画像準拠）、左側の濃い淵は不要 */
.quiz-explanation-area.is-correct,
.reading-exp-box.is-correct-exp,
.explanation-box.is-correct,
#explanation-area.is-correct,
.quiz-card.is-correct-card .quiz-explanation-area {
  background: #eef8f2 !important;
  border: 1px solid #c6e6d4 !important;
  border-left: 1px solid #c6e6d4 !important;
}

.quiz-explanation-area.is-correct .quiz-result-title,
.is-correct .quiz-result-title,
.reading-exp-box.is-correct-exp .reading-exp-title {
  color: #216a48 !important;
  font-weight: 800 !important;
}

/* 失敗・不正解時：全体が優しい赤色背景（3枚目画像準拠）、左側の濃い淵は不要 */
.quiz-explanation-area.is-wrong,
.reading-exp-box.is-wrong-exp,
.explanation-box.is-wrong,
#explanation-area.is-wrong,
.quiz-card.is-wrong-card .quiz-explanation-area {
  background: #fff5f5 !important;
  border: 1px solid #fed7d7 !important;
  border-left: 1px solid #fed7d7 !important;
}

.quiz-explanation-area.is-wrong .quiz-result-title,
.is-wrong .quiz-result-title,
.reading-exp-box.is-wrong-exp .reading-exp-title {
  color: #c53030 !important;
  font-weight: 800 !important;
}

/* 内側解説文エリア背景も透明にして全体背景と美しく一体化 */
.quiz-explanation-area.is-correct .quiz-explanation-body,
.quiz-explanation-area.is-wrong .quiz-explanation-body,
.quiz-explanation-area.is-correct div[style*="background:#f7fafc"],
.quiz-explanation-area.is-wrong div[style*="background:#f7fafc"],
.quiz-explanation-area.is-correct div[style*="background: #f7fafc"],
.quiz-explanation-area.is-wrong div[style*="background: #f7fafc"] {
  background: transparent !important;
  border: none !important;
  padding: 6px 0 0 0 !important;
}

/* 次の問題へボタン（青色を完全排除し、フォレストグリーンへ統一） */
#nextQuestionBtn,
#next-btn,
.next-question-btn,
#nextQuizBtn,
#nextTakkenQuestionBtn,
#nextPastQuestionBtn,
#nextFp1QuestionBtn,
#nextFp2QuestionBtn,
#nextFp3QuestionBtn {
  background: #345d4d !important;
  color: #ffffff !important;
  border: 1px solid #345d4d !important;
  border-radius: 9999px !important;
  padding: 10px 26px !important;
  font-weight: 700 !important;
  font-size: 1rem !important;
  cursor: pointer !important;
  box-shadow: 0 4px 12px rgba(52, 93, 77, 0.22) !important;
  transition: all 0.2s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
}

#nextQuestionBtn:hover,
#next-btn:hover,
.next-question-btn:hover,
#nextQuizBtn:hover,
#nextTakkenQuestionBtn:hover,
#nextPastQuestionBtn:hover,
#nextFp1QuestionBtn:hover,
#nextFp2QuestionBtn:hover,
#nextFp3QuestionBtn:hover {
  background: #254337 !important;
  border-color: #254337 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 16px rgba(52, 93, 77, 0.3) !important;
}

/* ==========================================================================
   マイページ & 学習時間ヒートマップ (Kakutoku Dashboard)
   ========================================================================== */

.mypage-hero {
  background: linear-gradient(135deg, #f7f4ed 0%, #edf4f0 100%);
  border-bottom: 1px solid #e2ddd3;
  padding: 40px 0 32px 0;
  margin-bottom: 36px;
}
.mypage-hero-title {
  font-size: 2rem;
  font-weight: 800;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.mypage-hero-desc {
  color: #64748b;
  font-size: 0.95rem;
}

/* サマリーカードグリッド */
.mypage-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.mypage-summary-card {
  background: #ffffff;
  border: 1px solid #e7dfd5;
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 4px 14px rgba(45, 55, 48, 0.04);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.mypage-summary-card.primary {
  background: linear-gradient(135deg, #345d4d 0%, #254337 100%);
  color: #ffffff;
  border-color: #345d4d;
  box-shadow: 0 8px 24px rgba(52, 93, 77, 0.22);
}
.mypage-summary-card.primary .summary-label {
  color: #d1e2da;
}
.mypage-summary-card.primary .summary-value {
  color: #ffffff;
}
.mypage-summary-card.primary .summary-icon {
  color: rgba(255, 255, 255, 0.2);
}
.summary-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.summary-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.05em;
}
.summary-icon {
  font-size: 1.4rem;
  color: #94a3b8;
}
.summary-value {
  font-size: 2.1rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.summary-value .unit {
  font-size: 0.95rem;
  font-weight: 600;
  margin-left: 2px;
}
.summary-footer {
  margin-top: 10px;
  font-size: 0.8rem;
  color: #8896a6;
}
.mypage-summary-card.primary .summary-footer {
  color: #bdd5c9;
}

/* リアルタイム計測中パルスバッジ */
.live-pulse-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(34, 197, 94, 0.15);
  color: #15803d;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 9999px;
}
.mypage-summary-card.primary .live-pulse-badge {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse-dot-anim 1.8s infinite;
}
.mypage-summary-card.primary .pulse-dot {
  background: #4ade80;
}
@keyframes pulse-dot-anim {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7); }
  70% { transform: scale(1.15); box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

/* 年間学習ヒートマップセクション */
.heatmap-card {
  background: #ffffff;
  border: 1px solid #e7dfd5;
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 4px 20px rgba(45, 55, 48, 0.04);
  margin-bottom: 36px;
}
.heatmap-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f1ece1;
}
.heatmap-title-group h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #1e293b;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.heatmap-title-group p {
  color: #64748b;
  font-size: 0.85rem;
  margin: 4px 0 0 0;
}
.heatmap-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.heatmap-btn-sm {
  background: #f7f4ed;
  border: 1px solid #dcd5ca;
  color: #475569;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.heatmap-btn-sm:hover {
  background: #ece7db;
  color: #1e293b;
}

/* ヒートマップ本体コンテナ（GitHub風） */
.heatmap-scroll-area {
  overflow-x: auto;
  padding-bottom: 12px;
  position: relative;
}
.heatmap-container {
  display: inline-block;
  min-width: 820px;
  user-select: none;
}
.heatmap-months {
  display: grid;
  grid-template-columns: 36px repeat(53, 13px);
  gap: 3px;
  font-size: 0.72rem;
  color: #64748b;
  margin-bottom: 6px;
  height: 18px;
  line-height: 18px;
}
.heatmap-body {
  display: flex;
  gap: 8px;
}
.heatmap-weekdays {
  display: grid;
  grid-template-rows: repeat(7, 12px);
  gap: 3px;
  font-size: 0.65rem;
  color: #94a3b8;
  width: 28px;
  line-height: 12px;
  text-align: right;
  padding-right: 4px;
}
.heatmap-weekdays span {
  display: block;
}
.heatmap-grid {
  display: grid;
  grid-template-rows: repeat(7, 12px);
  grid-auto-flow: column;
  grid-auto-columns: 12px;
  gap: 3px;
}
.heatmap-cell {
  width: 12px;
  height: 12px;
  border-radius: 2.5px;
  cursor: pointer;
  transition: transform 0.15s ease, outline 0.15s ease;
  box-sizing: border-box;
  outline: 1px solid rgba(27, 31, 35, 0.06);
  outline-offset: -1px;
}
.heatmap-cell:hover {
  transform: scale(1.3);
  z-index: 10;
  outline: 1.5px solid #0f172a;
}

/* セルカラー階層（フォレストグリーン・GitHub調の高級感ある緑） */
.heatmap-cell.level-0 {
  background-color: #ebedf0;
}
.heatmap-cell.level-1 {
  background-color: #9be9a8;
}
.heatmap-cell.level-2 {
  background-color: #40c463;
}
.heatmap-cell.level-3 {
  background-color: #30a14e;
}
.heatmap-cell.level-4 {
  background-color: #216e39;
}

/* ヒートマップフッター（凡例） */
.heatmap-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  font-size: 0.78rem;
  color: #64748b;
  flex-wrap: wrap;
  gap: 12px;
}
.heatmap-legend {
  display: flex;
  align-items: center;
  gap: 4px;
}
.heatmap-legend-scale {
  display: flex;
  align-items: center;
  gap: 3px;
  margin: 0 4px;
}
.heatmap-legend-cell {
  width: 11px;
  height: 11px;
  border-radius: 2px;
  outline: 1px solid rgba(27, 31, 35, 0.06);
}

/* ツールチップ */
.heatmap-tooltip {
  position: absolute;
  background: #0f172a;
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  z-index: 100;
  transform: translate(-50%, -100%) translateY(-8px);
  opacity: 0;
  transition: opacity 0.15s ease;
}
.heatmap-tooltip.show {
  opacity: 1;
}
.heatmap-tooltip::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 4px 4px 0;
  border-style: solid;
  border-color: #0f172a transparent transparent;
}

/* ==========================================================================
   各資格別 閲覧時間セクション
   ========================================================================== */

.category-times-section {
  margin-bottom: 48px;
}
.section-heading-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.section-heading {
  font-size: 1.4rem;
  font-weight: 800;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}
.category-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}
.category-time-card {
  background: #ffffff;
  border: 1px solid #e7dfd5;
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 4px 16px rgba(45, 55, 48, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.category-time-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(45, 55, 48, 0.08);
}
.cat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.cat-badge-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.cat-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}
.cat-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #1e293b;
  margin: 0;
}
.cat-subtitle {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 2px;
}
.cat-percent-tag {
  background: #f1f5f9;
  color: #475569;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 9999px;
}

.cat-time-display {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}
.cat-time-val {
  font-size: 1.8rem;
  font-weight: 800;
  color: #0f172a;
}
.cat-time-val .unit {
  font-size: 0.9rem;
  font-weight: 600;
  color: #64748b;
  margin-left: 2px;
}
.cat-last-study {
  font-size: 0.78rem;
  color: #8896a6;
}

/* プログレスバー */
.cat-progress-track {
  width: 100%;
  height: 8px;
  background: #f1ede4;
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 20px;
}
.cat-progress-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* カードフッターボタン */
.cat-card-footer {
  border-top: 1px solid #f1ece1;
  padding-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cat-action-btn {
  background: #345d4d !important;
  color: #ffffff !important;
  border: 1px solid #345d4d !important;
  border-radius: 9999px !important;
  padding: 8px 18px !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 3px 8px rgba(52, 93, 77, 0.2) !important;
}
.cat-action-btn:hover {
  background: #254337 !important;
  border-color: #254337 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 5px 12px rgba(52, 93, 77, 0.28) !important;
}

/* ==========================================================================
   クラウド同期 & アカウント認証 (Kakutoku Cloud Auth)
   ========================================================================== */

/* クラウド同期案内バナー（未ログイン時） */
.cloud-sync-banner {
  background: linear-gradient(135deg, #f0fdf4 0%, #e8f5ed 100%);
  border: 1.5px dashed #86efac;
  border-radius: 16px;
  padding: 16px 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: 0 2px 10px rgba(34, 197, 94, 0.06);
}
.sync-banner-content {
  display: flex;
  align-items: center;
  gap: 14px;
}
.sync-banner-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #dcfce7;
  color: #16a34a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.sync-banner-title {
  font-size: 1rem;
  font-weight: 700;
  color: #166534;
  margin: 0 0 3px 0;
}
.sync-banner-desc {
  font-size: 0.82rem;
  color: #4b7a5e;
  margin: 0;
}

/* ログインユーザー情報バー（ログイン時） */
.user-profile-bar {
  background: #ffffff;
  border: 1px solid #e2ddd3;
  border-radius: 16px;
  padding: 14px 22px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  box-shadow: 0 3px 12px rgba(45, 55, 48, 0.04);
}
.user-info-group {
  display: flex;
  align-items: center;
  gap: 14px;
}
.user-avatar-img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #345d4d;
}
.user-avatar-fallback {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #345d4d;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}
.user-name-text {
  font-size: 1rem;
  font-weight: 800;
  color: #1e293b;
  margin: 0;
}
.sync-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #15803d;
  background: #dcfce7;
  padding: 3px 9px;
  border-radius: 9999px;
}

/* 認証ボタン群 */
.btn-auth-login {
  background: #345d4d !important;
  color: #ffffff !important;
  border: 1px solid #345d4d !important;
  border-radius: 9999px !important;
  padding: 9px 20px !important;
  font-size: 0.88rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  box-shadow: 0 3px 10px rgba(52, 93, 77, 0.22) !important;
}
.btn-auth-login:hover {
  background: #254337 !important;
  border-color: #254337 !important;
  transform: translateY(-1px) !important;
}
.btn-auth-logout {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-auth-logout:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* 認証モーダル */
.auth-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.auth-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.auth-modal-dialog {
  background: #ffffff;
  border-radius: 20px;
  width: 100%;
  max-width: 440px;
  padding: 32px 28px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  transform: translateY(16px);
  transition: transform 0.25s ease;
  position: relative;
}
.auth-modal-overlay.active .auth-modal-dialog {
  transform: translateY(0);
}
.auth-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: #f1f5f9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  transition: all 0.2s ease;
}
.auth-modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}
.auth-modal-header {
  text-align: center;
  margin-bottom: 24px;
}
.auth-modal-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #1e293b;
  margin: 0 0 6px 0;
}
.auth-modal-subtitle {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0;
}

/* Googleログインボタン */
.btn-google-login {
  width: 100%;
  background: #ffffff;
  color: #374151;
  border: 1.5px solid #d1d5db;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  margin-bottom: 18px;
}
.btn-google-login:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}
.google-g-icon {
  width: 20px;
  height: 20px;
}

/* モーダル区切り線 */
.modal-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 18px 0;
  color: #94a3b8;
  font-size: 0.8rem;
}
.modal-divider::before,
.modal-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e2e8f0;
}
.modal-divider span {
  padding: 0 10px;
}

/* メールフォーム */
.auth-input-group {
  margin-bottom: 14px;
}
.auth-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 6px;
}
.auth-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  font-size: 0.92rem;
  transition: border-color 0.2s ease;
}
.auth-input:focus {
  outline: none;
  border-color: #345d4d;
  box-shadow: 0 0 0 3px rgba(52, 93, 77, 0.15);
}
.btn-email-submit {
  width: 100%;
  background: #345d4d;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 6px;
}
.btn-email-submit:hover {
  background: #254337;
}

/* モーダルフッター（ゲスト利用案内） */
.auth-modal-note {
  margin-top: 20px;
  font-size: 0.78rem;
  color: #64748b;
  text-align: center;
  line-height: 1.5;
}

/* ==========================================================================
   演習完了画面のボタンスタイル統一（Kakutoku Forest Green）
   ========================================================================== */
#restartWizardBtn,
#retryExamBtn,
#retryFp1ExamBtn,
#retryFp2ExamBtn,
#retryFp3ExamBtn {
  background: #345d4d !important;
  color: #ffffff !important;
  border: 1px solid #345d4d !important;
  border-radius: 9999px !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 12px rgba(52, 93, 77, 0.22) !important;
  transition: all 0.2s ease !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
}
#restartWizardBtn:hover,
#retryExamBtn:hover,
#retryFp1ExamBtn:hover,
#retryFp2ExamBtn:hover,
#retryFp3ExamBtn:hover {
  background: #254337 !important;
  border-color: #254337 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 16px rgba(52, 93, 77, 0.3) !important;
}

/* 過去問（本番年度別模試）へボタン */
a[href*="past-questions.html"].btn,
.card a[href*="past-questions.html"] {
  background: #f7f4ed !important;
  color: #345d4d !important;
  border: 1.5px solid #345d4d !important;
  border-radius: 9999px !important;
  font-weight: 700 !important;
  transition: all 0.2s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  text-decoration: none !important;
}
a[href*="past-questions.html"].btn:hover,
.card a[href*="past-questions.html"]:hover {
  background: #345d4d !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(52, 93, 77, 0.22) !important;
}



