/* 겨울 모드 (시안 winter_handoff, 2026-11-29) - 관리자가 겨울 모드를 켰고 gsu-on 스킨일 때만 실린다
 * (cham/common/winter.lib.php gsu_winter_css). 색은 tokens-on.css 의 --gs-winter… 만 쓴다.
 * 각 화면의 원래 css 보다 먼저 실리므로, 덮어쓰는 규칙은 .is-winter 를 붙여 무게로 이긴다. */

/* ---------- 1. 로고 산타 모자 (모든 머리글) ---------- */
.gon-hd h1.gon-logo a, .dna-top .dna-logo { position: relative; display: block; }
.gsu-hat { position: absolute; left: 0; top: 0; z-index: 1; width: 100%; height: 100%; overflow: visible; pointer-events: none; }

/* ---------- 2. 손님 홈 배너 첫 장 (2026-11-29 운영자: 진한 하늘색, 눈 결정은 멈추고 작은 눈만 내림) ---------- */
#gh .sw { background: var(--gs-winter-deep); }
#gh .sw .gh-eb { color: var(--gs-winter-deep-ink); font-weight: 800; }
#gh .gh-slide.sw h1, #gh .sw .gh-lead { color: var(--gs-winter-deep-text); }
#gh .gh-slide.sw h1 b { color: var(--gs-navy); }
#gh .sw .gh-lead { margin-top: 14px; }
#gh .sw .gh-b-line.is-dark:not(:hover) { border-color: var(--gs-white); }
/* 눈 결정: 글자와 로그인 창(오른쪽 360px) 사이에 다 들어가게, 본문 폭(1000~1280px)에 따라 240~412px */
#gh .gh-flk { --fw: clamp(240px, calc(var(--gon-w) - 868px), 412px); right: 384px; top: 50%; width: var(--fw); height: var(--fw); margin-top: calc(var(--fw) / -2); filter: drop-shadow(0 16px 20px rgba(47,103,168,.34)); opacity: 0; transform: scale(.9); transition: opacity 1.4s var(--gs-ease), transform 2.2s var(--gs-ease-out); }
#gh .sw.is-on .gh-flk { opacity: 1; transform: none; }
#gh .gh-flk img { display: block; width: 100%; height: 100%; max-width: none; }
/* 작은 눈: 글자에 겹치지 않게 제목 오른쪽부터 화면 끝까지 */
#gh .gh-snow { left: 440px; right: calc((var(--gon-w) - 100vw) / 2); top: 0; bottom: 0; }
#gh .gh-snow i { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); border-radius: 50%; background: var(--gs-white); opacity: var(--o); animation: gsu-snow var(--t) linear var(--d) infinite paused; }
#gh .sw.is-on .gh-snow i { animation-play-state: running; }
#gh .gh-bn.is-paused .sw .gh-snow i { animation-play-state: paused; }   /* 배너 멈춤 단추를 누르면 눈도 멈춘다 */
@keyframes gsu-snow {
	from { transform: translate(0, calc(-20px - var(--y))); }
	50% { transform: translate(var(--w), calc(225px - var(--y))); }
	to { transform: translate(0, calc(470px - var(--y))); }
}

/* ---------- 3. 학생 홈 낱말퍼즐 카드 ---------- */
#gs .gs-puz.is-winter { background: var(--gs-winter); box-shadow: none; }
#gs .gs-puz.is-winter:hover { box-shadow: 0 2px 4px rgba(47,103,168,.08), 0 14px 30px rgba(47,103,168,.18); }
#gs .gs-puz.is-winter .ic { background: var(--gs-white); color: var(--gs-winter-ink); box-shadow: none; }
#gs .gs-puz.is-winter:hover .ic { background: var(--gs-winter-ink); color: var(--gs-white); }
#gs .gs-puz.is-winter .tx b em { display: inline-block; margin-left: 8px; padding: 3px 9px; border-radius: var(--gs-r-pill); background: var(--gs-white); color: var(--gs-winter-ink); font-size: var(--gs-fs-micro); line-height: 1.4; font-style: normal; font-weight: 800; vertical-align: 3px; }
#gs .gs-puz.is-winter .tx small, #gs .gs-puz.is-winter .pg small { color: var(--gs-winter-sub); }
#gs .gs-puz.is-winter .pg .gs-bar { background: var(--gs-white); }
#gs .gs-puz.is-winter .pg .gs-bar i { background: var(--gs-winter-ink); }
#gs .gs-puz.is-winter .go { background: var(--gs-white); box-shadow: none; color: var(--gs-winter-ink); }
#gs .gs-puz.is-winter:hover .go { background: var(--gs-winter-ink); color: var(--gs-white); }

