/* ===== RESULTS SCREEN ===== */
.quiz-results-screen {
    position: relative;
    padding: 32px 28px 28px;
    text-align: center;
    overflow-y: auto;
    max-height: calc(85vh - 80px);
    z-index: 1;
}

.quiz-results-header {
    margin-bottom: 28px;
}

/* Results icon hidden — no emoji heroes */
.quiz-results-icon {
    display: none;
}

.quiz-results-title {
    font-size: 1.05em;
    font-weight: 600;
    color: #2C2C2C;
    margin: 0 0 20px 0;
    letter-spacing: -0.01em;
}

/* ============================================
   SCORE RING - SVG Circular Progress
   ============================================ */
.quiz-score-ring-wrap {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 8px auto 12px;
    display: none;
}

/* Plain score display — Karesansui: number speaks for itself */
.quiz-score-plain {
    text-align: center;
    margin: 12px auto 16px;
}

.quiz-score-ring {
    transform: rotate(-90deg);
}

.score-ring-bg {
    fill: none;
    stroke: rgba(61, 90, 128, 0.12);
    stroke-width: 8;
}

.score-ring-fill {
    fill: none;
    stroke: #3D5A80;
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 326.73; /* 2 * PI * 52 */
    stroke-dashoffset: 326.73;
    transition: stroke-dashoffset 1s cubic-bezier(0.34, 1.56, 0.64, 1),
                stroke 0.5s ease;
}

.score-ring-fill.high-score {
    stroke: var(--quiz-accent-correct, #4E6F3E);
}

.score-ring-fill.medium-score {
    stroke: #C9A96E;
}

.score-ring-fill.low-score {
    stroke: #A3604E;
}

.quiz-score-ring-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.1;
}

.quiz-score-value {
    font-size: 3.5em;
    font-weight: 800;
    color: #44403c;
    line-height: 1;
}

.quiz-score-total {
    font-size: 0.88em;
    font-weight: 600;
    color: var(--quiz-text-muted);
    margin-top: 4px;
}

/* Percentage badge hidden — score ring fraction is sufficient */
.quiz-results-percent {
    display: none;
}

/* ============================================
   STAT CARDS - 3-card grid
   ============================================ */
/* Stat cards hidden — analytics clutter */
.quiz-stat-cards {
    display: none;
}

.quiz-stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 12px 8px;
    background: #FAFAF7;
    border: 1.5px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.quiz-stat-card-icon {
    font-size: 1.2em;
    line-height: 1;
}

.quiz-stat-card-value {
    font-size: 1.3em;
    font-weight: 800;
    color: #44403c;
}

.quiz-stat-card-label {
    font-size: 0.7em;
    font-weight: 600;
    color: var(--quiz-text-muted);
}

/* Legacy minimal stats - hidden */
.quiz-results-stats-minimal {
    display: none;
}

/* Interactive Review Section - Exact Vocab Search Style */
.quiz-review-section {
    margin-bottom: 20px;
}

.quiz-review-header {
    font-size: 0.82em;
    font-weight: 600;
    color: var(--quiz-text-muted);
    margin-bottom: 10px;
}

