/*
Theme Name: 中学受験テスト練習アプリ
Theme URI: https://example.com/
Author: あなた
Author URI: https://example.com/
Description: Nuxt3で作ったテスト練習アプリのデザインをWordPressテーマ化したもの
Version: 1.0
Text Domain: chuju-test-app
*/

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Helvetica Neue", Arial, "Noto Sans JP", sans-serif;
  background: #f4f6fb;
  color: #0f172a;
}

img {
  width: 100%;
}
/* レイアウト全体 */
.l-app {
  min-height: 100vh;
  display: flex;
  background: #f4f6fb;
}

/* === サイドバー === */
.l-sidebar {
  width: 220px;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  background: #0f172a;
  color: #e5e7eb;
  box-shadow: 4px 0 18px rgba(15, 23, 42, 0.45);
}

.l-sidebar__logo {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.4);
}

.l-sidebar__logo-main {
  display: block;
  font-size: 16px;
  font-weight: 700;
}

.l-sidebar__logo-sub {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #9ca3af;
}

/* ナビリンク */
.l-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: auto;
}

.l-nav__link {
  display: block;
  padding: 10px 10px;
  border-radius: 999px;
  font-size: 14px;
  color: #e5e7eb;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.l-nav__link:hover {
  background: rgba(148, 163, 184, 0.3);
}

.l-nav__link.is-active {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #ffffff;
}

/* サイドバー下部（ログアウト） */
.l-sidebar__footer {
  margin-top: 24px;
}

.l-logout {
  width: 100%;
  padding: 9px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: transparent;
  color: #e5e7eb;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.l-logout:hover {
  background: rgba(248, 113, 113, 0.16);
  border-color: rgba(248, 113, 113, 0.8);
  color: #fecaca;
}

/* === メインエリア === */
.l-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.l-main__header {
  height: 56px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
}

.l-main__header-title {
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
}

.l-main__body {
  flex: 1;
  padding: 24px 20px;
  background: #f4f6fb;
}

/* ざっくりSP対応 */
@media (max-width: 768px) {
  .l-app {
    flex-direction: column;
  }

  .l-sidebar {
    width: 100%;
    flex-direction: row;
    align-items: center;
    padding: 10px 12px;
  }

  .l-sidebar__logo {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    margin-right: 12px;
  }

  .l-nav {
    flex-direction: row;
    margin-bottom: 0;
    gap: 6px;
    flex: 1;
  }

  .l-nav__link {
    padding-inline: 12px;
    white-space: nowrap;
    font-size: 13px;
  }

  .l-sidebar__footer {
    margin-top: 0;
    margin-left: 8px;
  }

  .l-main__body {
    padding: 16px 12px 24px;
  }
}

.dashboard {
  max-width: 800px;
  margin: 40px auto;
  padding: 0 16px;
}
.dashboard__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.dashboard__cards {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}
.card {
  flex: 1;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #ddd;
  text-align: center;
}
.btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 4px;
  background: #0070f3;
  color: #fff;
  text-decoration: none;
}
.dashboard__buttons {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}

.login {
  max-width: 420px;
  margin: 80px auto;
  padding: 24px 24px 32px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.1);
}
.login__title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}
.login__lead {
  font-size: 14px;
  color: #555;
  margin-bottom: 24px;
}
.login__form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.login__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
}
.login__field label {
  font-weight: 600;
}
.login__field input {
  border-radius: 8px;
  border: 1px solid #d4d4d8;
  padding: 8px 10px;
  font-size: 14px;
}
.login__field input:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 1px rgba(79, 70, 229, 0.25);
}
.login__error {
  color: #dc2626;
  font-size: 13px;
}
.login__submit {
  margin-top: 4px;
  border: none;
  border-radius: 999px;
  padding: 10px 0;
  font-size: 15px;
  font-weight: 600;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #fff;
  cursor: pointer;
}
.login__submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
.login__note {
  margin-top: 18px;
  font-size: 13px;
  color: #6b7280;
}
.login__note code {
  background: #f3f4f6;
  padding: 2px 4px;
  border-radius: 4px;
}