/* ---------- 4. 낱말퍼즐 목록 · 풀이 ---------- */
.pzo.is-winter .pzo-hero, .pzo.is-winter .pzo-band { background: var(--gs-winter); }
.pzo.is-winter .pzo-pill { color: var(--gs-winter-ink); }
.pzo.is-winter .pzo-lead { margin-top: 8px; font-size: var(--gs-fs-lead); line-height: 1.5; color: var(--gs-text-sub); }
.pzo.is-winter .pzo-stats { margin-top: 26px; }
.pzo.is-winter .pzo-flk { display: block; width: 230px; height: 230px; margin: -30px 0; filter: drop-shadow(0 14px 18px rgba(95,141,186,.25)); animation: pzo-fade-up .6s var(--gs-ease-out) both; }

.pzo.is-winter .pzo-lvs button.win { gap: 6px; background: var(--gs-winter); color: var(--gs-winter-ink); }
.pzo.is-winter .pzo-lvs button.win .gsu-sf { width: 20px; height: 20px; }
.pzo.is-winter .pzo-lvs button.win small { color: var(--gs-winter-sub); }
.pzo.is-winter .pzo-lvs button.win:hover { background: var(--gs-winter-hover); }
.pzo.is-winter .pzo-lvs button.win.on { background: var(--gs-winter-ink); color: var(--gs-white); }
.pzo.is-winter .pzo-lvs button.win.on small { color: var(--gs-winter-on); }

.pzo.is-winter .pzo-tiles.is-win { display: block; }
.pzo.is-winter .pzo-wh { margin-bottom: 16px; font-size: 21px; line-height: 1.4; font-weight: 800; color: var(--gs-navy); }
.pzo-wcs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.pzo-wc { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--gs-r-card); background: var(--gs-white); box-shadow: inset 0 0 0 1px var(--gs-line); transition: transform .2s var(--gs-ease-out), box-shadow .2s; }
.pzo-wc:hover, .pzo-wc:focus-visible { transform: translateY(-2px); outline: none; box-shadow: 0 0 0 2px var(--gs-winter-ink); }
.pzo-wc .face { position: relative; display: block; height: 196px; background: var(--gs-winter); }
.pzo-wc .face::after { content: ''; position: absolute; left: 50%; bottom: 10px; width: 92px; height: 14px; margin-left: -46px; border-radius: 50%; background: radial-gradient(closest-side, rgba(47,103,168,.22), rgba(47,103,168,0)); }
.pzo-wc .no { position: absolute; left: 12px; top: 10px; z-index: 1; font-size: var(--gs-fs-label); line-height: 1.4; font-weight: 800; color: var(--gs-winter-ink); }
.pzo-wc .face img { position: absolute; left: 50%; bottom: 16px; z-index: 1; width: auto; height: 150px; max-width: none; transform: translateX(-50%); }
.pzo-wc .meta { display: block; padding: 12px 14px 14px; }
.pzo-wc .meta b { display: block; font-size: var(--gs-fs-ui); line-height: 1.4; font-weight: 800; color: var(--gs-navy); }
.pzo-wc .meta small { display: block; margin-top: 2px; font-size: var(--gs-fs-label); line-height: 1.4; color: var(--gs-text-muted); white-space: nowrap; }
.pzo-wc .pb { position: relative; display: block; height: 5px; margin-top: 10px; border-radius: 5px; background: var(--gs-line); overflow: hidden; }
.pzo-wc .pb i { position: absolute; left: 0; top: 0; bottom: 0; width: var(--p); border-radius: 5px; background: var(--gs-winter-ink); }
/* 완성한 판 = 회색 */
.pzo-wc.done .face { background: var(--gs-winter-done); }
.pzo-wc.done .face::after { background: radial-gradient(closest-side, rgba(0,0,0,.12), rgba(0,0,0,0)); }
.pzo-wc.done .face img { filter: grayscale(1); opacity: .55; }
.pzo-wc.done .no, .pzo-wc.done .meta b { color: var(--gs-text-muted); }
.pzo-wc.done .meta small { font-weight: 700; }
.pzo-wc .dn { position: absolute; right: 10px; top: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 11px 0 8px; border-radius: var(--gs-r-pill); background: var(--gs-text-muted); color: var(--gs-white); font-size: var(--gs-fs-micro); font-weight: 800; }
.pzo-wc .dn svg { width: 16px; height: 16px; }

