/* Color Matching - Classic internal style */
.color-shell {
    max-width: 980px;
    margin: 0 auto;
    background: linear-gradient(180deg, #f9f3e4 0%, #f3ead3 100%);
    border: 2px solid #8f7a4c;
    border-radius: 16px;
    padding: 10px;
    box-shadow: none;
}

.color-control-stack {
    max-width: 860px;
    margin: 0.8rem auto 0;
}

.color-shell .info-bar {
    max-width: 860px;
    margin: 0 auto 0.55rem;
    padding: 0.45rem 0.55rem;
    display: grid;
    grid-template-columns: minmax(0, 3.2fr) minmax(140px, 1fr) minmax(140px, 1fr);
    align-items: stretch;
    gap: 0.5rem;
}

.color-shell .info-item {
    min-width: 0;
    min-height: 58px;
    padding: 0.45rem 0.75rem;
    font-size: 0.96rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
}

.color-shell .color-difficulty-item {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: center;
    justify-content: stretch;
    column-gap: 0.55rem;
}

.color-shell .color-difficulty-item > i {
    justify-self: center;
}

.color-shell .color-difficulty-item .difficulty-unified {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    gap: 0.35rem;
    margin: 0;
}

.color-shell .color-difficulty-item .difficulty-btn {
    min-width: 0;
    min-height: 44px;
    padding: 0.45rem 0.4rem;
    font-size: 0.82rem;
    line-height: 1.15;
    white-space: normal;
    text-align: center;
    justify-content: center;
}

.color-start-row {
    margin-top: 0;
}


.color-display {
    background: #fff8e8;
    border-radius: 16px;
    padding: 1.2rem;
    margin: 1rem 0;
    text-align: center;
    border: 2px solid #ccb27a;
    box-shadow: none;
}

.target-color-box {
    width: 148px;
    height: 148px;
    margin: 0.9rem auto 0;
    border-radius: 999px;
    border: 4px solid #f3e6ca;
    background: #fff;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4.4rem;
}

.color-name {
    font-size: 2rem;
    font-weight: 800;
    color: #3f3a2c;
    margin-bottom: 0.35rem;
}

.instruction-text {
    font-size: 1.05rem;
    color: #5b654f;
    margin-bottom: 0.2rem;
}

.color-options {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
    max-width: 760px;
    margin: 1rem auto;
}

.color-options.cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 620px;
}

.color-option-btn {
    aspect-ratio: 1;
    border-radius: 14px;
    border: 2px solid #ccb27a;
    cursor: pointer;
    transition: transform 0.12s ease, border-color 0.12s ease;
    box-shadow: none;
    position: relative;
    overflow: hidden;
    font-size: 2.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff9ea;
    color: #4d4838;
}

.color-option-btn:hover {
    transform: translateY(-2px);
    border-color: #1f5d45;
}

.color-option-btn:active {
    transform: translateY(0);
}

.difficulty-select {
    padding: 0.5rem 0.9rem;
    border-radius: 0.6rem;
    border: 2px solid #b49357;
    font-weight: 700;
    color: #4f4a3a;
    cursor: pointer;
    font-size: 0.95rem;
    background: #fff8e8;
}

.color-shell .difficulty-select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.color-shell .btn-group {
    margin-top: 0;
}

.color-shell .btn-large-start {
    margin: 0 auto;
    max-width: 320px;
}

.color-shell .guide-box {
    max-width: 760px;
    margin: 0.7rem auto 0;
}

.color-shell .guide-box h4 {
    margin-top: 0;
}

@media (max-width: 700px) {
    .color-control-stack {
        max-width: 760px;
        margin: 0.8rem auto 0;
    }

    .color-shell .info-bar {
        grid-template-columns: 1fr;
        justify-content: center;
    }

    .color-shell .info-item {
        width: 100%;
    }

    .color-shell .color-difficulty-item .difficulty-unified {
        width: 100%;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        justify-content: center;
    }

    .color-options,
    .color-options.cols-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: 480px;
    }

    .target-color-box {
        width: 122px;
        height: 122px;
        font-size: 3.6rem;
    }

    .color-name {
        font-size: 1.6rem;
    }
}


