/* AI 얼굴형별 헤어 스타일 — 이미지로 보기 전용 페이지 */
.face-shape-view {
    --hrv-accent: #be185d;
    --hrv-accent-soft: #fdf2f8;
    --hrv-accent-border: #fbcfe8;
    --hrv-accent-gradient: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%);
    min-height: calc(100vh - 120px);
    padding: 20px 12px 48px;
    box-sizing: border-box;
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(244, 114, 182, 0.08), transparent 60%),
        linear-gradient(180deg, #fafbfd 0%, #f1f5f9 100%);
}

.face-shape-view--blue {
    --hrv-accent: #1d4ed8;
    --hrv-accent-soft: #eff6ff;
    --hrv-accent-border: #bfdbfe;
    --hrv-accent-gradient: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(59, 130, 246, 0.08), transparent 60%),
        linear-gradient(180deg, #fafbfd 0%, #f1f5f9 100%);
}

.face-shape-view__inner {
    max-width: 960px;
    margin: 0 auto;
}

.face-shape-view__head {
    margin-bottom: 18px;
    text-align: center;
}

.face-shape-view__back {
    display: inline-flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    transition: color 0.15s ease;
}

.face-shape-view__back:hover {
    color: var(--hrv-accent);
}

.face-shape-view__title {
    margin: 0;
    font-size: clamp(24px, 4.8vw, 30px);
    font-weight: 800;
    line-height: 1.25;
    color: #0f172a;
    letter-spacing: -0.04em;
}

.face-shape-view__section {
    display: inline-flex;
    align-items: center;
    margin: 10px 0 0;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--hrv-accent);
    letter-spacing: -0.01em;
    background: var(--hrv-accent-gradient);
    border: 1px solid var(--hrv-accent-border);
}

.face-shape-view__layout {
    display: grid;
    grid-template-columns: minmax(0, 5.5fr) minmax(0, 4.5fr);
    gap: 16px;
    align-items: start;
}

.face-shape-view__ranks {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.face-shape-view__rank-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid #edf1f6;
    background: #fff;
    box-shadow: 0 2px 14px rgba(15, 23, 42, 0.04);
    box-sizing: border-box;
}

.face-shape-view__rank-card--first {
    border-color: var(--hrv-accent-border);
    box-shadow:
        0 4px 20px rgba(15, 23, 42, 0.06),
        0 0 0 1px rgba(255, 255, 255, 0.8) inset;
}

.face-shape-view__rank-photo {
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    background: #f8fafc;
    line-height: 0;
}

.face-shape-view__rank-photo.has-image img {
    display: block;
    width: 100%;
    height: auto;
    max-height: min(52vh, 420px);
    object-fit: contain;
    object-position: center top;
    margin: 0 auto;
    background: #f8fafc;
}

.face-shape-view__rank-photo.is-empty {
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #dbe3ec;
}

.face-shape-view__rank-photo-empty {
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.4;
}

.face-shape-view__rank-body {
    min-width: 0;
}

.face-shape-view__rank-name {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 12px;
    min-height: 56px;
    padding: 2px 0 12px;
}

.face-shape-gallery__rank-name-left {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1 1 auto;
}