/* 처음 한 번 나타남 - 카드 차례대로, 막대는 0.6초. 딱지(first)는 puzzle-on.js 가 끝나면 뗀다 */
.pzo-tiles.first .pzo-wc { animation: pzo-fade-up .3s var(--gs-ease-out) both; animation-delay: var(--d); }
.pzo-tiles.first .pzo-wc .pb i { animation: pzo-bar .6s var(--gs-ease-out) .3s both; }

/* ---------- 4-1. 겨울 퍼즐 풀이 (시안 winter_play_fix, 2026-11-29) - 겨울 특집 5판을 풀 때만. 움직임은 더하지 않는다 ---------- */
.pzo-playpage.is-winter { --wpz-mat: #EEF4FA; --wpz-word: #D6E7F6; --wpz-row: #EAF2FA; --wpz-edge: #9CC1E4; --wpz-line: #B9D2EA; }
/* 위 띠 */
.pzo-playpage.is-winter .pzo-band { overflow: hidden; }
.pzo-playpage.is-winter .pzo-band .gon-wrap { height: 160px; }
.pzo-playpage.is-winter .pzo-band-flk { position: absolute; right: 260px; top: -36px; display: block; width: 240px; height: 240px; max-width: none; opacity: .9; filter: drop-shadow(0 10px 14px rgba(95,141,186,.22)); pointer-events: none; }
.pzo-playpage.is-winter .pzo-nav { position: relative; z-index: 1; }
/* 판 바탕 · 고른 낱말 (틀린 칸의 호박색은 그대로) */
.pzo-playpage.is-winter .pzo-board-wrap { position: relative; overflow: hidden; padding-bottom: 46px; background: var(--wpz-mat); }
.pzo-playpage.is-winter .pzo-board { position: relative; z-index: 1; }
.pzo-playpage.is-winter .pzo-cell.word:not(.bad) { background: var(--wpz-word); }
.pzo-playpage.is-winter .pzo-clues li.on { background: var(--wpz-row); }
/* 눈 쌓임. 칸 번호 · 지금 칸의 남색 테두리 · 틀린 칸의 호박색 테두리는 눈 위에 */
.pzo-playpage.is-winter .pzo-cap { position: absolute; left: -2px; right: -2px; top: -6px; z-index: 1; display: block; height: 10px; pointer-events: none; }
.pzo-playpage.is-winter .pzo-cap svg { display: block; width: 100%; height: 100%; overflow: visible; }
.pzo-playpage.is-winter .pzo-cap path { fill: var(--gs-white); filter: drop-shadow(0 -.6px .8px rgba(95,141,186,.45)); }
.pzo-playpage.is-winter .pzo-cell .no { z-index: 3; }
.pzo-playpage.is-winter .pzo-cell input.input_ans.gsu-pz-cur { z-index: 2; }
.pzo-playpage.is-winter .pzo-play:not(.solved) .pzo-cell.bad::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 2; border-radius: 8px; box-shadow: inset 0 0 0 2.5px var(--gs-amber); pointer-events: none; }
.pzo-playpage.is-winter .pzo-drift { position: absolute; left: 0; bottom: 0; display: block; width: 100%; height: 40px; pointer-events: none; }
.pzo-playpage.is-winter .pzo-drift path { fill: var(--gs-white); opacity: .85; }
/* 완성 */
.pzo-playpage.is-winter .pzo-play.solved .pzo-cell.w { background: var(--gs-white); box-shadow: inset 0 0 0 2px var(--wpz-edge), var(--tile); }
.pzo-playpage.is-winter .pzo-play.solved .pzo-cell input.input_ans { color: var(--gs-winter-ink); }
.pzo-playpage.is-winter .pzo-play.solved .pzo-cell .no { color: var(--wpz-edge); }
.pzo-playpage.is-winter .pzo-done { background: var(--gs-winter); color: var(--gs-navy); }
.pzo-playpage.is-winter .pzo-done .gs-label { color: var(--gs-winter-ink); }
.pzo-playpage.is-winter .pzo-done p { color: var(--gs-text-sub); }
.pzo-playpage.is-winter .pzo-done h2, .pzo-playpage.is-winter .pzo-done p b { color: var(--gs-navy); }
.pzo-playpage.is-winter .pzo-done .btns .gs-btn-line { border-color: var(--wpz-line); background: var(--gs-white); color: var(--gs-navy); }
.pzo-playpage.is-winter .pzo-done .btns .gs-btn-line:hover { border-color: var(--gs-navy); color: var(--gs-navy); }

