.level-test-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border: 1px solid #e5e7eb; border-radius: 12px; margin-bottom: 10px; background: #fff; }
.level-test-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.level-test-info small { color: #6b7280; }
.level-test-action { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.level-test-note { color: #6b7280; font-size: 0.9rem; }
.btn-level-test { background: #0C3B2E; color: #fff; padding: 8px 14px; border-radius: 8px; text-decoration: none; font-weight: 600; border: 0; cursor: pointer; font-size: 1rem; }
.btn-level-test.secondary { background: #e5e7eb; color: #111827; }
.btn-level-test:disabled { opacity: 0.5; cursor: default; }

/* Test page */
[x-cloak] { display: none !important; }
.cloze-container { max-width: 760px; margin: 0 auto; padding: 16px 16px 120px; }
.cloze-intro { color: #374151; margin-bottom: 16px; }
.cloze-progress { position: sticky; top: 0; background: #fff; padding: 8px 0; z-index: 5; border-bottom: 1px solid #e5e7eb; font-weight: 600; }
.cloze-question { font-size: 1.25rem; line-height: 2.1; margin: 18px 0; font-family: 'Noto Serif JP', 'Noto Serif KR', 'Shippori Mincho B1', serif; }
.cloze-number { color: #6b7280; font-family: Inter, sans-serif; font-size: 0.9rem; margin-right: 6px; }
.cloze-blank { display: inline-block; min-width: 4.5rem; padding: 0 6px; border: 0; border-bottom: 2px solid #ec4899; background: #fdf2f8; color: #be185d; font: inherit; cursor: pointer; border-radius: 6px 6px 0 0; text-align: center; }
.cloze-blank.filled { background: #ecfdf5; border-bottom-color: #0C3B2E; color: #065f46; }
.cloze-blank.active { box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.35); }
.cloze-actions { margin-top: 24px; display: flex; flex-direction: column; gap: 10px; }
.cloze-warning { color: #b45309; background: #fffbeb; border: 1px solid #fcd34d; padding: 10px 12px; border-radius: 8px; }
.cloze-error { color: #b91c1c; }
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.35); z-index: 20; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; background: #fff; border-radius: 18px 18px 0 0; padding: 16px; box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.18); max-width: 760px; margin: 0 auto; }
.sheet-sentence { font-family: 'Noto Serif JP', 'Noto Serif KR', serif; font-size: 1.1rem; margin-bottom: 12px; color: #374151; }
.sheet-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sheet-option { padding: 16px 8px; font-size: 1.15rem; border: 2px solid #e5e7eb; border-radius: 12px; background: #fff; cursor: pointer; font-family: 'Noto Serif JP', 'Noto Serif KR', serif; }
.sheet-option.selected { border-color: #0C3B2E; background: #ecfdf5; }
.sheet-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.sheet-nav button { padding: 8px 14px; border: 0; background: #f3f4f6; border-radius: 8px; font-size: 1rem; cursor: pointer; }
.sheet-nav button:disabled { opacity: 0.4; }
.result-card { text-align: center; padding: 24px 16px; border-radius: 16px; background: #f9fafb; border: 1px solid #e5e7eb; }
.result-score { font-size: 2.5rem; font-weight: 700; }
.result-card.passed { background: #ecfdf5; border-color: #6ee7b7; }
.result-card.failed { background: #fef2f2; border-color: #fca5a5; }

.review-section { margin-top: 24px; }
.review-section h2 { font-size: 1.1rem; }
.review-rules { padding-left: 18px; }
.review-item { padding: 12px; border-radius: 10px; margin: 10px 0; border: 1px solid #e5e7eb; }
.review-item.wrong { border-left: 4px solid #dc2626; background: #fef2f2; }
.review-item.right { border-left: 4px solid #16a34a; background: #f0fdf4; }
.review-sentence { font-family: 'Noto Serif JP', 'Noto Serif KR', serif; font-size: 1.1rem; }
.review-line { margin-top: 6px; }
.review-explanation { margin: 8px 0 0; color: #374151; white-space: pre-line; }
.review-lesson { display: inline-block; margin-top: 8px; font-weight: 600; }
.tag { display: inline-block; font-size: 0.75rem; padding: 2px 8px; border-radius: 999px; font-weight: 600; }
.tag-wrong { background: #fee2e2; color: #b91c1c; }
.tag-right { background: #dcfce7; color: #166534; }
.history-list { list-style: none; padding: 0; }
.history-item { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; margin-bottom: 8px; border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; cursor: pointer; font-size: 0.95rem; }
.level-lock-note { display: block; color: #6b7280; font-size: 0.8rem; }

/* Level test chip, next to the level name */
.level-test-chip { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 0.8rem; font-weight: 600; text-decoration: none; background: #0C3B2E; color: #fff; white-space: nowrap; }
a.level-test-chip:hover { opacity: 0.9; }
.level-test-chip-passed { background: #dcfce7; color: #166534; }
.level-test-chip-locked, .level-test-chip-premium_only, .level-test-chip-cooling_down { background: #f3f4f6; color: #6b7280; }