.face-shape-view__rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
    color: #fff;
    background: linear-gradient(145deg, #fbbf24 0%, #f59e0b 100%);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}

.face-shape-view__rank-card[data-rank="2"] .face-shape-view__rank-badge {
    background: linear-gradient(145deg, #cbd5e1 0%, #94a3b8 100%);
    box-shadow: 0 2px 8px rgba(148, 163, 184, 0.35);
}

.face-shape-view__rank-card[data-rank="3"] .face-shape-view__rank-badge {
    background: linear-gradient(145deg, #fdba74 0%, #ea580c 100%);
    box-shadow: 0 2px 8px rgba(234, 88, 12, 0.3);
}

.face-shape-view__rank-label {
    font-size: clamp(19px, 3.2vw, 23px);
    font-weight: 800;
    line-height: 1.25;
    color: #0f172a;
    letter-spacing: -0.03em;
}

.face-shape-view__rank-label--empty {
    color: #94a3b8;
    font-weight: 700;
}

.face-shape-view__rank-desc-block {
    padding: 12px 14px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #eef2f7;
}

.face-shape-view__rank-desc {
    margin: 0;
    font-size: 14px;
    line-height: 1.72;
    color: #334155;
    word-break: keep-all;
}

.face-shape-view__aside {
    min-width: 0;
}

.face-shape-view__shops-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 16px 14px 14px;
    border-radius: 18px;
    border: 1px solid #edf1f6;
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
    box-shadow: 0 2px 14px rgba(15, 23, 42, 0.04);
    box-sizing: border-box;
}

.face-shape-view__shops-title {
    margin: 0;
    padding-bottom: 8px;
    font-size: clamp(16px, 2.8vw, 18px);
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    text-align: center;
    border-bottom: 1px solid #e8edf3;
    position: relative;
}

.face-shape-view__shops-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -1px;
    width: 48px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, #a78bfa, #7c3aed);
    transform: translateX(-50%);
}

.face-shape-view__shops-sub {
    margin: 8px 0 12px;
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    text-align: center;
}

.face-shape-view__shops {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1 1 auto;
    min-height: 0;
    max-height: min(72vh, 640px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 2px 4px 2px 0;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.face-shape-view__shops-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.face-shape-view__shops-more {
    flex: 0 0 auto;
    width: 100%;
    margin: 8px 0 0;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    color: #475569;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    position: relative;
    z-index: 3;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.face-shape-view__shops-more:hover,
.face-shape-view__shops-more:focus-visible {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
}

.face-shape-view__shops-more[hidden] {
    display: none;
}

.face-shape-view__shops::-webkit-scrollbar {
    width: 5px;
}

.face-shape-view__shops::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: #cbd5e1;
}

.face-shape-view__shops-status {
    margin: 0;
    padding: 20px 12px;
    font-size: 13px;
    line-height: 1.5;
    color: #64748b;
    text-align: center;
    background: #fff;
    border: 1px dashed #dbe3ec;
    border-radius: 12px;
}

.face-shape-view__shop {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 12px;
    border: 1px solid #e8edf3;
    border-radius: 13px;
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.face-shape-view__shop:hover {
    border-color: #d8c4ff;
    box-shadow: 0 6px 18px rgba(124, 58, 237, 0.1);
    transform: translateY(-1px);
}

.face-shape-view__shop-icon {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    font-size: 16px;
    line-height: 1;
    color: #7c3aed;
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    border: 1px solid #e9e2ff;
    overflow: hidden;
}

.face-shape-view__shop-icon--photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.face-shape-view__shop-icon--fallback img {
    width: 58%;
    height: 58%;
    object-fit: contain;
    display: block;
}

.face-shape-view__shop-body {
    flex: 1 1 auto;
    min-width: 0;
}

.face-shape-view__shop-name {
    display: block;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.35;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.face-shape-view__shop-addr {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    line-height: 1.45;
    color: #64748b;
    word-break: keep-all;
}

@media (min-width: 721px) {
    .face-shape-view__aside {
        position: sticky;
        top: 16px;
    }
}

@media (max-width: 720px) {
    .face-shape-view {
        padding: 14px 10px 36px;
        min-height: auto;
    }

    .face-shape-view__layout {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .face-shape-view__shops {
        max-height: none;
    }

    .face-shape-view__rank-photo.has-image img {
        max-height: min(44vh, 320px);
    }

    .face-shape-gallery__rank-trend--in-header {
        display: none !important;
    }

    .face-shape-view__rank-name.face-shape-gallery__rank-name {
        min-height: auto;
        padding-bottom: 8px;
    }
}

.face-shape-gallery__rank-new {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    color: #fff;
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 45%, #d946ef 100%);
    box-shadow: 0 2px 10px rgba(168, 85, 247, 0.32);
}

.face-shape-gallery__rank-trend {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    text-align: right;
    margin-left: auto;
    padding-left: 8px;
}

.face-shape-gallery__rank-trend-value {
    font-size: clamp(24px, 4.2vw, 32px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #6d28d9 0%, #9333ea 45%, #c026d3 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.face-shape-gallery__rank-trend-label {
    margin-top: 5px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    color: #64748b;
    white-space: nowrap;
}

.face-shape-gallery__rank-trend--in-header {
    display: none !important;
}

.face-shape-gallery__rank-trend--in-grid {
    display: flex;
}

.face-shape-gallery__stats {
    padding: 14px 0 12px;
    margin: 0 0 12px;
    border: 0;
    border-top: 1px solid #e8edf3;
    border-radius: 0;
    background: transparent;
}

.face-shape-gallery__stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

.face-shape-gallery__stats-item {
    position: relative;
    flex: none;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 72px;
    padding: 12px 4px;
    border: 0;
    border-radius: 0;
    background: transparent;
    text-align: center;
}

.face-shape-gallery__stats-item::after {
    content: '';
    position: absolute;
    top: 15%;
    right: 0;
    width: 1px;
    height: 70%;
    background: linear-gradient(180deg, rgba(232, 237, 243, 0.35) 0%, #e8edf3 18%, #e8edf3 82%, rgba(232, 237, 243, 0.35) 100%);
    display: none;
}

.face-shape-gallery__stats-item:not(:nth-child(3n))::after {
    display: block;
}

.face-shape-gallery__stats-item:nth-child(-n+3) {
    border-bottom: 1px solid #e8edf3;
    margin-bottom: 4px;
    padding-bottom: 14px;
}

.face-shape-gallery__stats-label {
    font-size: 14px;
    font-weight: 600;
    color: #94a3b8;
    line-height: 1.25;
    word-break: keep-all;
}

.face-shape-gallery__stats-value {
    font-size: clamp(20px, 4vw, 28px);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
    background: linear-gradient(135deg, #6d28d9 0%, #9333ea 55%, #a855f7 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.face-shape-gallery__stats-item:nth-child(even) .face-shape-gallery__stats-value {
    background: linear-gradient(135deg, #a21caf 0%, #c026d3 50%, #ec4899 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.face-shape-desc-text {
    display: block;
    white-space: pre-wrap;
    word-break: keep-all;
}

.face-shape-desc-youtube {
    margin: 10px 0;
}

.face-shape-desc-youtube__frame {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    border-radius: 12px;
    overflow: hidden;
    background: #0f172a;
}

.face-shape-desc-youtube__frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.face-shape-desc-guide {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.62;
    color: #334155;
}

.face-shape-desc-guide .face-shape-desc-text {
    white-space: pre-wrap;
}

@media (min-width: 721px) {
    .face-shape-gallery__stats:has(> .face-shape-gallery__stats-grid > .face-shape-gallery__stats-item--trend:only-child) {
        display: none;
        padding: 0;
        margin: 0;
        border: 0;
    }

    .face-shape-gallery__rank-trend--in-header {
        display: flex !important;
    }

    .face-shape-gallery__rank-trend--in-grid {
        display: none !important;
    }

    .face-shape-gallery__stats-grid {
        display: flex;
        align-items: stretch;
    }

    .face-shape-gallery__stats-item {
        flex: 1 1 0;
        min-height: auto;
        padding: 10px 6px;
        border-bottom: 0;
        margin-bottom: 0;
    }

    .face-shape-gallery__stats-item::after {
        display: none;
        top: 0;
        height: 100%;
    }

    .face-shape-gallery__stats-item:not(:last-child)::after {
        display: block;
    }
}

.face-shape-view__gallery-btn {
    display: inline-flex;
    align-items: center;
    margin-top: 12px;
    padding: 10px 16px;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
