/* =========================================================================
   QUAD 크리스마스 시즌 테마
   - 기존 quad_user.css 는 수정하지 않고, body.theme-xmas 아래에서 변수와 일부 규칙만 덮어씁니다.
   - 켜고 끄기: site/common/header.jsp 맨 위의 XMAS_THEME 값을 true/false 로 바꾸면 됩니다.
   - 이 파일은 header.jsp 가 XMAS_THEME=true 일 때만 불러옵니다.
   ========================================================================= */

/* ---------- 라이트 ---------- */
body.theme-xmas{
    --bg:#f4f7f3; --fg:#10241c; --muted:#5d7167; --card:#ffffff; --border:#dbe5de;
    --link:#10241c; --link-hover:#0f3d2e; --primary:#0f3d2e; --primary-fg:#ffffff;
    --chip-bg:#e9f0eb; --chip-green:#14724f; --chip-red:#b3202f; --chip-blue:#1d5a45; --chip-amber:#92400e;
    --accent:#b3202f; --muted-icon:#cbd5e1;
    --berry:#b3202f; --gold:#b98f35; --pine:#0f3d2e; --pine2:#1d5a45; --bulb-green:#14724f;
    --accent-grad:linear-gradient(135deg,#0f3d2e,#1d5a45);
    --hairline:#dbe5de;
    --surface-1:#ffffff; --surface-2:#f8faf8;
    --elev-1:0 2px 10px rgba(15,61,46,.06); --elev-2:0 6px 24px rgba(15,61,46,.12);
}

/* ---------- 다크 ---------- */
[data-theme="dark"] body.theme-xmas{
    --bg:#07130d; --fg:#e6efe9; --muted:#8fa89b; --card:#0f2118; --border:#1f372b;
    --link:#e6efe9; --link-hover:#ffffff; --primary:#e3c26e; --primary-fg:#07130d;
    --chip-bg:#16301f; --chip-green:#5fd1a0; --chip-red:#ff8a95; --chip-blue:#e3c26e; --chip-amber:#e3c26e;
    --accent:#e0505e; --muted-icon:#475569;
    --berry:#e0505e; --gold:#e3c26e; --pine:#0b2a20; --pine2:#14422f; --bulb-green:#5fd1a0;
    --accent-grad:linear-gradient(135deg,#e0505e,#b3202f);
    --hairline:color-mix(in oklab,#e3c26e 20%,#1f372b);
    --surface-1:color-mix(in oklab,#0f2118 96%,transparent);
    --surface-2:color-mix(in oklab,#0f2118 92%,transparent);
    --elev-1:0 10px 28px rgba(0,0,0,.35); --elev-2:0 14px 38px rgba(0,0,0,.5);
    color-scheme:dark;
    background:
        radial-gradient(circle at 10% 0%, rgba(224,80,94,.22), transparent 28%),
        radial-gradient(circle at 92% 4%, rgba(227,194,110,.16), transparent 26%),
        radial-gradient(circle at 70% 38%, rgba(95,209,160,.06), transparent 30%),
        radial-gradient(130% 50% at 50% -5%, #14452f 0%, transparent 70%),
        linear-gradient(180deg,#081a12 0%,#06100b 100%);
    background-attachment:fixed;
}

/* ---------- 헤더 ---------- */
.theme-xmas .site-header{border-bottom-color:var(--hairline)}
.theme-xmas .brand{display:inline-flex;align-items:center;gap:8px}
.theme-xmas .brand::before{
    content:"";width:15px;height:15px;flex:none;background:var(--accent);
    clip-path:polygon(50% 0,62% 36%,100% 38%,70% 60%,80% 100%,50% 76%,20% 100%,30% 60%,0 38%,38% 36%);
}
[data-theme="dark"] .theme-xmas .brand{color:var(--gold);text-shadow:0 0 12px rgba(227,194,110,.45)}
[data-theme="dark"] .theme-xmas .brand::before{background:var(--gold);filter:drop-shadow(0 0 5px rgba(227,194,110,.7))}
.theme-xmas .btn-franchise{background-color:var(--accent)}
.theme-xmas .btn-dealer-schedule{background-color:var(--pine2)}
[data-theme="dark"] .theme-xmas .btn-franchise{box-shadow:0 0 14px rgba(224,80,94,.35)}
[data-theme="dark"] .theme-xmas .btn-dealer-schedule{background-color:#14523a;box-shadow:0 0 14px rgba(95,209,160,.3)}
[data-theme="dark"] .theme-xmas #themeToggle{color:var(--gold);border-color:color-mix(in oklab,var(--gold) 40%,transparent)}

/* 전구 줄 (xmas.js 가 만듭니다) */
.xmas-lights{position:absolute;left:0;right:0;bottom:-7px;height:14px;display:flex;justify-content:space-around;pointer-events:none}
.xmas-lights b{width:7px;height:7px;border-radius:50%;margin-top:4px;animation:xmasTw 3s ease-in-out infinite}
.xmas-lights b:nth-child(4n+1){background:var(--berry)}
.xmas-lights b:nth-child(4n+2){background:var(--gold);animation-delay:.6s}
.xmas-lights b:nth-child(4n+3){background:var(--bulb-green);animation-delay:1.2s}
.xmas-lights b:nth-child(4n+4){background:var(--gold);animation-delay:1.8s}
[data-theme="dark"] .xmas-lights b:nth-child(4n+1){box-shadow:0 0 10px 3px rgba(224,80,94,.7)}
[data-theme="dark"] .xmas-lights b:nth-child(4n+2),
[data-theme="dark"] .xmas-lights b:nth-child(4n+4){box-shadow:0 0 10px 3px rgba(227,194,110,.7)}
[data-theme="dark"] .xmas-lights b:nth-child(4n+3){box-shadow:0 0 10px 3px rgba(95,209,160,.7)}
@keyframes xmasTw{50%{opacity:.35}}

/* 화면 전체 눈 (xmas.js 가 만듭니다) */
#xmasSnow{position:fixed;inset:0;width:100%;height:100%;pointer-events:none;z-index:55}

/* ---------- 히어로 ---------- */
.theme-xmas .hero::after{
    content:"";position:absolute;inset:0;z-index:2;pointer-events:none;
    background:linear-gradient(180deg,rgba(8,40,28,.12) 0%,rgba(7,36,26,.22) 55%,rgba(5,26,18,.6) 100%);
}
[data-theme="dark"] .theme-xmas .fullbleed{border-bottom:1px solid rgba(227,194,110,.5);box-shadow:0 12px 30px rgba(0,0,0,.45)}

/* ---------- 제목 앞 별 (다크) ---------- */
[data-theme="dark"] .theme-xmas .section .head .title::before{
    content:"";display:inline-block;width:13px;height:13px;margin-right:8px;vertical-align:-1px;
    background:var(--gold);filter:drop-shadow(0 0 5px rgba(227,194,110,.7));
    clip-path:polygon(50% 0,62% 36%,100% 38%,70% 60%,80% 100%,50% 76%,20% 100%,30% 60%,0 38%,38% 36%);
}

/* ---------- 칩 / 하단 탭 / 랭킹 ---------- */
.theme-xmas .chip.red{background:var(--accent);color:#fff}
[data-theme="dark"] .theme-xmas .chip.red{box-shadow:0 0 10px rgba(224,80,94,.4)}
.theme-xmas .bottom-nav .tab.active::after{background:linear-gradient(90deg,var(--accent),var(--gold))}
[data-theme="dark"] .theme-xmas .bottom-nav{background:color-mix(in oklab,var(--bg) 78%,transparent);border-top-color:var(--hairline)}
[data-theme="dark"] .theme-xmas .bottom-nav .tab.active{text-shadow:0 0 12px rgba(224,80,94,.8)}
.theme-xmas .rank-item:has(.rank-medal){
    background:linear-gradient(90deg,color-mix(in oklab,var(--gold) 16%,var(--card)),var(--card) 75%) !important;
}
[data-theme="dark"] .theme-xmas .rank-medal.gold{box-shadow:inset 0 0 0 2px rgba(255,255,255,.65),0 0 12px rgba(246,215,122,.55)}

/* ---------- 빙고 / 파켓 이벤트 ---------- */
.theme-xmas .bingo-cell{border-color:var(--hairline)}
.theme-xmas .bingo-cell.detail{background:linear-gradient(135deg,var(--accent),#1d5a45) !important}
[data-theme="dark"] .theme-xmas .bingo-cell.detail{box-shadow:0 0 14px rgba(224,80,94,.35)}
.theme-xmas .pocket-progress-bar > span{background:linear-gradient(90deg,var(--accent) 0%,var(--gold) 100%)}
[data-theme="dark"] .theme-xmas .pocket-progress-bar > span{box-shadow:0 0 12px rgba(227,194,110,.55)}

/* ---------- 딜러 스케줄 ---------- */
.theme-xmas .ds-day.today{border-color:var(--primary);box-shadow:0 0 0 1px var(--primary)}
