
/* クイズのすべてを管理する親要素 */
.quiz_area{
    position: relative;
}

.quiz_meta{
    display: flex;
    justify-content: space-between;
    align-items: center; /* 縦方向の中央揃え */
}

/* 回答後に上に被せてタップできなくするための要素（デフォルト非表示、回答後に一時的に表示） */
.quiz_area .quiz_area_bg{
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    right: 0;
    left: 0;
    z-index: 999;
    background: rgba(0, 0, 0, 0.3);
    display: none;
    color: #FFF;
    text-align: center;
}

.quiz_set {
    position: relative;
}

/* 画面に〇、×を表示するための要素（デフォルト非表示、回答後に一時的に表示） */
.quiz_area .quiz_area_icon{
    position: absolute;
    box-sizing: border-box;
    top: 85%;
    left: 50%;
    z-index: 9999;
    transform: translate(-50%, -50%);
    color: red;
    display: none;
    font-size: 8em;
    font-weight: bold;
    -webkit-text-stroke: 4px #FFF;
    text-stroke: 4px #FFF;
}

/* .trueまたは.falseのクラスが付与されたら表示するものとみなす */
.quiz_area .quiz_area_icon.true, .quiz_area .quiz_area_icon.false{
    display: block;
}

/* .trueは正解（〇を表示） */
.quiz_area .quiz_area_icon.true:before{
    content: '\f058';
    font-weight: 300;
    font-family: "Font Awesome 5 Free";
    color: green;
    opacity: 0.4;
}
/* .falseは不正解（×を表示） */
.quiz_area .quiz_area_icon.false:before{
    content: '❌';
    font-weight: 100;
    color: red;
    opacity: 0.2;
}

.quiz_question{
    position: relative;
}

.quiz_question.true::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: green;
    opacity: 0.1;
    z-index: 1;
  }
.quiz_question.false::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: pink;
    opacity: 0.1;
    z-index: 1;
  }

/* 現在の問題数を表示 */
.quiz_area .quiz_no{
    font-weight: bold;
}

/* 問題文 */
.quiz_area .quiz_question {
    box-sizing: border-box;
    padding: 15px;
    border: 4px solid #CCC;
    font-weight: bold;
    padding: 10px 2px;
}

/* 回答後の結果 */
/* 結果文言 */
.quiz_area .quiz_result  {
    font-size: 1.2em;
    font-weight: bold;
}

/* ボタン共通スタイル（結果画面用） */
.quiz_area .quiz_result button {
    border-radius: 10px;
    padding: 10px 20px;
    white-space: nowrap; /* ← これを追加 */
}

/* 回答後の結果は初期非表示 */
.quiz_area .quiz_result{
    display: none;
    text-align: center;
}

/* 以下クイズの選択肢のデザイン */
body .quiz_area .quiz_ans_area div .single{
    margin: 10px 0 0 0 !important;
    padding: 0;
    display: block;
}

.quiz_area .quiz_ans_area div.selected{
    background-color: #bcbcbc;
}

/* 問題画像 */
#qa_img{
    position: relative;
    width: 100%;
    /* max-height: 500px; */
    display: block;
    margin: auto;
}

@media screen and (max-width: 480px) {
    #qa_img {
        width: auto;
        max-height: 400px;
      }
}

/* Radio button */
.radiodiv, .ai_learn_wrapper{
    text-align: center;
}

.radiodiv p, .ai_learn_wrapper p{
    margin: 10px 0; /*SWELL向けスタイル調整*/
}

.radiodiv input, .ai_learn_wrapper input{
    background-color: white !important; /*SWELL向けスタイル調整*/
}

.ai_parameter {
    display: flex; /* 横並び */
    flex-wrap: wrap; /* 行を折り返す */
    justify-content: center; /* 中央揃え */
    gap: 20px; /* 要素間の間隔 */
    margin: 20px auto;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 10px;
    background-color: #f9f9f9;
    width: fit-content;
}


.radio-inline__input {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
}

.radio-inline__label {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin-right: 18px;
    border-radius: 3px;
    transition: all .2s;
    font-weight: bold;
    font-size: large;
}

.radio-inline__input:checked + .radio-inline__label {
    background: #B54A4A;
    color: #fff;
    text-shadow: 0 0 1px rgba(0,0,0,.7);
}

.radio-inline__input:focus + .radio-inline__label {
    outline-color: #4D90FE;
    outline-offset: -2px;
    outline-style: auto;
    outline-width: 5px;
}

