@charset "UTF-8";

/* ==========================================================================
   스마트 컬러 휠 스튜디오 전용 스타일시트 (데스크톱/모바일 완벽 반응형)
   파일 경로: /mycss/color-picker.css
   ========================================================================== */

.color-tool-card {
    max-width: 740px !important;
    width: 100% !important;
    margin: 16px auto 25px auto !important;
    padding: 22px 18px !important;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
    font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Segoe UI", Roboto, sans-serif;
    box-sizing: border-box;
}

.color-tool-card * {
    box-sizing: border-box;
}

.color-tool-card p:empty,
.color-tool-card br {
    display: none !important;
}

.tool-header {
    text-align: center;
    margin-bottom: 24px !important;
}

.tool-badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: 11.5px;
    font-weight: 700;
    color: #0284c7;
    background-color: #e0f2fe;
    border-radius: 20px;
    margin-bottom: 4px;
}

.tool-title {
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    margin: 2px 0 6px 0 !important;
    line-height: 1.35 !important;
    word-break: keep-all !important;
}

.tool-desc {
    font-size: 0.88rem !important;
    color: #64748b !important;
    margin: 0 !important;
    line-height: 1.45 !important;
    word-break: keep-all !important;
}

/* ==========================================================================
   데스크톱 데크 레이아웃 (세로 3열)
   ========================================================================== */
.studio-deck {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    justify-content: center !important;
    gap: 18px !important;
    width: 100% !important;
    max-width: 704px !important;
    margin: 0 auto 18px auto !important;
}

.v-slider-col {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 68px !important;
    flex-shrink: 0 !important;
    user-select: none !important;
    -webkit-user-select: none !important;
}

.v-slider-header {
    height: 44px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-end !important;
    margin-bottom: 8px !important;
    text-align: center !important;
}

.v-badge-title {
    font-size: 11.5px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    background: #f1f5f9 !important;
    padding: 2px 7px !important;
    border-radius: 4px !important;
    border: 1px solid #cbd5e1 !important;
    line-height: 1.3 !important;
    white-space: nowrap !important;
}

.v-badge-title strong {
    color: #0284c7 !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
    margin-left: 2px !important;
}

.v-badge-sub {
    font-size: 10.5px !important;
    font-weight: 600 !important;
    color: #64748b !important;
    margin-top: 3px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}

.mobile-top-sub {
    display: none !important;
}

.v-slider-footer {
    height: 22px !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: center !important;
    margin-top: 8px !important;
    text-align: center !important;
}

.wheel-col {
    flex: 0 0 532px !important;
    max-width: 532px !important;
    width: 532px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

.wheel-header-spacer {
    height: 44px !important;
    margin-bottom: 8px !important;
    width: 100% !important;
}

.wheel-footer-spacer {
    height: 22px !important;
    margin-top: 8px !important;
    width: 100% !important;
}

.v-slider-track-wrap {
    position: relative !important;
    width: 28px !important;
    height: 532px !important;
    border-radius: 14px !important;
    border: 1px solid #cbd5e1 !important;
    cursor: pointer !important;
    overflow: visible !important;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.12) !important;
    touch-action: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
}

.v-slider-bar {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border-radius: 13px !important;
    pointer-events: none !important;
}

.v-slider-thumb {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 36px;
    height: 16px;
    background: #ffffff;
    border: 2px solid #0f172a;
    border-radius: 5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    transform: translate(-50%, -50%);
    pointer-events: none !important;
    transition: top 0.02s linear, left 0.02s linear;
}

