/*
 * LottoMate V3 Layout Fix
 * 1. 제목 줄바꿈
 * 2. 히어로 높이 축소
 * 3. 중앙 그래픽 축소
 * 4. 결과 카드 높이 축소
 * 5. 기능 카드 겹침
 * 6. 당첨금 정보
 * 7. 헤더 메뉴 간격
 * 8. 모바일 제목 보정
 */

/* 전체 히어로 높이와 3단 비율 */
.lm-v3-hero {
    padding-top: 22px;
}

.lm-v3-hero-grid {
    min-height: 400px !important;
    grid-template-columns:
        minmax(510px, 1.06fr)
        minmax(285px, .65fr)
        minmax(500px, 1.05fr) !important;
    gap: 16px !important;
    align-items: start !important;
}

/* 1. 제목 줄바꿈 및 왼쪽 영역 */
.lm-v3-hero-copy {
    min-width: 0;
    padding: 48px 18px 30px 22px !important;
}

.lm-v3-hero-copy h1 {
    max-width: 560px;
    margin-top: 0;
    font-size: clamp(48px, 3.6vw, 61px) !important;
    line-height: 1.1 !important;
    letter-spacing: -.055em !important;
    word-break: keep-all !important;
    overflow-wrap: normal !important;
}

.lm-v3-hero-copy h1 br {
    display: block;
}

.lm-v3-hero-copy p {
    margin-top: 20px !important;
    font-size: 15px !important;
    line-height: 1.65 !important;
}

.lm-v3-hero-actions {
    margin-top: 25px !important;
}

.lm-v3-feature-points {
    margin-top: 22px !important;
    gap: 15px !important;
}

/* 2, 3. 중앙 그래픽 축소 */
.lm-v3-visual {
    min-height: 390px !important;
    transform: scale(.9);
    transform-origin: center top;
}

.lm-v3-orbit {
    top: 78px !important;
    width: 208px !important;
    height: 208px !important;
}

.lm-v3-platform {
    bottom: 34px !important;
    width: 275px !important;
    height: 62px !important;
}

.lm-v3-chart-card-a {
    top: 49px !important;
    left: 0 !important;
    transform: scale(.88);
    transform-origin: left top;
}

.lm-v3-chart-card-b {
    top: 55px !important;
    right: 0 !important;
    transform: scale(.88);
    transform-origin: right top;
}

/* 4. 최신 당첨결과 카드 높이와 내부 밀도 */
.lm-v3-result-card {
    min-height: 0 !important;
    height: auto !important;
    padding: 23px 26px 22px !important;
}

.lm-v3-result-head h2 {
    margin-top: 5px !important;
    font-size: 31px !important;
}

.lm-v3-result-balls {
    margin: 22px 0 18px !important;
    gap: 10px !important;
}

.lm-v3-ball {
    width: 52px !important;
    height: 52px !important;
    font-size: 18px !important;
}

.lm-v3-result-summary div {
    padding: 14px 10px !important;
}

.lm-v3-result-summary strong {
    font-size: 14px !important;
}

/* 6. 당첨금 정보 추가 */
.lm-v3-prize-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 12px;
}

.lm-v3-prize-info > div {
    min-width: 0;
    padding: 11px 9px;
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 11px;
    text-align: center;
    background: rgba(255,255,255,.055);
}

.lm-v3-prize-info span,
.lm-v3-prize-info strong {
    display: block;
}

.lm-v3-prize-info span {
    color: #9fb4cc;
    font-size: 10px;
}