/* START ボタン*/
.quiz_area button {
    display: inline-block;
    width: 200px;
    /*height: 54px;*/
    text-align: center;
    text-decoration: none;
    /* line-height: 54px; */
    outline: none;
    position: relative;
    z-index: 2;
    background-color: #333 !important;/*SWELL向けスタイル調整*/
    border: 1px solid #fff !important;/*SWELL向けスタイル調整*/
    color: #fff !important;/*SWELL向けスタイル調整*/
    line-height: 50px;
    font-weight: bold;
    /* font-size: x-large; */
}
.quiz_area button::before,
.quiz_area button::after {
    position: absolute;
    z-index: -1;
    display: block;
    content: '';
}
.quiz_area button,
.quiz_area button::before,
.quiz_area button::after {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    -webkit-transition: all .3s;
    transition: all .3s;
}

.quiz_area button.tweet-button a{
  color: #FFF;
}
.quiz_area button:hover, .quiz_area button.tweet-button a:hover, .quiz_area button.tweet-button:hover a {
    background-color: #fff;
    border-color: #59b1eb;
    color: #59b1eb;
}

.quiz_area button.tweet-button  {
    width: 400px;
}

/* ホバー時のスタイル */
.quiz_area button:hover {
    background-color: #555 !important;
}

/* quiz_skipボタン用のスタイル */
.quiz_area button.quiz_skip {
    background-color: #f0f0f0 !important;
    color: #333 !important;
    border: none !important;
    margin: 0 10px;
    font-size: 14px;
    cursor: pointer;
    transition: all .3s;
}

/* quiz_skipボタンのホバー時のスタイル */
.quiz_area button.quiz_skip:hover {
    background-color: #e0e0e0 !important;
}

/* モバイルビューの時のquiz_skipボタンのスタイル */
@media screen and (max-width: 600px) {
    .quiz_area button.quiz_skip {
        margin-top: 10px;
    }
}

/*Selectボタン*/
.selectdiv label{
  box-shadow:0 3px 5px rgba(0,0,0,.2);
  padding:15px;
  background:white;
  width:260px;
  display:inline-block;
  position:relative;
  margin-left:50px;
}

.kaisai_area select{
  border:none;
  outline:none;
  display: inline-block;
  -webkit-appearance:none;
  -moz-appearance:none;
  appearance:none;
  cursor:pointer;
  font-size:16px;
  color:#909090 !important;/*SWELL向けスタイル調整*/
  border-radius:0;
  width:275px;
  z-index:2;
  background:transparent !important;/*SWELL向けスタイル調整*/
  border-color: transparent !important;/*SWELL向けスタイル調整*/
}

.selectdiv label:after{
  content:"\25bc";
  font-size:16px;
  color:white;
  background:#f3a1a1;
  width:42px;
  text-align:center;
  line-height:3.2em;
  top:0;
  right:0;
  bottom:0;
  position:absolute;
  pointer-events:none;
}

option{
  border-bottom:1px solid #eaeaea;
  border-left:3px solid white;
  appearance:none;
}

option:hover{
  background-color:white;
  border-left:3px solid #f3a1a1;

}

.selectdiv {
    text-align: center;
}

.quiz_next_align{
    margin-top: 1em;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@media screen and (max-width: 480px) {
    .quiz_next_align {
        flex-direction: column-reverse;
      }
}

.corrected{
    background-color: #28BA00 !important;
}




label.ck-btn span {
  font-size: 1.2em ;
}

label.ck-btn{
    display: block;
    margin: auto 5px;
}

.quiz_area label input[type="checkbox"]{
    display: none;
}

.quiz_area label input[type="checkbox"] ~ i.far.fa-square{
    color: #c8c8c8;    display: inline;
}
.quiz_area label input[type="checkbox"] ~ i.far.fa-check-square{
    display: none;
}
.quiz_area label input[type="checkbox"]:checked ~ i.far.fa-square{
    display: none;
}
.quiz_area label input[type="checkbox"]:checked ~ i.far.fa-check-square{
    color: #7AA3CC;    display: inline;
}
.quiz_area label:hover input[type="checkbox"] ~ i.fa {
color: #7AA3CC;
}

/*問題パラメータ*/
.btn-group{
    background: #f5f5f5;
}
/*チェックボックス*/
.btn-group{
    text-align: center;
    border: solid 1px #000;
    width: 90%;
    margin: auto;
    font-size: small;
    padding: 20px;
}

#quiz_parameter{
    text-align: center;
}

#quiz_parameter:hover{
    font-weight: bold;
    color: #7AA3CC;
}

.parameter{
    margin-top: 1em;
}

