.answer-key,
.answer-key-header,
.answer-key-question,
.scorecard {
    box-sizing: border-box;
}

.answer-key {
    padding: 0 0 2.4em 0;
    text-align: center;
    background: #000 !important;
}

.answer-key-header {
    display: inline-flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px auto;
    width: auto;
    max-width: 100%;
    min-width: 320px;
    padding: 1.15em 1.4em 1.05em 1.4em;
    background: #000;
    border: 1px solid #fff;
    border-radius: 12px;
}

.answer-key-header-gold {
    border-color: #ffd700 !important;
}

.answer-key-header-gold .answer-key-title,
.answer-key-header-gold .answer-key-subtitle,
.answer-key-header-gold .scorecard-score {
    color: #ffd700 !important;
    border-color: #ffd700 !important;
}

.answer-key-actions {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

.answer-key-question {
    position: relative;
    margin: 0.5em 0;
    text-align: center;
    display: inline-block;
    min-width: 400px;
    max-width: 770px;
    width: 100%;
    background: #000;
    border-radius: 15px;
    border: 1px solid #fff;
    padding: 1.15em 1.5em;
}

.answer-key-question .question-number {
    position: absolute;
    top: 12px;
    left: 10px;
    margin: 0;
    padding: 0;
    font-size: 1.25em;
    text-align: left;
    background: transparent;
    z-index: 2;
    min-width: 0;
    width: auto;
    line-height: 1;
    font-family: 'Montserrat', 'League Spartan', Arial, sans-serif;
    flex-shrink: 0;
    font-weight: bold !important;
    color: #fff;
}

.incorrect-x {
    position: absolute;
    top: 12px;
    right: 15px;
    color: #fff;
    font-size: 1.7em;
    font-weight: normal;
    z-index: 10;
    font-family: 'Montserrat', 'League Spartan', Arial, sans-serif;
    pointer-events: none;
    user-select: none;
}

.scorecard {
    font-size: 1.55em;
    font-family: 'Montserrat', 'League Spartan', Arial, sans-serif;
    color: #fff;
    background: #000;
    border-radius: 36px;
    padding: 1.1em 2em 0.7em 2em;
    margin: 0 auto 1.3em auto;
    width: fit-content;
    font-weight: normal;
    box-shadow: 0 1.2px 9px rgba(0,0,0,0.23);
    letter-spacing: 1.2px;
    border: 1px solid #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1em;
}

.scorecard-troyale {
    font-weight: bold !important;
    font-size: 2.55em !important;
    line-height: 1.07;
    margin-bottom: 0.2em;
}

.scorecard-troyale,
.scorecard-daily,
.scorecard-date {
    color: #fff;
}

.scorecard-daily {
    display: inline-block;
    padding: 0.23em 1.3em;
    border: 1px solid #fff;
    border-radius: 17px;
    background: transparent;
    font-weight: normal;
    font-size: 1.7em;
    margin: 0.22em 0 0.08em 0;
    letter-spacing: 0.04em;
    vertical-align: middle;
    min-width: 0;
    width: auto;
    text-align: center;
    height: auto;
    line-height: 1.1;
    box-sizing: border-box;
    transition: border-color 0.3s, color 0.3s;
}

.scorecard-score {
    display: inline-block;
    padding: 0.3em 1.5em;
    border: 1px solid #fff !important;
    border-radius: 17px;
    background: transparent;
    font-weight: normal;
    font-size: 2em;
    margin: 0.1em 0 0.22em 0;
    letter-spacing: 0.012em;
    vertical-align: middle;
    min-width: 0;
    width: auto;
    text-align: center;
    height: auto;
    line-height: 1.1;
    box-sizing: border-box;
    transition: border-color 0.3s, color 0.3s;
}

.scorecard-score .score-slash {
    padding: 0 0.13em;
}

.scorecard-date {
    font-size: 0.78em;
    color: #aaa !important;
    margin-top: 0.51em;
}

.scorecard-gold {
    border-color: #ffd700 !important;
    color: #ffd700 !important;
}

.scorecard-gold .scorecard-troyale,
.scorecard-gold .scorecard-daily,
.scorecard-gold .scorecard-date {
    color: #ffd700 !important;
}

.scorecard-gold .scorecard-daily {
    border-color: #ffd700 !important;
    color: #ffd700 !important;
}

.scorecard-gold .scorecard-score {
    border-color: #ffd700 !important;
    color: #ffd700 !important;
}

.scorecard-gold * {
    color: #ffd700 !important;
    border-color: #ffd700 !important;
}

.answer-key-gold,
.scorecard-gold .answer-key-question {
    border: 3px solid #ffd700 !important;
}

.answer-key-gold,
.scorecard-gold .answer-key-question,
.answer-key-gold *,
.scorecard-gold .answer-key-question * {
    color: #ffd700 !important;
    border-color: #ffd700 !important;
}

.scorecard-gold + .date-btn,
.scorecard-gold + a.date-btn {
    color: #ffd700 !important;
    border-color: #ffd700 !important;
}

.scorecard-gold + .date-btn:hover,
.scorecard-gold + a.date-btn:hover {
    background: #ffd700 !important;
    color: #000 !important;
    border-color: #ffd700 !important;
}

.scorecard-gold .question-number {
    color: #ffd700 !important;
}

.scorecard-gold .incorrect-x {
    color: #ffd700 !important;
}

.scorecard-gold .answer-key-title,
.scorecard-gold .answer-key-subtitle,
.scorecard-gold .answer-key-answer,
.scorecard-gold .answer-key-spice {
    color: #ffd700 !important;
}

.scorecard-gold .answer-key-question .question-number {
    color: #ffd700 !important;
    font-weight: bold !important;
}

.scorecard-gold .answer-key-question {
    border-color: #ffd700 !important;
}

.answer-key-question.correct {
    background: #000;
    border: 3px solid #0b3 !important;
    color: #0b3 !important;
}

.answer-key-question.correct * {
    color: #0b3 !important;
    border-color: #0b3 !important;
}

.answer-key-question.incorrect {
    background: #000;
    border: 3px solid #d22 !important;
    color: #d22 !important;
}

.answer-key-question.incorrect * {
    color: #d22 !important;
    border-color: #d22 !important;
}

.answer-key-title {
    font-weight: bold !important;
    font-size: 3.4em;
    line-height: 1.05;
    margin: 0 0 0.18em 0;
    text-align: center;
    color: #fff;
    font-family: 'Montserrat', 'League Spartan', Arial, sans-serif;
    letter-spacing: 1px;
}

.answer-key-subtitle {
    font-weight: bold !important;
    font-size: 2.8em;
    line-height: 1.06;
    margin: 0 0 0.35em 0;
    text-align: center;
    color: #fff;
    font-family: 'Montserrat', 'League Spartan', Arial, sans-serif;
    letter-spacing: 1px;
}

.answer-key-answer {
    margin-top: 1em;
    font-size: 1.18em;
    font-weight: bold;
    color: #fff;
    text-align: center;
}

.answer-key-spice {
    margin-top: 0.85em;
    color: #fff;
    text-align: center;
    font-style: normal;
    font-size: 1.18em;
}

.share-btn.is-perfect {
    background: #000;
    color: #ffd700;
    border: 1px solid #ffd700;
}

.share-btn {
    transition: background 0.2s, color 0.2s, transform 0.2s;
}

.share-btn:hover,
.share-btn:active {
    transform: scale(1.08);
}

.home-btn,
.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0.7em 2em;
    font-size: 1.17em;
    border: 1px solid #fff;
    border-radius: 12px;
    background: #000;
    color: #fff;
    text-align: center;
    cursor: pointer;
    font-family: 'Montserrat', 'League Spartan', Arial, sans-serif;
    box-shadow: 0 1.2px 9px rgba(0,0,0,0.23);
    transition: background 0.2s, color 0.2s;
    text-decoration: none;
    font-weight: bold;
    vertical-align: middle;
}

