:root {
    --max-width: 620px;
    --bg: #f7f7f5;
    --white: #ffffff;
    --text: #171717;
    --muted: #777;
    --line: #ecece8;
    --bottom-safe: env(safe-area-inset-bottom, 0px);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Pretendard",
        "Noto Sans KR", "Apple SD Gothic Neo", Arial, sans-serif;
    color: var(--text);
    background: #e7e7e5;
}

html.v2-loading,
html.v2-loading body {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

img {
    display: block;
    width: 100%;
}

.v2-shell {
    width: 100%;
    max-width: var(--max-width);
    min-height: 100vh;
    margin: 0 auto;
    background: var(--bg);
    box-shadow: 0 0 45px rgba(0, 0, 0, .1);
}

.v2-app {
    opacity: 0;
    transition: opacity .35s ease;
    padding-bottom: calc(80px + var(--bottom-safe));
}

html.v2-ready .v2-app {
    opacity: 1;
}

.v2-splash {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111;
    transition: opacity .45s ease, visibility .45s ease;
}

.v2-splash.hide {
    opacity: 0;
    visibility: hidden;
}

.v2-splash-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #fff;
    animation: splashIn 1.1s cubic-bezier(.22,.61,.36,1);
}

.v2-splash-mark {
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    margin-bottom: 18px;
    border: 2px solid rgba(255,255,255,.8);
    border-radius: 27px;
    font-size: 53px;
    font-weight: 950;
    letter-spacing: -4px;
}

.v2-splash-logo strong {
    font-size: 19px;
    letter-spacing: 5px;
}

.v2-splash-logo small {
    margin-top: 9px;
    color: rgba(255,255,255,.55);
    font-size: 8px;
    letter-spacing: 2px;
}

@keyframes splashIn {
    0% {
        opacity: 0;
        transform: scale(.78) translateY(18px);
    }

    55% {
        opacity: 1;
        transform: scale(1.04) translateY(0);
    }

    100% {
        transform: scale(1);
    }
}

.v2-skeleton {
    position: absolute;
    z-index: 300;
    width: 100%;
    max-width: var(--max-width);
    min-height: 100vh;
    padding: 15px;
    background: var(--bg);
    transition: opacity .3s ease;
}

.v2-skeleton.hide {
    opacity: 0;
    pointer-events: none;
}

.v2-skeleton > div,
.v2-skeleton span {
    background: linear-gradient(
        90deg,
        #ebebe7 25%,
        #f5f5f2 40%,
        #ebebe7 65%
    );
    background-size: 300% 100%;
    animation: skeleton 1.3s infinite;
}

@keyframes skeleton {
    0% { background-position: 100% 0; }
    100% { background-position: 0 0; }
}

.sk-top {
    height: 44px;
    border-radius: 12px;
}

.sk-search {
    height: 48px;
    margin-top: 12px;
    border-radius: 16px;
}

.sk-tabs {
    height: 28px;
    margin-top: 12px;
    border-radius: 10px;
}

.sk-banner {
    height: 280px;
    margin-top: 14px;
    border-radius: 24px;
}

.sk-icons {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin-top: 22px;
}

.sk-icons span {
    display: block;
    width: 52px;
    height: 52px;
    margin: 0 auto;
    border-radius: 18px;
}

.sk-title {
    width: 45%;
    height: 22px;
    margin-top: 28px;
    border-radius: 8px;
}

.sk-products {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 13px;
}

.sk-products span {
    display: block;
    height: 210px;
    border-radius: 18px;
}

.v2-preview-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 35px;
    padding: 7px 14px;
    color: #fff;
    background: #111;
    font-size: 10px;
}

.v2-preview-bar a {
    padding: 4px 8px;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 999px;
}

.v2-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,.96);
    border-bottom: 1px solid rgba(0,0,0,.04);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.v2-app-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 49px;
    padding: 8px 14px;
    background: #171717;
    color: #fff;
}

.v2-app-banner-left {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 10px;
}

.v2-app-banner-left strong {
    display: block;
    margin-top: 2px;
    color: #d4b477;
    font-size: 11px;
}