.color-bottom-link {
    width: 100%;
    max-width: 760px;
    margin: 0.75rem auto 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.color-bottom-link .btn-back-bottom {
    background: #1a3b2c;
    color: #f8edd1;
    border: 1px solid #355544;
}

.color-bottom-link .btn-back-bottom:hover {
    background: #224936;
    color: #fff5dd;
}
/* 2026-03 viewport-fit audit pass */
.color-shell {
    padding: 0.85rem;
}

.color-display {
    padding: 0.95rem;
    margin: 0.75rem 0;
}

.target-color-box {
    width: 132px;
    height: 132px;
    margin-top: 0.65rem;
    font-size: 3.8rem;
}

.color-name {
    font-size: 1.7rem;
}

.color-options {
    gap: 0.65rem;
    margin: 0.75rem auto;
}

@media (min-width: 768px) and (max-width: 1180px) {
    .color-shell .info-bar {
        grid-template-columns: minmax(0, 3fr) minmax(120px, 1fr) minmax(120px, 1fr);
    }

    .color-shell .info-item {
        min-height: 50px;
        font-size: 0.9rem;
    }

    .color-shell .color-difficulty-item .difficulty-btn {
        font-size: 0.76rem;
    }

    .color-display {
        padding: 0.85rem;
        margin: 0.6rem 0;
    }

    .target-color-box {
        width: 112px;
        height: 112px;
        font-size: 3.1rem;
    }

    .color-name {
        font-size: 1.45rem;
    }

    .instruction-text {
        font-size: 0.96rem;
    }

    .color-options {
        gap: 0.55rem;
        max-width: 700px;
        margin: 0.65rem auto;
    }
}

/* 2026-03 final compact pass: color matching */
.color-shell {
    max-width: 900px;
    padding: 0.78rem;
}

.color-control-stack,
.color-shell .info-bar {
    max-width: 760px;
}

.color-shell .info-bar {
    grid-template-columns: minmax(0, 3fr) minmax(116px, 1fr) minmax(116px, 1fr);
    gap: 0.45rem;
    padding: 0.42rem 0.5rem;
}

.color-shell .info-item {
    min-height: 50px;
    padding: 0.4rem 0.62rem;
    font-size: 0.88rem;
}

.color-shell .color-difficulty-item .difficulty-unified {
    gap: 0.3rem;
}

.color-shell .color-difficulty-item .difficulty-btn {
    min-height: 40px;
    padding: 0.38rem 0.34rem;
    font-size: 0.74rem;
}

.color-display {
    max-width: 760px;
    margin: 0.55rem auto;
    padding: 0.82rem;
}

.target-color-box {
    width: 116px;
    height: 116px;
    margin-top: 0.55rem;
    font-size: 3.2rem;
}

.color-name {
    font-size: 1.48rem;
}

.instruction-text {
    font-size: 0.92rem;
}

.color-options {
    max-width: 700px;
    gap: 0.52rem;
    margin: 0.6rem auto;
}

.color-option-btn {
    border-radius: 12px;
    font-size: 2.2rem;
}

.color-shell .guide-box,
.color-bottom-link {
    max-width: 760px;
}

@media (min-width: 768px) and (max-width: 1180px) {
    .color-shell {
        max-width: 820px;
        padding: 0.72rem;
    }

    .color-control-stack,
    .color-shell .info-bar,
    .color-display,
    .color-shell .guide-box,
    .color-bottom-link {
        max-width: 680px;
    }

    .color-shell .info-bar {
        grid-template-columns: minmax(0, 3fr) minmax(104px, 1fr) minmax(104px, 1fr);
        gap: 0.38rem;
    }

    .color-shell .info-item {
        min-height: 46px;
        font-size: 0.82rem;
        padding: 0.36rem 0.5rem;
    }

    .color-shell .color-difficulty-item {
        column-gap: 0.45rem;
    }

    .color-shell .color-difficulty-item .difficulty-btn {
        min-height: 38px;
        font-size: 0.68rem;
        padding: 0.3rem 0.24rem;
    }

    .color-display {
        padding: 0.72rem;
        margin: 0.48rem auto;
    }

    .target-color-box {
        width: 100px;
        height: 100px;
        font-size: 2.8rem;
    }

    .color-name {
        font-size: 1.28rem;
    }

    .instruction-text {
        font-size: 0.84rem;
    }

    .color-options {
        max-width: 620px;
        gap: 0.45rem;
        margin: 0.5rem auto;
    }

    .color-option-btn {
        font-size: 1.85rem;
    }

    .color-shell .btn-large-start {
        max-width: 280px;
        min-height: 40px;
        font-size: 0.8rem;
    }

    .color-shell .guide-box {
        margin-top: 0.55rem;
        padding: 0.68rem 0.75rem;
    }

    .color-shell .guide-title-standard {
        font-size: 0.9rem;
        margin-bottom: 0.24rem;
    }

    .color-shell .guide-text-standard {
        font-size: 0.82rem;
        line-height: 1.45;
    }
}