.sc {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 16px;
  background: #f4f6fb;
}

.sc__card {
  width: 100%;
  max-width: 840px;
  margin-top: 32px;
  padding: 28px 26px 30px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

.sc__header {
  margin-bottom: 20px;
}

.sc__subject {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #0f766e;
  background: #ccfbf1;
  margin-bottom: 8px;
}

.sc__title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
}

.sc__lead {
  font-size: 14px;
  color: #64748b;
}

.sc__empty {
  margin-top: 12px;
  text-align: center;
}

.sc__btn-main {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin-top: 16px;
  padding: 12px 20px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

/* ===== テーブル部分 ===== */

.sc__table-wrap {
  margin-top: 12px;
}

.sc__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.sc__table th,
.sc__table td {
  padding: 8px 10px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}

.sc__table th {
  background: #f8fafc;
  font-weight: 600;
}

/* 前回比の色分け */
.sc__diff {
  font-size: 11px;
  margin-left: 4px;
}

.sc__diff--up {
  color: #1d4ed8; /* 青：成績アップ */
}

.sc__diff--down {
  color: #b91c1c; /* 赤：成績ダウン */
}

.sc__diff--same {
  color: #94a3b8; /* グレー：変化なし */
}

/* ===== グラフ部分 ===== */

.sc__chart {
  margin-top: 28px;
}

.sc__chart-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.sc__chart-note {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 10px;
}

.sc__chart-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sc__chart-item + .sc__chart-item {
  margin-top: 8px;
}

.sc__chart-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
  margin-bottom: 4px;
}

.sc__chart-date {
  color: #64748b;
}

.sc__chart-subject {
  font-weight: 600;
}

.sc__chart-percent {
  margin-left: auto;
  font-weight: 600;
}

.sc__chart-bar-wrap {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.sc__chart-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #6366f1, #4f46e5);
  transition: width 0.3s ease;
}

.sc__actions {
  margin-top: 16px;
  text-align: right;
}

.up {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 16px;
  background: #f4f6fb;
}

.up__card {
  width: 100%;
  max-width: 720px;
  margin-top: 32px;
  padding: 24px 22px 26px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

.up__header {
  margin-bottom: 18px;
}

.up__label {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #1d4ed8;
  background: #dbeafe;
  margin-bottom: 6px;
}

.up__title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.up__lead {
  font-size: 13px;
  color: #64748b;
}

.up__form {
  margin-top: 16px;
}

.up__field {
  margin-bottom: 12px;
}

.up__field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}

.up__file-name {
  margin-top: 4px;
  font-size: 13px;
  color: #0f172a;
}

.up__btn-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.up__btn-main:disabled {
  opacity: 0.5;
  cursor: default;
}

.up__result {
  margin-top: 20px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}

.up__result-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.up__result-message {
  font-size: 13px;
  margin-bottom: 8px;
}

.up__result-list {
  font-size: 13px;
  margin-bottom: 8px;
}

.up__result-list dt {
  font-weight: 600;
}

.up__result-list dd {
  margin: 0 0 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    'Liberation Mono', 'Courier New', monospace;
}

.up__hint {
  font-size: 12px;
  color: #64748b;
}

.up__hint-link {
  font-size: 12px;
  margin-top: 4px;
}

.up__hint-link code {
  background: #f1f5f9;
  padding: 2px 4px;
  border-radius: 4px;
}

.up__error {
  margin-top: 12px;
  font-size: 13px;
  color: #b91c1c;
}

.history {
  max-width: 640px;
  margin: 40px auto;
  padding: 0 16px;
}
section {
  margin-bottom: 24px;
}
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}
th,
td {
  border: 1px solid #ddd;
  padding: 6px 8px;
  text-align: center;
}
.score--bad {
  color: #d00;
  font-weight: 700;
}
.score--good {
  color: #0066cc;
  font-weight: 700;
}

