:root {
    --pink: #E7316E;
    --light-pink: #FFF6F9;
    --text: #10131a;
    --line: #ffe7f1;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Noto Sans JP', sans-serif;
    color: var(--text);
    background: #fff;
}

a {
    color: inherit;
    text-decoration: none;
}

.result-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.result-header {
    height: 104px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
}

.brand {
    display: inline-flex;
    align-items: center;
}

.brand-logo {
    height: 56px;
    width: auto;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logout-button {
    min-width: 160px;
    height: 52px;
    padding: 13px 28px;
    border: 2px solid #10131a;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

.account-button {
    width: 60px;
    height: 60px;
    background: var(--pink);
    border-radius: 50%;
    position: relative;
}

.account-button::before,
.account-button::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
}

.account-button::before {
    top: 15px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

.account-button::after {
    bottom: 12px;
    width: 28px;
    height: 14px;
    border-radius: 14px 14px 8px 8px;
}

.result-main {
    flex: 1;
    padding: 22px 40px 50px;
    background: #fff;
}

.result-panel {
    max-width: 1100px;
    margin: 0 auto;
    background: var(--light-pink);
    border-radius: 24px;
    padding: 56px 42px 42px;
}

.meta-list {
    display: inline-flex;
    background: #fff;
    border-radius: 999px;
    padding: 14px 28px;
    gap: 30px;
    margin-bottom: 34px;
}

.meta-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
}

.meta-item + .meta-item::before {
    content: "";
    position: absolute;
    left: -15px;
    width: 1px;
    height: 26px;
    background: #d8d8d8;
}

.meta-label {
    color: var(--pink);
    font-weight: 700;
    font-size: 13px;
}

.meta-value {
    font-size: 14px;
    font-weight: 500;
}

.result-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin-bottom: 28px;
}

.summary-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 80px;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.summary-card .label {
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    background: var(--pink);
}

.summary-card .value {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 36px;
    font-weight: 700;
}

.answers-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
}

.answers-table th,
.answers-table td {
    border: 1px solid var(--line);
    padding: 14px 20px;
    text-align: center;
    font-size: 14px;
}

.answers-table th {
    color: #fff;
    font-weight: 700;
    background: #1E1E1E;
}

.answers-table td {
    font-weight: 500;
    background: #fff;
}

.answers-table td:first-child {
    font-weight: 700;
}

.judgement {
    font-size: 24px;
    line-height: 1;
    font-weight: 700;
}

.judgement.correct {
    color: #47B766;
}

.judgement.incorrect {
    color: #D23535;
}

.judgement.unanswered {
    color: #9ea7af;
}

.mobile-table-wrap {
    display: none;
}

.mobile-toggle {
    border: none;
    background: transparent;
    color: var(--pink);
    font-size: 30px;
    line-height: 1;
}

.mobile-detail-row td {
    text-align: left;
    padding: 18px 22px;
}

.mobile-answer-line {
    display: flex;
    gap: 18px;
    font-size: 39px;
    padding: 8px 0;
}

.mobile-answer-label {
    font-weight: 700;
}

.result-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 30px;
}

.result-actions a {
    min-height: 52px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 28px;
    font-size: 14px;
    font-weight: 700;
}

.result-actions .primary {
    background: var(--pink);
    color: #fff;
    margin-right: auto;
}

.result-actions .secondary {
    background: #fff;
    border: 2px solid #f2f2f2;
}

.result-actions .muted {
    color: #bcbcbc;
}

.result-footer {
    border-top: 1px solid #FF8E3F;
    padding: 20px 40px 26px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.result-footer nav {
    display: flex;
    gap: 28px;
}

@media (max-width: 900px) {
    .result-header {
        padding: 12px 20px;
        height: 80px;
    }

    .logout-button {
        display: none;
    }

    .account-button {
        width: 42px;
        height: 42px;
        border-radius: 40px;
    }

    .account-button::before {
        top: 9px;
        width: 12px;
        height: 12px;
    }

    .account-button::after {
        bottom: 8px;
        width: 20px;
        height: 11px;
        border-radius: 10px 10px 6px 6px;
    }

    .result-main {
        padding: 0;
    }

    .result-panel {
        border-radius: 0;
        padding: 18px 20px 28px;
    }

    .meta-list {
        width: 100%;
        justify-content: space-between;
        border-radius: 999px;
        padding: 14px 18px;
        gap: 8px;
        margin-bottom: 18px;
    }

    .meta-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .meta-label {
        font-size: 12px;
    }

    .meta-value {
        font-size: 13px;
    }

    .meta-item + .meta-item::before {
        left: -6px;
        height: 34px;
    }

    .result-summary {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .summary-card {
        grid-template-columns: 43% 1fr;
    }

    .summary-card .label {
        font-size: 16px;
    }

    .summary-card .value {
        font-size: 32px;
    }

    .desktop-table-wrap {
        display: none;
    }

    .mobile-table-wrap {
        display: block;
    }

    .answers-table th,
    .answers-table td {
        font-size: 14px;
        padding: 12px 8px;
    }

    .mobile-detail-row td {
        padding: 12px 16px;
    }

    .mobile-answer-line {
        font-size: 14px;
        line-height: 1.6;
    }

    .result-actions {
        flex-wrap: wrap;
        gap: 10px;
    }

    .result-actions a {
        border-radius: 40px;
    }

    .result-actions .primary {
        margin-right: 0;
        width: 100%;
        height: 72px;
        font-size: 20px;
        border-radius: 40px;
    }

    .result-actions .secondary {
        flex: 1;
        height: 52px;
    }

    .result-footer {
        font-size: 10px;
        padding: 20px 16px;
        flex-direction: column-reverse;
        text-align: center;
        gap: 14px;
    }

    .result-footer nav {
        justify-content: center;
        gap: 40px;
    }

    .result-footer nav a {
        font-size: 14px;
        font-weight: 700;
    }
}
