
/* ==========================================================================
   Onepath - Matching
   /assets/css/matching.css

   対象:
   - /tsushin/matching/index.php
   - /tsushin/matching/result.php
   ========================================================================== */


/* ==========================================================================
   BASE TOKENS
   ========================================================================== */

.matching-hero,
.matching-section,
.matching-result-hero,
.matching-results,
.matching-result-note,
.matching-consult-cta {
    --matching-accent: #159ca5;
    --matching-accent-dark: #0d7f87;
    --matching-accent-soft: #eaf8f8;
    --matching-purple-soft: #f5f1f7;
    --matching-text: #222;
    --matching-muted: #6f7478;
    --matching-border: #e1e6e8;
    --matching-bg: #f7f9fa;
    --matching-white: #fff;
    --matching-good: #17795d;
    --matching-good-bg: #eef8f4;
    --matching-caution: #8a6225;
    --matching-caution-bg: #fff6e8;
    --matching-shadow: 0 18px 55px rgba(0, 0, 0, .07);
}


/* ==========================================================================
   HERO
   ========================================================================== */

.matching-hero,
.matching-result-hero {
    position: relative;
    overflow: hidden;
    padding: 94px 0 76px;
    background:
        radial-gradient(
            circle at 90% 10%,
            rgba(21, 156, 165, .12),
            transparent 34%
        ),
        linear-gradient(
            135deg,
            #f7fbfb 0%,
            #f8f5fa 100%
        );
}

.matching-hero::after,
.matching-result-hero::after {
    content: "";
    position: absolute;
    right: -95px;
    bottom: -115px;
    width: 320px;
    height: 320px;
    border: 1px solid rgba(21, 156, 165, .12);
    border-radius: 50%;
}

.matching-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 820px;
}

.matching-en {
    display: inline-block;
    margin-bottom: 16px;
    color: var(--matching-accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .18em;
}

.matching-hero h1,
.matching-result-hero h1 {
    margin: 0;
    color: var(--matching-text);
    font-size: clamp(36px, 5vw, 62px);
    font-weight: 800;
    line-height: 1.16;
    letter-spacing: -.03em;
}

.matching-hero h1 em,
.matching-result-hero h1 em {
    color: var(--matching-accent);
    font-style: normal;
}

.matching-hero p,
.matching-result-hero p {
    max-width: 680px;
    margin: 22px 0 0;
    color: var(--matching-muted);
    font-size: 15px;
    line-height: 1.9;
}

.matching-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.matching-hero-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid rgba(21, 156, 165, .18);
    border-radius: 999px;
    background: rgba(255, 255, 255, .72);
    color: #4d5559;
    font-size: 12px;
    font-weight: 700;
}


/* ==========================================================================
   TARGET
   ========================================================================== */

.matching-target {
    padding: 38px 0 0;
    background: #fff;
}

.matching-target-card {
    display: grid;
    grid-template-columns: minmax(0, 220px) 1fr;
    gap: 28px;
    align-items: center;
    padding: 24px;
    border: 1px solid var(--matching-border);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 36px rgba(0, 0, 0, .05);
}

.matching-target-card:not(:has(.matching-target-image)) {
    grid-template-columns: 1fr;
}

.matching-target-image {
    overflow: hidden;
    aspect-ratio: 4 / 3;
    border-radius: 14px;
    background: #edf1f2;
}

.matching-target-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.matching-target-content > span {
    color: var(--matching-accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
}

.matching-target-content h2 {
    margin: 7px 0 0;
    color: var(--matching-text);
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.4;
}

.matching-target-campus {
    margin: 8px 0 0;
    color: #34393d;
    font-size: 16px;
    font-weight: 700;
}

.matching-target-location,
.matching-target-copy {
    color: var(--matching-muted);
    font-size: 13px;
    line-height: 1.8;
}

.matching-target-location {
    margin: 10px 0 0;
}

.matching-target-copy {
    margin: 12px 0 0;
}


/* ==========================================================================
   MATCHING FORM SECTION
   ========================================================================== */

.matching-section {
    padding: 68px 0 96px;
    background: var(--matching-bg);
}

.matching-form {
    max-width: 860px;
    margin: 0 auto;
}


/* ==========================================================================
   PROGRESS
   ========================================================================== */

.matching-progress {
    margin-bottom: 24px;
    padding: 18px 20px;
    border: 1px solid var(--matching-border);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .04);
}