.quiz_ans_area {
    display: flex;
    flex-wrap: nowrap; /* 横方向には折り返さない */
    justify-content: space-evenly; /* 中央揃え */
    align-items: center; /* 縦方向に中央揃え */
  }

  .answer_choice {
    flex: 1; /* 余白を均等に分配 */
    text-align: center; /* 中央揃え */
    margin: 0 5px; /* 要素同士の余白を指定 */
  }

.quiz_ans_area div select {
    width: 100%; /* 横幅を100%に */
}

.quiz_ans_area div.single{
    width: 20%;
    height: 50px;
    border: none;
    border-radius: 10px;
    background-color: #3498db;
    text-align: center;
    margin-top: 20px;
    font-size: 30px;
    margin-right: 10px;
    color: #fff;
}
/* モバイル用のスタイル */
@media (max-width: 767px) {
    .quiz_ans_area div.single{
        margin-right: 2px;

    }
  }

.post_content div>:first-child.single { /*SWELL対応*/
    margin-top: 20px !important;
}

.quiz_ans_area div.single:hover{
  background-color: #2980b9;
  font-size: 30px;
  transition-duration: 0.3s;
}

#box_btn{
    display: flex;
    flex-wrap: wrap;
    border: solid 0.5px #CCC;
    background-color: #FFF;
    padding: 10px;
}

#box_btn-rate{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
    border: solid 0.5px #CCC;
    background-color: #FFF;
    border-radius: 10px;
    padding: 12px;
}

#qa_hoki{
    display: flex;
    flex-wrap: wrap;
}

#review_rate{
  /*height: 20px;*/
  width: 30%;
}

.parameter-img{
    height: 15px;
}

.pill-check-group {
    display: contents;
}

.pill-check {
    position: relative;
    display: inline-flex;
    cursor: pointer;
    min-width: 140px;
    width: 100%;
}

.pill-check input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.pill-check__card {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid #d6d9e0;
    border-radius: 14px;
    background: #f8fafc;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.05);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, transform 0.15s ease;
    width: 100%;
    text-align: center;
}

.pill-check__dot {
    display: none;
}

.pill-check__text {
    font-weight: 700;
    color: #0f172a;
    font-size: 14px;
    letter-spacing: 0.01em;
}

.pill-check input[type="checkbox"]:checked + .pill-check__card {
    border-color: #2563eb;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.08);
    transform: translateY(-1px);
    background: linear-gradient(120deg, #eef4ff, #f8fbff);
}

.pill-check img.parameter-img {
    height: 16px;
}

.ad_cst{
    display: none;
}


.modal{
    display: none;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999;
}
.modal__bg{
    background: rgba(0,0,0,0.8);
    height: 100vh;
    position: absolute;
    width: 100%;
    z-index: 999;
}
.modal__content{
    left: 50%;
    padding: 40px;
    position: absolute;
    top: 50%;
    transform: translate(-50%,-50%);
    width: 100%;
    padding: 0 0 0 0;
    z-index: 999;
}

.js-modal-close-block{
    display: none;
    z-index: 9999;
}

.countdown-timer-block a, .js-modal-close-block a{
    color: white;
    font-size: x-large;
}

.countdown-timer-block, .js-modal-close-block{
    position: fixed;
    left: 85%;
}

.js-modal-link-block{
    border: #89c3eb 1px solid;
    border-radius: 20px;
    background-color: #89c3eb;
    width: 50%;
    text-align: center;
    margin: 10px auto;
}
.js-modal-link-block a{
    text-decoration: initial;
    color: white;
}

span.micro-copy-ads::after {
    content: '';
    height: 0;
    width: 0;
    position: absolute;
    border-left: 7px solid #B54A4A;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    padding: -10px;
    margin: 20px 10px 10px 5px;
}

span.micro-copy-ads {
    font-size: 14px;
    background: #B54A4A;
    padding: 7px;
    color: white;
    margin-right: 10px;
    border-radius: 3px;
}

.search_bar{
    display: flex; /*アイコン、テキストボックスを調整する*/
    align-items: center; /*アイコン、テキストボックスを縦方向の中心に*/
    justify-content: center; /*アイコン、テキストボックスを横方向の中心に*/
    height: 50px;
    width: 100%;
    background-color: #ddd;
}

.search_icon{ /*アイコンに一定のスペースを設ける*/
    height: 15px;
    width: 15px;
    padding: 5px 5px;
}

#parameter-2{
    font-size: 16px;
    width: 100%; /*flexの中で100%広げる*/
    background-color: #ddd !important;
    border: none; /*枠線非表示*/
    outline: none; /*フォーカス時の枠線非表示*/
    box-sizing: border-box; /*横幅の解釈をpadding, borderまでとする*/
}


