/* ========== [quiz専用] q_responsive.css ========== */

/*=============================*/
/* ▼ PCサイズ（1201px〜）     */
/*=============================*/
@media screen and (min-width: 1201px) {

}

/*======================================*/
/* ▼ タブレットサイズ（600〜1200px）   */
/*======================================*/
@media screen and (min-width: 600px) and (max-width: 1200px) {

}

/*===============================*/
/* ▼ スマホサイズ（〜599px）     */
/*===============================*/
@media screen and (max-width: 599px) {

  /* ------------------*/
  /* q_list_read.php  */
  /* ----------------*/

  /* PCでは非表示 */
  thead.q-list-header {
    display: none !important;
  }

  /* 表全体を最大幅に広げる */
  .q-list {
    width: 100%;
    max-width: 100%;
    margin: 1em auto;
    line-height: 1;
  }

  /* 1行目の「番号＋漢字」横並び */
  table.q-list tr td.num,
  table.q-list tr td.kanji {
    display: inline-block;
    width: auto;
    margin-right: 1em;
    padding-right: 0.6em;
  }

  table.q-list tr td.kanji {
    font-size: 1.6em;
    font-weight: bold;
		display: inline-block;
  }

  table.q-list tr td.kanji::before {
    content: "";
  }

  /* 各 td をブロックで分割し、順番制御 */
  table.q-list,
  table.q-list thead,
  table.q-list tbody,
  table.q-list tr,
  table.q-list td,
  table.q-list th {
    display: block;
    width: 100%;
  }

  table.q-list tr {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.2em;
    padding: 0.8em;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  }

  table.q-list td {
    font-size: 0.95em;
    padding: 0.4em 0;
    border: none;
  }

  /* 表示順とラベル */
  table.q-list td.num     { order: 1; }
  table.q-list td.kanji   { order: 2; }
  table.q-list td.reading { order: 3; }
  table.q-list td.radical { order: 4; }
  table.q-list td.meaning { order: 5; }
  table.q-list td.btn     { order: 6; text-align: center; }

  table.q-list td.num::before     { content: "番号："; font-weight: bold; }
  table.q-list td.kanji::before   { content: "漢字："; font-weight: bold; }
  table.q-list td.reading::before { content: "読み："; font-weight: bold; }
  table.q-list td.radical::before { content: "部首："; font-weight: bold; }
  table.q-list td.meaning::before { content: "意味："; font-weight: bold; }

  table.q-list td.btn::before { content: ""; }

  /* ボタン調整 */
  table.q-list .reveal-button,
  table.q-list .judge-button,
  table.q-list .toggle-button {
    font-size: 0.95em;
    margin-top: 0.4em;
  }

  table.q-list .reveal-button {
    display: block;
    margin: 0.2em auto;
  }

  /* 「続きを読む」無効化 */
  table.q-list .toggle-button-wrapper,
  table.q-list .full-meaning {
    display: none;
    margin: 0;
    padding: 0;
  }
}
