/* ═══════════════════════════════════════════════
   Heart-Dog Kindergarten · 3D Game Style
   캐릭터 대화창 바로 위 고정 · RPG 레이아웃
═══════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
    width: 100%; height: 100%;
    overflow: hidden;
    font-family: 'Noto Sans KR', sans-serif;
    background: #0d0618;
}
body { cursor: none; }
img { user-select: none; -webkit-user-drag: none; pointer-events: none; }
button { cursor: none; border: none; font-family: inherit; background: none; }
input, textarea { font-family: inherit; }
a { cursor: none; }

/* ═══════════════════════════════════════════════
   CUSTOM CURSOR
═══════════════════════════════════════════════ */
#cur-ring {
    position: fixed; z-index: 99999; pointer-events: none;
    width: 28px; height: 28px;
    border: 2px solid #ff85c2;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width .12s, height .12s, border-color .12s, background .12s;
    mix-blend-mode: screen;
    top: 0; left: 0;
}
#cur-dot {
    position: fixed; z-index: 99999; pointer-events: none;
    width: 6px; height: 6px;
    background: #ff85c2;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: transform .06s;
    top: 0; left: 0;
    box-shadow: 0 0 8px #ff85c2;
}
#cur-ring.grow { width: 48px; height: 48px; border-color: #fff; background: rgba(255,133,194,.1); }
#cur-ring.click { width: 18px; height: 18px; background: rgba(255,133,194,.4); }

/* ═══════════════════════════════════════════════
   LOADING SCREEN
═══════════════════════════════════════════════ */
#loading-screen {
    position: fixed; inset: 0; z-index: 10000;
    display: flex; align-items: center; justify-content: center;
    transition: opacity .9s ease, visibility .9s;
}
#loading-screen.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.ld-bg {
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 40% 55%, #3b0764 0%, #1a0a2e 55%, #080412 100%);
}
.ld-bg::after {
    content: '';
    position: absolute; inset: 0;
    background: url('images/bg_home.jpg') center / cover no-repeat;
    opacity: .15;
}
.ld-content {
    position: relative; z-index: 1;
    text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.ld-dog-ring {
    width: 180px; height: 180px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: radial-gradient(circle, rgba(255,133,194,.18) 0%, transparent 70%);
    margin-bottom: 12px;
    animation: ldRingPulse 2s ease-in-out infinite;
}
@keyframes ldRingPulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(255,133,194,.35), 0 0 40px rgba(255,133,194,.2); }
    50%      { box-shadow: 0 0 0 20px rgba(255,133,194,0), 0 0 60px rgba(255,133,194,.35); }
}
.ld-dog-img {
    height: 160px; width: auto;
    filter: drop-shadow(0 0 30px rgba(255,133,194,.8));
    animation: ldFloat 2.2s ease-in-out infinite alternate;
}
@keyframes ldFloat {
    from { transform: translateY(0) scale(1); }
    to   { transform: translateY(-16px) scale(1.04); }
}
.ld-title {
    font-family: 'Gaegu', cursive;
    font-size: 2.6rem; font-weight: 700; color: #fff;
    text-shadow: 0 0 40px rgba(255,133,194,.9);
}
.ld-sub { font-size: .9rem; color: rgba(255,200,230,.6); letter-spacing: .2em; }
.ld-bar-wrap {
    width: 280px; height: 5px;
    background: rgba(255,255,255,.08);
    border-radius: 10px; overflow: hidden; margin: 14px auto 6px;
}
.ld-bar {
    height: 100%; width: 0%;
    background: linear-gradient(90deg, #ff85c2, #b37feb, #ff85c2);
    background-size: 200% 100%;
    border-radius: 10px;
    transition: width .35s ease;
    animation: ldShimmer 1.4s linear infinite;
}
@keyframes ldShimmer { to { background-position: -200% 0; } }
.ld-pct { font-size: .78rem; color: rgba(255,200,230,.5); }

/* ═══════════════════════════════════════════════
   APP / SCENE BASE
═══════════════════════════════════════════════ */
#app { position: fixed; inset: 0; overflow: hidden; }

.scene {
    position: absolute; inset: 0;
    opacity: 0; visibility: hidden;
    transition: opacity .55s ease;
    overflow: hidden;
}
.scene.active { opacity: 1; visibility: visible; }

/* 배경 레이어 */
.bg-far {
    position: absolute; inset: -5%;
    background-size: cover; background-position: center;
    will-change: transform;
    filter: brightness(.7) saturate(1.15);
    transition: transform 8s ease;
}
.bg-vignette {
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse at 50% 110%, transparent 20%, rgba(8,4,22,.85) 80%),
        radial-gradient(ellipse at 50% -20%, transparent 40%, rgba(8,4,22,.4) 100%);
    pointer-events: none; z-index: 2;
}