/* v6.0 追加 */
.option-white-box
{
    display: flex;
    flex-wrap: wrap;
    border: solid 0.5px #CCC;
    background-color: #FFF;
    padding: 10px;
    visibility: visible;
}

.para-box{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}


/* v6.3 追加 */
span.micro-copy-ads::after {
    content: '';
    height: 0;
    width: 0;
    position: absolute;
    border-left: 7px solid #000;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    padding: -10px;
    margin: 10px 10px 10px 5px;
}

span.micro-copy-ads {
    display: none;
    font-size: 14px;
    background: #000;
    padding: 7px;
    color: white;
    margin-right: 10px;
    border-radius: 3px;
}

.quiz_comment{
    margin-top: 5%;
}



.container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.flex-items{
    margin-bottom: 20px;
}

.center{
    text-align: center;
}

.quiz_area .quiz_ans_area div select.selected{
    background-color: #bcbcbc;
}

.quiz_meta_right {
    font-size: small;
}

.user_checkbox{
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
}

.check-later {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid #d8dde8;
    border-radius: 14px;
    background: #f8fafc;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
    font-weight: 700;
    color: #111827;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.check-later:hover {
    border-color: #b9c4d7;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.09);
    background: #f1f5f9;
}

.check-later input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #2563eb;
    cursor: pointer;
}

.check-later-text {
    font-size: 16px;
    line-height: 1.4;
}

@media (max-width: 640px) {
  .user_checkbox {
    justify-content: center;
  }

  .check-later {
    width: 100%;
    justify-content: center;
    padding: 12px 14px;
  }

  .check-later-text {
    font-size: 15px;
  }
}

div#google-link-box{
    max-height: 500px;
    overflow-y: scroll;
    display: none;
}

div#google-link-box table td{
    border: none;
}

div#google-link-box input#gsc-i-id1 {
    background: #FFFF;
}

.incorrect{
    color: #D32F2F;
}

.theChampGoogleBackground{
    width: 220px;
    border-radius: 5px;
    border-color: black;
    border-width: 2px;
  }

  ul.the_champ_login_ul li i ss.theChampGoogleLoginSvg{
    background-size: unset !important;
  }

.tab-buttons {
    position: relative;
    display: flex;
    justify-content: space-around; /* タブボタン間のスペースを均等に配分 */
    width: 100%; /* コンテナの幅を画面幅いっぱいに拡張 */
    box-sizing: border-box;
    background-color: #f8f9fa; /* 軽い背景色でコンテナを強調 */
    padding: 10px 0; /* 上下のパディングでタブ内のスペースを確保 */
    border-bottom: 2px solid #dee2e6; /* コンテナの下部に境界線を追加 */
    margin-bottom: 60px;
}

.tab-button {
    flex-grow: 1; /* タブボタンが利用可能なスペースを均等に分け合う */
    text-align: center; /* テキストを中央揃えに */
    padding: 10px 0; /* タッチしやすいようにタブボタンのパディングを調整 */
    font-size: 16px; /* 文字の大きさを大きくして読みやすく */
    font-weight: 500; /* フォントの太さを中程度に設定 */
    color: #495057; /* タブボタンのテキストカラー */
    transition: all 0.3s ease; /* ホバーやアクティブ状態へのスムーズな遷移 */
    cursor: pointer;
    border: none; /* 不要なボーダーを削除 */
    background-color: transparent; /* ボタンの背景を透明に */
}

.tab-button:hover, .tab-button.active {
    color: #007bff; /* ホバーまたはアクティブ状態でのテキストカラー */
    background-color: #e9ecef; /* ホバーまたはアクティブ状態での背景色 */
}

.tab-indicator {
    position: absolute;
    bottom: -2px; /* インジケータをタブボタンの下に配置するための調整 */
    height: 2px;
    background-color: #007bff; /* インジケータの色 */
    transition: all 0.3s ease-in-out; /* インジケータの移動と幅の変更にアニメーションを適用 */
}

/* モーダル背景 */
.modal-background {
    display: none; /* 初期状態では非表示 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* 背景を半透明の黒に設定 */
    z-index: 1000;
}

/* モーダルの表示設定 */
.modal {
    display: none; /* 初期状態では非表示 */
    position: fixed;
    z-index: 1100; /* 背景よりも上に表示 */
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    width: 100%;
    max-width: 900px;
    max-height: 700px;
}

/* モーダルが表示されているとき */
.modal.show, .modal-background.show {
    display: block;
}