.checker-bg,
.checkerboard-bg {
    background-image: linear-gradient(45deg, #cbd5e1 25%, transparent 25%), 
                      linear-gradient(-45deg, #cbd5e1 25%, transparent 25%), 
                      linear-gradient(45deg, transparent 75%, #cbd5e1 75%), 
                      linear-gradient(-45deg, transparent 75%, #cbd5e1 75%);
    background-size: 10px 10px;
    background-position: 0 0, 0 5px, 5px -5px, -5px 0px;
}

.wheel-wrapper {
    position: relative !important;
    width: 100% !important;
    max-width: 532px !important;
    aspect-ratio: 1 / 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    user-select: none !important;
    touch-action: none !important;
}

#colorWheelCanvas {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 50% !important;
    cursor: crosshair !important;
}

#crosshairPointer {
    position: absolute !important;
    width: 18px !important;
    height: 18px !important;
    border: 2px solid #ffffff !important;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.8) !important;
    border-radius: 50% !important;
    transform: translate(-50%, -50%) !important;
    pointer-events: none !important;
    display: block !important;
    transition: transform 0.05s ease !important;
}

#crosshairPointer.locked {
    border-color: #0284c7 !important;
    background-color: rgba(2, 132, 199, 0.25) !important;
    box-shadow: 0 0 0 2px #ffffff, 0 0 6px rgba(0, 0, 0, 0.8) !important;
}

/* ==========================================================================
   하단 패널 & 가독성 샘플 박스
   ========================================================================== */
.display-panel {
    width: 100% !important;
    max-width: 700px !important;
    margin: 0 auto !important;
}

.status-badge-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

#lockStatusBadge {
    font-size: 12px;
    font-weight: bold;
    color: #0284c7;
    background: #f0f9ff;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid #bae6fd;
}

#btnUnlockHover {
    display: none;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    cursor: pointer;
}

.preview-box-container {
    width: 100%;
    height: 82px !important;
    border-radius: 10px;
    margin-bottom: 12px !important;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.12);
}

.preview-box-large {
    width: 100%;
    height: 100%;
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    justify-content: space-between !important;
    transition: background-color 0.04s ease;
}

.readability-col {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 8px 12px !important;
    min-width: 0 !important;
    text-align: center !important;
}

.readability-divider {
    width: 1.5px !important;
    margin: 10px 0 !important;
    background: rgba(148, 163, 184, 0.45) !important;
    flex-shrink: 0 !important;
}

.white-side .sample-headline {
    color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7) !important;
    font-weight: 800 !important;
    font-size: 19.5px !important;
    line-height: 1.25 !important;
    white-space: nowrap !important;
    margin-bottom: 5px !important;
}