.home-btn:hover,
.share-btn:hover {
    background: #fff;
    color: #000;
}

@media (max-width: 900px) {
    .answer-key-header {
        min-width: 0;
        width: auto;
        max-width: calc(100vw - 1.2em);
        padding: 1em 0.9em 0.95em 0.9em;
    }

    .answer-key-question {
        min-width: 0;
        max-width: 100%;
        width: 100%;
        padding: 1em 0.5em;
    }

    .answer-key-actions {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
    }
}

@media (max-width: 600px) {
    .answer-key {
        padding-top: 0;
    }

    .answer-key-header {
        display: flex;
        margin-top: 0;
        min-width: 0;
        width: 100%;
        max-width: 100%;
        padding: 0.95em 0.8em 0.9em 0.8em;
    }

    .answer-key-question {
        min-width: 0;
        max-width: 100%;
        width: 100%;
        padding: 0.7em 0.5em;
    }

    .answer-key-question .question-number {
        left: 8px;
        top: 10px;
    }

    .incorrect-x {
        right: 8px;
        top: 10px;
    }

    .answer-key-title {
        font-size: 2.4em;
        margin: 0 0 0.14em 0;
    }

    .answer-key-subtitle {
        font-size: 2em;
        margin: 0 0 0.28em 0;
    }

    .scorecard-daily {
        padding: 0.23em 1.3em;
        border-radius: 17px;
        font-size: 1.7em;
        min-width: 0;
        width: auto;
        height: auto;
        line-height: 1.1;
        border-width: 1px !important;
    }

    .scorecard-score {
        padding: 0.28em 1.45em;
        border-radius: 17px;
        font-size: 1.9em;
        min-width: 0;
        width: auto;
        height: auto;
        line-height: 1.1;
        border-width: 1px !important;
    }

    .scorecard-score .score-slash {
        padding: 0 0.08em;
    }

    .answer-key-actions {
        flex-direction: row;
        gap: 10px;
    }

    .home-btn,
    .share-btn {
        display: inline-flex;
        margin: 0;
        width: 150px;
        min-width: 0;
        max-width: 90vw;
        box-sizing: border-box;
        text-align: center;
        padding: 0.7em 2em;
    }
}

@media (min-width: 901px) {
    .answer-key {
        padding-top: 0 !important;
    }
}