.v2-mini-logo {
    display: grid;
    place-items: center;
    width: 31px;
    height: 31px;
    border-radius: 10px;
    background: #fff;
    color: #111;
    font-size: 15px;
    font-weight: 900;
}

.v2-app-banner button {
    height: 29px;
    padding: 0 12px;
    border: 0;
    border-radius: 9px;
    background: #fff;
    font-size: 10px;
    font-weight: 800;
}

.v2-search {
    display: flex;
    align-items: center;
    height: 47px;
    margin: 11px 14px 7px;
    padding: 0 13px;
    border: 1px solid #e7e7e4;
    border-radius: 15px;
    background: #f5f5f3;
}

.v2-search-icon {
    flex: none;
    margin-right: 9px;
    color: #666;
    font-size: 20px;
}

.v2-search input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 13px;
}

.v2-menu-icon {
    flex: none;
    padding-left: 10px;
    color: #333;
    font-size: 19px;
}

.v2-tabs {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    padding: 4px 14px 11px;
    scrollbar-width: none;
}

.v2-tabs::-webkit-scrollbar {
    display: none;
}

.v2-tabs a {
    position: relative;
    flex: none;
    padding: 4px 0 7px;
    color: #777;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.v2-tabs a.active {
    color: #111;
}

.v2-tabs a.active::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 2px;
    border-radius: 999px;
    background: #111;
}

.v2-banner {
    position: relative;
    overflow: hidden;
    margin: 13px 0 0;
}

.v2-banner-track {
    display: flex;
    transition: transform .55s cubic-bezier(.22,.61,.36,1);
}

.v2-banner-slide {
    position: relative;
    flex: 0 0 100%;
    min-height: 294px;
    overflow: hidden;
    padding: 31px 25px;
    color: #fff;
}

.slide-dark {
    background:
        radial-gradient(circle at 90% 10%, rgba(255,255,255,.2), transparent 30%),
        linear-gradient(140deg, #111 0%, #2b2b2d 55%, #68543d 100%);
}

.slide-gold {
    background:
        radial-gradient(circle at 90% 12%, rgba(255,255,255,.26), transparent 30%),
        linear-gradient(140deg, #6f542a, #bc9555 60%, #e2c99b);
}

.slide-blue {
    background:
        radial-gradient(circle at 90% 12%, rgba(255,255,255,.22), transparent 30%),
        linear-gradient(140deg, #162132, #31567c 55%, #7394b7);
}

.v2-banner-label {
    display: inline-block;
    padding: 6px 9px;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1px;
}

.v2-banner-slide strong {
    position: relative;
    z-index: 2;
    display: block;
    margin-top: 42px;
    font-size: clamp(29px, 7vw, 43px);
    line-height: 1.08;
    letter-spacing: -2px;
}

.v2-banner-slide p {
    position: relative;
    z-index: 2;
    margin: 12px 0 0;
    color: rgba(255,255,255,.74);
    font-size: 12px;
}

.v2-banner-button {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    margin-top: 23px;
    padding: 0 14px;
    border-radius: 11px;
    background: #fff;
    color: #111;
    font-size: 9px;
    font-weight: 900;
}

.v2-banner-letter {
    position: absolute;
    right: -15px;
    bottom: -35px;
    color: rgba(255,255,255,.08);
    font-size: 170px;
    font-weight: 950;
    line-height: 1;
}

.v2-banner-dots {
    position: absolute;
    right: 0;
    bottom: 15px;
    left: 0;
    display: flex;
    justify-content: center;
    gap: 5px;
}

.v2-banner-dots button {
    width: 6px;
    height: 6px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255,255,255,.45);
    transition: width .25s ease;
}

.v2-banner-dots button.active {
    width: 18px;
    background: #fff;
}

.v2-quick {
    padding: 20px 14px 0;
}

.v2-quick-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0,1fr));
    gap: 16px 4px;
}

.v2-quick-item {
    min-width: 0;
    text-align: center;
}

.v2-quick-icon {
    display: grid;
    place-items: center;
    width: 55px;
    height: 55px;
    margin: 0 auto 7px;
    border-radius: 50%;
    color: #fff;
    background: #1a1a1a;
    font-size: 20px;
    font-weight: 900;
    box-shadow: 0 5px 14px rgba(0,0,0,.12);
}