.white-side .sample-metrics-pill {
    background: rgba(15, 23, 42, 0.68) !important;
    color: #ffffff !important;
    backdrop-filter: blur(3px) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.black-side .sample-headline {
    color: #0f172a !important;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.6) !important;
    font-weight: 800 !important;
    font-size: 19.5px !important;
    line-height: 1.25 !important;
    white-space: nowrap !important;
    margin-bottom: 5px !important;
}

.black-side .sample-metrics-pill {
    background: rgba(255, 255, 255, 0.85) !important;
    color: #0f172a !important;
    backdrop-filter: blur(3px) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

.sample-metrics-pill {
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
    padding: 3px 12px !important;
    border-radius: 16px !important;
    font-size: 15px !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
    white-space: nowrap !important;
}

.metric-score {
    font-weight: 900 !important;
    font-size: 16.5px !important;
}

.metric-divider {
    opacity: 0.45 !important;
}

.metric-cr {
    font-weight: 700 !important;
    font-size: 14.5px !important;
}

.metric-grade {
    display: inline-block !important;
    padding: 1px 7px !important;
    border-radius: 5px !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    line-height: 18px !important;
    text-shadow: none !important;
    margin-left: 2px !important;
}

.grade-aaa { background: #10b981 !important; color: #ffffff !important; }
.grade-aa { background: #0284c7 !important; color: #ffffff !important; }
.grade-large { background: #f59e0b !important; color: #ffffff !important; }
.grade-fail { background: #ef4444 !important; color: #ffffff !important; }

.code-inputs-group {
    display: flex;
    flex-direction: column;
    gap: 6px !important;
    margin-bottom: 10px !important;
}

.code-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 4px 10px !important;
}

.code-label {
    width: 40px;
    font-size: 12.5px;
    font-weight: 700;
    color: #64748b;
}

.code-row input {
    flex: 1;
    border: none !important;
    background: transparent !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
    font-size: 14.5px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    padding: 4px !important;
    outline: none !important;
}

.btn-copy {
    padding: 4px 12px !important;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 12.5px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-copy:hover {
    background-color: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
}

.action-buttons-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-eyedropper {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 14px !important;
    background-color: #0f172a;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.btn-eyedropper:hover { background-color: #1e293b; }

.copy-toast {
    position: absolute;
    right: 0;
    bottom: -20px;
    font-size: 11.5px;
    font-weight: 700;
    color: #059669;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.copy-toast.show { opacity: 1; }

.preset-section {
    border-top: 1px solid #f1f5f9;
    padding-top: 12px !important;
    margin-top: 12px !important;
}

.preset-label {
    font-size: 12.5px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 8px !important;
    text-align: left;
}

.preset-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px !important;
}

.swatch-item {
    width: 32px !important;
    height: 32px !important;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.swatch-item:hover {
    transform: translateY(-2px) scale(1.08);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   🌟 모바일 전용 반응형 레이아웃 (폭 640px 이하: 완벽한 수직 1열)
   ========================================================================== */
@media screen and (max-width: 640px) {
    .color-tool-card {
        padding: 16px 12px !important;
    }

    /* 가로 행 -> 세로 1열 강제 전환 */
    .studio-deck {
        flex-direction: column !important;
        align-items: center !important;
        gap: 16px !important;
        margin: 0 auto 16px auto !important;
        max-width: 100% !important;
    }

    /* 1. 최상단: 원형 휠 */
    .wheel-col {
        order: 1 !important;
        width: 100% !important;
        max-width: 330px !important;
        flex: none !important;
    }
    .wheel-wrapper {
        width: 100% !important;
        max-width: 330px !important;
    }
    .wheel-header-spacer,
    .wheel-footer-spacer {
        display: none !important;
    }

    /* 2. 중단: 좌측 명암 슬라이더 -> 가로 풀와이드 바로 전환 */
    .left-slider {
        order: 2 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* 3. 하단: 우측 투명도 슬라이더 -> 가로 풀와이드 바로 전환 */
    .right-slider {
        order: 3 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .v-slider-col {
        width: 100% !important;
    }

    /* 모바일 헤더 라벨: 좌측에 명칭 뱃지 */
    .v-slider-header {
        height: auto !important;
        width: 100% !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: flex-start !important;
        align-items: center !important;
        margin-bottom: 5px !important;
    }

    .top-sub {
        display: none !important;
    }

    /* 모바일 슬라이더 트랙: 가로 바 형태 */
    .v-slider-track-wrap {
        width: 100% !important;
        height: 24px !important;
        border-radius: 12px !important;
    }

    .v-slider-thumb {
        width: 16px !important;
        height: 30px !important;
        top: 50% !important;
    }

    /* 모바일 푸터 라벨: 트랙 양끝에 0%와 100% 배치 */
    .v-slider-footer {
        height: auto !important;
        width: 100% !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        margin-top: 4px !important;
    }

    .mobile-top-sub {
        display: block !important;
    }

    /* 모바일 가독성 샘플 박스 스케일링 */
    .preview-box-container {
        height: 74px !important;
    }
    .white-side .sample-headline,
    .black-side .sample-headline {
        font-size: 15px !important;
        margin-bottom: 3px !important;
    }
    .sample-metrics-pill {
        font-size: 12.5px !important;
        padding: 2px 8px !important;
        gap: 4px !important;
    }
    .metric-score {
        font-size: 13.5px !important;
    }
    .metric-cr {
        font-size: 12px !important;
    }
    .metric-grade {
        font-size: 11px !important;
        padding: 0 5px !important;
        line-height: 16px !important;
    }
}