/* 閉じるボタンのスタイル */
.modal .close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 20px;
    cursor: pointer;
}

/* モバイル表示時に .login-right を非表示にする */
@media (max-width: 768px) {
    .login-right {
        display: none;
    }
}

/* ログインボタンの見た目を修正 */
#openLoginModal.login-button {
    background-color: #f5f5f5; /* 目立たない灰色 */
    color: #666; /* テキストカラーをより控えめに */
    padding: 3px 8px; /* ボタンをさらに小さく */
    font-size: 12px; /* テキストサイズを小さく */
    border: 1px solid #ccc; /* 目立たない薄い境界線 */
    border-radius: 5px; /* 角を少し丸くする */
    float: right; /* 右端に寄せる */
    margin-right: 10px; /* 右に少し余白を入れる */
    margin-top: 5px; /* ボタンを少し上に */
    box-shadow: none; /* ボックスシャドウを無効にする */
    width: 200px;
    height: 40px;
    line-height: normal;
}

/* ボタンのホバー時のスタイル */
#openLoginModal.login-button:hover {
    background-color: #ddd; /* ホバー時の色を薄い灰色に */
    color: #333; /* ホバー時のテキスト色 */
}

/* モーダルの背景 */
.quizCache-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* モーダルの内容ボックス */
.quizCache-modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* テキストのスタイル */
.quizCache-modal-text {
    font-size: 18px;
    margin-bottom: 20px;
    color: #333;
}

/* ボタンの基本スタイル */
.quizCache-button {
    margin: 0 10px;
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 「はい」ボタン */
.quizCache-button-yes {
    color: #fff;
    background-color: #007BFF;
}

.quizCache-button-yes:hover {
    background-color: #0056b3;
}

/* 「いいえ」ボタン */
.quizCache-button-no {
    color: #fff;
    background-color: #6c757d;
}

.quizCache-button-no:hover {
    background-color: #5a6268;
}

/* 無効化されたチェックボックスの隣接ラベル要素をグレーアウト */
.ck-btn input:disabled + i,
.ck-btn input:disabled + i + span {
    color: gray; /* ラベルの色をグレーに */
}

/* 全体のラベルをグレーアウト */
.ck-btn input:disabled ~ span {
    color: gray;
    pointer-events: none; /* ユーザー操作を無効に */
}


/* タグ全体のコンテナ */
.glossary-tags {
    margin-top: 15px;
    padding: 10px;
    display: flex;
    flex-wrap: wrap; /* 折り返し表示 */
    gap: 10px; /* タグ間の余白 */
    justify-content: center; /* 中央揃え */
}

/* 各タグのスタイル */
.glossary-tags a.toolchip {
    display: inline-block;
    background-color: #ffffff; /* 白背景 */
    color: #0073aa; /* Instagram風のブルーカラー */
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 6px 12px;
    border: 2px solid #0073aa; /* 枠線 */
    border-radius: 30px; /* Instagram風の丸み */
    transition: background-color 0.3s, transform 0.2s;
    position: relative; /* ツールチップ表示に必要 */
    cursor: pointer;
}

/* ホバー時のエフェクト */
.glossary-tags a.toolchip:hover {
    background-color: #0073aa; /* ホバー時にブルー背景 */
    color: #ffffff; /* ホバー時に白文字 */
    transform: scale(1.05); /* 少し拡大 */
    z-index: 1000; /* ツールチップを最前面に表示 */
}

/* ツールチップのスタイル */
.toolchiptext {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: calc(100% + 10px); /* タグの下に表示 */
    left: 50%;
    transform: translateX(-50%);
    background-color: #333; /* 黒い背景 */
    color: #fff; /* 白文字 */
    text-align: center;
    padding: 10px;
    border-radius: 5px;
    font-size: 12px;
    line-height: 1.4;
    z-index: 1000; /* ツールチップを最前面に表示 */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* 影の追加 */
    white-space: normal; /* 折り返しを許可 */
    width: 220px; /* 最大幅 */
    transition: visibility 0.2s, opacity 0.2s;
}

/* ツールチップの矢印 */
.toolchiptext::after {
    content: '';
    position: absolute;
    bottom: 100%; /* ツールチップの上部に矢印を配置 */
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: transparent transparent #333 transparent; /* 矢印の色をツールチップ背景に合わせる */
}

/* タグのホバー時にツールチップを表示 */
.glossary-tags a.toolchip:hover .toolchiptext {
    visibility: visible;
    opacity: 1;
}

/* モバイル対応 */
@media screen and (max-width: 768px) {
    .toolchiptext {
        width: 180px; /* ツールチップの幅を狭く */
        font-size: 11px; /* フォントサイズを小さく */
    }
}

/* ============================= */
/* Memo Section & Ask Charlie Button Styles */
/* ============================= */

/* メモセクション全体の余白 */
.memo-section {
  margin-top: 20px;
  margin-bottom: 30px;
}

.memo-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07);
}