.v2-quick-item > span:last-child {
    display: block;
    overflow: hidden;
    color: #333;
    font-size: 9px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.q2 { background: linear-gradient(145deg,#cba85e,#80602c); }
.q3 { background: linear-gradient(145deg,#7f64d7,#4d339b); }
.q4 { background: linear-gradient(145deg,#417eb1,#245077); }
.q5 { background: linear-gradient(145deg,#323232,#111); }
.q6 { background: linear-gradient(145deg,#4ba870,#287148); }
.q7 { background: linear-gradient(145deg,#d16f7c,#963b4a); }
.q8 { background: linear-gradient(145deg,#b08a4f,#62471f); }
.q9 { background: linear-gradient(145deg,#4c69ce,#263d91); }
.q10 { background: linear-gradient(145deg,#e8983d,#a75a15); }

.v2-section {
    padding: 27px 14px 0;
}

.v2-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 13px;
}

.v2-section-header h2 {
    margin: 0;
    font-size: 18px;
    letter-spacing: -.7px;
}

.v2-section-header p {
    margin: 4px 0 0;
    color: #888;
    font-size: 10px;
}

.v2-section-header > a {
    flex: none;
    color: #777;
    font-size: 10px;
}

.v2-chip-scroll,
.v2-rank-tabs {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    margin: 0 -14px;
    padding: 0 14px 3px;
    scrollbar-width: none;
}

.v2-chip-scroll::-webkit-scrollbar,
.v2-rank-tabs::-webkit-scrollbar {
    display: none;
}

.v2-chip-scroll a,
.v2-rank-tabs button {
    flex: none;
    padding: 9px 13px;
    border: 1px solid #e6e6e2;
    border-radius: 999px;
    background: #fff;
    color: #333;
    font-size: 10px;
    font-weight: 750;
    white-space: nowrap;
}

.v2-chip-scroll a.hot,
.v2-rank-tabs button.active {
    border-color: #111;
    background: #111;
    color: #fff;
}

.v2-product-scroll {
    display: grid;
    grid-auto-columns: minmax(142px, 41%);
    grid-auto-flow: column;
    gap: 9px;
    overflow-x: auto;
    margin: 0 -14px;
    padding: 1px 14px 8px;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
}

.v2-product-scroll::-webkit-scrollbar {
    display: none;
}

.v2-product-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 17px;
    background: #fff;
    scroll-snap-align: start;
}

.v2-product-image {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #ededeb;
}

.v2-product-image img {
    height: 100%;
    object-fit: cover;
}

.v2-product-badge,
.v2-rank-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    min-width: 25px;
    padding: 4px 6px;
    border-radius: 8px;
    background: rgba(0,0,0,.72);
    color: #fff;
    font-size: 8px;
    font-weight: 900;
    text-align: center;
}

.v2-rank-badge {
    background: #111;
    font-size: 12px;
    font-style: italic;
}

.v2-no-image {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: #aaa;
    font-size: 34px;
    font-weight: 950;
}

.v2-product-info {
    padding: 9px 9px 11px;
}

.v2-product-brand {
    display: block;
    overflow: hidden;
    color: #96733e;
    font-size: 8px;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.v2-product-info strong {
    display: -webkit-box;
    min-height: 34px;
    margin-top: 5px;
    overflow: hidden;
    font-size: 10px;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.v2-product-price {
    display: block;
    margin-top: 7px;
    font-size: 11px;
    font-weight: 900;
}

.v2-rank-tabs {
    margin-bottom: 12px;
}

.v2-guide-grid {
    display: grid;
    gap: 8px;
}

.v2-guide-grid > a {
    display: grid;
    grid-template-columns: 45px minmax(0,1fr) 20px;
    align-items: center;
    gap: 10px;
    min-height: 76px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}

.v2-guide-grid > a > span {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: #f4f1ea;
    font-size: 20px;
}

.v2-guide-grid strong {
    display: block;
    font-size: 11px;
}

.v2-guide-grid p {
    margin: 5px 0 0;
    color: #888;
    font-size: 9px;
}

.v2-guide-grid b {
    color: #999;
    font-size: 15px;
}

.v2-seo-box {
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
}

.v2-seo-box h2 {
    margin: 0;
    font-size: 13px;
}

.v2-seo-box p {
    margin: 9px 0 0;
    color: #777;
    font-size: 10px;
    line-height: 1.7;
}

.v2-seo-hidden {
    display: none;
}

.v2-seo-box.expanded .v2-seo-hidden {
    display: block;
}

.v2-seo-box button {
    width: 100%;
    margin-top: 11px;
    padding: 9px;
    border: 0;
    border-radius: 10px;
    background: #f3f3f1;
    color: #555;
    font-size: 9px;
    font-weight: 750;
}

.v2-bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 500;
    display: grid;
    grid-template-columns: repeat(5,1fr);
    width: 100%;
    max-width: var(--max-width);
    min-height: 65px;
    margin: 0 auto;
    padding: 7px 5px calc(7px + var(--bottom-safe));
    border-top: 1px solid rgba(0,0,0,.07);
    background: rgba(255,255,255,.97);
    box-shadow: 0 -8px 25px rgba(0,0,0,.07);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.v2-bottom-nav a {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: #888;
    font-size: 8px;
    font-weight: 750;
}

.v2-bottom-nav a.active {
    color: #111;
}

.v2-bottom-nav a > span {
    display: grid;
    place-items: center;
    width: 27px;
    height: 27px;
    font-size: 17px;
}

.v2-bottom-nav a.special::before {
    content: "";
    position: absolute;
    top: -7px;
    width: 28px;
    height: 3px;
    border-radius: 0 0 4px 4px;
    background: linear-gradient(90deg,#7164e8,#9b61df);
}

.v2-bottom-nav a.special {
    color: #6e56d5;
}

.v2-chat-fab {
    position: fixed;
    right: max(13px, calc((100vw - var(--max-width))/2 + 13px));
    bottom: calc(74px + var(--bottom-safe));
    z-index: 480;
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 37px;
    padding: 0 12px;
    border-radius: 999px;
    background: #fee500;
    box-shadow: 0 6px 20px rgba(0,0,0,.16);
    color: #111;
    font-size: 9px;
    font-weight: 850;
}

@media (min-width: 621px) {
    .v2-shell {
        margin-top: 20px;
        margin-bottom: 20px;
        min-height: calc(100vh - 40px);
        border-radius: 25px;
        overflow: hidden;
    }

    .v2-skeleton {
        border-radius: 25px;
    }

    .v2-product-scroll {
        grid-auto-columns: 185px;
    }
}

@media (max-width: 400px) {
    .v2-quick-icon {
        width: 49px;
        height: 49px;
    }

    .v2-product-scroll {
        grid-auto-columns: 45%;
    }

    .v2-banner-slide {
        min-height: 275px;
        padding-right: 20px;
        padding-left: 20px;
    }
}


/* V2 CLICK BLOCK FIX START */
.v2-splash.hide,
.v2-skeleton.hide {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.v2-app {
    position: relative;
    z-index: 10;
    pointer-events: auto !important;
}

.v2-app a,
.v2-app button,
.v2-force-shop-link {
    pointer-events: auto !important;
}

.v2-tabs,
.v2-quick-grid,
.v2-bottom-nav {
    position: relative;
    z-index: 20;
}

.v2-bottom-nav {
    z-index: 10000 !important;
}

.v2-force-shop-link {
    cursor: pointer !important;
    touch-action: manipulation;
}
/* V2 CLICK BLOCK FIX END */

/* V2 HEAD SHOP CLICK FIX */
.v2-tabs {
    pointer-events: auto !important;
}

.v2-tabs a {
    position: relative;
    z-index: 50;
    pointer-events: auto !important;
    touch-action: manipulation;
}

.v2-head-shop {
    cursor: pointer !important;
}

/* V2 HEAD LINK CLICK FINAL */
.v2-header,
.v2-tabs,
#v2MainTabs {
    pointer-events: auto !important;
}

#v2MainTabs {
    position: relative !important;
    z-index: 9999 !important;
}

#v2MainTabs a {
    position: relative !important;
    z-index: 10000 !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
    cursor: pointer !important;
}

.v2-splash.hide,
.v2-skeleton.hide {
    display: none !important;
    pointer-events: none !important;
}

/* V2 RESPONSIVE LAYOUT START */

/* 기본 모바일은 기존 디자인 유지 */
:root {
    --max-width: 620px;
}

/* 태블릿 */
@media (min-width: 621px) and (max-width: 1023px) {
    :root {
        --max-width: 100%;
    }

    .v2-shell {
        width: calc(100% - 24px);
        max-width: none;
        margin: 12px auto;
        border-radius: 24px;
        overflow: hidden;
    }

    .v2-skeleton {
        width: calc(100% - 24px);
        max-width: none;
    }

    .v2-search,
    .v2-tabs,
    .v2-quick,
    .v2-section {
        padding-right: 24px;
        padding-left: 24px;
    }

    .v2-search {
        margin-right: 24px;
        margin-left: 24px;
    }

    .v2-quick-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .v2-product-scroll {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-auto-flow: row;
        grid-auto-columns: auto;
        overflow: visible;
        margin: 0;
        padding: 0;
        gap: 14px;
        scroll-snap-type: none;
    }

    .v2-product-card {
        min-width: 0;
    }

    .v2-guide-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .v2-bottom-nav {
        width: calc(100% - 24px);
        max-width: none;
        left: 12px;
        right: 12px;
    }
}

/* PC */
@media (min-width: 1024px) {
    :root {
        --max-width: 1440px;
    }

    .v2-shell {
        width: calc(100% - 48px);
        max-width: 1440px;
        margin: 24px auto;
        border-radius: 28px;
        overflow: hidden;
    }

    .v2-skeleton {
        width: calc(100% - 48px);
        max-width: 1440px;
    }

    .v2-header {
        padding-right: 32px;
        padding-left: 32px;
    }

    .v2-search {
        max-width: 760px;
        margin: 14px auto 8px;
    }

    .v2-tabs {
        justify-content: center;
        padding-right: 0;
        padding-left: 0;
    }

    .v2-banner {
        margin-top: 18px;
    }

    .v2-banner-slide {
        min-height: 430px;
        padding: 58px 64px;
    }

    .v2-banner-slide strong {
        max-width: 760px;
        margin-top: 52px;
        font-size: clamp(46px, 4vw, 68px);
    }

    .v2-banner-slide p {
        font-size: 15px;
    }

    .v2-quick {
        padding: 32px 32px 0;
    }

    .v2-quick-grid {
        grid-template-columns: repeat(10, minmax(0, 1fr));
        gap: 18px 12px;
    }

    .v2-quick-icon {
        width: 64px;
        height: 64px;
        font-size: 24px;
    }

    .v2-section {
        padding: 42px 32px 0;
    }

    .v2-section-header h2 {
        font-size: 24px;
    }

    .v2-product-scroll {
        display: grid;
        grid-template-columns: repeat(6, minmax(0, 1fr));
        grid-auto-flow: row;
        grid-auto-columns: auto;
        overflow: visible;
        margin: 0;
        padding: 0;
        gap: 18px;
        scroll-snap-type: none;
    }

    .v2-product-card {
        min-width: 0;
        scroll-snap-align: none;
    }

    .v2-product-info {
        padding: 13px 13px 16px;
    }

    .v2-product-brand {
        font-size: 10px;
    }

    .v2-product-info strong {
        min-height: 42px;
        font-size: 13px;
    }

    .v2-product-price {
        font-size: 14px;
    }

    .v2-guide-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .v2-bottom-nav {
        width: calc(100% - 48px);
        max-width: 1440px;
        left: 24px;
        right: 24px;
    }

    .v2-chat-fab {
        right: max(
            37px,
            calc((100vw - min(1440px, calc(100vw - 48px))) / 2 + 13px)
        );
    }
}

/* 큰 PC */
@media (min-width: 1500px) {
    .v2-product-scroll {
        grid-template-columns: repeat(7, minmax(0, 1fr));
    }
}

/* V2 RESPONSIVE LAYOUT END */