.matching-progress-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
    color: #50565a;
    font-size: 12px;
    font-weight: 800;
}

.matching-progress-bar {
    position: relative;
    overflow: hidden;
    height: 8px;
    border-radius: 999px;
    background: #edf1f2;
}

.matching-progress-bar::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--matching-progress, 10%);
    border-radius: inherit;
    background:
        linear-gradient(
            90deg,
            var(--matching-accent),
            #5ab8be
        );
    transition: width .28s ease;
}


/* ==========================================================================
   QUESTION CARD
   ========================================================================== */

.matching-question {
    display: none;
    padding: 38px;
    border: 1px solid var(--matching-border);
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--matching-shadow);
}

.matching-question.is-active {
    display: block;
}

.matching-question-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--matching-accent-soft);
    color: var(--matching-accent-dark);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
}

.matching-question h2,
.matching-question h3 {
    margin: 15px 0 0;
    color: var(--matching-text);
    font-size: clamp(25px, 3vw, 34px);
    line-height: 1.45;
}

.matching-question > p {
    margin: 12px 0 0;
    color: var(--matching-muted);
    font-size: 14px;
    line-height: 1.85;
}


/* ==========================================================================
   CHOICES
   ========================================================================== */

.matching-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 28px;
}

.matching-choice {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 11px;
    min-height: 68px;
    padding: 16px;
    border: 1px solid var(--matching-border);
    border-radius: 13px;
    background: #fff;
    color: #3d4347;
    cursor: pointer;
    transition:
        border-color .18s ease,
        background .18s ease,
        box-shadow .18s ease,
        transform .18s ease;
}

.matching-choice:hover {
    border-color: rgba(21, 156, 165, .55);
    background: #fbfefe;
    transform: translateY(-1px);
}

.matching-choice input[type="radio"],
.matching-choice input[type="checkbox"] {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    accent-color: var(--matching-accent);
}

.matching-choice span {
    line-height: 1.65;
}

.matching-choice.is-selected,
.matching-choice:has(input:checked) {
    border-color: var(--matching-accent);
    background: var(--matching-accent-soft);
    box-shadow: inset 0 0 0 1px rgba(21, 156, 165, .08);
}

.matching-choice.is-selected span,
.matching-choice:has(input:checked) span {
    color: var(--matching-accent-dark);
    font-weight: 800;
}


/* ==========================================================================
   SELECT
   ========================================================================== */

.matching-select-wrap {
    margin-top: 28px;
}

.matching-select-wrap select {
    width: 100%;
    min-height: 54px;
    padding: 0 14px;
    border: 1px solid #d7dee1;
    border-radius: 11px;
    background: #fff;
    color: var(--matching-text);
    font: inherit;
    cursor: pointer;
}

.matching-select-wrap select:focus {
    outline: none;
    border-color: var(--matching-accent);
    box-shadow: 0 0 0 3px rgba(21, 156, 165, .11);
}


/* ==========================================================================
   CONTROLS
   ========================================================================== */

.matching-controls {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
}

.matching-prev,
.matching-next,
.matching-submit {
    min-height: 54px;
    padding: 12px 22px;
    border-radius: 11px;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition:
        background .18s ease,
        border-color .18s ease,
        transform .18s ease,
        box-shadow .18s ease;
}

.matching-prev {
    border: 1px solid #cfd7da;
    background: #fff;
    color: #495055;
}

.matching-prev:hover {
    background: #f7f9fa;
    border-color: #aeb9bd;
}

.matching-next,
.matching-submit {
    border: 1px solid var(--matching-accent);
    background: var(--matching-accent);
    color: #fff;
}

.matching-next:hover,
.matching-submit:hover {
    background: var(--matching-accent-dark);
    box-shadow: 0 10px 24px rgba(21, 156, 165, .18);
    transform: translateY(-1px);
}

.matching-prev[disabled],
.matching-next[disabled],
.matching-submit[disabled] {
    opacity: .46;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.matching-note {
    margin-top: 18px;
    color: var(--matching-muted);
    font-size: 12px;
    line-height: 1.75;
}

.matching-note-box {
    margin-top: 26px;
    padding: 17px 18px;
    border-radius: 12px;
    background: #f1f5f6;
    color: #62696d;
    font-size: 12px;
    line-height: 1.75;
}


/* ==========================================================================
   RESULT SECTION
   ========================================================================== */

.matching-results {
    padding: 68px 0 96px;
    background: var(--matching-bg);
}

.matching-result-main {
    display: grid;
    gap: 22px;
}

.matching-result-card {
    position: relative;
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 22px;
    padding: 28px;
    border: 1px solid var(--matching-border);
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--matching-shadow);
}