.memo-header .memo-toggle {
  display: flex;
  margin-left: auto;
  gap: 12px; /* タブ間のスペース */
}

.memo-toggle .toggle-btn {
  cursor: pointer;
  position: relative;
  font-size: 12px;
  padding: 2px 6px;
  background: none;
  color: #555;
  border: none;
  margin-left: 8px;
}

.memo-toggle .toggle-btn::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: #333;
  transition: width 0.3s ease;
}

.memo-toggle .toggle-btn.active {
  color: #333;
}
.memo-toggle .toggle-btn.active::after {
  width: 100%;
}

.memo-toggle .toggle-btn:hover {
  color: #333;
}

/* メモラベルのフォントと余白 */
.memo-label {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

/* Ask チャーリー ボタン全体 */
.ask-charlie-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 0 16px 0 42px;
  height: 40px;
  border: none;
  border-radius: 20px;
  background: linear-gradient(135deg, #6b8bff 0%, #7c3aed 100%);
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 10px 22px rgba(124, 58, 237, 0.25);
}

.ask-charlie-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(107, 139, 255, 0.3);
}

.ask-charlie-btn::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background-image: url("../../images/icon/ai-star.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

/* ボタンテキスト（グラデーションカラー） */
.ask-charlie-btn .btn-text {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.ask-charlie-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  flex-wrap: wrap;
}

.ai-auto-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #334155;
  cursor: pointer;
  user-select: none;
  font-weight: 600;
}

.ai-auto-toggle input {
  display: none;
}

.ai-auto-switch {
  position: relative;
  width: 42px;
  height: 22px;
  border-radius: 999px;
  background: #e2e8f0;
  box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.12);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.ai-auto-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25);
  transition: transform 0.2s ease;
}

.ai-auto-toggle input:checked + .ai-auto-switch {
  background: linear-gradient(90deg, #6b8bff 0%, #7c3aed 100%);
  box-shadow: 0 4px 12px rgba(107, 139, 255, 0.35);
}

.ai-auto-toggle input:checked + .ai-auto-switch .ai-auto-knob {
  transform: translateX(20px);
}

.ai-auto-text {
  font-size: 12px;
  color: #475569;
}

.ai-auto-status {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 9999px;
  background: #eef2ff;
  color: #312e81;
  border: 1px solid #e0e7ff;
  font-weight: 700;
}

/* テキストエリアのスタイル調整 */
.memo-section textarea#memo {
  width: 100%;
  min-height: 80px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 14px;
  color: #1f2937;
  resize: vertical;
  transition: border-color 0.2s ease;
}

.memo-section textarea#memo:focus {
  outline: none;
  border-color: #4a90e2;
}

/* 文字数カウンター */
.char-counter {
  text-align: right;
  font-size: 13px;
  color: #6b7280;
  margin-top: 4px;
}

@media (max-width: 640px) {
  .memo-section {
    margin-top: 14px;
    margin-bottom: 18px;
  }

  .memo-header {
    padding: 10px 12px;
    gap: 8px;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
  }

  .memo-label {
    font-size: 15px;
  }

  .memo-header .memo-toggle {
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
    gap: 10px;
  }

  .memo-toggle .toggle-btn {
    font-size: 12px;
    padding: 2px 4px;
    margin-left: 0;
  }

  .ask-charlie-actions {
    width: 100%;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: 14px;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
  }

  .ask-charlie-btn {
    height: 36px;
    padding: 0 12px 0 36px;
    font-size: 13px;
  }

  .ask-charlie-btn::before {
    width: 18px;
    height: 18px;
    left: 8px;
  }

  .ai-auto-text,
  .ai-auto-status {
    font-size: 11px;
  }

  .memo-section textarea#memo {
    min-height: 120px;
    font-size: 15px;
  }

  .char-counter {
    font-size: 12px;
    margin-top: 6px;
  }
}


/* ============================= */


/* CSS for quiz restart buttons with tooltips */