/* japanese.vue と同じデザイン */
.test {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 16px;
  background: #f4f6fb;
}

.test__card {
  width: 100%;
  max-width: 760px;
  margin-top: 32px;
  padding: 28px 26px 30px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

.test__header {
  margin-bottom: 16px;
}

.test__label {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #1d4ed8;
  background: #dbeafe;
  margin-bottom: 8px;
}

.test__title {
  font-size: 20px;
  font-weight: 700;
}

.test__info {
  font-size: 13px;
  color: #64748b;
}

.test__timer {
  margin-top: 4px;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
}

.test__timer span {
  font-variant-numeric: tabular-nums;
}

.test__state {
  margin-top: 16px;
}

.test__state--error {
  color: #b91c1c;
}

.test__before {
  margin-top: 20px;
  text-align: center;
}

.test__btn-main,
.test__btn-sub {
  border-radius: 999px;
  border: none;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.test__btn-main {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #fff;
}

.test__btn-sub {
  background: #e2e8f0;
  color: #0f172a;
}

.test__body {
  margin-top: 16px;
}

.test__progress {
  font-size: 14px;
  margin-bottom: 8px;
}

.test__question-text {
  font-size: 14px;
  font-weight: 400;
  margin-bottom: 10px;
}

.test__choices {
  list-style: none;
  margin: 0;
  padding: 0;
}

.test__choice {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
}

/* 記述式 UI */
.test__free {
  margin-top: 8px;
}

.test__free-label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.test__free-label-text {
  font-size: 14px;
}

.test__input-free {
  flex: 0 1 220px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid #cbd5f5;
  font-size: 14px;
}

.test__free-unit {
  font-size: 13px;
  color: #64748b;
}

.test__nav {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 16px;
}

.test__result {
  margin-top: 20px;
}

.test__result-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.test__result-main {
  font-size: 16px;
  margin-bottom: 16px;
}

.test__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.tests {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 16px;
  background: #f4f6fb;
}

.tests__card {
  width: 100%;
  max-width: 720px;
  margin-top: 32px;
  padding: 28px 26px 30px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

.tests__header {
  margin-bottom: 20px;
}

.tests__label {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #1d4ed8;
  background: #dbeafe;
  margin-bottom: 8px;
}

.tests__title {
  font-size: 20px;
  font-weight: 700;
}

.tests__form {
  margin-top: 12px;
  padding-bottom: 16px;
  border-bottom: 1px dashed #e2e8f0;
}

.tests__section {
  margin-top: 20px;
}

.tests__section-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.tests__section-note {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 10px;
}

.tests__field {
  margin-bottom: 16px;
}

.tests__field-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

.tests__radios {
  display: flex;
  gap: 12px;
}

.tests__radio {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
}

.tests__select {
  width: 160px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  font-size: 14px;
}

.tests__note {
  font-size: 12px;
  color: #64748b;
}

.tests__actions {
  margin-top: 16px;
  text-align: right;
}

.tests__btn-main,
.tests__btn-sub {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border-radius: 999px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.tests__btn-main {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #fff;
}

.tests__btn-sub {
  background: #e2e8f0;
  color: #0f172a;
}

/* 過去問テスト一覧 */
.tests__state {
  margin-top: 8px;
  font-size: 13px;
  color: #64748b;
}

.tests__state--error {
  color: #b91c1c;
}

.tests__test-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tests__test-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

.tests__test-name {
  font-size: 14px;
  font-weight: 600;
}

.tests__test-meta {
  font-size: 12px;
  color: #6b7280;
}

.tests__test-actions {
  flex-shrink: 0;
}

.import {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 16px;
  background: #f4f6fb;
}

.import__card {
  width: 100%;
  max-width: 840px;
  margin-top: 32px;
  padding: 28px 26px 30px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

.import__header {
  margin-bottom: 20px;
}

.import__label {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #1d4ed8;
  background: #dbeafe;
  margin-bottom: 8px;
}

.import__title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
}

.import__lead {
  font-size: 14px;
  color: #64748b;
}

.import__form {
  margin-top: 16px;
}

.import__field {
  margin-bottom: 12px;
}

.import__field-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.import__file {
  display: block;
  width: 100%;
}

.import__file-name {
  font-size: 13px;
  color: #4b5563;
  margin-bottom: 8px;
}

.import__error {
  margin-top: 4px;
  font-size: 13px;
  color: #b91c1c;
}

.import__success {
  margin-top: 4px;
  font-size: 13px;
  color: #16a34a;
}

.import__btn-main {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin-top: 12px;
  padding: 10px 20px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.import__btn-main:disabled {
  opacity: 0.6;
  cursor: default;
}

/* 結果表示 */
.import__result {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.import__result-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.import__result-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  font-size: 13px;
  margin-bottom: 8px;
}

.import__result-list dt {
  font-weight: 600;
  color: #4b5563;
}

.import__result-list dd {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    'Liberation Mono', 'Courier New', monospace;
}

.import__result-note {
  font-size: 12px;
  color: #6b7280;
}

.te {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 32px 16px;
  background: #f4f6fb;
}

.te__card {
  width: 100%;
  max-width: 960px;
  padding: 24px 24px 32px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

/* ヘッダー */
.te__header {
  margin-bottom: 24px;
}

.te__label {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #1d4ed8;
  background: #dbeafe;
  margin-bottom: 8px;
}

.te__title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
}

.te__lead {
  font-size: 13px;
  color: #64748b;
}

.te__lead code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    'Liberation Mono', 'Courier New', monospace;
  background: #e5e7eb;
  padding: 1px 4px;
  border-radius: 4px;
}

.te__meta {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
}

.te__meta dt {
  font-weight: 600;
  color: #475569;
}

.te__meta dd {
  margin: 0;
}

.te__name-row {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.te__name-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}

/* 入力共通 */
.te__input,
.te__textarea,
.te__select {
  border-radius: 10px;
  border: 1px solid #cbd5f5;
  padding: 6px 10px;
  font-size: 14px;
  width: 100%;
  box-sizing: border-box;
}

.te__input--wide {
  min-width: 260px;
}

.te__input--small {
  max-width: 96px;
}

.te__input--points {
  max-width: 72px;
}

/* 問題リスト */
.te__questions-header {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.te__questions-header h2 {
  font-size: 16px;
  font-weight: 700;
}

.te__empty {
  margin-top: 10px;
  font-size: 13px;
  color: #6b7280;
}

.te__q-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.te__q-item {
  border-radius: 18px;
  border: 1px solid #e2e8f0;
  padding: 14px 14px 16px;
  background: #f9fafb;
}

.te__q-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.te__q-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.te__q-number {
  font-weight: 700;
}

.te__select--type {
  max-width: 180px;
}

.te__q-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.te__q-points {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
}

/* ボタン */
.te__btn-main,
.te__btn-sub,
.te__btn-danger,
.te__btn-icon,
.te__btn-sub--small {
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 13px;
}

.te__btn-main {
  padding: 8px 14px;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #fff;
  font-weight: 600;
}

.te__btn-sub {
  padding: 6px 12px;
  background: #e2e8f0;
  color: #0f172a;
}

.te__btn-sub--small {
  margin-top: 6px;
  padding: 4px 10px;
  font-size: 12px;
}

.te__btn-danger {
  padding: 6px 10px;
  background: rgba(248, 113, 113, 0.1);
  color: #b91c1c;
}

.te__btn-icon {
  padding: 0 8px;
  background: transparent;
  color: #6b7280;
}

/* 問題の本体 */
.te__q-body {
  margin-top: 10px;
}

.te__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}

.te__field-label {
  font-size: 13px;
  font-weight: 600;
}

.te__field-label--sub {
  margin-top: 4px;
  font-size: 12px;
  color: #6b7280;
}

.te__textarea {
  resize: vertical;
  min-height: 80px;
}

/* 選択肢 */
.te__choices {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.te__choice-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.te__choice-radio {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
}

.te__input--choice {
  flex: 1;
}

/* 記述式 */
.te__free-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.te__field--inline {
  flex-direction: row;
  align-items: center;
  gap: 6px;
}

.te__field-inline-label {
  font-size: 12px;
  white-space: nowrap;
}

.te__input--answer {
  min-width: 120px;
}

.te__input--unit {
  min-width: 80px;
}

.te__free-note {
  margin-top: 6px;
  font-size: 12px;
  color: #6b7280;
}

/* 画像メモ */
.te__field--image {
  margin-top: 10px;
}

/* プレビュー */
.te__preview {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

.te__preview-title {
  font-size: 16px;
  font-weight: 700;
}

.te__preview-note {
  font-size: 13px;
  color: #64748b;
  margin-top: 4px;
}

.te__code {
  margin-top: 8px;
  padding: 12px;
  border-radius: 12px;
  background: #020617;
  color: #e5e7eb;
  font-size: 12px;
  overflow-x: auto;
}

.l-app {
  min-height: 100vh;
  display: flex;
  background: #f4f6fb;
}

/* === レイアウト全体 === */
.l-app {
  display: flex;
  min-height: 100vh;
  background: #020617;
}

/* メイン側 */
.l-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ヘッダーを一番上に */
.l-main__header {
  position: sticky;
  top: 0;
  z-index: 50; /* ← ここを大きくする（例：50） */
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: #020617;
  color: #e5e7eb;
  box-shadow: 0 1px 8px rgba(15, 23, 42, 0.6);
}

.l-main__header-title {
  font-size: 16px;
  font-weight: 600;
}

.l-main__body {
  padding: 24px;
}

/* サイドバー側の z-index はそれより小さく */
.l-sidebar {
  width: 220px;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  background: #0f172a;
  color: #e5e7eb;
  box-shadow: 4px 0 18px rgba(15, 23, 42, 0.45);
  z-index: 40;  /* ← ヘッダーより小さく */
}

.l-sidebar__logo {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.4);
}

.l-sidebar__logo-main {
  display: block;
  font-size: 16px;
  font-weight: 700;
}

.l-sidebar__logo-sub {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #9ca3af;
}

.l-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.l-nav__link {
  display: block;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 14px;
  color: #e5e7eb;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.l-nav__link:hover {
  background: rgba(148, 163, 184, 0.25);
}

.l-nav__link.is-active {
  background: #2563eb;
  color: #f9fafb;
}

.l-sidebar__footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.4);
}

.l-logout {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  border: 0;
  font-size: 13px;
  cursor: pointer;
  background: rgba(239, 68, 68, 0.1);
  color: #fecaca;
}

/* === ハンバーガーボタン（PCでは非表示） === */
.l-navToggle {
  display: none;           /* SPで表示 */
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  cursor: pointer;
  justify-content: center;
  align-items: center;
  padding: 0;
}

.l-navToggle__line,
.l-navToggle__line::before,
.l-navToggle__line::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: #e5e7eb;
  transition: transform 0.25s ease, opacity 0.25s ease, top 0.25s ease, bottom 0.25s ease;
  position: relative;
}

.l-navToggle__line::before {
  position: absolute;
  top: -6px;
}

.l-navToggle__line::after {
  position: absolute;
  bottom: -6px;
}

/* 開いたとき（×印） */
.l-navToggle.is-open .l-navToggle__line {
  transform: rotate(45deg);
}

.l-navToggle.is-open .l-navToggle__line::before {
  top: 0;
  transform: rotate(-90deg);
}

.l-navToggle.is-open .l-navToggle__line::after {
  bottom: 0;
  opacity: 0;
}

/* === SPレイアウト（768px以下） === */
@media (max-width: 768px) {
  .l-app {
    position: relative;
  }

  /* サイドバーを全画面スライドインに変更 */
  .l-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;     /* 全画面 */
    height: 100vh;
    max-width: none;
    transform: translateX(-100%);
    transition: transform 0.35s ease;
    box-shadow: none;
  }

  .l-sidebar.is-open {
    transform: translateX(0);
    display: grid;
  }

  .l-main__body {
    padding: 16px;
  }

  /* ハンバーガー表示 */
  .l-navToggle {
    display: inline-flex;
  }

  /* メニューオープン中は背景スクロール禁止 */
  body.is-menu-open {
    overflow: hidden;
  }
}

/* ナビリンク */
.l-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: auto;
}

