/* ==========================================================================
   주소업 — Premium Commercial Portal
   골드를 밝은·중간·어두운 톤으로 나눠 입체감을 만들고, 블랙과 대비시킨다.
   광원은 왼쪽 위. 광고 규격(1200×100 / 600×100)과 팝업(400×318)은 그대로.
   ========================================================================== */

@property --ang {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

:root {
    /* gold scale */
    --gold-champagne: #F7E7B4;
    --gold-light: #FFE29A;
    --gold: #EFC44C;
    --gold-rich: #D4A62A;
    --gold-deep: #A87912;
    /* neutrals */
    --warm-white: #FFFDFA;
    --ivory: #F7F4ED;
    --charcoal: #202124;
    --black: #141414;
    --text: #202124;
    --text-sub: #6F6A5E;
    --text-faint: #9A9486;
    --line: #E9E3D3;
    --line-soft: #F2EDE0;
    --telegram: #229ED9;

    /* materials */
    --metal-gold: linear-gradient(180deg, #FFEDB8 0%, var(--gold-light) 18%, var(--gold) 52%, var(--gold-rich) 100%);
    --metal-gold-text: linear-gradient(90deg, var(--gold-deep) 0%, var(--gold-rich) 22%, #E9C766 45%, var(--gold-deep) 70%, var(--gold-rich) 100%);
    --metal-black: linear-gradient(180deg, #2C2D31 0%, var(--charcoal) 50%, var(--black) 100%);
    --hairline-gold: linear-gradient(90deg, transparent 0%, var(--gold-rich) 14%, var(--gold-light) 50%, var(--gold-rich) 86%, transparent 100%);
    --border-gold: conic-gradient(from var(--ang), var(--gold-champagne), var(--gold-rich), var(--gold-light), var(--gold-deep), var(--gold-champagne));

    /* elevation (광원: 위) */
    --shadow-1: 0 1px 2px rgba(32, 33, 36, 0.05), 0 6px 16px -8px rgba(168, 121, 18, 0.22);
    --shadow-2: 0 2px 4px rgba(32, 33, 36, 0.06), 0 14px 28px -12px rgba(168, 121, 18, 0.34);
    --shadow-card: 0 1px 2px rgba(32, 33, 36, 0.05), 0 10px 24px -14px rgba(32, 33, 36, 0.28);

    /* motion */
    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
    --t-hover: 200ms;
    --t-card: 280ms;
    --t-sweep: 950ms;

    /* typography */
    --font-sans: "Pretendard Variable", Pretendard, Inter, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;

    /* spacing */
    --sp-1: 4px;
    --sp-2: 8px;
    --sp-3: 12px;
    --sp-4: 16px;
    --sp-5: 20px;
    --sp-6: 24px;
    --sp-8: 32px;
    --sp-10: 40px;
    --sp-12: 48px;

    --container: 1200px;
    --gutter: 24px;
    --btn-h: 44px;
}

/* ── base ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--warm-white);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a[aria-disabled="true"] { cursor: default; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, video { display: block; max-width: 100%; }
[hidden] { display: none !important; }

:focus-visible {
    outline: 2px solid var(--gold-deep);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    top: -80px;
    left: var(--sp-4);
    z-index: 100;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 var(--sp-4);
    border-radius: 8px;
    background: var(--black);
    color: var(--gold-light);
    font-size: 14px;
    font-weight: 600;
}

.skip-link:focus { top: var(--sp-2); }

.container {
    width: 100%;
    max-width: calc(var(--container) + var(--gutter) * 2);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.arrow {
    display: inline-block;
    margin-left: 6px;
    transition: transform var(--t-hover) var(--ease);
}

/* ── keyframes ─────────────────────────────────────────────────────────── */
/* 빛이 한 번 훑고 지나감 (버튼 hover) */
@keyframes sweep-once {
    from { transform: translateX(-160%) skewX(-18deg); }
    to { transform: translateX(420%) skewX(-18deg); }
}

/* 프리미엄 배너: 8초마다 한 번 */
@keyframes sweep-loop {
    0% { transform: translateX(-160%) skewX(-18deg); }
    13%, 100% { transform: translateX(520%) skewX(-18deg); }
}

/* 금색 글자 그라데이션 흐름 (복원) */
@keyframes gold-flow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

@keyframes ambient {
    0%, 100% { opacity: 0.75; }
    50% { opacity: 1; }
}

@keyframes border-spin { to { --ang: 360deg; } }

@keyframes live-pulse {
    0% { box-shadow: 0 0 0 0 rgba(212, 166, 42, 0.55); }
    70%, 100% { box-shadow: 0 0 0 7px rgba(212, 166, 42, 0); }
}

@keyframes popup-in {
    from { opacity: 0; transform: translateY(10px) scale(0.975); }
    to { opacity: 1; transform: none; }
}

/* ── buttons ───────────────────────────────────────────────────────────── */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    height: var(--btn-h);
    padding: 0 var(--sp-5);
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1;
    white-space: nowrap;
    transition: box-shadow var(--t-hover) var(--ease), transform var(--t-hover) var(--ease), background-position 400ms var(--ease);
}

/* 광택 띠 (hover 때 한 번 지나감) */
.btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 32%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6) 50%, transparent);
    transform: translateX(-160%) skewX(-18deg);
    pointer-events: none;
}