.quiz-review-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Review as Flashcards Button */
.quiz-review-flashcards-btn {
    width: 100%;
    margin-top: 12px;
    padding: 12px 20px;
    font-size: 0.95em;
    font-weight: 600;
    color: #3D5A80;
    background: rgba(61, 90, 128, 0.07);
    border: 1px solid rgba(61, 90, 128, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.quiz-review-flashcards-btn:hover {
    background: rgba(61, 90, 128, 0.15);
    border-color: rgba(61, 90, 128, 0.35);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(61, 90, 128, 0.09);
}

.quiz-review-flashcards-btn:active {
    transform: translateY(0);
}

/* Practice Missed Words Button */
.quiz-practice-missed-btn {
    width: 100%;
    margin-top: 12px;
    padding: 12px 20px;
    font-size: 0.95em;
    font-weight: 600;
    color: var(--quiz-primary-dark);
    background: rgba(var(--quiz-primary-rgb), 0.06);
    border: 1px solid rgba(var(--quiz-primary-rgb), 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
}

.quiz-practice-missed-btn:hover {
    background: rgba(var(--quiz-primary-rgb), 0.12);
    border-color: rgba(var(--quiz-primary-rgb), 0.35);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--quiz-primary-rgb), 0.15);
}

.quiz-practice-missed-btn:active {
    transform: translateY(0);
}

/* Review Item - matches vocab-search-result */
.quiz-review-item {
    display: flex;
    flex-direction: column;
    padding: 12px 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 0;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.quiz-review-item:last-child {
    border-bottom: none;
}

.quiz-review-item:hover {
    background: rgba(0, 0, 0, 0.02);
}

/* Compact view */
.review-compact {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.review-compact .review-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.review-word {
    font-family: 'Klee One', 'Noto Sans JP', sans-serif;
    font-size: 1.2em;
    font-weight: 600;
    color: #44403c;
}

.review-details {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9em;
}

.review-roma {
    color: var(--quiz-primary-text);
    font-weight: 500;
}

.review-separator {
    color: rgba(0, 0, 0, 0.12);
}

.review-english {
    color: #57534e;
}

.review-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.review-pos {
    font-size: 0.7em;
    color: var(--quiz-primary-text);
    background: rgba(var(--quiz-primary-rgb), 0.1);
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 500;
}

/* Legacy styles - hidden */
.quiz-results-stats {
    display: none;
}

/* Section Titles */
.quiz-results-section-title {
    font-size: 0.85em;
    font-weight: 600;
    color: var(--quiz-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px 0;
    text-align: left;
}

/* Breakdown by Type — hidden, too analytics-heavy */
.quiz-results-breakdown {
    display: none;
}

.quiz-breakdown-header {
    font-size: 0.75em;
    font-weight: 700;
    color: var(--quiz-primary-text);
    margin-bottom: 12px;
    text-align: left;
}

.quiz-breakdown-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quiz-breakdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #FAFAF7;
    border-radius: 10px;
}

.quiz-breakdown-label {
    flex: 1;
    font-size: 0.85em;
    font-weight: 600;
    color: #57534e;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.quiz-breakdown-bar {
    flex: 2;
    height: 8px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 4px;
    overflow: hidden;
}

.quiz-breakdown-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    animation: barFillReveal 0.6s ease-out;
}

@keyframes barFillReveal {
    from {
        transform: scaleX(0);
        transform-origin: left;
    }
    to {
        transform: scaleX(1);
        transform-origin: left;
    }
}

.quiz-breakdown-fill.perfect {
    background: var(--quiz-accent-correct, #4E6F3E);
}

.quiz-breakdown-fill.good {
    background: #C9A96E;
}

.quiz-breakdown-fill.needs-work {
    background: #A3604E;
}

.quiz-breakdown-fill.struggling {
    background: #8B5E4B;
}

.quiz-breakdown-score {
    font-size: 0.85em;
    font-weight: 700;
    color: #8C8578;
    min-width: 40px;
    text-align: right;
}

/* Weak Words Section */
.quiz-results-weak {
    margin-bottom: 20px;
}

.quiz-weak-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quiz-weak-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(194, 130, 114, 0.06);
    border: 1px solid rgba(194, 130, 114, 0.15);
    border-radius: 10px;
    text-align: left;
}

.quiz-weak-word {
    flex: 1;
    font-size: 1em;
    font-weight: 700;
    color: #44403c;
}

.quiz-weak-answer {
    font-size: 0.85em;
    color: #A3604E;
    font-weight: 600;
}

.quiz-weak-answer::before {
    content: '→ ';
    color: var(--quiz-text-muted);
}

.quiz-results-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.quiz-retry-btn,
.quiz-close-btn {
    padding: 12px 28px;
    font-size: 0.95em;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.quiz-retry-btn {
    padding: 14px 24px;
    color: white;
    background: var(--quiz-primary);
    border: none;
    box-shadow: 0 2px 4px rgba(var(--quiz-primary-rgb), 0.1);
}

.quiz-retry-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(var(--quiz-primary-rgb), 0.15);
}

.quiz-close-btn {
    color: #8C8578;
    background: rgba(0, 0, 0, 0.04);
    border: none;
}

.quiz-close-btn:hover {
    color: #57534e;
}

/* ============================================
   DASHBOARD SCREEN
   ============================================ */
.quiz-dashboard-screen {
    position: relative;
    padding: 24px 20px;
    overflow-y: auto;
    max-height: calc(85vh - 80px);
    z-index: 1;
}

.dashboard-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.5em;
    font-weight: 600;
    color: #2C2C2C;
    text-align: center;
    margin: 0 0 20px 0;
}

.dashboard-section {
    margin-bottom: 20px;
}

.dashboard-section-label {
    font-size: 0.72em;
    font-weight: 600;
    color: var(--quiz-text-muted);
    margin-bottom: 10px;
}

/* --- Streak Calendar --- */
.dashboard-streak-calendar {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.streak-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.streak-day-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85em;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.04);
    color: var(--quiz-text-muted);
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.streak-day.active .streak-day-circle {
    background: #C9A96E;
    color: white;
    border-color: rgba(201, 169, 110, 0.3);
    box-shadow: 0 2px 8px rgba(201, 169, 110, 0.18);
}

.streak-day.today .streak-day-circle {
    border-color: #C9A96E;
}

.streak-day-label {
    font-size: 0.65em;
    font-weight: 600;
    color: var(--quiz-text-muted);
}

/* --- Mastery Grid --- */
.dashboard-mastery-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

.mastery-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 14px 8px;
    border-radius: 12px;
    border: 1.5px solid;
}

