@charset "UTF-8";
/* ============================================================
   定期テスト2週間前 チェックリスト スタイル
   設置先: https://mathnet-online.com/tools/test-checklist.css
   テンプレート（post.html）の <head> 内で読み込んでください。
   ============================================================ */

#test-checklist {
  --tc-main: #2b6cb0;
  --tc-accent: #c05621;
  --tc-bg: #f7fafc;
  --tc-line: #dfe6ee;
  --tc-text: #2d3748;
  --tc-sub: #718096;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
  color: var(--tc-text);
  line-height: 1.7;
  max-width: 760px;
  margin: 28px auto;
  border: 1px solid var(--tc-line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
#test-checklist * { box-sizing: border-box; }

/* ---- ヘッダー ---- */
.tc-head {
  background: var(--tc-main);
  color: #fff;
  padding: 16px 18px;
}
.tc-head h3 { margin: 0; font-size: 18px; font-weight: 700; }
.tc-head p { margin: 5px 0 0; font-size: 13px; opacity: .92; }

/* ---- 日付入力 ---- */
.tc-date {
  padding: 16px 18px;
  background: var(--tc-bg);
  border-bottom: 1px solid var(--tc-line);
}
.tc-date label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}
.tc-date input[type="date"] {
  font-family: inherit;
  font-size: 16px;
  padding: 10px 12px;
  border: 1px solid #cbd5e0;
  border-radius: 6px;
  background: #fff;
  color: var(--tc-text);
  width: 100%;
  max-width: 260px;
  min-height: 44px;
}
.tc-countdown {
  display: none;
  margin: 12px 0 0;
  padding: 12px 14px;
  background: #fff;
  border-left: 4px solid var(--tc-accent);
  border-radius: 0 6px 6px 0;
  font-size: 15px;
}
.tc-countdown.on { display: block; }
.tc-countdown strong { color: var(--tc-accent); font-size: 22px; }
.tc-countdown span { display: block; font-size: 13px; color: var(--tc-sub); margin-top: 4px; }

/* ---- 進捗バー ---- */
.tc-progress {
  padding: 16px 18px;
  border-bottom: 1px solid var(--tc-line);
}
.tc-progress-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 14px;
  margin-bottom: 8px;
}
.tc-progress-label b { font-size: 20px; color: var(--tc-main); }
.tc-bar {
  height: 14px;
  background: #e2e8f0;
  border-radius: 7px;
  overflow: hidden;
}
.tc-bar > i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--tc-main);
  transition: width .4s;
}

/* ---- 教科アコーディオン ---- */
.tc-body { padding: 16px 18px 4px; }

details.tc-subject {
  border: 1px solid var(--tc-line);
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
  background: #fff;
}
details.tc-subject > summary {
  cursor: pointer;
  padding: 15px 16px 15px 38px;
  font-size: 16px;
  font-weight: 700;
  color: var(--tc-main);
  background: var(--tc-bg);
  list-style: none;
  position: relative;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
details.tc-subject > summary::-webkit-details-marker { display: none; }
details.tc-subject > summary::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--tc-main);
  border-bottom: 2px solid var(--tc-main);
  transform: translateY(-70%) rotate(45deg);
  transition: transform .2s;
}
details.tc-subject[open] > summary::before {
  transform: translateY(-30%) rotate(225deg);
}
details.tc-subject[open] > summary { border-bottom: 1px solid var(--tc-line); }
.tc-count {
  font-size: 13px;
  font-weight: 400;
  color: var(--tc-sub);
  background: #fff;
  border: 1px solid var(--tc-line);
  border-radius: 12px;
  padding: 3px 10px;
}

/* ---- 期間ブロック ---- */
.tc-period { padding: 14px 16px 4px; }
.tc-period + .tc-period { border-top: 1px dashed var(--tc-line); }
.tc-period h4 {
  margin: 0 0 4px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--tc-accent);
}
.tc-period p.tc-aim {
  margin: 0 0 10px;
  font-size: 12.5px;
  color: var(--tc-sub);
}

