﻿@charset "utf-8";


.ut-heading-icon {
  font-size: 1.3em; /* 通常の文字の1.3倍の大きさに */
  vertical-align: middle; /* 必要に応じて、文字との上下のズレを微調整 */
}

/* PC環境ではスマホ用改行を無効化する */
.viewSp {
  display: none;
}

/* --- ページ全体の共通設定 --- */
html {
  scroll-behavior: smooth;
}

/* 脳トレ広場全体のベースフォント（UD・游ゴシック優先） */
.ut-noutore-container {
  max-width: 1100px; /* 3枚横並び用に全体の横幅を少しゆったり広げています */
  margin: 0 auto;
  padding: 30px 15px;
  font-family: "Yu Gothic Medium", "Yu Gothic", "游ゴシック体", "游ゴシック", "BIZ UDPGothic", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
}

/* --- 1. メインバナーエリア --- */
.ut-noutore-banner-area {
  width: 100%;
  background: radial-gradient(circle at top, #ffffff 0%, #fff1f2 60%, #ffe4e6 100%);
  padding: 50px 20px;
  text-align: center;
  border-bottom: 4px solid #e11d48;
  box-shadow: inset 0 -4px 10px rgba(225, 29, 72, 0.05);
}
.ut-noutore-banner-inner h1 {
  margin: 0;
  font-size: 34px;
  color: #e11d48;
  font-weight: 800;
  line-height: 1.4;
  text-shadow: 1px 1px 0px #ffffff, 2px 2px 4px rgba(0,0,0,0.1);
}
.ut-noutore-banner-inner h1 span {
  display: block;
  font-size: 22px;
  color: #1e293b;
  margin-top: 10px;
  font-weight: bold;
  letter-spacing: 0.05em;
}

/* --- 2. 大見出し（絵文字付き） --- */
.ut-main-heading {
  font-size: 24px;
  color: #1e293b; /* 文字色を読みやすい濃いグレー（ほぼ黒）に変更 */
  font-weight: 700;
  padding: 12px 16px;
  margin-top: 40px;
  margin-bottom: 20px;
  background-color: #f0fdf4; /* 目に優しい極薄のグリーン */
  border-left: 6px solid #10b981; /* アクセントのグリーンの太線 */
  border-radius: 0 6px 6px 0;
  letter-spacing: 0.03em;
}

/* --- 導入文エリアの設定 --- */
.ut-noutore-intro {
  background: transparent;
  border: none;
  border-top: 4px dotted #cbd5e1;
  border-bottom: 4px dotted #cbd5e1;
  border-radius: 0;
  padding: 30px 10px;
  margin-top: 10px;
  margin-bottom: 40px;
  text-align: center;
}

.ut-noutore-intro p {
  font-size: 20px;
  line-height: 1.9;
  color: #334155;
  margin: 0 0 18px 0;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.ut-noutore-intro p:last-child {
  margin-bottom: 0;
}

.ut-noutore-intro strong {
  color: #e11d48;
  font-weight: 800;
  background: linear-gradient(transparent 60%, #ffe4e6 60%);
}

/* PCだけで改行させたいときの設定 */
.viewPc { display: inline; }

/* --- レスポンシブ（スマホ用共通） --- */
@media screen and (max-width: 768px) {
  .ut-noutore-intro {
    padding: 25px 5px;
    margin-bottom: 30px;
    text-align: left;
  }
  .ut-noutore-intro p {
    font-size: 16px;
    line-height: 1.8;
  }
  .viewPc { display: none; }
}

/* --- 3. 目次エリア --- */
.ut-toc-section {
  background: #ffffff;
  border: 3px solid #f1f5f9;
  border-top: 5px solid #1e3a8a;
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 50px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
.ut-toc-box {
  margin-bottom: 25px;
  background: #f8fafc;
  padding: 18px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}
.ut-toc-box:last-child {
  margin-bottom: 0;
}
.ut-toc-title {
  font-size: 18px;
  color: #ffffff;
  background: #1e3a8a;
  margin: -18px -18px 15px -18px;
  padding: 12px 18px;
  border-radius: 7px 7px 0 0;
  font-weight: 800;
  display: flex;
  align-items: center;
}
.ut-toc-title::before {
  content: "◆";
  color: #f59e0b;
  margin-right: 8px;
  font-size: 14px;
}
.ut-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.ut-toc-list-all {
  grid-template-columns: 1fr;
}
.ut-toc-list li a {
  display: block;
  background: linear-gradient(to bottom, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #cbd5e1;
  border-bottom: 3px solid #cbd5e1;
  border-radius: 8px;
  padding: 14px;
  text-align: center;
  color: #1e293b;
  text-decoration: none;
  font-weight: 800;
  font-size: 17px;
  transition: all 0.1s;
}
.ut-toc-list li a:hover {
  background: linear-gradient(to bottom, #e11d48 0%, #be123c 100%);
  color: #ffffff;
  border-color: #be123c;
  border-bottom: 3px solid #9f1239;
  transform: translateY(1px);
}

/* --- 4. クイズカード（基本設定） --- */
.ut-quiz-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 均等に3分割 */
  gap: 24px; /* カード同士の間隔 */
  margin-bottom: 60px;
  align-items: start; /* 高さがずれても綺麗に上揃え */
}

.ut-quiz-card {
  background: #ffffff;
  border: 3px solid #cbd5e1;
  border-radius: 16px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%; /* カードの高さを揃える */
  box-sizing: border-box;
  transition: box-shadow 0.2s, transform 0.2s;
}

.ut-quiz-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.ut-quiz-header {
  background: linear-gradient(to bottom, #f8fafc 0%, #f1f5f9 100%);
  padding: 20px 18px;
  border-bottom: 3px solid #cbd5e1;
}

.ut-quiz-number {
  display: inline-block;
  background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
  color: #fff;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 15px;
  margin-bottom: 8px;
  box-shadow: 0 2px 4px rgba(190, 18, 60, 0.2);
}

.ut-quiz-title {
  font-size: 22px;
  color: #0f172a;
  margin: 0 0 12px 0;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.4;
}

.ut-quiz-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ut-tag-ability, .ut-tag-level {
  font-size: 14px;
  padding: 4px 10px;
  border-radius: 6px;
  background: #e2e8f0;
  color: #334155;
  font-weight: bold;
}

.ut-tag-ability {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

/* 問題本文エリア */
.ut-quiz-body {
  padding: 24px 18px;
  background: #ffffff;
  flex-grow: 1;
}

/* 読みやすいフォント・行間設定 */
.ut-quiz-text {
  font-family: "Yu Gothic Medium", "Yu Gothic", "游ゴシック体", "游ゴシック", "BIZ UDPGothic", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  font-size: 18px;
  line-height: 1.8;
  color: #1e293b;
  margin-bottom: 0;
  font-weight: 500;
  letter-spacing: 0.04em;
}

/* 答え合わせアコーディオン */
.ut-quiz-accordion {
  border-top: 3px solid #cbd5e1;
  margin-top: auto;
}

.ut-details {
  border: none;
}

.ut-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 18px;
  background: linear-gradient(to bottom, #2563eb 0%, #1d4ed8 100%);
  cursor: pointer;
  list-style: none;
  font-weight: 800;
  font-size: 18px;
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
  transition: opacity 0.2s;
}

.ut-summary::-webkit-details-marker {
  display: none;
}

.ut-summary:hover {
  opacity: 0.9;
}

.ut-summary-icon {
  font-size: 20px;
  color: #ffffff;
  font-weight: bold;
}

.ut-details[open] .ut-summary {
  background: linear-gradient(to bottom, #1e3a8a 0%, #172554 100%);
}

/* 内部の解説部分 */
.ut-answer-content {
  padding: 24px 18px;
  background: #fffbeb;
  animation: fadeIn 0.35s ease-out;
}

.ut-answer-badge {
  display: inline-block;
  background: linear-gradient(135deg, #ca8a04 0%, #854d0e 100%);
  color: white;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ut-answer-main {
  font-size: 24px;
  font-weight: 800;
  color: #854d0e;
  margin: 0 0 15px 0;
  line-height: 1.6;
}

.ut-answer-divider {
  border: 0;
  border-top: 2px dashed #b45309;
  margin: 15px 0;
}

.ut-answer-explain {
  font-size: 17px;
  line-height: 1.7;
  color: #1e293b;
  font-weight: 700;
}

@keyframes fadeIn {
  0% { opacity: 0; transform: translateY(-8px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* 難易度バッジの色分け */
.ut-tag-level {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
}

.ut-level-easy {
  background-color: #EAF3DE;
  color: #3B6D11;
}

.ut-level-normal {
  background-color: #FAEEDA;
  color: #854F0B;
}

.ut-level-hard {
  background-color: #FCEBEB;
  color: #A32D2D;
}


/* ========================================================
   ★ レスポンシブ対応（画面幅に応じた最適化）
========================================================= */

@media screen and (max-width: 950px) {
  .ut-quiz-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media screen and (max-width: 768px) {
  .ut-quiz-grid {
    grid-template-columns: 1fr !important;
    gap: 25px;
    padding: 0 5px;
  }
  
  .ut-quiz-card {
    width: 100% !important;
    max-width: 100% !important;
  }

  .ut-noutore-banner-area {
    padding: 35px 15px;
  }
  .ut-noutore-banner-inner h1 {
    font-size: 26px;
  }
  .ut-noutore-banner-inner h1 span {
    font-size: 16px;
  }

  .ut-main-heading {
    font-size: 19px;
    padding: 10px 12px;
  }

  .ut-toc-list {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .ut-toc-list li a {
    padding: 16px;
    font-size: 18px;
  }
  .ut-quiz-title {
    font-size: 22px;
  }
  .ut-quiz-text {
    font-size: 18px;
  }
  .ut-answer-main {
    font-size: 24px;
  }
  .ut-answer-explain {
    font-size: 17px;
  }

  .viewSp {
    display: inline;
  }
}

/* ==========================================================================
   ??新・ゼロから作るシンプルアコーディオン制御
   ========================================================================== */

/* 4?9問目の共通初期設定：最初は完全に非表示 */
.ut-quiz-grid .ut-quiz-card.ut-hide-quiz {
  display: none !important;
}

/* ??【超重要】閉じている時、4?6問目の「ヘッダーだけ」を無理やり表に出す設定 */
.ut-quiz-grid:not(.is-open) #quiz-thisweek-04,
.ut-quiz-grid:not(.is-open) #quiz-thisweek-05,
.ut-quiz-grid:not(.is-open) #quiz-thisweek-06 {
  display: flex !important;      /* 強制表示 */
  height: 120px !important;     /* ヘッダーの高さでスパッと切る */
  overflow: hidden !important;   /* はみ出た中身は絶対に隠す */
  position: relative !important;
}

/* 4?6問目の下に敷く、綺麗な白グラデーション（これでカードが途中で消え込みます） */
.ut-quiz-grid:not(.is-open) #quiz-thisweek-04::after,
.ut-quiz-grid:not(.is-open) #quiz-thisweek-05::after,
.ut-quiz-grid:not(.is-open) #quiz-thisweek-06::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.95) 100%);
  pointer-events: none;
  z-index: 2;
}

/* ??ボタンが押された時（is-openがついた時）の全解放命令 */
.ut-quiz-grid.is-open .ut-quiz-card.ut-hide-quiz {
  display: flex !important;     /* すべてのカードを正しく表示 */
  height: 100% !important;      /* 高さを揃える元のルールに戻す */
  overflow: visible !important;
}

/* ==========================================================================
   ? 元のお気に入りボタンデザイン（配置を完全に独立させて安定化）
   ========================================================================== */
.ut-trigger-btn-wrap {
  text-align: center;
  margin-top: -20px; /* チラ見えしているカードのすぐ下に潜り込ませる調整 */
  margin-bottom: 40px;
  position: relative;
  z-index: 20;       /* 何があっても一番上に表示 */
}

.ut-custom-more-btn {
  display: inline-block;
  cursor: pointer;
  padding: 16px 50px;
  background: linear-gradient(to bottom, #ffffff 0%, #fffafb 100%);
  border: 1px solid #fca5a5;
  border-radius: 50px;
  font-weight: 700;
  font-size: 19px;
  color: #e11d48;
  box-shadow: 0 6px 16px rgba(225, 29, 72, 0.15);
  transition: all 0.2s ease;
  outline: none;
}
.ut-custom-more-btn:hover {
  background: #fff1f2;
  border-color: #f87171;
  transform: translateY(-1px);
}

/* 開いた（閉じる）ボタンの時の落ち着いたグレーデザイン */
.ut-custom-more-btn.is-active {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #64748b;
  box-shadow: none;
}