/* =========================================================
   D. RESULT.CSS
   デニムファインダー
   結果画面 / 失格画面
   ========================================================= */


/* =========================================================
   01. RESULT SCREEN
   ========================================================= */

#result-screen {
    width: 100%;
    animation: resultFadeIn 0.55s ease;
}

@keyframes resultFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================================================
   02. RESULT CARD
   ========================================================= */

.result-card {
    padding:
        54px
        54px
        64px;
}


/* =========================================================
   03. RESULT HEADER
   ========================================================= */

.result-header {
    width: 100%;
    text-align: center;
    margin-bottom: 45px;
}


/* YOUR DENIM IS... */

.result-label {
    margin-bottom: 12px;

    font-family:
        "Montserrat",
        sans-serif;

    font-size: 12px;
    font-weight: 600;

    letter-spacing: 0.22em;

    color: #777568;
}


/* あなたにおすすめの〜 */

.result-title {
    margin: 0;

    font-family:
        "Noto Sans JP",
        sans-serif;

    font-size: 18px;
    font-weight: 400;

    line-height: 1.7;
    letter-spacing: 0.06em;

    color: #302f29;
}


/* =========================================================
   04. BRAND NAME
   ========================================================= */

.result-brand-area {
    width: 100%;

    margin-bottom: 40px;

    text-align: center;
}


/* 英字ブランド名 */

.result-brand {
    margin: 0;

    font-family:
        "Montserrat",
        "Helvetica Neue",
        Arial,
        sans-serif;

    font-size: clamp(38px, 7vw, 64px);
    font-weight: 600;

    line-height: 1.05;

    letter-spacing: -0.035em;

    color: #302f29;

    overflow-wrap: anywhere;
}


/* 日本語ブランド名 */

.result-japanese {
    margin-top: 12px;

    font-family:
        "Noto Sans JP",
        sans-serif;

    font-size: 13px;
    font-weight: 300;

    line-height: 1.5;
    letter-spacing: 0.13em;

    color: #777568;
}


/* =========================================================
   05. INSTAGRAM
   ========================================================= */

.result-instagram {
    width: 100%;

    margin:
        0
        auto
        52px;

    display: flex;
    justify-content: center;
}


/* hidden属性 */

.result-instagram[hidden] {
    display: none;
}


/*
   Instagram側で生成される要素が
   カード幅からはみ出しにくくする
*/

.result-instagram .instagram-media {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 500px !important;

    margin: 0 auto !important;
}


/* =========================================================
   06. RESULT SECTION
   COMMENT / BRAND 共通
   ========================================================= */

.result-section {
    width: 100%;

    margin-bottom: 46px;

    text-align: left;
}


/* =========================================================
   07. SECTION LABEL
   ========================================================= */

.result-section-label {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-width: 108px;

    margin:
        0
        0
        18px;

    padding:
        8px
        17px;

    background: #302f29;

    color: #ffffff;

    font-family:
        "Montserrat",
        sans-serif;

    font-size: 12px;
    font-weight: 600;

    line-height: 1;

    letter-spacing: 0.18em;
}


/* =========================================================
   08. SECTION TEXT
   ========================================================= */

.result-section-text {
    margin: 0;

    font-family:
        "Noto Sans JP",
        sans-serif;

    font-size: 15px;
    font-weight: 400;

    line-height: 2;

    letter-spacing: 0.035em;

    color: #302f29;

    text-align: justify;

    word-break: normal;
    overflow-wrap: break-word;
}


/* =========================================================
   09. ACTION AREA
   ========================================================= */

.result-actions {
    width: 100%;

    margin-top: 58px;

    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 22px;
}


/* =========================================================
   10. MORE BUTTON
   ========================================================= */

.result-more-button {
    position: relative;

    width: 100%;
    max-width: 500px;

    min-height: 76px;

    padding:
        18px
        30px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: #302f29;

    color: #ffffff;

    border: 2px solid #302f29;

    border-radius: 0;

    font-family:
        "Noto Sans JP",
        sans-serif;

    font-size: 17px;
    font-weight: 500;

    line-height: 1;

    letter-spacing: 0.08em;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}


/* → */

.result-more-button::after {
    content: "→";

    position: absolute;

    right: 25px;

    top: 50%;

    transform: translateY(-50%);

    font-family:
        "Montserrat",
        sans-serif;

    font-size: 20px;
    font-weight: 400;

    transition:
        transform 0.2s ease;
}


.result-more-button:hover {
    background: transparent;

    color: #302f29;
}


.result-more-button:hover::after {
    transform:
        translate(4px, -50%);
}


/* =========================================================
   11. RESTART BUTTON
   ========================================================= */

.result-restart-button {
    position: relative;

    display: inline-block;

    padding:
        8px
        3px;

    background: transparent;

    color: #777568;

    border: 0;

    border-bottom:
        1px solid #aaa89a;

    font-family:
        "Noto Sans JP",
        sans-serif;

    font-size: 13px;
    font-weight: 400;

    line-height: 1.4;

    letter-spacing: 0.06em;

    cursor: pointer;

    transition:
        color 0.2s ease,
        border-color 0.2s ease;
}


.result-restart-button:hover {
    color: #302f29;

    border-color: #302f29;
}


/* =========================================================
   12. FAILURE SCREEN
   ========================================================= */

#failure-screen {
    width: 100%;

    animation: resultFadeIn 0.5s ease;
}


.screen-failure .main-card {
    min-height: 700px;

    padding:
        55px
        55px
        60px;

    display: flex;
    flex-direction: column;
    align-items: center;

    justify-content: center;

    text-align: center;
}