/* ---- チェック項目 ---- */
label.tc-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 12px;
  margin-bottom: 8px;
  border: 1px solid var(--tc-line);
  border-radius: 6px;
  font-size: 15px;
  cursor: pointer;
  min-height: 48px;
  background: #fff;
  transition: background .15s;
}
label.tc-item:hover { background: var(--tc-bg); }
label.tc-item input[type="checkbox"] {
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  flex-shrink: 0;
  accent-color: var(--tc-main);
  cursor: pointer;
}
label.tc-item.done {
  background: #f0fff4;
  border-color: #9ae6b4;
}
label.tc-item.done span {
  color: var(--tc-sub);
  text-decoration: line-through;
}

/* ---- ボタン ---- */
.tc-btnrow {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 4px 18px 18px;
}
.tc-btn {
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  padding: 13px 22px;
  border-radius: 6px;
  border: none;
  min-height: 48px;
}
.tc-btn-print { background: var(--tc-main); color: #fff; }
.tc-btn-reset { background: #fff; color: var(--tc-sub); border: 1px solid var(--tc-line); }

.tc-foot {
  padding: 12px 18px;
  font-size: 12px;
  color: var(--tc-sub);
  border-top: 1px solid var(--tc-line);
  background: var(--tc-bg);
}

@media (max-width: 480px) {
  #test-checklist { margin: 20px -4px; border-radius: 8px; }
  .tc-head h3 { font-size: 16.5px; }
  label.tc-item { font-size: 14.5px; }
  .tc-btn { flex: 1 1 100%; }
}

/* ============================================================
   印刷用
   ============================================================ */
@media print {
  #test-checklist {
    border: 1px solid #999;
    max-width: 100%;
    margin: 0;
    page-break-inside: auto;
  }
  .tc-head { background: #fff !important; color: #000 !important; border-bottom: 2px solid #000; }
  .tc-btnrow,
  .tc-foot,
  .tc-progress { display: none !important; }
  details.tc-subject > summary { background: #eee !important; }
  details.tc-subject > summary::before { display: none; }
  details.tc-subject { page-break-inside: avoid; }
  label.tc-item {
    background: #fff !important;
    min-height: 0;
    padding: 7px 10px;
    margin-bottom: 5px;
  }
  label.tc-item.done span { text-decoration: none; color: #000; }
  .tc-countdown { border-left: 3px solid #000; }
}

/* ============================================================
   JavaScriptが動かない場合の保険
   チェックの見た目だけはCSSで反映されます
   ============================================================ */
label.tc-item input[type="checkbox"]:checked + span {
  color: #718096;
  text-decoration: line-through;
}

/* ============================================================
   記事本文の全体像テーブル
   ============================================================ */
table.tc-table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 14.5px;
  line-height: 1.65;
}
table.tc-table th,
table.tc-table td {
  border: 1px solid #dfe6ee;
  padding: 11px 12px;
  text-align: left;
  vertical-align: top;
}
table.tc-table th {
  background: #2b6cb0;
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
}
table.tc-table td:first-child {
  font-weight: 700;
  color: #2b6cb0;
  white-space: nowrap;
}
table.tc-table tbody tr:nth-child(even) { background: #f7fafc; }

@media (max-width: 560px) {
  table.tc-table, table.tc-table tbody, table.tc-table tr, table.tc-table td { display: block; width: 100%; }
  table.tc-table thead { display: none; }
  table.tc-table tr {
    border: 1px solid #dfe6ee;
    border-radius: 6px;
    margin-bottom: 12px;
    overflow: hidden;
  }
  table.tc-table td { border: none; border-bottom: 1px solid #edf2f7; }
  table.tc-table td:last-child { border-bottom: none; }
  table.tc-table td:first-child { background: #2b6cb0; color: #fff; }
  table.tc-table td:nth-child(2)::before { content: 'やること：'; font-weight: 700; color: #2b6cb0; }
  table.tc-table td:nth-child(3)::before { content: 'やらないこと：'; font-weight: 700; color: #c05621; }
}