.quiz_result_title {
  font-size: 2rem;
  font-weight: 800;
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(90deg, #4a90e2, #9013fe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 50px;
  position: relative;
  display: inline-block;
}

.quiz_result_title::after {
  content: '';
  position: absolute;
  width: 60%;
  height: 3px;
  background: linear-gradient(90deg, rgba(74,144,226,0.6), rgba(144,19,254,0.6));
  bottom: -6px;
  left: 0;
  border-radius: 2px;
}

/* tooltip for wrong-answer retry button */
button.quiz_restart_wrong_answer,
button.quiz_restart_same {
  position: relative; /* establish positioning context */
}

/* common tooltip (speech bubble) styles */
button.quiz_restart_wrong_answer::after,
button.quiz_restart_same::after {
  content: attr(data-tooltip);
  position: absolute;
  white-space: nowrap;
  background: #333; /* solid dark grey to match button style */
  color: #fff;
  padding: 0px 12px; /* slightly larger padding for readability */
  border-radius: 8px;
  font-size: 12px; /* increase font size */
  opacity: 0;
  pointer-events: none;
  z-index: 1000;
  bottom: 110%; /* move a bit higher to avoid overlap */
  left: 50%;
  transform: translateX(-50%);
}

/* arrow of speech bubble */
button.quiz_restart_wrong_answer::before,
button.quiz_restart_same::before {
  content: "";
  position: absolute;
  border-width: 10px;
  border-style: solid;
  border-color: #333 transparent transparent transparent; /* match bubble color */
  opacity: 0;
  pointer-events: none;
  z-index: 1000;
  bottom: 85%; /* align with bubble */
  left: 50%;
  transform: translateX(-50%);
}

/* show tooltip on hover */
button.quiz_restart_wrong_answer:hover::after,
button.quiz_restart_wrong_answer:hover::before,
button.quiz_restart_same:hover::after,
button.quiz_restart_same:hover::before {
  opacity: 1;
}

.copy-tooltip {
  position: absolute;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.4;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 2000;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.copy-tooltip.show {
  opacity: 1;
  transform: translateY(0);
}

.quiz_area {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
}

.tab-buttons {
  width: 100%;
  gap: 8px;
}

.tab-button {
  padding: 12px 14px;
  border-radius: 12px;
  min-height: 42px;
  font-weight: 700;
}

.radiodiv .radio-inline__label,
.ai_learn_wrapper .radio-inline__label {
  padding: 10px 14px;
  min-width: 92px;
  justify-content: center;
}

.quiz_area .radio-inline__label {
  border-radius: 10px;
}

/* 分野別 */
.category-group.option-white-box {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px;
  background: #fafbff;
}

[hidden] {
  display: none !important;
}

/* 試験回選択 */
#kaisai_options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  width: 100%;
}

#kaisai_options .option-white-box {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px;
}

/* パラメータ行 */
.btn-group {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px 12px;
}

.btn-group label {
  width: 100%;
  margin: 0;
}

/* 難易度・頻度 */
#box_btn-rate {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  align-items: stretch;
  width: 100%;
}

.pill-check__card {
  box-sizing: border-box;
}

@media (max-width: 640px) {
  #box_btn-rate {
    grid-template-columns: 1fr;
  }

  .pill-check__card {
    justify-content: flex-start;
    text-align: left;
  }
}

.ai_parameter {
  justify-content: flex-start;
  gap: 10px;
}

@media (max-width: 640px) {
  .quiz_area {
    padding: 16px 12px;
  }

  .quiz_no {
    font-size: 18px;
    margin-bottom: 6px;
  }

  .quiz_meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .quiz_meta_left {
    font-size: 14px;
    line-height: 1.6;
  }

  .quiz_meta_right {
    width: 100%;
    font-size: 12px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 4px 8px;
  }

  .quiz_question {
    font-size: 15px;
    line-height: 1.6;
  }
}

.keyword .search_bar {
  height: auto;
  justify-content: flex-start;
  background: none;
}

.keyword .search_bar input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #d1d5db;
  background: #f8fafc;
  box-sizing: border-box;
}

/* === Checkbox modern look (ck-btn only) === */
.ck-btn {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  gap: 10px;
  padding: 12px 14px;
  margin: 8px 8px 8px 0;
  border: 1px solid #e1e5f2;
  border-radius: 14px;
  background: #f9fbff;
  font-weight: 700;
  color: #111827;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.04);
  min-width: 200px;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  line-height: 1.2;
}

.ck-btn input[type="checkbox"] {
  display: none;
}

.ck-btn i.far.fa-square {
  color: #9fb3ff;
  display: inline-block;
  font-size: 22px;
}

.ck-btn i.far.fa-check-square {
  display: none;
  font-size: 22px;
}

.ck-btn input[type="checkbox"]:checked ~ i.far.fa-square {
  display: none;
}