.matching-result-rank {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 3px;
    color: var(--matching-accent);
    text-align: center;
}

.matching-result-rank > span {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em;
}

.matching-result-rank strong {
    margin-top: 4px;
    font-size: 34px;
    line-height: 1;
}

.matching-result-content {
    min-width: 0;
}

.matching-result-content h2 {
    margin: 0;
    color: var(--matching-text);
    font-size: clamp(23px, 3vw, 32px);
    line-height: 1.45;
}

.matching-result-campus {
    margin: 6px 0 0;
    color: #3f464a;
    font-size: 15px;
    font-weight: 700;
}

.matching-result-location {
    margin: 8px 0 0;
    color: var(--matching-muted);
    font-size: 13px;
}

.matching-result-copy {
    margin: 12px 0 0;
    color: #535a5e;
    font-size: 13px;
    line-height: 1.8;
}


/* ==========================================================================
   SCORE / CONFIDENCE
   ========================================================================== */

.matching-result-score {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    margin-top: 18px;
    color: var(--matching-accent-dark);
}

.matching-result-score strong {
    font-size: 36px;
    line-height: 1;
}

.matching-result-score span {
    font-size: 13px;
    font-weight: 800;
}

.matching-result-confidence {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    margin-left: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    background: #f0f3f4;
    color: #596065;
    font-size: 11px;
    font-weight: 800;
}


/* ==========================================================================
   RESULT ANALYSIS
   ========================================================================== */

.matching-result-analysis {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 22px;
}

.matching-result-good,
.matching-result-caution {
    padding: 17px 18px;
    border-radius: 13px;
}

.matching-result-good {
    background: var(--matching-good-bg);
    color: var(--matching-good);
}

.matching-result-caution {
    background: var(--matching-caution-bg);
    color: var(--matching-caution);
}

.matching-result-good h3,
.matching-result-caution h3 {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
}

.matching-result-good ul,
.matching-result-caution ul {
    margin: 10px 0 0;
    padding-left: 18px;
}

.matching-result-good li,
.matching-result-caution li {
    margin-top: 5px;
    font-size: 12px;
    line-height: 1.7;
}


/* ==========================================================================
   RESULT META
   ========================================================================== */

.matching-result-cost,
.matching-result-data-note {
    margin-top: 16px;
    color: var(--matching-muted);
    font-size: 12px;
    line-height: 1.7;
}

.matching-result-cost strong {
    color: var(--matching-text);
    font-size: 15px;
}

.matching-result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.matching-detail-btn,
.matching-request-btn,
.matching-retry-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 11px 18px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
    transition:
        background .18s ease,
        border-color .18s ease,
        transform .18s ease;
}

.matching-detail-btn {
    border: 1px solid var(--matching-accent);
    background: var(--matching-accent);
    color: #fff;
}

.matching-detail-btn:hover {
    background: var(--matching-accent-dark);
    transform: translateY(-1px);
}

.matching-request-btn {
    border: 1px solid var(--matching-border);
    background: #fff;
    color: var(--matching-text);
}

.matching-request-btn:hover,
.matching-retry-link:hover {
    border-color: var(--matching-accent);
    background: var(--matching-accent-soft);
    transform: translateY(-1px);
}

.matching-retry-link {
    border: 1px solid var(--matching-border);
    background: #fff;
    color: var(--matching-text);
}


/* ==========================================================================
   RESULT IMAGE
   ========================================================================== */

.matching-result-image {
    overflow: hidden;
    margin-top: 18px;
    aspect-ratio: 16 / 7;
    border-radius: 14px;
    background: #edf1f2;
}

.matching-result-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* ==========================================================================
   EMPTY
   ========================================================================== */

.matching-result-empty {
    padding: 44px 30px;
    border: 1px solid var(--matching-border);
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--matching-shadow);
    text-align: center;
}

.matching-result-empty h2 {
    margin: 0;
    color: var(--matching-text);
    font-size: 28px;
}

.matching-result-empty p {
    max-width: 620px;
    margin: 14px auto 0;
    color: var(--matching-muted);
    font-size: 14px;
    line-height: 1.85;
}

.matching-result-empty-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 24px;
}