/* 앰비언트 오브 */
.amb-orb {
    position: absolute; border-radius: 50%;
    filter: blur(90px); pointer-events: none; z-index: 1;
    mix-blend-mode: screen;
    animation: orbDrift 12s ease-in-out infinite alternate;
}
.orb-pink  { width:400px;height:400px; background:rgba(255,133,194,.2); top:-80px;left:-60px; }
.orb-lav   { width:320px;height:320px; background:rgba(179,127,235,.18); bottom:60px;right:-60px; animation-delay:-5s; }
.orb-warm1 { width:360px;height:360px; background:rgba(255,160,60,.18); top:-80px;left:-40px; }
.orb-warm2 { width:280px;height:280px; background:rgba(255,100,30,.12); bottom:60px;right:-40px; animation-delay:-4s; }
.orb-lav1  { width:380px;height:380px; background:rgba(140,60,240,.2); top:-80px;right:-60px; }
.orb-lav2  { width:260px;height:260px; background:rgba(200,150,255,.14); bottom:60px;left:-40px; animation-delay:-6s; }
.orb-pink1 { width:380px;height:380px; background:rgba(255,40,110,.2); top:-80px;left:-40px; }
.orb-pink2 { width:300px;height:300px; background:rgba(255,180,220,.14); bottom:60px;right:-40px; animation-delay:-4s; }
.orb-teal1 { width:360px;height:360px; background:rgba(0,200,190,.18); top:-80px;right:-40px; }
.orb-teal2 { width:280px;height:280px; background:rgba(0,230,210,.12); bottom:60px;left:-40px; animation-delay:-5s; }
@keyframes orbDrift {
    from { transform: translate(0,0) scale(1); }
    to   { transform: translate(25px,-20px) scale(1.1); }
}

/* 파티클 캔버스 */
.ptc {
    position: absolute; inset: 0;
    pointer-events: none; z-index: 3;
    width: 100%; height: 100%;
}

/* ═══════════════════════════════════════════════
   MUSIC BUTTON
═══════════════════════════════════════════════ */
#music-btn {
    position: fixed; top: 18px; right: 18px; z-index: 8000;
    display: flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,.1);
    backdrop-filter: blur(14px);
    border: 1.5px solid rgba(255,133,194,.5);
    border-radius: 50px;
    padding: 8px 16px;
    color: #fff; font-size: .78rem; font-weight: 600;
    letter-spacing: .04em;
    transition: all .3s;
    box-shadow: 0 4px 20px rgba(255,133,194,.2);
}
#music-btn:hover { background: rgba(255,133,194,.22); }
#music-btn.muted { opacity: .5; }

/* ═══════════════════════════════════════════════
   FX LAYER
═══════════════════════════════════════════════ */
#fx-layer {
    position: fixed; inset: 0;
    pointer-events: none; z-index: 9000;
    overflow: hidden;
}
.fx-particle {
    position: absolute;
    pointer-events: none;
    will-change: transform, opacity;
}
.fx-heart {
    font-size: 22px; line-height: 1;
    animation: fxHeartUp .9s ease-out forwards;
}
@keyframes fxHeartUp {
    0%   { opacity: 1; transform: translateY(0) scale(.6) rotate(0deg); }
    60%  { opacity: 1; transform: translateY(-80px) scale(1.2) rotate(15deg); }
    100% { opacity: 0; transform: translateY(-140px) scale(.8) rotate(-10deg); }
}
.fx-spark {
    width: 6px; height: 6px; border-radius: 50%;
    background: #ff85c2;
    animation: fxSpark .7s ease-out forwards;
}
@keyframes fxSpark {
    0%   { opacity: 1; transform: translate(0,0) scale(1); }
    100% { opacity: 0; transform: translate(var(--sx,30px), var(--sy,-60px)) scale(0); }
}
.fx-flash {
    position: fixed; inset: 0;
    background: rgba(255,200,230,.25);
    pointer-events: none; z-index: 8999;
    animation: fxFlash .4s ease-out forwards;
}
@keyframes fxFlash { from { opacity:1; } to { opacity:0; } }