/* ---------- 5. 홈 팝업 (cham/include/winter_popup.php) - 흰 면 하나에 글과 정서인. 그림에 그림자를 더 두르지 않는다 ---------- */
.wp-scrim { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; overflow: auto; background: rgba(30,42,63,.42); opacity: 0; transition: opacity var(--gs-dur) var(--gs-ease); }
.wp-scrim[hidden] { display: none; }
.wp-scrim.on { opacity: 1; }
.wp, .wp * { box-sizing: border-box; }
.wp { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 258px; align-items: center; width: 640px; max-width: 100%; min-height: 360px; overflow: hidden; border-radius: var(--gs-r-card); background: var(--gs-white); box-shadow: 0 2px 6px rgba(30,42,63,.08), 0 20px 48px rgba(30,42,63,.18); font-family: var(--gs-font); letter-spacing: normal; text-align: left; word-break: keep-all; color: var(--gs-text); }
.wp:focus { outline: none; }
.wp-in { position: relative; z-index: 1; padding: 30px 0 22px 40px; }
.wp .wp-t { margin: 0; padding: 0; font-size: 25px; line-height: 1.4; font-weight: 800; color: var(--gs-navy); letter-spacing: var(--gs-ls-title); }
.wp .wp-d { margin: 12px 0 0; padding: 0; font-size: 16px; line-height: 1.6; color: var(--gs-text-sub); }
.wp a.wp-go { display: flex; align-items: center; justify-content: center; width: 230px; height: 52px; margin-top: 24px; border-radius: var(--gs-r-btn); background: var(--gs-amber); color: var(--gs-navy); font-size: 17px; font-weight: 700; text-decoration: none; transition: background var(--gs-dur) var(--gs-ease); }
.wp a.wp-go:hover { background: #D6950F; }
.wp .wp-no { display: block; width: 230px; height: 44px; margin: 4px 0 0; padding: 0; border: 0; background: none; color: var(--gs-text-muted); font: 600 15px/1 var(--gs-font); cursor: pointer; transition: color var(--gs-dur) var(--gs-ease); }
.wp .wp-no:hover { color: var(--gs-navy); }
.wp .wp-img { display: block; align-self: end; justify-self: end; width: auto; height: 330px; max-width: none; margin: 0 0 8px; }
.wp .wp-x { position: absolute; right: 8px; top: 8px; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--gs-navy); cursor: pointer; transition: background var(--gs-dur) var(--gs-ease); }
.wp .wp-x:hover { background: var(--gs-tint); }
.wp .wp-x svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.wp a.wp-go:focus-visible, .wp .wp-no:focus-visible, .wp .wp-x:focus-visible { outline: 2px solid var(--gs-navy); outline-offset: 2px; }
/* 세로 모양: 휴대폰(winter-popup.js 가 .is-m 을 붙임) */
.wp-scrim.is-m .wp { grid-template-columns: minmax(0, 1fr); width: 350px; max-width: none; min-height: 0; }
.wp-scrim.is-m .wp-img { order: -1; justify-self: center; height: 230px; margin: 14px 0 0; }
.wp-scrim.is-m .wp-in { padding: 14px 24px 12px; text-align: center; }
.wp-scrim.is-m .wp-t { font-size: 22px; }
.wp-scrim.is-m a.wp-go, .wp-scrim.is-m .wp-no { width: 100%; }
@media (prefers-reduced-motion: reduce) { .wp-scrim, .wp * { transition: none !important; } }