.mastery-card.mastery-mastered {
    background: rgba(163, 177, 138, 0.1);
    border-color: rgba(163, 177, 138, 0.25);
}

.mastery-card.mastery-practicing {
    background: rgba(201, 169, 110, 0.06);
    border-color: rgba(201, 169, 110, 0.2);
}

.mastery-card.mastery-new {
    background: rgba(148, 163, 184, 0.06);
    border-color: rgba(148, 163, 184, 0.2);
}

.mastery-count {
    font-size: 1.6em;
    font-weight: 800;
    color: #44403c;
}

.mastery-label {
    font-size: 0.7em;
    font-weight: 600;
    color: #8C8578;
}

/* --- Session List --- */
.dashboard-session-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dashboard-session-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: #FAFAF7;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 10px;
}

.session-card-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.session-card-score {
    font-size: 1em;
    font-weight: 700;
    color: #44403c;
}

.session-card-meta {
    font-size: 0.75em;
    color: var(--quiz-text-muted);
}

.session-card-percent {
    font-size: 1.1em;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 8px;
}

.session-card-percent.high { color: #3f5229; background: rgba(163, 177, 138, 0.15); }
.session-card-percent.medium { color: #7c6a3e; background: rgba(201, 169, 110, 0.12); }
.session-card-percent.low { color: #7c2d12; background: rgba(194, 130, 114, 0.12); }

.dashboard-empty {
    text-align: center;
    padding: 40px 24px;
    color: #a8a29e;
    font-family: 'Klee One', 'Noto Sans JP', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
}

/* --- Trouble Words --- */
.dashboard-trouble-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.trouble-word-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(194, 130, 114, 0.04);
    border: 1px solid rgba(194, 130, 114, 0.12);
    border-radius: 10px;
}

.trouble-word-text {
    font-size: 1em;
    font-weight: 600;
    color: #44403c;
}

.trouble-word-accuracy {
    font-size: 0.85em;
    font-weight: 700;
    color: #A3604E;
}

/* ============================================
   SESSION-END SENTENCE — Parting word
   ============================================ */
.quiz-end-sentence {
    margin: 24px 0;
    padding: 20px;
    background: #FAFAF7;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 12px;
    text-align: center;
}

.quiz-end-sentence-label {
    font-size: 0.75em;
    font-weight: 600;
    color: var(--quiz-text-muted);
    margin-bottom: 8px;
}

.quiz-end-sentence-jp {
    font-family: 'Klee One', 'Noto Sans JP', sans-serif;
    font-size: 1.05em;
    font-weight: 500;
    color: #2C2C2C;
    line-height: 1.7;
    margin-bottom: 4px;
}

.quiz-end-sentence-en {
    font-size: 0.82em;
    color: #57534e;
}

/* --- Dashboard Actions --- */
.dashboard-actions {
    margin-top: 8px;
}