/* =========================================================
   13. FAILURE CHARACTER
   ========================================================= */

.failure-character {
    width: 260px;

    margin:
        0
        auto
        25px;
}


.failure-character img {
    width: 100%;
    height: auto;

    object-fit: contain;
}


/* =========================================================
   14. FAILURE CONTENT
   ========================================================= */

.failure-content {
    width: 100%;
}


.failure-label {
    margin-bottom: 10px;

    font-family:
        "Montserrat",
        sans-serif;

    font-size: 11px;
    font-weight: 600;

    letter-spacing: 0.2em;

    color: #777568;
}


.failure-title {
    margin-bottom: 22px;

    font-family:
        "Yusei Magic",
        sans-serif;

    font-size: 48px;
    font-weight: 400;

    line-height: 1.2;

    color: #302f29;
}


.failure-reason {
    max-width: 450px;

    margin:
        0
        auto;

    font-family:
        "Yusei Magic",
        sans-serif;

    font-size: 22px;
    font-weight: 400;

    line-height: 1.7;

    color: #302f29;
}


/* =========================================================
   15. FAILURE ACTION
   ========================================================= */

.failure-action {
    width: 100%;

    margin-top: 45px;

    display: flex;
    justify-content: center;
}


.failure-action .primary-button {
    max-width: 460px;
}


/* =========================================================
   16. TABLET
   ========================================================= */

@media (max-width: 700px) {

    .result-card {
        padding:
            45px
            34px
            52px;
    }


    /* HEADER */

    .result-header {
        margin-bottom: 38px;
    }


    .result-title {
        font-size: 17px;
    }


    /* BRAND */

    .result-brand-area {
        margin-bottom: 35px;
    }


    .result-brand {
        font-size:
            clamp(35px, 8vw, 54px);
    }


    /* INSTAGRAM */

    .result-instagram {
        margin-bottom: 44px;
    }


    /* SECTION */

    .result-section {
        margin-bottom: 40px;
    }


    .result-section-text {
        font-size: 14px;

        line-height: 1.95;
    }


    /* ACTION */

    .result-actions {
        margin-top: 48px;
    }


    /* FAILURE */

    .screen-failure .main-card {
        min-height: 620px;

        padding:
            45px
            34px
            50px;
    }


    .failure-character {
        width: 220px;
    }


    .failure-title {
        font-size: 42px;
    }


    .failure-reason {
        font-size: 20px;
    }
}


/* =========================================================
   17. SMARTPHONE
   ========================================================= */

@media (max-width: 480px) {

    /* CARD */

    .result-card {
        padding:
            38px
            22px
            44px;
    }


    /* HEADER */

    .result-header {
        margin-bottom: 32px;
    }


    .result-label {
        margin-bottom: 10px;

        font-size: 10px;

        letter-spacing: 0.2em;
    }


    .result-title {
        font-size: 15px;

        line-height: 1.65;
    }


    /* BRAND */

    .result-brand-area {
        margin-bottom: 30px;
    }


    .result-brand {
        font-size:
            clamp(31px, 10vw, 46px);

        line-height: 1.08;

        letter-spacing: -0.04em;
    }


    .result-japanese {
        margin-top: 9px;

        font-size: 11px;

        letter-spacing: 0.1em;
    }


    /* INSTAGRAM */

    .result-instagram {
        margin-bottom: 38px;
    }


    /* SECTION */

    .result-section {
        margin-bottom: 36px;
    }


    /* COMMENT / BRAND */

    .result-section-label {
        min-width: 96px;

        margin-bottom: 15px;

        padding:
            7px
            14px;

        font-size: 10px;

        letter-spacing: 0.16em;
    }


    /* TEXT */

    .result-section-text {
        font-size: 13px;

        line-height: 1.9;

        letter-spacing: 0.025em;

        text-align: left;
    }


    /* ACTION */

    .result-actions {
        margin-top: 43px;

        gap: 19px;
    }


    /* MORE */

    .result-more-button {
        min-height: 67px;

        padding:
            15px
            48px
            15px
            20px;

        font-size: 15px;
    }


    .result-more-button::after {
        right: 20px;

        font-size: 18px;
    }


    /* RESTART */

    .result-restart-button {
        font-size: 12px;
    }


    /* FAILURE */

    .screen-failure .main-card {
        min-height: 560px;

        padding:
            38px
            22px
            42px;
    }


    .failure-character {
        width: 190px;

        margin-bottom: 20px;
    }


    .failure-title {
        margin-bottom: 18px;

        font-size: 38px;
    }


    .failure-reason {
        font-size: 18px;

        line-height: 1.65;
    }


    .failure-action {
        margin-top: 36px;
    }
}


/* =========================================================
   18. VERY SMALL SMARTPHONE
   ========================================================= */

@media (max-width: 360px) {

    .result-card {
        padding:
            34px
            17px
            40px;
    }


    .result-brand {
        font-size:
            clamp(28px, 10vw, 38px);
    }


    .result-section-text {
        font-size: 12.5px;
    }
}


/* =========================================================
   19. ACCESSIBILITY
   ========================================================= */

.result-more-button:focus-visible,
.result-restart-button:focus-visible {
    outline:
        4px solid
        rgba(69, 168, 207, 0.4);

    outline-offset: 4px;
}


/* =========================================================
   20. REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    #result-screen,
    #failure-screen {
        animation: none;
    }


    .result-more-button,
    .result-more-button::after,
    .result-restart-button {
        transition: none;
    }
}