.results-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 28px;
}

#open-tiebreak {
    display: block;
    margin: 18px auto 0;
}

.question-preview {
    position: fixed;
    z-index: 20;
    left: 50%;
    top: 50%;
    width: min(520px, calc(100vw - 32px));
    padding: 24px;
    transform: translate(-50%, -50%);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface-strong);
    box-shadow: 0 24px 90px rgba(0, 0, 0, 0.45);
}

.question-preview-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface);
    color: var(--text);
    font-size: 1.2rem;
    cursor: pointer;
}

.question-preview-value {
    color: var(--accent);
    font-weight: 900;
    letter-spacing: 0.08em;
}

.question-preview-text {
    margin: 18px 0 14px;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.4;
}

.question-preview-answer {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-soft);
    color: var(--muted);
    line-height: 1.5;
}

.question-history-modal,
.decision-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(3, 8, 12, 0.76);
    backdrop-filter: blur(8px);
}

.question-history-modal.hidden {
    display: none;
}

.question-history-dialog,
.decision-modal-dialog {
    position: relative;
    width: min(980px, 100%);
    max-height: min(88vh, 900px);
    overflow: auto;
    padding: 28px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.5);
}

.question-history-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.question-history-header h2 {
    margin: 8px 0 0;
}

.question-history-close,
.decision-modal-close {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface-strong);
    color: var(--text);
    font-size: 1.3rem;
    cursor: pointer;
}

.question-history-content {
    display: grid;
    gap: 18px;
}

.question-history-topic {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-strong);
    overflow: hidden;
}

.question-history-topic-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
}

.question-history-topic-header h3 {
    margin: 0;
}

.question-history-topic-header span {
    color: var(--accent-strong);
    font-weight: 800;
}

.question-history-list {
    display: grid;
}

.question-history-item {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
}

.question-history-item:last-child {
    border-bottom: 0;
}

.question-history-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.question-history-points {
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 850;
}

.question-status {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-weight: 900;
}

.question-status.correct {
    background: rgba(52, 211, 153, 0.16);
    color: #34d399;
    border: 1px solid rgba(52, 211, 153, 0.42);
}

.question-status.wrong {
    background: rgba(251, 113, 133, 0.14);
    color: #fb7185;
    border: 1px solid rgba(251, 113, 133, 0.4);
}

.question-history-question {
    margin-top: 8px;
    font-weight: 750;
    line-height: 1.5;
}

.question-history-answer {
    margin-top: 6px;
    color: var(--muted);
    line-height: 1.45;
}

.decision-modal {
    z-index: 110;
}

.decision-modal-dialog {
    width: min(760px, 100%);
    max-height: 92vh;
    overflow: auto;
    padding: 24px;
}

.decision-modal-dialog.spinning .decision-modal-close {
    opacity: 0.35;
    cursor: not-allowed;
}

.decision-modal-dialog .tiebreak-card {
    border: 0;
    padding: 10px 0 4px;
    box-shadow: none;
    background: transparent;
}

@media (max-width: 700px) {
    .question-history-dialog,
    .decision-modal-dialog {
        padding: 20px;
    }

    .results-actions {
        flex-direction: column;
    }

    .results-actions .btn {
        width: min(260px, 100%);
    }
}