/* ═══════════════════════════════════════════════
   HOME: ZONE BOARD (존 선택 카드)
═══════════════════════════════════════════════ */
.zone-board {
    position: absolute;
    top: 50%; left: 4vw;
    transform: translateY(-50%);
    z-index: 20;
    display: flex; flex-direction: column; gap: 14px;
    animation: slideInLeft .7s cubic-bezier(.34,1.56,.64,1);
}
@keyframes slideInLeft {
    from { opacity:0; transform: translateY(-50%) translateX(-60px); }
    to   { opacity:1; transform: translateY(-50%) translateX(0); }
}
.zone-board-title {
    font-family: 'Gaegu', cursive;
    font-size: 1.3rem; font-weight: 700;
    color: rgba(255,220,240,.9);
    text-shadow: 0 0 20px rgba(255,133,194,.6);
}
.zone-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.zone-card {
    position: relative;
    width: 160px; height: 200px;
    border-radius: 20px;
    overflow: hidden;
    border: 1.5px solid rgba(255,255,255,.15);
    transition: transform .35s cubic-bezier(.34,1.56,.64,1), box-shadow .35s, border-color .35s;
    box-shadow: 0 8px 30px rgba(0,0,0,.5);
    display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
    cursor: none;
}
.zone-card:hover {
    transform: translateY(-10px) scale(1.06) rotate(-1deg);
    border-color: rgba(255,133,194,.7);
    box-shadow: 0 20px 60px rgba(255,133,194,.35);
}
.zone-card:active { transform: scale(.97); }
.zcard-bg {
    position: absolute; inset: -4px;
    background-size: cover; background-position: center;
    filter: brightness(.5) saturate(1.2);
    transition: filter .35s, transform .35s;
}
.zone-card:hover .zcard-bg { filter: brightness(.7) saturate(1.4); transform: scale(1.05); }
.zcard-darken {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.8) 0%, transparent 60%);
}
.zcard-dogimg {
    position: absolute;
    bottom: 36px; left: 50%;
    transform: translateX(-50%);
    height: 110px; width: auto;
    filter: drop-shadow(0 6px 16px rgba(0,0,0,.7));
    transition: transform .35s cubic-bezier(.34,1.56,.64,1), filter .3s;
    pointer-events: none;
    background: transparent;
}
.zone-card:hover .zcard-dogimg {
    transform: translateX(-50%) translateY(-8px) scale(1.12);
    filter: drop-shadow(0 12px 24px rgba(0,0,0,.5)) brightness(1.05);
}
.zcard-info {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 10px 10px 12px;
    display: flex; flex-direction: column; gap: 1px;
    z-index: 2;
}
.zcard-name {
    font-size: .82rem; font-weight: 700; color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,.8);
}
.zcard-npc {
    font-size: .7rem; color: rgba(255,200,230,.75);
    text-shadow: 0 1px 4px rgba(0,0,0,.8);
}
.zcard-shine {
    position: absolute; inset: 0; border-radius: 20px;
    background: radial-gradient(circle at var(--sx,50%) var(--sy,50%), rgba(255,255,255,.18) 0%, transparent 55%);
    opacity: 0; transition: opacity .3s; pointer-events: none; z-index: 3;
}
.zone-card:hover .zcard-shine { opacity: 1; }

/* ═══════════════════════════════════════════════
   CHARACTER — RPG 방식: 대화창 바로 위 중앙 고정
═══════════════════════════════════════════════ */
.char-anchor {
    position: absolute;
    bottom: 150px;       /* 대화창 높이만큼 올림 */
    z-index: 25;
    pointer-events: none;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: transparent;
    /* 이 div 자체에 배경색/박스 절대 없음 */
    box-shadow: none;
    border: none;
    outline: none;
}

/* 홈씬: 화면 정중앙 */
#scene-home .char-anchor {
    left: 50%;
    transform: translateX(-50%);
    right: auto;
}

/* 존 씬: 오른쪽 배치 */
#scene-snack .char-anchor,
#scene-goods .char-anchor,
#scene-party .char-anchor,
#scene-care  .char-anchor {
    right: 5vw;
    left: auto;
    transform: none;
}

.char-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: all;
    background: transparent;
    border: none;
    box-shadow: none;
    outline: none;
}