.lm-v3-prize-info strong {
    margin-top: 5px;
    overflow: hidden;
    color: #f3ca6b;
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.lm-v3-result-link {
    min-height: 42px !important;
    margin-top: 11px !important;
}

/* 5. 기능 카드 위로 겹치기 */
.lm-v3-feature-strip-section {
    position: relative;
    z-index: 30;
    margin-top: -42px !important;
}

.lm-v3-feature-strip {
    box-shadow:
        0 18px 38px rgba(8, 34, 67, .17) !important;
}

.lm-v3-dashboard-section {
    margin-top: 16px !important;
}

/* 7. 공통 헤더 정렬 */
body.lm-v3-active .lm-v3-site-header {
    min-height: 72px !important;
}

body.lm-v3-active .lm-v3-site-header > div,
body.lm-v3-active .lm-v3-site-header > .wrap,
body.lm-v3-active .lm-v3-site-header > .container,
body.lm-v3-active .lm-v3-site-header > .inner {
    width: min(1120px, calc(100% - 44px));
    min-height: 72px;
    margin: 0 auto;
}

body.lm-v3-active .lm-v3-site-header nav,
body.lm-v3-active .lm-v3-site-header .nav,
body.lm-v3-active .lm-v3-site-header .menu {
    display: flex;
    align-items: center;
    gap: clamp(20px, 2.15vw, 38px) !important;
}

body.lm-v3-active .lm-v3-site-header nav a,
body.lm-v3-active .lm-v3-site-header .nav a,
body.lm-v3-active .lm-v3-site-header .menu a {
    padding-left: 0 !important;
    padding-right: 0 !important;
    white-space: nowrap;
}

/* PC 중간 폭 */
@media (max-width: 1380px) {
    .lm-v3-hero-grid {
        grid-template-columns:
            minmax(440px, 1fr)
            minmax(250px, .58fr)
            minmax(470px, 1.02fr) !important;
    }

    .lm-v3-hero-copy h1 {
        font-size: 52px !important;
    }

    .lm-v3-visual {
        transform: scale(.84);
    }

    .lm-v3-ball {
        width: 47px !important;
        height: 47px !important;
        font-size: 16px !important;
    }
}

/* 태블릿 */
@media (max-width: 1100px) {
    .lm-v3-hero-grid {
        grid-template-columns: 1fr 1fr !important;
        min-height: auto !important;
    }

    .lm-v3-hero-copy {
        grid-column: 1 / -1;
        padding: 36px 28px !important;
        border-radius: 20px;
        background:
            radial-gradient(
                circle at 85% 25%,
                rgba(54,145,255,.18),
                transparent 28%
            ),
            rgba(7,29,55,.26);
    }

    .lm-v3-hero-copy h1 {
        max-width: none;
        font-size: 52px !important;
    }

    .lm-v3-visual {
        min-height: 350px !important;
        transform: scale(.88);
    }

    .lm-v3-result-card {
        height: 100% !important;
    }

    .lm-v3-feature-strip-section {
        margin-top: -18px !important;
    }
}

/* 모바일 */
@media (max-width: 720px) {
    .lm-v3-page {
        padding-bottom: 30px;
    }

    .lm-v3-hero {
        padding-top: 14px;
    }

    .lm-v3-hero-grid {
        display: grid;
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    .lm-v3-hero-copy,
    .lm-v3-visual,
    .lm-v3-result-card {
        grid-column: auto;
    }

    .lm-v3-hero-copy {
        padding: 29px 20px 25px !important;
    }

    /* 8. 모바일 제목 크기 */
    .lm-v3-hero-copy h1 {
        max-width: 100%;
        font-size: 39px !important;
        line-height: 1.13 !important;
        letter-spacing: -.045em !important;
    }

    .lm-v3-hero-copy p {
        font-size: 14px !important;
    }

    .lm-v3-visual {
        min-height: 310px !important;
        transform: scale(.82);
        transform-origin: center top;
    }

    .lm-v3-result-card {
        padding: 21px 18px !important;
    }

    .lm-v3-result-balls {
        justify-content: center;
    }

    .lm-v3-prize-info {
        grid-template-columns: 1fr;
    }

    .lm-v3-prize-info strong {
        white-space: normal;
    }

    .lm-v3-feature-strip-section {
        margin-top: 14px !important;
    }
}

@media (max-width: 480px) {
    .lm-v3-hero-copy h1 {
        font-size: 33px !important;
    }

    .lm-v3-hero-copy h1 br {
        display: block;
    }

    .lm-v3-hero-actions {
        display: grid;
    }

    .lm-v3-visual {
        min-height: 275px !important;
        transform: scale(.72);
        margin-bottom: -45px;
    }

    .lm-v3-ball {
        width: 41px !important;
        height: 41px !important;
        font-size: 14px !important;
    }

    .lm-v3-result-summary {
        grid-template-columns: 1fr !important;
    }
}