.btn:not([aria-disabled="true"]):hover::after { animation: sweep-once var(--t-sweep) var(--ease) 1; }

.btn:not([aria-disabled="true"]):active { transform: translateY(1px); }

/* 메탈릭 골드 */
.btn-primary {
    border-color: rgba(168, 121, 18, 0.55);
    background: var(--metal-gold);
    color: var(--black);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.75),
        inset 0 -1px 0 rgba(168, 121, 18, 0.35),
        0 1px 2px rgba(168, 121, 18, 0.3),
        0 6px 14px -6px rgba(168, 121, 18, 0.45);
}

.btn-primary:not([aria-disabled="true"]):hover {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.85),
        inset 0 -1px 0 rgba(168, 121, 18, 0.35),
        0 2px 4px rgba(168, 121, 18, 0.3),
        0 10px 20px -8px rgba(168, 121, 18, 0.55);
}

/* 웜 화이트 + 골드 그라데이션 테두리 */
.btn-secondary {
    background:
        linear-gradient(180deg, #FFFFFF, var(--ivory)) padding-box,
        linear-gradient(120deg, var(--gold-champagne), var(--gold-rich), var(--gold-champagne), var(--gold-deep)) border-box;
    background-size: 100% 100%, 300% 100%;
    background-position: 0 0, 0% 0;
    color: var(--charcoal);
    box-shadow: inset 0 1px 0 #FFFFFF, 0 1px 2px rgba(32, 33, 36, 0.05);
}

.btn-secondary:not([aria-disabled="true"]):hover {
    background-position: 0 0, 100% 0;
    box-shadow: inset 0 1px 0 #FFFFFF, var(--shadow-1);
}

.btn-sm { height: 40px; padding: 0 var(--sp-4); font-size: 14px; }

.tg-icon {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(180deg, #3BB3EA, #1C8DC6);
    color: #FFFFFF;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.tg-icon svg { width: 13px; height: 13px; fill: currentColor; }

/* ── header ────────────────────────────────────────────────────────────── */
.site-header {
    position: relative;
    background: linear-gradient(180deg, #FFFFFF 0%, var(--warm-white) 60%, #FBF6E8 100%);
}

/* 브랜드 구분선: 골드 헤어라인 + 블랙 라인 */
.site-header::after {
    content: "";
    display: block;
    height: 4px;
    background:
        var(--hairline-gold) top / 100% 2px no-repeat,
        linear-gradient(90deg, transparent, var(--black) 14%, var(--black) 86%, transparent) bottom / 100% 1px no-repeat;
}

.header-inner {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-areas: "actions brand meta";
    align-items: center;
    column-gap: var(--sp-6);
    min-height: 136px;          /* + 구분선 4px = 140px */
    padding-top: var(--sp-1);
    padding-bottom: var(--sp-1);
}

.header-actions {
    grid-area: actions;
    justify-self: start;
    display: grid;
    gap: var(--sp-2);
    width: 210px;
}

.brand {
    position: relative;
    grid-area: brand;
    justify-self: center;
    padding: 0 var(--sp-4);
}

/* 로고 뒤 앰비언트 라이트 (9초 주기로 은은하게) */
.brand::before {
    content: "";
    position: absolute;
    inset: -14px -150px;
    background: radial-gradient(ellipse 50% 50% at 50% 55%, rgba(255, 226, 154, 0.7) 0%, rgba(247, 231, 180, 0.35) 42%, transparent 72%);
    animation: ambient 9s ease-in-out infinite;
    pointer-events: none;
}

.brand a { position: relative; display: block; }

.brand-logo {
    width: 264px;
    height: auto;
    filter: drop-shadow(0 6px 8px rgba(168, 121, 18, 0.2));
    transition: transform var(--t-card) var(--ease);
}

.brand a:hover .brand-logo { transform: scale(1.02); }

.header-meta {
    grid-area: meta;
    justify-self: end;
    display: grid;
    justify-items: end;
    gap: 6px;
    text-align: right;
}

.today {
    color: var(--text-sub);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: -0.01em;
}

/* 디지털 시계 패널 */
.clock {
    min-width: 132px;
    padding: 7px 14px 6px;
    border: 1px solid rgba(239, 196, 76, 0.4);
    border-radius: 8px;
    background: var(--metal-black);
    color: var(--gold-light);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0.08em;
    text-align: center;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 10px rgba(239, 196, 76, 0.35);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), inset 0 0 14px rgba(239, 196, 76, 0.08), 0 4px 10px -6px rgba(20, 20, 20, 0.5);
}

.lifetime-link {
    color: var(--text-sub);
    font-size: 13px;
    font-weight: 500;
    transition: color var(--t-hover) var(--ease);
}

.lifetime-link strong { color: var(--gold-deep); font-weight: 700; }
.lifetime-link:hover { color: var(--charcoal); }

/* ── portal shortcuts ──────────────────────────────────────────────────── */
.portal-bar {
    border-bottom: 1px solid var(--line);
    background: #FFFFFF;
}

.portal-list {
    display: grid;
    grid-template-columns: repeat(9, minmax(0, 1fr));
}

.portal-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 54px;
    transition: background-color var(--t-hover) var(--ease);
}

/* hover: 골드 밑줄이 가운데서 펼쳐짐 */
.portal-link::after {
    content: "";
    position: absolute;
    right: 18%;
    bottom: 0;
    left: 18%;
    height: 2px;
    background: var(--hairline-gold);
    transform: scaleX(0);
    transition: transform 240ms var(--ease);
}

.portal-link:hover { background: linear-gradient(180deg, transparent, rgba(247, 231, 180, 0.35)); }
.portal-link:hover::after { transform: scaleX(1); }

.wm {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1;
    white-space: nowrap;
}

.wm b { font-weight: inherit; }
.c-blue { color: #4285F4; }
.c-red { color: #EA4335; }
.c-yellow { color: #FBBC05; }
.c-green { color: #34A853; }
.wm-google { font-weight: 700; letter-spacing: -0.02em; }
.wm-naver { color: #03C75A; letter-spacing: 0.02em; }
.wm-nate { color: #EE1C25; letter-spacing: 0.02em; }
.wm-zum { color: #3366CC; }
.wm-facebook { color: #1877F2; }
.wm-x { color: var(--charcoal); font-size: 17px; }

.wm-youtube {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--charcoal);
    letter-spacing: -0.03em;
}

.wm-youtube::before {
    content: "";
    flex: none;
    width: 20px;
    height: 14px;
    border-radius: 4px;
    background: #FF0000;
}

.wm-youtube::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 8px;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 6px solid #FFFFFF;
    transform: translateY(-50%);
}

.wm-instagram {
    background: linear-gradient(90deg, #F58529 0%, #DD2A7B 50%, #8134AF 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: #DD2A7B;
    -webkit-text-fill-color: transparent;
}

/* ── bands ─────────────────────────────────────────────────────────────── */
.band--white {
    padding: var(--sp-8) 0 var(--sp-10);
    background: var(--warm-white);
}

/* 아이보리 + 아주 옅은 점 패턴 */
.band--warm {
    padding: var(--sp-10) 0 var(--sp-12);
    border-top: 1px solid var(--line);
    background:
        radial-gradient(rgba(168, 121, 18, 0.07) 1px, transparent 1.5px) 0 0 / 22px 22px,
        linear-gradient(180deg, var(--ivory) 0%, #F3EFE4 100%);
}

/* ── section heads ─────────────────────────────────────────────────────── */
.section-head {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    margin-bottom: var(--sp-4);
}

.section-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--charcoal);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.03em;
    white-space: nowrap;
}

.section-title--lg {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.035em;
}

.title-orn {
    flex: none;
    width: 24px;
    height: 24px;
    filter: drop-shadow(0 1px 1px rgba(168, 121, 18, 0.45));
}

/* 흐르는 메탈릭 골드 글자 */
.title-metal {
    background: var(--metal-gold-text);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: var(--gold-deep);
    -webkit-text-fill-color: transparent;
    animation: gold-flow 8s linear infinite;
}

/* 제목 옆으로 사라지는 골드 헤어라인 */
.section-rule {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--gold-rich), rgba(212, 166, 42, 0.25) 40%, transparent);
}

.section-link {
    color: var(--gold-deep);
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.section-link:not([aria-disabled="true"]):hover .arrow { transform: translateX(3px); }

.section-sub {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-sub);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gold-rich);
    animation: live-pulse 2.4s ease-out infinite;
}

/* ── ad slots ──────────────────────────────────────────────────────────── */
.banner-wide { margin-bottom: 10px; }

.banner-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.ad-slot {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 10px;
}

.ad-slot.is-media {
    box-shadow: var(--shadow-1);
    transition: box-shadow var(--t-card) var(--ease);
}

a.ad-slot.is-media:hover { box-shadow: var(--shadow-2); }

.ad-slot.is-media picture,
.ad-slot.is-media img,
.ad-slot.is-media video {
    display: block;
    width: 100%;
    height: auto;
}

.ad-title {
    color: var(--black);
    font-weight: 800;
    letter-spacing: -0.03em;
    white-space: nowrap;
}

.ad-size {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    font-variant-numeric: tabular-nums;
}

/* 프리미엄 1200×100: 금속 판 느낌 — 가로 명암 + 위쪽 반사광 + 곡선 그래픽 + 주기적 광택 */
.ad-premium {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100px;
    padding: 0 var(--sp-8);
    border: 1px solid rgba(168, 121, 18, 0.7);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.08) 46%, rgba(20, 20, 20, 0.1) 100%),
        linear-gradient(100deg, var(--gold-rich) 0%, var(--gold) 16%, var(--gold-light) 34%, #FFF1C4 44%, var(--gold-light) 54%, var(--gold) 72%, var(--gold-rich) 88%, var(--gold-deep) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 -1px 0 rgba(168, 121, 18, 0.5),
        0 2px 4px rgba(168, 121, 18, 0.22),
        0 16px 30px -16px rgba(168, 121, 18, 0.55);
    transition: box-shadow var(--t-card) var(--ease);
}

/* 흐르는 곡선 그래픽 (오른쪽으로 갈수록 진해짐) */
.ad-premium::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 100' preserveAspectRatio='none'%3E%3Cg fill='none' stroke-width='1'%3E%3Cpath stroke='%23fff' stroke-opacity='.55' d='M380 118C560 20 760 8 1210 62'/%3E%3Cpath stroke='%23fff' stroke-opacity='.4' d='M440 124C620 34 800 22 1210 78'/%3E%3Cpath stroke='%23fff' stroke-opacity='.28' d='M520 128C690 52 850 40 1210 94'/%3E%3Cpath stroke='%23A87912' stroke-opacity='.35' d='M300 -14C520 70 780 84 1210 30'/%3E%3Cpath stroke='%23A87912' stroke-opacity='.25' d='M360 -20C570 56 800 68 1210 14'/%3E%3Cpath stroke='%23A87912' stroke-opacity='.16' d='M440 -24C630 42 830 52 1210 0'/%3E%3C/g%3E%3C/svg%3E") center / 100% 100% no-repeat;
    -webkit-mask-image: linear-gradient(90deg, transparent 20%, #000 60%);
    mask-image: linear-gradient(90deg, transparent 20%, #000 60%);
    pointer-events: none;
}

/* Light sweep — 프리미엄 배너 전용 */
.ad-premium::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 22%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7) 50%, transparent);
    transform: translateX(-160%) skewX(-18deg);
    animation: sweep-loop 8s var(--ease) 1.2s infinite;
    pointer-events: none;
}

.ad-premium .ad-main,
.ad-premium .ad-side {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: var(--sp-3);
}

.ad-premium .ad-badge {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 10px;
    border: 1px solid rgba(239, 196, 76, 0.55);
    border-radius: 5px;
    background: var(--metal-black);
    color: var(--gold-light);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    line-height: 1;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 2px 4px rgba(20, 20, 20, 0.3);
}

.ad-premium .ad-title {
    font-size: 23px;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}

.ad-premium .ad-size { color: rgba(20, 20, 20, 0.6); }

.ad-cta {
    display: inline-flex;
    align-items: center;
    height: 40px;
    padding: 0 var(--sp-5);
    border: 1px solid rgba(255, 226, 154, 0.35);
    border-radius: 999px;
    background: var(--metal-black);
    color: var(--gold-light);
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 4px 10px -4px rgba(20, 20, 20, 0.55);
    transition: color var(--t-hover) var(--ease), box-shadow var(--t-hover) var(--ease);
}

a.ad-premium:not([aria-disabled="true"]):hover {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.85),
        inset 0 -1px 0 rgba(168, 121, 18, 0.5),
        0 4px 8px rgba(168, 121, 18, 0.25),
        0 22px 36px -16px rgba(168, 121, 18, 0.65);
}

a.ad-premium:not([aria-disabled="true"]):hover .ad-cta { color: #FFFFFF; }
a.ad-premium:not([aria-disabled="true"]):hover .ad-cta .arrow { transform: translateX(3px); }

/* 일반 600×100: 모두 같은 디자인 — 웜 화이트 면 + 골드 그라데이션 테두리 + 오른쪽 위 반사광 */
.ad-basic {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-4);
    height: 100px;
    padding: 0 var(--sp-6);
    border: 1px solid transparent;
    background:
        radial-gradient(90% 150% at 100% 0%, rgba(255, 226, 154, 0.4) 0%, transparent 58%) padding-box,
        linear-gradient(180deg, #FFFFFF 0%, var(--warm-white) 45%, var(--ivory) 100%) padding-box,
        var(--border-gold) border-box;
    box-shadow: inset 0 1px 0 #FFFFFF, var(--shadow-1);
    transition: box-shadow var(--t-card) var(--ease);
}

.ad-basic .ad-main {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.ad-basic .ad-badge {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 9px;
    border: 1px solid rgba(168, 121, 18, 0.5);
    border-radius: 5px;
    background: var(--metal-gold);
    color: var(--black);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    line-height: 1;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.ad-copy { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ad-basic .ad-title { font-size: 18px; }
.ad-basic .ad-size { color: var(--text-sub); }

.ad-arrow {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(239, 196, 76, 0.45);
    border-radius: 50%;
    background: var(--metal-black);
    color: var(--gold-light);
    font-size: 16px;
    font-weight: 800;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 4px 8px -4px rgba(20, 20, 20, 0.5);
    transition: transform var(--t-hover) var(--ease), color var(--t-hover) var(--ease);
}

/* hover: 테두리 광택이 한 바퀴 돌고, 그림자가 깊어짐 */
a.ad-basic:not([aria-disabled="true"]):hover {
    box-shadow: inset 0 1px 0 #FFFFFF, var(--shadow-2);
    animation: border-spin 4s linear infinite;
}

a.ad-basic:not([aria-disabled="true"]):hover .ad-arrow {
    color: #FFFFFF;
    transform: translateX(3px);
}

/* ── 공식 텔레그램 채널 ────────────────────────────────────────────────── */
.channel-banner {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    height: 64px;
    margin-top: var(--sp-5);
    padding: 0 var(--sp-3) 0 var(--sp-4);
    overflow: hidden;
    border: 1px solid rgba(23, 104, 154, 0.6);
    border-radius: 12px;
    background:
        radial-gradient(60% 180% at 0% 0%, rgba(255, 255, 255, 0.28) 0%, transparent 60%),
        linear-gradient(100deg, #17689A 0%, #1C8DC6 34%, var(--telegram) 68%, #36ACE4 100%);
    color: #FFFFFF;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 2px 4px rgba(23, 104, 154, 0.18), 0 14px 26px -16px rgba(23, 104, 154, 0.6);
    transition: box-shadow var(--t-card) var(--ease);
}

.channel-icon {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(180deg, #FFFFFF, #E6F3FA);
    color: #1C8DC6;
    box-shadow: inset 0 1px 0 #FFFFFF, 0 3px 8px -2px rgba(13, 62, 92, 0.45);
}

.channel-icon svg { width: 22px; height: 22px; fill: currentColor; }

/* 사이트의 골드와 이어 주는 칩 */
.channel-chip {
    display: inline-flex;
    flex: none;
    align-items: center;
    height: 22px;
    padding: 0 9px;
    border: 1px solid rgba(168, 121, 18, 0.6);
    border-radius: 5px;
    background: var(--metal-gold);
    color: var(--black);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.channel-title {
    overflow: hidden;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-overflow: ellipsis;
    text-shadow: 0 1px 1px rgba(13, 62, 92, 0.35);
    white-space: nowrap;
}

.channel-btn {
    display: inline-flex;
    flex: none;
    align-items: center;
    height: 40px;
    margin-left: auto;
    padding: 0 var(--sp-5);
    border-radius: 999px;
    background: linear-gradient(180deg, #FFFFFF, #EAF5FB);
    color: #17689A;
    font-size: 14px;
    font-weight: 800;
    box-shadow: inset 0 1px 0 #FFFFFF, 0 4px 10px -4px rgba(13, 62, 92, 0.5);
}

.channel-banner:not([aria-disabled="true"]):hover {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 4px 8px rgba(23, 104, 154, 0.2), 0 20px 32px -16px rgba(23, 104, 154, 0.7);
}

.channel-banner:not([aria-disabled="true"]):hover .arrow { transform: translateX(3px); }

/* ── TOP10 랭킹 ────────────────────────────────────────────────────────── */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--sp-4);
}

.cat-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #FFFFFF;
    box-shadow: var(--shadow-card);
    transition: box-shadow var(--t-card) var(--ease), border-color var(--t-card) var(--ease);
}

.cat-card:hover {
    border-color: rgba(212, 166, 42, 0.65);
    box-shadow: 0 2px 4px rgba(32, 33, 36, 0.06), 0 18px 32px -16px rgba(168, 121, 18, 0.4);
}

/* 헤더: 차콜→딥 블랙 + 오른쪽 위 골드 반사광 + 아래 골드 헤어라인 */
.cat-head {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px var(--sp-5);
    background:
        radial-gradient(70% 160% at 100% 0%, rgba(239, 196, 76, 0.26) 0%, transparent 60%),
        var(--metal-black);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 3px 8px -2px rgba(20, 20, 20, 0.3);
}

.cat-head::before {
    content: "";
    flex: none;
    width: 4px;
    height: 18px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--gold-light), var(--gold-rich) 60%, var(--gold-deep));
    box-shadow: 0 0 8px rgba(239, 196, 76, 0.45);
}

.cat-head::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gold-deep) 0%, var(--gold-light) 28%, var(--gold-rich) 55%, rgba(212, 166, 42, 0) 100%);
}

.cat-title {
    overflow: hidden;
    background: linear-gradient(90deg, #FFFFFF 0%, #FFFFFF 40%, var(--gold-light) 50%, #FFFFFF 60%, #FFFFFF 100%);
    background-size: 250% 100%;
    background-position: 100% 50%;
    -webkit-background-clip: text;
    background-clip: text;
    color: #FFFFFF;
    -webkit-text-fill-color: transparent;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.03em;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: background-position 900ms var(--ease);
}

/* 카드에 올리면 제목에 금빛이 한 번 지나감 */
.cat-card:hover .cat-title { background-position: 0% 50%; }

.rank-list { padding: 6px 0 8px; }

.rank-list li + li { border-top: 1px solid var(--line-soft); }

.rank-row {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--sp-3);
    min-height: 42px;
    padding: 0 var(--sp-5);
    transition: background-color var(--t-hover) var(--ease), box-shadow var(--t-hover) var(--ease);
}

a.rank-row:not([aria-disabled="true"]):hover {
    background: linear-gradient(90deg, rgba(247, 231, 180, 0.55), rgba(247, 231, 180, 0.08));
    box-shadow: inset 3px 0 0 var(--gold-rich);
}

.rank-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    color: var(--text-faint);
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* 1·2·3위: 금·은·동 메탈 배지 (왼쪽 위 반사광) */
.rank-num.rank-1,
.rank-num.rank-2,
.rank-num.rank-3 {
    border: 1px solid;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 800;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}

.rank-num.rank-1 {
    border-color: var(--gold-deep);
    background: radial-gradient(circle at 32% 26%, #FFF8DC 0%, var(--gold-light) 24%, var(--gold) 56%, var(--gold-deep) 100%);
    color: #3A2A00;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 2px 5px -1px rgba(168, 121, 18, 0.6);
}

.rank-num.rank-2 {
    border-color: #858B95;
    background: radial-gradient(circle at 32% 26%, #FFFFFF 0%, #ECEEF1 24%, #C3C8CF 58%, #878D97 100%);
    color: #26292E;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 2px 5px -1px rgba(90, 96, 106, 0.5);
}

.rank-num.rank-3 {
    border-color: #8A5226;
    background: radial-gradient(circle at 32% 26%, #FFEBD8 0%, #EDBB8F 24%, #C98550 58%, #8A5226 100%);
    color: #3B1F0A;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 2px 5px -1px rgba(138, 82, 38, 0.55);
}

.rank-name {
    overflow: hidden;
    color: var(--charcoal);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: -0.01em;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color var(--t-hover) var(--ease);
}

.rank-row.is-top .rank-name { font-weight: 700; }

/* 1~3위 이름: 계속 흐르는 금색 그라데이션 (예전 효과 복원) */
@supports ((background-clip: text) or (-webkit-background-clip: text)) {
    .rank-row.is-top .rank-name,
    .rank-row.is-top .rank-name.is-empty {
        background: linear-gradient(90deg, var(--gold-deep) 0%, #E2B93F 25%, #FFD76A 40%, var(--gold-deep) 60%, #E2B93F 85%, var(--gold-deep) 100%);
        background-size: 200% 100%;
        -webkit-background-clip: text;
        background-clip: text;
        color: var(--gold-deep);
        -webkit-text-fill-color: transparent;
        animation: gold-flow 3.2s linear infinite;
    }
}
.rank-name.is-empty { color: var(--text-sub); }
.rank-row:not(.is-top) .rank-name.is-empty { color: #8C8678; }

.rank-meta {
    max-width: 120px;
    overflow: hidden;
    color: var(--text-faint);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

a.rank-row:not([aria-disabled="true"]):hover .rank-name { color: var(--gold-deep); }

/* ── footer ────────────────────────────────────────────────────────────── */
.site-footer {
    position: relative;
    background:
        radial-gradient(50% 140% at 50% 0%, rgba(239, 196, 76, 0.12) 0%, transparent 70%),
        linear-gradient(180deg, var(--charcoal), var(--black));
}

.site-footer::before {
    content: "";
    display: block;
    height: 2px;
    background: var(--hairline-gold);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-4);
    padding-top: var(--sp-8);
    padding-bottom: var(--sp-8);
}

.footer-desc { color: #FFFFFF; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.footer-copy { margin-top: var(--sp-1); color: #9C978B; font-size: 13px; }

/* ── popups (400×318, 기능 동일) ───────────────────────────────────────── */
html.popup-open,
html.popup-open body { overflow: hidden; }

.popup-layer {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: var(--sp-6) var(--sp-4);
    background: rgba(20, 20, 20, 0.55);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.popup-layer.is-visible { display: flex; }

.popup-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: center;
    gap: var(--sp-4);
    max-width: calc(100vw - 32px);
    max-height: calc(100dvh - 48px);
    overflow: auto;
}

.popup {
    width: 402px;               /* 테두리 1px 포함 → 안쪽 콘텐츠 400×318 */
    flex: 0 0 402px;
    max-width: 100%;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 14px;
    background:
        linear-gradient(#FFFFFF, #FFFFFF) padding-box,
        linear-gradient(140deg, var(--gold-light), var(--gold-rich) 40%, var(--gold-deep) 70%, var(--gold-light)) border-box;
    box-shadow: 0 4px 10px rgba(20, 20, 20, 0.2), 0 28px 60px -20px rgba(20, 20, 20, 0.6);
    animation: popup-in 320ms var(--ease) both;
}

.popup:nth-child(2) { animation-delay: 70ms; }
.popup:nth-child(3) { animation-delay: 140ms; }
.popup.is-dismissed { display: none; }

.popup-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--metal-black);
}

.popup-footer button {
    height: 44px;
    border: 0;
    background: transparent;
    color: #D9D5CB;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: color var(--t-hover) var(--ease), background-color var(--t-hover) var(--ease);
}

.popup-footer button + button { border-left: 1px solid rgba(255, 255, 255, 0.1); }

.popup-footer button:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--gold-light);
}

.pop-image,
.pop-image img,
.pop-image video { display: block; width: 100%; height: auto; }

/* 왼쪽 위에서 들어오는 빛 + 옅은 결 */
.pop-card {
    display: flex;
    flex-direction: column;
    aspect-ratio: 400 / 318;
    padding: var(--sp-5) var(--sp-6) var(--sp-6);
    background:
        radial-gradient(80% 70% at 0% 0%, rgba(255, 226, 154, 0.45) 0%, transparent 62%),
        repeating-linear-gradient(135deg, transparent 0 38px, rgba(212, 166, 42, 0.05) 38px 39px),
        linear-gradient(180deg, #FFFFFF, var(--warm-white));
    color: var(--charcoal);
}

.pop-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--sp-4);
}

.pop-logo { width: auto; height: 38px; filter: drop-shadow(0 3px 4px rgba(168, 121, 18, 0.25)); }

.pop-kicker {
    padding: 4px 11px;
    border: 1px solid rgba(239, 196, 76, 0.45);
    border-radius: 999px;
    background: var(--metal-black);
    color: var(--gold-light);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.pop-label { color: var(--text-sub); font-size: 13px; font-weight: 500; }

.pop-domain {
    overflow: hidden;
    color: var(--black);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.03em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pop-rows { margin-top: auto; border-top: 1px solid var(--line); }

.pop-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
    min-height: 36px;
    border-bottom: 1px solid var(--line-soft);
    font-size: 14px;
}

.pop-row span { color: var(--text-sub); font-weight: 500; }

.pop-row strong {
    overflow: hidden;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pop-row.is-accent strong { color: var(--gold-deep); }

.pop-hint {
    margin-top: auto;
    padding: var(--sp-3) var(--sp-4);
    border: 1px solid rgba(212, 166, 42, 0.35);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(247, 231, 180, 0.45));
    color: var(--charcoal);
    font-size: 13px;
    font-weight: 600;
}

.pop-cta { width: 100%; margin-top: var(--sp-4); }

/* ── responsive ────────────────────────────────────────────────────────── */
@media (max-width: 1199px) {
    :root { --gutter: 20px; }

    .header-actions { width: 180px; }
    .brand-logo { width: 240px; }
    .brand::before { inset: -14px -90px; }
    .clock { font-size: 20px; min-width: 120px; }
    .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .portal-list {
        display: flex;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .portal-list::-webkit-scrollbar { display: none; }
    .portal-list li { flex: 1 0 auto; }
    .portal-link { padding: 0 var(--sp-4); }
}

@media (max-width: 849px) {
    .popup-row {
        display: grid;
        grid-template-areas: "popup";
        grid-template-columns: minmax(0, 1fr);
        justify-content: stretch;
        width: min(400px, calc(100vw - 32px));
        gap: 0;
    }

    .popup { grid-area: popup; width: 100%; flex: none; animation-delay: 0ms !important; }
    .popup.is-queued { visibility: hidden; pointer-events: none; }
}

@media (max-width: 767px) {
    :root { --gutter: 16px; }

    .header-inner {
        grid-template-columns: 1fr;
        grid-template-areas: "brand" "actions" "meta";
        row-gap: var(--sp-3);
        min-height: 0;
        padding-top: var(--sp-3);
        padding-bottom: var(--sp-3);
    }

    .brand-logo { width: 200px; }
    .brand::before { inset: -8px -60px; }

    .header-actions {
        justify-self: stretch;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    .header-meta { justify-self: center; justify-items: center; text-align: center; }
    .header-meta .today,
    .header-meta .clock { display: none; }

    .lifetime-link { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; }

    .portal-link { height: 48px; }

    .band--white { padding: var(--sp-6) 0 var(--sp-8); }
    .band--warm { padding: var(--sp-8) 0 var(--sp-10); }

    .section-head { gap: var(--sp-3); margin-bottom: var(--sp-2); }
    .section-title { font-size: 20px; }
    .section-title--lg { font-size: 23px; }
    .title-orn { width: 22px; height: 22px; }

    .section-link,
    .section-sub { min-height: 44px; display: inline-flex; align-items: center; font-size: 13px; }

    .banner-wide { margin-bottom: var(--sp-2); }
    .banner-grid { grid-template-columns: 1fr; gap: var(--sp-2); }

    .ad-premium { height: 64px; padding: 0 14px; }
    .ad-premium .ad-main { gap: var(--sp-2); }
    .ad-premium .ad-badge { height: 20px; padding: 0 7px; font-size: 10px; letter-spacing: 0.08em; }
    .ad-premium .ad-title { font-size: 16px; }
    .ad-premium .ad-size { display: none; }
    .ad-premium::after { width: 34%; }
    .ad-cta { height: 36px; padding: 0 var(--sp-3); font-size: 13px; }

    .ad-basic { height: 64px; padding: 0 var(--sp-4); }
    .ad-basic .ad-title { font-size: 16px; }
    .ad-arrow { width: 34px; height: 34px; }

    .channel-banner { margin-top: var(--sp-4); gap: 10px; padding: 0 10px 0 12px; }
    .channel-chip { display: none; }
    .channel-title { font-size: 15px; }
    .channel-btn { height: 44px; padding: 0 var(--sp-4); font-size: 13px; }

    .cat-grid { grid-template-columns: 1fr; gap: var(--sp-3); }
    .rank-row { min-height: 44px; }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        padding-top: var(--sp-6);
        padding-bottom: var(--sp-6);
    }

    .footer-inner .btn-sm { height: 44px; }
}

@media (max-width: 420px) {
    .pop-card { padding: var(--sp-4) var(--sp-5) var(--sp-5); }
    .pop-head { margin-bottom: var(--sp-3); }
    .pop-logo { height: 30px; }
    .pop-domain { font-size: 23px; }
    .pop-row { min-height: 32px; font-size: 13px; }
    .pop-cta { margin-top: var(--sp-3); }
}

/* 움직임 줄이기 설정: 모든 애니메이션·전환 끔 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