/* 갓레이 (캐릭터 뒤 빛기둥) */
.char-rays {
    position: absolute;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 340px; height: 600px;
    background: conic-gradient(from -40deg at 50% 100%,
        transparent 0deg,
        var(--ray-color, #ff85c2) 4deg,
        transparent 8deg,
        transparent 14deg,
        var(--ray-color, #ff85c2) 17deg,
        transparent 21deg,
        transparent 28deg,
        var(--ray-color, #ff85c2) 31deg,
        transparent 35deg,
        transparent 44deg,
        var(--ray-color, #ff85c2) 47deg,
        transparent 50deg,
        transparent 58deg,
        var(--ray-color, #ff85c2) 61deg,
        transparent 65deg,
        transparent 72deg,
        var(--ray-color, #ff85c2) 75deg,
        transparent 79deg,
        transparent 180deg
    );
    opacity: .18;
    pointer-events: none; z-index: -1;
    animation: raysRotate 12s linear infinite;
}
@keyframes raysRotate { to { transform: translateX(-50%) rotate(360deg); } }

/* ═══════════════════════════════════════════════════════
   캐릭터 래퍼 — RPG 자연 합성 핵심
   ★ overflow: visible 유지 (마스크는 img 자체에만 적용)
   ★ 체커보드 = PNG 배경이 아니라 렌더링 박스 문제
     → .char-wrap 에 배경 완전 제거 + mix-blend-mode 차단
═══════════════════════════════════════════════════════ */
.char-wrap {
    position: relative;
    cursor: none;
    /* 배경 완전 없음 — checkerboard 원인 차단 */
    background: transparent;
    /* 떠다니는 애니메이션 */
    animation: charFloat 3.8s ease-in-out infinite alternate;
    transition: filter .3s ease;
    /* overflow: visible — 마스크 영역 잘림 방지 */
    overflow: visible;
    /* 박스 효과 완전 없음 */
    box-shadow: none;
    border: none;
    outline: none;
    /* 마스크 img 자체에 적용하므로 여기선 제거 */
}
.char-wrap:hover { filter: brightness(1.1) saturate(1.12); }

@keyframes charFloat {
    from { transform: translateY(0)     scale(1);     }
    to   { transform: translateY(-22px) scale(1.025); }
}

.char-wrap:hover .char-img  { transform: scale(1.07) translateY(-8px); }
.char-wrap:active .char-img { transform: scale(.92); }

/* ════════════════════════════════════════════════
   ★★★ 캐릭터 이미지 — 완전 자연 합성 ★★★
   JS의 removeBgFromImg()가 PNG 흰/회색 배경 픽셀
   제거 → CSS 마스크로 발끝 자연 페이드
════════════════════════════════════════════════ */
.char-img {
    /* 화면 높이의 60%, 최소 420px, 최대 650px */
    height: clamp(420px, 60vh, 650px);
    width: auto;
    display: block;
    background: transparent;
    /* mix-blend-mode 없음 — JS로 배경 제거 후 순수 합성 */
    /* 그림자: 땅에 붙는 느낌 */
    filter:
        drop-shadow(0 10px 28px rgba(0,0,0,.65))
        drop-shadow(0 28px 65px rgba(0,0,0,.38));
    transition: transform .45s cubic-bezier(.34,1.56,.64,1), filter .3s ease;
    position: relative;
    z-index: 2;
    /* ★ 발끝 자연 페이드 마스크 */
    -webkit-mask-image: linear-gradient(
        to bottom,
        black    0%,
        black   63%,
        rgba(0,0,0,.88) 77%,
        rgba(0,0,0,.42) 91%,
        transparent     100%
    );
    mask-image: linear-gradient(
        to bottom,
        black    0%,
        black   63%,
        rgba(0,0,0,.88) 77%,
        rgba(0,0,0,.42) 91%,
        transparent     100%
    );
    box-shadow: none;
    border:     none;
    outline:    none;
    image-rendering: auto;
}

/* 존 씬 캐릭터 — 더 크게 */
#scene-snack .char-img,
#scene-goods .char-img,
#scene-party .char-img,
#scene-care  .char-img {
    height: clamp(470px, 68vh, 740px);
}

/* 아우라 (캐릭터 뒤 빛 번짐) */
.char-aura {
    position: absolute;
    left: 50%; bottom: 10%;
    transform: translateX(-50%);
    width: 120%; height: 80%;
    border-radius: 50%;
    background: radial-gradient(ellipse at 50% 85%,
        rgba(var(--ac, 255,133,194), .38) 0%,
        rgba(var(--ac, 255,133,194), .12) 45%,
        transparent 70%);
    pointer-events: none; z-index: 0;
    animation: auraBreath 3s ease-in-out infinite alternate;
    filter: blur(8px);
}
@keyframes auraBreath {
    from { opacity: .5; transform: translateX(-50%) scale(.92); }
    to   { opacity: 1;  transform: translateX(-50%) scale(1.08); }
}

/* 지면 빛 반사 (발밑 컬러 풀) */
.char-glow {
    position: absolute;
    bottom: -4px; left: 50%;
    transform: translateX(-50%);
    width: 260px; height: 60px;
    background: radial-gradient(ellipse,
        var(--gc, #ff85c2) 0%,
        rgba(255,133,194,.3) 40%,
        transparent 72%);
    opacity: .6;
    pointer-events: none; z-index: 3;
    filter: blur(6px);
    animation: glowPulse 2.5s ease-in-out infinite alternate;
}
@keyframes glowPulse {
    from { opacity: .4; transform: translateX(-50%) scaleX(.75); }
    to   { opacity: .7; transform: translateX(-50%) scaleX(1.25); }
}

/* 지면 그림자 */
.char-shadow {
    width: 200px; height: 22px;
    background: radial-gradient(ellipse, rgba(0,0,0,.7) 0%, transparent 70%);
    border-radius: 50%;
    margin-top: -14px; z-index: 0;
    filter: blur(4px);
    transition: width .35s, opacity .35s;
}
.char-wrap:hover ~ .char-shadow { width: 155px; opacity: .6; }

/* 이름 플레이트 */
.char-plate {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,.12);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 50px;
    padding: 5px 18px;
    font-size: .88rem; font-weight: 700; color: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,.35);
    margin-top: 4px;
}
.plate-pip {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--pc, #ff85c2);
    box-shadow: 0 0 8px var(--pc, #ff85c2);
    animation: pipPulse 1.6s ease-in-out infinite;
    display: inline-block;
}
@keyframes pipPulse {
    0%,100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.5); opacity: .7; }
}

/* 코 이스터에그 히트존 */
.nose-zone {
    position: absolute;
    top: 30%; left: 25%; width: 50%; height: 20%;
    cursor: none; z-index: 10; border-radius: 50%;
}

/* ═══════════════════════════════════════════════
   VISUAL NOVEL DIALOG — 하단 고정, 진짜 게임처럼
═══════════════════════════════════════════════ */
.vn-dialog {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    z-index: 30;
    padding: 0 5vw 16px;
    /* 대화창 최대 너비 제한으로 캐릭터 공간 확보 */
    max-width: 100%;
}

.vn-speaker-tag {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(8,4,22,.85);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,.18);
    border-bottom: none;
    border-radius: 14px 14px 0 0;
    padding: 6px 20px;
    margin-left: 12px;
}
.spk-face {
    width: 34px; height: 34px;
    object-fit: cover; object-position: top;
    border-radius: 50%;
    border: 2px solid rgba(255,133,194,.6);
    background: transparent;
    pointer-events: all;
}
.vn-speaker-tag span {
    font-size: .88rem; font-weight: 700;
    color: #ff85c2;
    text-shadow: 0 0 12px rgba(255,133,194,.5);
}

.vn-textbox {
    background: rgba(8,4,22,.9);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 0 18px 18px 18px;
    padding: 18px 26px 18px;
    box-shadow:
        0 -8px 60px rgba(0,0,0,.6),
        inset 0 1px 0 rgba(255,255,255,.1),
        0 0 0 1px rgba(255,133,194,.06);
    min-height: 76px;
}

.vn-text {
    font-size: 1rem; line-height: 1.8;
    color: rgba(255,240,250,1);
    display: block; min-height: 1.8em;
}
.vn-text.typing::after {
    content: '▌';
    color: #ff85c2;
    animation: blink .6s step-end infinite;
    font-size: .9rem; margin-left: 2px;
}
@keyframes blink { 0%,100%{opacity:1;} 50%{opacity:0;} }

/* 선택지 버튼 */
.vn-choices {
    display: flex; flex-wrap: wrap; gap: 8px;
    margin-top: 14px;
    opacity: 0; pointer-events: none;
    transform: translateY(10px);
    transition: opacity .4s, transform .4s;
}
.vn-choices.visible { opacity: 1; pointer-events: all; transform: translateY(0); }

.choice-btn {
    background: rgba(255,255,255,.1);
    border: 1.5px solid rgba(255,255,255,.22);
    border-radius: 50px;
    padding: 9px 20px;
    font-size: .85rem; font-weight: 600;
    color: #fff;
    cursor: none;
    transition: all .25s cubic-bezier(.34,1.56,.64,1);
    backdrop-filter: blur(8px);
}
.choice-btn:hover {
    background: rgba(255,255,255,.22);
    border-color: rgba(255,133,194,.7);
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 6px 20px rgba(255,133,194,.25);
}
.choice-btn:active { transform: scale(.97); }
.choice-prime {
    background: var(--pc, #ff85c2);
    border-color: var(--pc, #ff85c2);
    box-shadow: 0 4px 20px rgba(255,133,194,.4);
}
.choice-prime:hover {
    background: var(--pc, #ff85c2);
    filter: brightness(1.15);
    border-color: var(--pc, #ff85c2);
}

/* ═══════════════════════════════════════════════
   CONTENT PANEL (존 씬 왼쪽)
═══════════════════════════════════════════════ */
.content-panel {
    position: absolute;
    top: 50%; left: 4vw;
    transform: translateY(-50%);
    z-index: 20;
    width: min(420px, 44vw);
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,133,194,.4) transparent;
    animation: panelIn .6s cubic-bezier(.34,1.56,.64,1);
}
.content-panel::-webkit-scrollbar { width: 3px; }
.content-panel::-webkit-scrollbar-thumb { background: rgba(255,133,194,.4); border-radius: 10px; }

@keyframes panelIn {
    from { opacity:0; transform: translateY(-50%) translateX(-50px); }
    to   { opacity:1; transform: translateY(-50%) translateX(0); }
}

.glass-panel {
    background: rgba(8,4,22,.72);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 24px;
    padding: 24px 22px;
    box-shadow:
        0 24px 70px rgba(0,0,0,.6),
        inset 0 1px 0 rgba(255,255,255,.1);
}

/* 패널 헤더 (개 아이콘 + 제목) */
.panel-header {
    display: flex; align-items: center; gap: 14px;
    margin-bottom: 18px;
}
.panel-dog-icon {
    width: 60px; height: 60px;
    object-fit: contain; object-position: top;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,.5));
    border-radius: 50%;
    background: rgba(255,255,255,.06);
    border: 1.5px solid rgba(255,255,255,.15);
    pointer-events: all;
    flex-shrink: 0;
}
.panel-title {
    font-family: 'Gaegu', cursive;
    font-size: 1.7rem; font-weight: 700;
    color: #fff;
    text-shadow: 0 0 20px rgba(255,133,194,.5);
    line-height: 1.2;
}
.panel-sub { font-size: .78rem; color: rgba(255,200,230,.6); margin-top: 2px; }

/* 아이템 그리드 */
.item-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px; margin-bottom: 18px;
}
.item-card {
    position: relative;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 14px; padding: 12px 10px;
    display: flex; flex-direction: column; gap: 8px;
    cursor: none; overflow: hidden;
    transition: transform .3s cubic-bezier(.34,1.56,.64,1), background .3s, border-color .3s, box-shadow .3s;
}
.item-card:hover {
    transform: translateY(-5px) scale(1.03);
    background: rgba(255,255,255,.14);
    border-color: rgba(255,133,194,.5);
    box-shadow: 0 10px 30px rgba(255,133,194,.25);
}
.item-icon-bg {
    width: 46px; height: 46px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(0,0,0,.3);
}
.item-dog-mini {
    width: 44px; height: 44px;
    object-fit: contain; object-position: top;
    pointer-events: all;
}
.item-info { display: flex; flex-direction: column; gap: 2px; }
.item-info strong { font-size: .78rem; font-weight: 700; color: #fff; }
.item-info span { font-size: .67rem; color: rgba(255,200,230,.55); line-height: 1.3; }
.item-info em { font-size: .8rem; font-weight: 700; color: #ff85c2; font-style: normal; }
.item-best { border-color: rgba(255,200,50,.25); }
.best-badge {
    position: absolute; top: 6px; right: 6px;
    background: linear-gradient(135deg, #ff85c2, #b37feb);
    color: #fff; font-size: .58rem; font-weight: 700;
    padding: 2px 7px; border-radius: 50px;
    letter-spacing: .06em; pointer-events: none;
}

/* CTA 버튼 */
.cta-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--cc, #ff85c2);
    color: #fff; font-size: .88rem; font-weight: 700;
    padding: 11px 26px; border-radius: 50px;
    cursor: none;
    box-shadow: 0 6px 24px var(--cg, rgba(255,133,194,.4));
    transition: all .3s cubic-bezier(.34,1.56,.64,1);
    border: none;
}
.cta-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 14px 36px var(--cg, rgba(255,133,194,.5));
    filter: brightness(1.1);
}
.cta-btn:active { transform: scale(.97); }

/* 패키지 카드 (파티룸) */
.pkg-row {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 10px; margin-bottom: 18px;
}
.pkg-card {
    position: relative;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 16px; padding: 16px 12px;
    display: flex; flex-direction: column; gap: 6px;
    cursor: none; overflow: hidden;
    transition: transform .3s cubic-bezier(.34,1.56,.64,1), box-shadow .3s;
}
.pkg-card:hover { transform: translateY(-6px) scale(1.03); }
.pkg-premium { border-color: rgba(255,133,194,.3); box-shadow: 0 0 30px rgba(255,133,194,.12); }
.pkg-vip { border-color: rgba(255,200,50,.3); box-shadow: 0 0 30px rgba(255,200,50,.1); }
.pkg-tier {
    font-size: .68rem; font-weight: 700;
    letter-spacing: .1em; color: rgba(255,200,230,.7);
}
.pkg-premium .pkg-tier { color: #ff85c2; }
.pkg-vip .pkg-tier { color: #ffd700; }
.pkg-price { font-size: 1.1rem; font-weight: 900; color: #fff; }
.pkg-list {
    list-style: none; display: flex; flex-direction: column; gap: 3px; flex: 1;
}
.pkg-list li { font-size: .68rem; color: rgba(255,200,230,.65); }
.pkg-sel-btn {
    margin-top: 8px; padding: 7px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 10px;
    color: #fff; font-size: .75rem; font-weight: 600;
    cursor: none; transition: all .25s;
}
.pkg-sel-btn:hover { background: rgba(255,133,194,.3); border-color: rgba(255,133,194,.6); }

/* 케어 리스트 */
.care-list { display: flex; flex-direction: column; gap: 9px; margin-bottom: 18px; }
.care-card {
    display: flex; align-items: center; gap: 12px;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 14px; padding: 12px 14px;
    cursor: none; overflow: hidden;
    transition: transform .3s cubic-bezier(.34,1.56,.64,1), background .3s;
    position: relative;
}
.care-card:hover { transform: translateX(8px); background: rgba(255,255,255,.13); border-color: rgba(0,200,200,.4); }
.care-icon-img {
    width: 48px; height: 48px;
    object-fit: contain; object-position: top;
    border-radius: 50%; flex-shrink: 0;
    background: rgba(255,255,255,.07);
    border: 1.5px solid rgba(255,255,255,.15);
    pointer-events: all;
}
.care-info { display: flex; flex-direction: column; gap: 2px; }
.care-info strong { font-size: .88rem; font-weight: 700; color: #fff; }
.care-info span { font-size: .72rem; color: rgba(255,220,240,.6); }
.care-info em { font-size: .82rem; font-weight: 700; color: #1de9b6; font-style: normal; }

/* ═══════════════════════════════════════════════
   CONTACT MODAL
═══════════════════════════════════════════════ */
.modal-bg {
    position: fixed; inset: 0; z-index: 9500;
    background: rgba(5,2,16,.82);
    backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    transition: opacity .35s, visibility .35s;
}
.modal-bg.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.contact-modal {
    position: relative;
    background: rgba(12,6,30,.95);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 28px;
    width: min(500px, 92vw);
    max-height: 90vh;
    display: flex; flex-direction: column;
    box-shadow: 0 30px 90px rgba(0,0,0,.8), 0 0 0 1px rgba(255,133,194,.15);
    animation: modalPop .45s cubic-bezier(.34,1.56,.64,1);
    overflow: hidden;
}
@keyframes modalPop {
    from { opacity:0; transform: scale(.85) translateY(20px); }
    to   { opacity:1; transform: scale(1) translateY(0); }
}
.modal-close-btn {
    position: absolute; top: 14px; right: 16px; z-index: 1;
    width: 32px; height: 32px;
    background: rgba(255,255,255,.1);
    border-radius: 50%;
    color: rgba(255,255,255,.7); font-size: 1rem;
    display: flex; align-items: center; justify-content: center;
    cursor: none; transition: all .25s;
}
.modal-close-btn:hover { background: rgba(255,80,80,.3); color: #fff; }

/* 헤더 */
.ct-head {
    display: flex; align-items: center; gap: 14px;
    padding: 20px 24px 16px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    flex-shrink: 0;
}
.ct-dog-wrap {
    position: relative; width: 60px; height: 60px; flex-shrink: 0;
}
.ct-dog-img {
    width: 60px; height: 60px;
    object-fit: contain; object-position: top;
    border-radius: 50%;
    background: rgba(255,255,255,.06);
    border: 2px solid rgba(255,133,194,.5);
    pointer-events: all;
}
.ct-dog-aura {
    position: absolute; inset: -6px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255,133,194,.3) 0%, transparent 70%);
    animation: auraBreath 2s ease-in-out infinite alternate;
}
.ct-head-info { display: flex; flex-direction: column; gap: 3px; }
.ct-dog-name { font-family: 'Gaegu', cursive; font-size: 1.3rem; font-weight: 700; color: #fff; }
.ct-online { display: flex; align-items: center; gap: 5px; font-size: .75rem; color: rgba(255,200,230,.6); }
.online-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: #4cff91;
    box-shadow: 0 0 6px #4cff91;
    animation: pipPulse 2s ease-in-out infinite;
}

/* 채팅 스크롤 */
.chat-scroll {
    flex: 1; overflow-y: auto; overflow-x: hidden;
    padding: 16px 20px;
    display: flex; flex-direction: column; gap: 10px;
    min-height: 220px; max-height: 340px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,133,194,.3) transparent;
}
.chat-scroll::-webkit-scrollbar { width: 3px; }
.chat-scroll::-webkit-scrollbar-thumb { background: rgba(255,133,194,.3); border-radius: 5px; }

.msg-dog, .msg-user {
    display: flex; gap: 8px; max-width: 88%;
    animation: msgIn .3s ease-out;
}
@keyframes msgIn {
    from { opacity:0; transform: translateY(10px); }
    to   { opacity:1; transform: translateY(0); }
}
.msg-dog { align-self: flex-start; align-items: flex-end; }
.msg-user { align-self: flex-end; flex-direction: row-reverse; }

.msg-dog-face {
    width: 30px; height: 30px;
    object-fit: contain; object-position: top;
    border-radius: 50%;
    background: rgba(255,255,255,.06);
    border: 1.5px solid rgba(255,133,194,.4);
    flex-shrink: 0; pointer-events: all;
}
.msg-bubble {
    padding: 10px 14px;
    border-radius: 18px;
    font-size: .88rem; line-height: 1.6;
    max-width: 100%;
    word-break: break-word;
}
.msg-dog .msg-bubble {
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.13);
    border-bottom-left-radius: 4px;
    color: rgba(255,240,250,1);
}
.msg-user .msg-bubble {
    background: linear-gradient(135deg, #ff85c2, #b37feb);
    border-bottom-right-radius: 4px;
    color: #fff;
    font-weight: 500;
}

/* 입력 영역 */
.chat-input-area {
    padding: 14px 20px 18px;
    border-top: 1px solid rgba(255,255,255,.08);
    flex-shrink: 0;
}
.fstep { display: none; }
.fstep.active {
    display: flex; gap: 8px; align-items: center;
    animation: msgIn .3s ease-out;
}
.chat-inp {
    flex: 1; padding: 11px 16px;
    background: rgba(255,255,255,.08);
    border: 1.5px solid rgba(255,255,255,.15);
    border-radius: 50px;
    color: #fff; font-size: .88rem;
    outline: none;
    transition: border-color .25s, background .25s;
}
.chat-inp:focus {
    border-color: rgba(255,133,194,.7);
    background: rgba(255,255,255,.12);
}
.chat-inp::placeholder { color: rgba(255,200,230,.45); }
.chat-send-btn {
    width: 44px; height: 44px; border-radius: 50%;
    background: linear-gradient(135deg, #ff85c2, #b37feb);
    color: #fff; font-size: .82rem; font-weight: 700;
    cursor: none; flex-shrink: 0;
    transition: all .25s cubic-bezier(.34,1.56,.64,1);
    box-shadow: 0 4px 16px rgba(255,133,194,.4);
    display: flex; align-items: center; justify-content: center;
}
.chat-send-btn:hover { transform: scale(1.12); box-shadow: 0 8px 24px rgba(255,133,194,.5); }

.chat-submit-btn, .chat-reset-btn, .chat-close-final-btn {
    padding: 10px 22px; border-radius: 50px;
    font-size: .88rem; font-weight: 700;
    cursor: none; transition: all .25s;
}
.chat-submit-btn {
    background: linear-gradient(135deg, #ff85c2, #b37feb);
    color: #fff; box-shadow: 0 4px 20px rgba(255,133,194,.4);
}
.chat-submit-btn:hover { transform: translateY(-2px) scale(1.04); }
.chat-reset-btn {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.18);
    color: rgba(255,200,230,.7);
}
.chat-reset-btn:hover { background: rgba(255,255,255,.15); }
.chat-close-final-btn {
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,133,194,.4);
    color: #ff85c2;
}
.chat-close-final-btn:hover { background: rgba(255,133,194,.2); }

/* ═══════════════════════════════════════════════
   EASTER EGG POPUPS
═══════════════════════════════════════════════ */
.coupon-box, .night-box {
    position: relative;
    background: rgba(12,6,30,.96);
    border: 1px solid rgba(255,133,194,.3);
    border-radius: 28px;
    width: min(400px, 90vw);
    padding: 36px 32px 32px;
    text-align: center;
    box-shadow: 0 30px 80px rgba(0,0,0,.8), 0 0 60px rgba(255,133,194,.15);
    animation: modalPop .45s cubic-bezier(.34,1.56,.64,1);
}
.coupon-dog-img, .night-dog-img {
    width: 120px; height: 120px;
    object-fit: contain; object-position: top;
    filter: drop-shadow(0 8px 24px rgba(255,133,194,.5));
    animation: ldFloat 2.5s ease-in-out infinite alternate;
    pointer-events: all;
}
.coupon-speech {
    font-family: 'Gaegu', cursive;
    font-size: 1.5rem; font-weight: 700;
    color: #ff85c2;
    text-shadow: 0 0 20px rgba(255,133,194,.6);
    margin: 12px 0 16px;
}
.coupon-code-box {
    background: rgba(255,133,194,.12);
    border: 1.5px dashed rgba(255,133,194,.5);
    border-radius: 14px; padding: 14px 20px;
    margin-bottom: 12px;
}
.coupon-label { display: block; font-size: .72rem; color: rgba(255,200,230,.6); margin-bottom: 4px; }
.coupon-code {
    display: block; font-family: 'Gaegu', cursive;
    font-size: 2rem; font-weight: 700; color: #fff;
    letter-spacing: .12em;
    text-shadow: 0 0 20px rgba(255,133,194,.7);
}
.coupon-hint { font-size: .78rem; color: rgba(255,200,230,.55); }
.night-zzz {
    font-family: 'Gaegu', cursive;
    font-size: 2rem; color: rgba(179,127,235,.8);
    text-shadow: 0 0 20px rgba(179,127,235,.5);
    animation: ldFloat 3s ease-in-out infinite alternate;
    margin: 10px 0 6px;
}
.night-text {
    font-family: 'Gaegu', cursive;
    font-size: 1.4rem; font-weight: 700; color: #fff;
    margin-bottom: 8px;
}
.night-sub { font-size: .85rem; color: rgba(255,200,230,.6); line-height: 1.7; margin-bottom: 18px; }
.night-ok-btn {
    padding: 10px 24px; border-radius: 50px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.2);
    color: #fff; font-size: .85rem; font-weight: 600;
    cursor: none; transition: all .25s;
}
.night-ok-btn:hover { background: rgba(179,127,235,.25); border-color: rgba(179,127,235,.5); }

/* ═══════════════════════════════════════════════
   RIPPLE EFFECT
═══════════════════════════════════════════════ */
.ripple-wave {
    position: absolute; border-radius: 50%;
    background: rgba(255,255,255,.25);
    transform: scale(0); pointer-events: none;
    animation: rippleAnim .55s ease-out forwards;
}
@keyframes rippleAnim {
    to { transform: scale(4); opacity: 0; }
}

/* ═══════════════════════════════════════════════
   RESPONSIVE — 모바일
═══════════════════════════════════════════════ */
@media (max-width: 768px) {
    body { cursor: auto; }
    #cur-ring, #cur-dot { display: none; }
    button { cursor: pointer; }

    /* 홈 존 보드 */
    .zone-board {
        position: absolute;
        top: auto; bottom: 195px; left: 0; right: 0;
        transform: none;
        align-items: center;
        padding: 0 12px;
    }
    @keyframes slideInLeft {
        from { opacity:0; transform: translateY(20px); }
        to   { opacity:1; transform: none; }
    }
    .zone-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
    .zone-card { width: auto; height: 140px; }
    .zcard-dogimg { height: 70px; bottom: 28px; }

    /* 캐릭터 */
    .char-anchor {
        bottom: 195px; left: 50% !important; right: auto !important;
        transform: translateX(-50%) !important;
    }
    .char-img { height: 240px !important; }
    #scene-snack .char-img,
    #scene-goods .char-img,
    #scene-party .char-img,
    #scene-care  .char-img { height: 240px !important; }

    /* 콘텐츠 패널 */
    .content-panel {
        position: absolute;
        top: 8px; left: 8px; right: 8px;
        transform: none;
        width: auto;
        max-height: calc(100vh - 400px);
    }
    @keyframes panelIn {
        from { opacity:0; transform: translateY(-20px); }
        to   { opacity:1; transform: none; }
    }
    .glass-panel { padding: 16px 14px; }
    .item-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .pkg-row { grid-template-columns: 1fr; }
    .panel-title { font-size: 1.3rem; }
    .panel-dog-icon { width: 46px; height: 46px; }

    /* 대화창 */
    .vn-dialog { padding: 0 12px 10px; }
    .vn-textbox { padding: 12px 14px 12px; }
    .vn-text { font-size: .9rem; }
    .choice-btn { font-size: .78rem; padding: 7px 14px; }

    /* 음악 버튼 */
    #music-btn { top: 10px; right: 10px; padding: 6px 12px; font-size: .72rem; }
}

@media (max-width: 480px) {
    .zone-grid { grid-template-columns: repeat(2, 1fr); }
    .zone-card { height: 120px; }
    .char-img { height: 200px !important; }
    #scene-snack .char-img,
    #scene-goods .char-img,
    #scene-party .char-img,
    #scene-care  .char-img { height: 200px !important; }
}