.l-nav__link {
  display: block;
  padding: 10px 10px;
  border-radius: 999px;
  font-size: 14px;
  color: #e5e7eb;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.l-nav__link:hover {
  background: rgba(148, 163, 184, 0.3);
}

.l-nav__link.is-active {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #ffffff;
}

/* ★ 追加：アップロード＆編集だけ少し強調 */
.l-nav__link--accent {
  margin-top: 4px;
  border: 1px solid rgba(129, 140, 248, 0.6);
  background: rgba(129, 140, 248, 0.12);
}

/* サイドバー下部（ログアウト） */
.l-sidebar__footer {
  margin-top: 24px;
}

.l-logout {
  width: 100%;
  padding: 9px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: transparent;
  color: #e5e7eb;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.l-logout:hover {
  background: rgba(248, 113, 113, 0.16);
  border-color: rgba(248, 113, 113, 0.8);
  color: #fecaca;
}

/* === メインエリア === */
.l-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.l-main__header {
  height: 56px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
}

.l-main__header-title {
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
}

.l-main__body {
  flex: 1;
  padding: 24px 20px;
  background: #f4f6fb;
}

/* ざっくりSP対応（必要に応じて調整） */
@media (max-width: 768px) {
  .l-app {
    flex-direction: column;
  }

  .l-sidebar {
    width: 94%;
    flex-direction: row;
    align-items: center;
    padding: 10px 12px;
  }

  .l-sidebar__logo {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    margin-right: 12px;
  }

  .l-nav {
    margin-bottom: 0;
    gap: 6px;
    flex: 1;
  }

  .l-nav__link {
    padding-inline: 12px;
    white-space: nowrap;
    font-size: 13px;
  }

  .l-sidebar__footer {
    margin-top: 0;
    margin-left: 8px;
  }

  .l-main__body {
    padding: 16px 12px 24px;
  }
}