.ck-btn input[type="checkbox"]:checked ~ i.far.fa-check-square {
  display: inline-block;
  color: #2563eb;
}

.ck-btn input[type="checkbox"]:checked ~ span {
  color: #1f2937;
}

.ck-btn:hover {
  border-color: #cbd5e1;
  background: #eef2ff;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.08);
}

.ck-btn span {
  font-size: 17px;
  display: inline-flex;
  align-items: center;
}

.parameter-group {
    background-color: white;
    padding: 15px;
    border-radius: 10px;
}

.parameter-group .para-box {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

/* toggle design for parameter settings */
.toggle-field {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.04);
  font-weight: 700;
  color: #111827;
  position: relative;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.toggle-field input[type="checkbox"] {
  display: block !important;
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  top: 0;
  left: 0;
}

.toggle-field .toggle-label {
  order: 1;
  flex: 1;
  font-size: 16px;
  line-height: 1.4;
}

.toggle-field .toggle-switch {
  order: 2;
  margin-left: auto;
  position: relative;
  width: 46px;
  height: 26px;
  background: #e5e7eb;
  border-radius: 999px;
  transition: background 0.2s ease;
  box-shadow: inset 0 0 0 1px #d1d5db;
}

.toggle-field .toggle-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.toggle-field input[type="checkbox"]:checked + .toggle-switch {
  background: linear-gradient(120deg, #3b82f6, #2563eb);
  box-shadow: inset 0 0 0 1px #1d4ed8;
}

.toggle-field input[type="checkbox"]:checked + .toggle-switch::after {
  transform: translateX(20px);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
}

.toggle-field:hover {
  border-color: #cbd5e1;
  box-shadow: 0 10px 22px rgba(17, 24, 39, 0.07);
}

.toggle-field input[type="checkbox"]:focus-visible + .toggle-switch {
  outline: 3px solid rgba(37, 99, 235, 0.35);
  outline-offset: 4px;
}

.parameter-group .toggle-field,
.parameter .toggle-field {
  width: 100%;
}

.ai_parameter .toggle-field {
  flex: 1 1 260px;
  min-width: 240px;
  max-width: 360px;
}

/* AIパラメータカードの簡易レイアウト */
.ai-parameter-card {
  background: #f8f9fb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px 16px;
  margin: 12px 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}
.ai-parameter-title {
  font-size: 13px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 8px;
}
.ai-parameter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px 12px;
  align-items: stretch;
}
.ai-parameter-card .toggle-field {
  width: 100%;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}
.ai-parameter-note {
  font-size: 12px;
  color: #6b7280;
  margin: 8px 4px 0;
}

/* AI出題プラン プレビュー */
.ai-plan-box {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px 16px;
  margin: 10px 0 4px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.05);
}
.ai-plan-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.ai-plan-title {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
}
.ai-plan-badge {
  font-size: 11px;
  color: #1d4ed8;
  background: #e0e7ff;
  border: 1px solid #c7d2fe;
  padding: 2px 8px;
  border-radius: 999px;
}
.ai-plan-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}
.ai-plan-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #111827;
  background: #f8fafc;
  padding: 8px 10px;
  border-radius: 8px;
}
.ai-plan-row span:last-child {
  font-weight: 700;
}
.ai-plan-note {
  margin-top: 8px;
  font-size: 12px;
  color: #6b7280;
}
.ai-topic-candidates {
  margin-top: 10px;
}
.ai-topic-taglist {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
  justify-content: center;
}
.ai-topic-tag {
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  color: #111827;
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  min-width: 200px;
  max-width: 320px;
  text-align: center;
  white-space: normal;
  line-height: 1.5;
  font-size: 13px;
  position: relative;
}
.ai-topic-tag.selected {
  background: #fff;
  color: #1d4ed8;
  border-color: #1d4ed8;
  box-shadow: 0 6px 12px rgba(29,78,216,0.18);
}
.ai-topic-tag .tag-status {
  display: none;
  position: absolute;
  top: 6px;
  right: 8px;
  background: #e0e7ff;
  color: #1d4ed8;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
}
.ai-topic-tag.selected .tag-status {
  display: inline-block;
  background: #1d4ed8;
  color: #fff;
}
.ai-topic-tag.selected .tag-title {
  color: #111827;
}
.ai-topic-tag.selected .tag-sub {
  color: #4b5563;
}
.ai-topic-tag .tag-title {
  font-weight: 600;
  font-size: 13px;
}
.ai-topic-tag .tag-sub {
  margin-top: 4px;
  font-size: 11px;
  color: #4b5563;
  line-height: 1.4;
}