/* ==========================================================================
   RESULT NOTE / CONSULT
   ========================================================================== */

.matching-result-note {
    padding: 0 0 70px;
    background: var(--matching-bg);
}

.matching-result-note .matching-note-box {
    max-width: 920px;
    margin: 0 auto;
}

.matching-consult-cta {
    padding: 0 0 96px;
    background: var(--matching-bg);
}

.matching-consult-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 34px 38px;
    border-radius: 22px;
    background:
        linear-gradient(
            135deg,
            #eaf8f8,
            #f5f1f7
        );
}

.matching-consult-box h2 {
    margin: 0;
    color: var(--matching-text);
    font-size: clamp(24px, 3vw, 32px);
    line-height: 1.5;
}

.matching-consult-box p {
    max-width: 680px;
    margin: 10px 0 0;
    color: var(--matching-muted);
    font-size: 14px;
    line-height: 1.85;
}

.matching-consult-box a {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 12px 22px;
    border-radius: 11px;
    background: var(--matching-text);
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
    transition:
        opacity .18s ease,
        transform .18s ease;
}

.matching-consult-box a:hover {
    opacity: .9;
    transform: translateY(-1px);
}


/* ==========================================================================
   TABLET
   ========================================================================== */

@media (max-width: 920px) {

    .matching-result-card {
        grid-template-columns: 72px minmax(0, 1fr);
    }

    .matching-result-analysis {
        grid-template-columns: 1fr;
    }

    .matching-consult-box {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* ==========================================================================
   MOBILE
   ========================================================================== */

@media (max-width: 720px) {

    .matching-hero,
    .matching-result-hero {
        padding: 72px 0 58px;
    }

    .matching-hero h1,
    .matching-result-hero h1 {
        font-size: 38px;
    }

    .matching-target {
        padding-top: 26px;
    }

    .matching-target-card {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 18px;
        border-radius: 16px;
    }

    .matching-target-image {
        aspect-ratio: 16 / 9;
    }

    .matching-section,
    .matching-results {
        padding: 48px 0 70px;
    }

    .matching-progress {
        padding: 16px;
        border-radius: 14px;
    }

    .matching-question {
        padding: 24px 18px;
        border-radius: 16px;
    }

    .matching-choice-grid {
        grid-template-columns: 1fr;
        margin-top: 22px;
    }

    .matching-controls {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .matching-prev,
    .matching-next,
    .matching-submit {
        width: 100%;
    }

    .matching-result-card {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 22px 18px;
        border-radius: 16px;
    }

    .matching-result-rank {
        align-items: flex-start;
        flex-direction: row;
        gap: 7px;
    }

    .matching-result-rank strong {
        font-size: 24px;
    }

    .matching-result-score {
        display: flex;
    }

    .matching-result-confidence {
        margin: 10px 0 0;
    }

    .matching-result-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .matching-detail-btn,
    .matching-request-btn,
    .matching-retry-link {
        width: 100%;
    }

    .matching-result-image {
        aspect-ratio: 16 / 9;
    }

    .matching-result-empty {
        padding: 30px 18px;
        border-radius: 16px;
    }

    .matching-result-empty-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .matching-consult-cta {
        padding-bottom: 70px;
    }

    .matching-consult-box {
        gap: 22px;
        padding: 26px 20px;
        border-radius: 16px;
    }

    .matching-consult-box a {
        width: 100%;
    }
}


/* ==========================================================================
   SMALL MOBILE
   ========================================================================== */

@media (max-width: 420px) {

    .matching-hero h1,
    .matching-result-hero h1 {
        font-size: 34px;
    }

    .matching-question {
        padding-left: 15px;
        padding-right: 15px;
    }

    .matching-choice {
        padding: 14px;
    }

    .matching-result-score strong {
        font-size: 32px;
    }
}


/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */

.matching-prev:focus-visible,
.matching-next:focus-visible,
.matching-submit:focus-visible,
.matching-detail-btn:focus-visible,
.matching-request-btn:focus-visible,
.matching-retry-link:focus-visible,
.matching-consult-box a:focus-visible {
    outline: 3px solid rgba(21, 156, 165, .28);
    outline-offset: 3px;
}

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

    .matching-choice,
    .matching-prev,
    .matching-next,
    .matching-submit,
    .matching-detail-btn,
    .matching-request-btn,
    .matching-retry-link,
    .matching-consult-box a,
    .matching-progress-bar::before {
        transition: none;
    }
}