.dash {
  min-height: 100vh;
  display:flex;
  justify-content:center;
  align-items:flex-start;
  padding:40px 16px;
  background:#f4f6fb;
}
.dash__card {
  width:100%;
  max-width:900px;
  margin-top:32px;
  padding:28px 26px 30px;
  border-radius:24px;
  background:#fff;
  box-shadow:0 18px 45px rgba(15,23,42,.12);
}
.dash__header{margin-bottom:20px;}
.dash__label{
  display:inline-flex;
  align-items:center;
  padding:4px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:600;
  color:#1d4ed8;
  background:#dbeafe;
  margin-bottom:8px;
}
.dash__title{font-size:20px;font-weight:700;margin-bottom:4px;}
.dash__lead{font-size:13px;color:#64748b;}

.dash__summary{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(160px,1fr));
  gap:14px;
  margin:20px 0 24px;
}
.dash__summary-item{
  padding:14px 16px;
  border-radius:16px;
  background:#f1f5f9;
}
.dash__summary-label{
  font-size:12px;
  color:#64748b;
  margin-bottom:4px;
}
.dash__summary-value{
  font-size:22px;
  font-weight:700;
}
.dash__summary-unit{
  font-size:13px;
  margin-left:2px;
}

.dash__section-title{
  font-size:16px;
  font-weight:700;
  margin-bottom:8px;
}
.dash__latest{
  margin-top:8px;
  padding-top:12px;
  border-top:1px solid #e2e8f0;
}
.dash__latest-title{
  font-size:15px;
  font-weight:600;
}
.dash__latest-meta{
  font-size:12px;
  color:#64748b;
  margin:4px 0 8px;
}
.dash__latest-score{
  font-size:14px;
  font-weight:600;
  margin-bottom:16px;
}
.dash__actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.dash__btn-main,
.dash__btn-sub{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 16px;
  border-radius:999px;
  font-size:13px;
  font-weight:600;
  text-decoration:none;
}
.dash__btn-main{
  background:linear-gradient(135deg,#4f46e5,#6366f1);
  color:#fff;
}
.dash__btn-sub{
  border:1px solid #cbd5e1;
  color:#0f172a;
  background:#fff;
}
.dash__link{
  color:#2563eb;
  text-decoration:underline;
}
@media (max-width:768px){
  .dash__card{padding:22px 18px;}
}

.scores{
  min-height:100vh;
  display:flex;
  justify-content:center;
  align-items:flex-start;
  padding:40px 16px;
  background:#f4f6fb;
}
.scores__card{
  width:100%;
  max-width:960px;
  margin-top:32px;
  padding:28px 26px 30px;
  border-radius:24px;
  background:#fff;
  box-shadow:0 18px 45px rgba(15,23,42,.12);
}
.scores__header{margin-bottom:20px;}
.scores__label{
  display:inline-flex;
  align-items:center;
  padding:4px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:600;
  color:#1d4ed8;
  background:#dbeafe;
  margin-bottom:8px;
}
.scores__title{font-size:20px;font-weight:700;margin-bottom:4px;}
.scores__lead{font-size:13px;color:#64748b;}

.scores__filter{
  display:flex;
  flex-wrap:wrap;
  align-items:flex-end;
  gap:8px;
  margin-bottom:16px;
}
.scores__filter-label{
  font-size:13px;
  font-weight:600;
}
.scores__select{
  display:block;
  margin-top:4px;
  padding:6px 8px;
  border-radius:8px;
  border:1px solid #cbd5e1;
  font-size:14px;
}
.scores__btn-sub{
  padding:7px 14px;
  border-radius:999px;
  border:1px solid #cbd5e1;
  background:#fff;
  font-size:13px;
  font-weight:600;
  cursor:pointer;
}
.scores__table{
  width:100%;
  border-collapse:collapse;
  font-size:13px;
}
.scores__table th,
.scores__table td{
  padding:8px 10px;
  border-bottom:1px solid #e2e8f0;
}
.scores__table thead th{
  background:#f8fafc;
  font-weight:600;
  text-align:left;
}
.scores__empty{font-size:13px;color:#64748b;margin-top:8px;}
.scores__link{color:#2563eb;text-decoration:underline;}
@media (max-width:768px){
  .scores__card{padding:22px 14px;}
  .scores__table{font-size:12px;}
  .scores__table th,
  .scores__table td{padding:6px 6px;}
}

ul.tests__list {
    padding-left: 15px;
}

a.tests__item-link {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 数学用：分数 */
.m-frac {
  display: inline-block;
  vertical-align: middle;
  text-align: center;
  line-height: 1;
  font-size: 0.9em;   /* 少し小さめに */
}

.m-frac__top {
  display: block;
  border-bottom: 1px solid currentColor;
  padding: 0 2px;
}

.m-frac__bottom {
  display: block;
  padding: 0 2px;
}

/* 帯分数（3 2/3 みたいなやつ） */
.m-mixed {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.m-mixed__int {
  font-size: 1em;
}


.test__detail-title {
  margin-top: 32px;
  font-size: 18px;
  font-weight: 700;
}

.test__detail-list {
  margin-top: 16px;
  list-style: none;
  padding: 0;
}

.test__detail-item {
  padding: 16px 14px;
  border-radius: 16px;
  background: #f8fafc;
  margin-bottom: 12px;
}

.test__detail-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.test__detail-number {
  font-weight: 600;
  font-size: 14px;
}

.test__detail-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
}

.test__detail-mark--correct {
  background: #dcfce7;
  color: #166534;
}

.test__detail-mark--wrong {
  background: #fee2e2;
  color: #b91c1c;
}

.test__detail-question {
  font-size: 14px;
  margin-bottom: 6px;
}

.test__detail-label {
  font-weight: 600;
}

.test__detail-answer,
.test__detail-correct {
  font-size: 13px;
  margin: 2px 0;
}

.test__section {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

.test__section-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.test__section-desc {
  font-size: 14px;
  color: #475569;
  margin-bottom: 12px;
}

.test__judge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  font-weight: 700;
  margin-right: 8px;
}

.test__judge--ok {
  background: #dcfce7;
  color: #16a34a;
}

.test__judge--ng {
  background: #fee2e2;
  color: #dc2626;
}

.test__q-item--review {
  padding: 12px 16px;
  border-radius: 12px;
  background: #f8fafc;
  margin-bottom: 10px;
}

.test__q-header {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.test__figure {
  margin: 8px 0 16px;
}
.test__figure img {
  max-width: 100%;
  height: auto;
  display: block;
}

.test__pdf {
  margin: 16px 0 24px;
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

.test__pdf-frame {
  width: 100%;
  height: 640px; /* お好みで */
  border: none;
}


@media (max-width: 768px) {
  .test {
    padding: 20px 5px;
  }
  ol,ul {
        padding-left: 15px;
  }
  .test__input-free {
    font-size: 16px;
  }
}

/* =======================================
   ログインページ
   page-login.php 用
   ======================================= */

.login {
  min-height: calc(100vh - 80px); /* ヘッダー分をざっくり除外（必要に応じて調整） */
  padding: 40px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f5f9;
}

.login__card {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  padding: 28px 24px 32px;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .login__card {
    padding: 32px 32px 36px;
  }
}

.login__header {
  margin-bottom: 24px;
  text-align: center;
}

.login__label {
  display: inline-block;
  padding: 4px 10px;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  border-radius: 999px;
  background: #eef2ff;
  color: #4f46e5;
  margin-bottom: 8px;
}

.login__title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 6px;
  color: #111827;
}

.login__lead {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: #6b7280;
}

/* フォーム本体 */
.login__form {
  margin-top: 16px;
}

.login__row {
  margin-bottom: 16px;
}

.login__labelText {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #374151;
}

.login__field {
  position: relative;
}

.login__input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  font-size: 14px;
  line-height: 1.4;
  color: #111827;
  background-color: #ffffff;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.login__input::placeholder {
  color: #9ca3af;
}

.login__input:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 1px rgba(79, 70, 229, 0.15), 0 0 0 4px rgba(79, 70, 229, 0.12);
  background-color: #ffffff;
}

/* エラーメッセージ（wp_login_form のエラーなどを想定してクラスだけ用意） */
.login__error {
  margin: 0 0 12px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.4;
  color: #b91c1c;
  background: #fef2f2;
  border-radius: 10px;
}

/* チェックボックス（ログイン状態を保存する 等） */
.login__remember {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0 14px;
  font-size: 12px;
  color: #4b5563;
}

.login__remember input[type="checkbox"] {
  width: 14px;
  height: 14px;
}

/* ボタン */
.login__submit {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: none;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #ffffff;
  box-shadow: 0 12px 25px rgba(79, 70, 229, 0.35);
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.login__submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(79, 70, 229, 0.42);
}

.login__submit:active {
  transform: translateY(0);
  box-shadow: 0 10px 22px rgba(79, 70, 229, 0.32);
  opacity: .92;
}

/* フッターリンク（パスワード紛失 / 戻るなど） */
.login__footer {
  margin-top: 18px;
  font-size: 12px;
  text-align: center;
  color: #6b7280;
}

.login__footer a {
  color: #4f46e5;
  text-decoration: none;
}

.login__footer a:hover {
  text-decoration: underline;
}

/* もし .l-app など全体ラッパーを使っている場合の微調整 */
.l-app .login {
  padding-top: 80px;
  padding-bottom: 80px;
}
