/* 상디 선물 v3 — 게임플레이 재작업 레이어 (style.css 뒤에 로드) */
@font-face{font-family:'NanumPen';src:url('../assets/fonts/NanumPenScript.woff2') format('woff2');font-display:swap}
:root{--hand:'NanumPen','Nanum Pen Script',cursive;--green:#7ad7a0;--amber:#f0b45a;--red:#e8604f}
.ico{width:1em;height:1em;flex:none;display:inline-block;vertical-align:-.14em}
.btn .ico,.pill .ico{width:16px;height:16px}
.btn{gap:7px}

/* ---- HUD 통일 ---- */
.hud-bar{height:56px;padding:10px 54px 0 12px;align-items:center;gap:6px;background:linear-gradient(#0b1b2ed8,#0b1b2e00)}
.hud-l,.hud-r{display:flex;align-items:center;gap:6px;flex:none}
.hud-c{flex:1;display:flex;justify-content:center;min-width:0}
.day-chip{color:var(--cream);font-weight:600;gap:5px;padding:4px 10px}
.day-chip .ico{color:var(--gold)}
.pill-gold b{font-weight:700}
.hgauge{display:flex;align-items:center;gap:6px;height:30px;padding:0 10px 0 8px;border-radius:999px;background:#0b1b2eb0;border:1px solid #ffffff22;color:var(--coral)}
.hgauge .hg-ico{display:grid;place-items:center;font-size:17px;filter:drop-shadow(0 0 5px #e8806f88)}
.hg-bar{position:relative;display:block;width:64px;height:9px;border-radius:9px;background:#05101c;overflow:hidden;box-shadow:inset 0 1px 2px #0008}
.hg-fill{position:absolute;left:0;top:0;bottom:0;border-radius:9px;background:linear-gradient(90deg,#e8806f,#ff9f8f);transition:width .8s cubic-bezier(.2,.8,.2,1)}
.hg-bar b{position:absolute;top:0;bottom:0;width:1.5px;background:#0b1b2e99}
.hgauge.big{align-self:center;height:36px;padding:0 16px 0 12px;margin:2px 0}.hgauge.big .hg-bar{width:150px;height:12px}.hgauge.big .hg-ico{font-size:22px}
.hgauge.pulse{animation:hgp .6s ease}
.icon-btn{width:44px;height:44px;flex:none;border-radius:50%;display:grid;place-items:center;background:#ffffff18;border:1px solid #ffffff26;color:var(--gold);backdrop-filter:blur(14px);position:relative;font-size:22px;padding:0}
.icon-btn.small{width:32px;height:32px;font-size:16px}

/* ---- 파티클 스프라이트 ---- */
.fx.spr{width:var(--sz,20px);height:var(--sz,20px);font-size:0;opacity:0;animation:pf2 1.25s ease-out forwards;animation-delay:var(--d);filter:drop-shadow(0 0 7px currentColor)}
.fx.spr svg{width:100%;height:100%;display:block}
.p-heart.spr{color:#e8806f}.p-coin.spr{color:#f6d77a}.p-star.spr{color:#ffe27a}.p-spark.spr{color:#fff}.p-smoke.spr,.p-steam.spr{color:transparent;filter:blur(1px)}.p-drop.spr{color:#8fd0ff}
@keyframes pf2{0%{opacity:0;transform:translate(-50%,-50%) scale(.2) rotate(var(--r0))}18%{opacity:1;transform:translate(calc(-50% + var(--dx)*.35),calc(-50% + var(--dy)*.35)) scale(calc(var(--s)*1.25)) rotate(calc(var(--r0) + var(--r1)*.3))}100%{opacity:0;transform:translate(calc(-50% + var(--dx)),calc(-50% + var(--dy))) scale(calc(var(--s)*.45)) rotate(var(--r1))}}
.fx-ico{width:.85em;height:.85em;vertical-align:-.08em;margin-right:2px;filter:drop-shadow(0 0 6px #e8806f)}
.float{display:flex;align-items:center}

/* ---- 리그 프레이밍(머리 꼭대기·HUD) ---- */
.screen:not(.night-stage) .rig-host{top:52px;height:560px;transform:scale(.9);transform-origin:50% 0}

/* ---- 시작 ---- */
.scene-tint.start{background:linear-gradient(180deg,#0b1b2e40 0,#0b1b2e10 30%,#0b1b2ecc 62%,#0b1b2ef5 100%)}
.title-logo{position:absolute;left:0;right:0;top:418px;text-align:center;z-index:3;display:flex;flex-direction:column;align-items:center;gap:4px;text-shadow:0 3px 18px #000c}
.logo-sub{font:600 13px var(--sans);letter-spacing:.22em;color:var(--gold);padding-left:.22em}
.logo-main{font:700 46px/1.1 var(--serif);margin:0;letter-spacing:.02em;background:linear-gradient(180deg,#fff8e4,#e9d5a1 55%,#d9b96c);-webkit-background-clip:text;background-clip:text;color:transparent;filter:drop-shadow(0 4px 14px #000a)}
.logo-line{display:block;width:150px;height:2px;margin-top:4px;background:linear-gradient(90deg,transparent,#e9d5a1,transparent)}
.start-panel{bottom:22px}

/* ---- 아침 ---- */
.morning-dialogue{bottom:138px}
.go-chip{display:inline-flex;align-items:center;gap:4px;padding:5px 10px;border-radius:999px;background:#0b1b2e22;font-size:13px}
.big-copy small{opacity:.75}
.smallactions .btn{font-size:13px}

/* ---- 공용 말풍선/결과 ---- */
.scene-backdrop.clear{inset:0;width:100%;height:100%;filter:saturate(1.08) brightness(.95)}
.scene-tint.res{background:linear-gradient(180deg,#0b1b2e50 0,#0b1b2e00 22%,#0b1b2e00 42%,#0b1b2ed8 75%,#0b1b2ef2 100%)}
.say-bubble{position:absolute;left:22px;right:22px;z-index:4;padding:11px 14px;border-radius:18px 18px 18px 4px;background:#f7efe2f2;color:#1a2a3c;font-size:13.5px;line-height:1.55;font-weight:500;box-shadow:0 8px 24px #0006;animation:bub .5s .5s both cubic-bezier(.3,1.5,.5,1)}
@keyframes bub{from{opacity:0;transform:translateY(10px) scale(.9)}}
.result-card .say{display:none}
.result-card{bottom:16px;gap:8px}
.result-stars{display:flex;justify-content:center;gap:6px;color:#ffffff2e;margin-top:-2px;letter-spacing:0}
.result-stars span{width:38px;height:38px}.result-stars svg,.rs-stars svg{width:100%;height:100%}
.result-stars span.on{color:#ffd86b}
.effect-chip{display:inline-flex;align-items:center;gap:4px}
.effect-chip .ico{width:13px;height:13px}
.effect-chip b{font-weight:700}
.say-bubble{bottom:292px}
.rest-result{bottom:16px}
.shop3 .say-bubble{display:none}

/* ---- 쉬는시간 메뉴 ---- */
.activity-intro{height:80px;padding-top:14px}
.activity-intro h1{font-size:23px}
.activity-card.selected .art:after{content:'';background:linear-gradient(115deg,#F2E1B5,#D9B96C) center/cover;mask:none}
.activity-card.selected .art:before{content:'';position:absolute;right:11px;top:11px;width:12px;height:7px;border-left:3px solid #0b1b2e;border-bottom:3px solid #0b1b2e;transform:rotate(-45deg);z-index:2}
.selection-summary{display:flex;align-items:center;gap:6px;font-size:12px}
.selection-summary b{color:var(--gold)}
.selection-summary .ico{color:var(--gold)}

/* ============ 요리 v3 ============ */
.cook3 .hud-bar{z-index:6}
.cook-bg{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;filter:brightness(.6) saturate(1.1) blur(2px);transform:scale(1.04)}
.cook-shade{position:absolute;inset:0;background:linear-gradient(#0b1b2e66 0,#0b1b2e10 30%,#0b1b2e99 50%,#0b1b2eee 100%)}
.star-prog{display:flex;gap:6px}
.star-prog i{width:22px;height:22px;background:#ffffff33;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.5l2.9 7.2 7.6.6-5.8 5 1.8 7.5L12 17.8 5.5 21.8l1.8-7.5-5.800-5 7.600-.6z'/%3E%3C/svg%3E") center/contain no-repeat;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.5l2.9 7.2 7.6.6-5.8 5 1.8 7.5L12 17.8 5.5 21.8l1.8-7.5-5.800-5 7.600-.6z'/%3E%3C/svg%3E") center/contain no-repeat;transition:background .4s}
.star-prog i.on{background:#ffd86b;filter:drop-shadow(0 0 6px #ffd86b)}
.cust-zone{position:absolute;left:0;right:0;top:50px;height:256px;z-index:2}
.cust{position:absolute;left:88px;top:0;width:214px;height:250px;overflow:hidden;-webkit-mask-image:linear-gradient(#000 74%,transparent);mask-image:linear-gradient(#000 74%,transparent);transition:transform .5s,opacity .5s}
.cust img{position:absolute;left:0;top:0;width:214px;height:auto;filter:drop-shadow(0 6px 14px #0008);transition:filter .4s}
.cust.in{animation:custIn .5s ease both}
@keyframes custIn{from{opacity:0;transform:translateX(-40px)}}
.cust.m3 img{animation:angry .5s infinite}
@keyframes angry{0%,100%{transform:translateX(0)}25%{transform:translateX(-2px)}75%{transform:translateX(2px)}}
.cust-fx{position:absolute;right:26px;top:34px;width:34px;height:34px;opacity:0;transition:opacity .3s;background-repeat:no-repeat;background-size:contain}
.cust.joy{animation:joy .8s ease}.cust.leave{opacity:0;transform:translateX(-50px)}
@keyframes joy{30%{transform:translateY(-12px)}60%{transform:translateY(0)}80%{transform:translateY(-5px)}}
.cust.vip:before{content:'';position:absolute;inset:0;background:radial-gradient(circle at 50% 30%,#ffd86b55,transparent 65%);z-index:1;animation:vip 1.6s ease-in-out infinite}
@keyframes vip{50%{opacity:.4}}
.order-bubble{position:absolute;left:10px;top:20px;width:152px;padding:9px 10px;border-radius:16px 16px 16px 4px;background:#f7efe2;color:#14263a;box-shadow:0 8px 22px #0007;display:flex;gap:8px;align-items:center;z-index:3}
.order-bubble.bpop{animation:bub .4s cubic-bezier(.3,1.5,.5,1)}
.ob-dish{width:42px;height:42px;object-fit:contain;flex:none}
.ob-txt{min-width:0;display:flex;flex-direction:column;gap:3px}
.ob-txt b{font:700 12.5px/1.2 var(--serif)}
.ob-ing{display:flex;gap:2px;flex-wrap:wrap}.ob-ing img{width:19px;height:19px;object-fit:contain}
.ob-want{font-style:normal;font-size:10.5px;font-weight:700;color:#c4462f}
.order-bubble:has(.react){width:170px;padding:12px;left:6px;top:26px}.ob-txt.react b{font-size:13.5px}
.cut-in{position:absolute;right:10px;top:64px;width:84px;height:106px;border-radius:42px 42px 14px 14px;overflow:visible;z-index:4;border:2px solid #e9d5a1cc;box-shadow:0 10px 24px #000a;background:#1b2f42}
.cut-media{position:absolute;inset:0;overflow:hidden;border-radius:40px 40px 12px 12px}
.cut-media>img{width:100%;height:100%;object-fit:cover;object-position:50% 8%}
.cut-in .name-tab.small{position:absolute;left:50%;transform:translateX(-50%);bottom:-11px;top:auto;font-size:11px;padding:2px 9px;white-space:nowrap}
.cut-in .cut-bubble{position:absolute;right:0;top:112px;left:auto;width:118px;padding:6px 9px;border-radius:12px 4px 12px 12px;font-size:11.5px;line-height:1.35}
.cut-in.a-flip{animation:flip .5s ease}.cut-in.a-taste{animation:taste .7s ease}.cut-in.a-cheer{animation:cheer .8s ease}.cut-in.a-worry{animation:worry .5s ease}
.pat{position:absolute;left:46px;right:46px;top:310px;height:22px;display:flex;align-items:center;gap:8px;z-index:3}
.mood{width:22px;height:22px;flex:none;filter:drop-shadow(0 2px 4px #0008)}
.pat-track{flex:1;height:11px;border-radius:99px;background:#06101c;box-shadow:inset 0 1px 3px #000a;overflow:hidden;border:1px solid #ffffff1a}
.pat-fill{height:100%;border-radius:99px;transition:background .3s;background:linear-gradient(90deg,#4fc58a,#7ad7a0)}
.pat-fill.m2{background:linear-gradient(90deg,#e09a3a,#f0b45a)}.pat-fill.m3{background:linear-gradient(90deg,#d94a3d,#ff7a68);animation:pulseR .6s infinite}
@keyframes pulseR{50%{filter:brightness(1.3)}}
.cust-count{font-size:11px;color:var(--muted);min-width:24px;text-align:right}
.counter{position:absolute;left:12px;top:342px;width:366px;height:374px;border-radius:24px;z-index:3;background:linear-gradient(180deg,#ffffff18,#00000030),repeating-linear-gradient(90deg,#9a6a3e 0 26px,#8c5e35 26px 28px,#a2713f 28px 54px,#905f36 54px 56px);border:3px solid #5a371c;box-shadow:inset 0 2px 0 #ffffff30,inset 0 -10px 24px #3a200f88,0 14px 30px #000a}
.step-hint{position:absolute;left:50%;top:9px;transform:translateX(-50%);padding:5px 14px;border-radius:999px;background:#0b1b2ecc;color:var(--gold);font-size:12px;font-weight:600;white-space:nowrap;z-index:6;min-height:26px;transition:opacity .3s}
.step-hint:empty{opacity:0}
.bench{position:absolute;left:0;right:0;top:40px;bottom:0;touch-action:none}
.bench.in>*{animation:benchIn .35s ease both}
@keyframes benchIn{from{opacity:0;transform:translateY(12px)}}
.judge{position:absolute;left:0;right:0;top:262px;text-align:center;font:700 24px var(--serif);opacity:0;pointer-events:none;z-index:7;text-shadow:0 2px 10px #000c}
.judge.on{animation:judge .9s ease}
@keyframes judge{0%{opacity:0;transform:scale(.5)}20%{opacity:1;transform:scale(1.2)}70%{opacity:1;transform:scale(1)}100%{opacity:0;transform:translateY(-14px)}}
.judge.perfect{color:#ffe27a}.judge.good{color:#f7efe2}.judge.miss{color:#c7d2dc}
.hint-hand{position:absolute;left:50%;top:46%;width:40px;height:52px;z-index:8;pointer-events:none;animation:handTap 1.3s ease-in-out infinite;transform-origin:50% 0}
.hint-hand .finger{width:100%;height:100%;filter:drop-shadow(0 4px 6px #0007)}
@keyframes handTap{0%,100%{transform:translate(0,0) scale(1);opacity:.95}45%{transform:translate(0,-8px) scale(.9)}60%{transform:translate(0,2px) scale(.8)}}
/* 손질 */
.board{position:absolute;left:50%;top:6px;width:290px;height:244px;transform:translateX(-50%);border-radius:22px;background:linear-gradient(135deg,#e9c58f,#d7a96b 60%,#c99655);border:2px solid #b8844a;box-shadow:0 10px 20px #0006,inset 0 2px 0 #ffffff55;overflow:hidden}
.board-grain{position:absolute;inset:0;background:repeating-linear-gradient(8deg,transparent 0 9px,#8a5a2a14 9px 10px)}
.chop-wrap{position:absolute;left:50%;top:50%;width:132px;height:132px;transform:translate(-50%,-50%)}
.chop-ing{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 8px 8px #0005)}
.chop-ing.slide{animation:chopSlide .35s ease}
@keyframes chopSlide{from{opacity:0;transform:translateX(70px) rotate(8deg)}}
.cutline{position:absolute;left:50%;top:-8px;bottom:-8px;width:0;border-left:2px dashed #ffffff99;transform:translateX(-50%)}
.chop-wrap.split .chop-ing{animation:chopHit .4s ease}
.chop-wrap.split .cutline{animation:cutFlash .4s ease}
.chop-wrap.sloppy .chop-ing{animation:chopBad .4s ease}
@keyframes chopHit{0%{transform:scale(1)}25%{transform:scale(1.1,.82) translateY(6px)}60%{transform:scale(.97,1.04)}100%{transform:scale(1)}}
@keyframes chopBad{0%{transform:rotate(0)}30%{transform:rotate(-9deg) translateX(-8px)}100%{transform:rotate(0)}}
@keyframes cutFlash{0%{border-color:#fff;filter:drop-shadow(0 0 8px #fff);border-left-width:5px}100%{border-left-width:2px}}
.aim{position:absolute;left:50%;top:50%;width:104px;height:104px;margin:-52px 0 0 -52px;border-radius:50%;border:2px dashed #ffffffaa;box-shadow:0 0 12px #fff6}
.ring{position:absolute;left:50%;top:50%;width:104px;height:104px;margin:-52px 0 0 -52px;border-radius:50%;border:5px solid #ffd86b;box-shadow:0 0 16px #ffd86b99;opacity:0;transform:scale(2.6)}
.ring.go{animation:ringGo var(--ms,1200ms) linear forwards}
@keyframes ringGo{0%{opacity:.15;transform:scale(2.6)}100%{opacity:1;transform:scale(1)}}
.knife{position:absolute;right:26px;top:12px;font-size:44px;color:#dfe7ee;transform:rotate(-30deg);transform-origin:90% 90%;filter:drop-shadow(0 4px 4px #0006);transition:transform .08s}
.knife.hit{animation:knifeHit .3s ease}
@keyframes knifeHit{0%{transform:rotate(-30deg)}40%{transform:rotate(18deg) translate(-70px,50px)}100%{transform:rotate(-30deg)}}
/* 굽기 */
.pan{position:absolute;left:50%;top:6px;width:250px;height:150px;transform:translateX(-50%)}
.pan-svg{position:absolute;inset:0}.pan-svg svg{width:100%;height:100%}
.pan-ing{position:absolute;left:44%;top:35%;width:84px;height:84px;margin:-8px 0 0 -42px;object-fit:contain;transition:filter .2s;filter:drop-shadow(0 4px 4px #0008)}
.pan-ing.flipjump{animation:flipJ .5s ease}
@keyframes flipJ{0%{transform:translateY(0) rotateX(0)}45%{transform:translateY(-42px) rotateX(180deg) scale(1.1)}100%{transform:translateY(0) rotateX(360deg)}}
.flame{position:absolute;left:46px;bottom:-26px;width:130px;height:44px;transform-origin:50% 100%;transition:transform .15s;filter:drop-shadow(0 0 10px #ff8a3d);animation:flick .3s infinite alternate;z-index:-1}
@keyframes flick{from{opacity:.85}to{opacity:1}}
.gauge-c{position:absolute;left:30px;top:178px;width:124px;height:124px;border-radius:50%;background:conic-gradient(#14212f 0 var(--z0),#3fb57a var(--z0) var(--z1),#14212f var(--z1) 360deg);box-shadow:0 8px 16px #0006,inset 0 0 0 2px #ffffff2a;transition:box-shadow .15s}
.gauge-c:before{content:'';position:absolute;inset:12px;border-radius:50%;background:conic-gradient(#f0b45acc 0 var(--p),#00000055 var(--p) 360deg)}
.gauge-c:after{content:'';position:absolute;inset:28px;border-radius:50%;background:#0f1e2e}
.gauge-c.in-zone{box-shadow:0 0 26px #7ad7a0,0 8px 16px #0006,inset 0 0 0 3px #7ad7a0}
.needle{position:absolute;left:50%;top:0;width:4px;height:50%;margin-left:-2px;transform-origin:50% 100%;z-index:3}
.needle:before{content:'';position:absolute;left:0;top:0;width:4px;height:16px;border-radius:2px;background:#fff;box-shadow:0 0 8px #fff}
.gtxt{position:absolute;inset:0;display:grid;place-items:center;z-index:2;font:700 17px var(--serif);color:var(--gold)}
.flip-btn{position:absolute;right:34px;top:186px;width:108px;height:108px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#fff3c9,#e9d5a1 45%,#c9a24e);color:#0b1b2e;font:800 20px var(--sans);box-shadow:0 10px 20px #0008,inset 0 2px 0 #fff9;touch-action:none}
.flip-btn:active{transform:scale(.92)}
/* 간 */
.s-plate{position:absolute;left:56px;top:2px;width:158px;height:158px;border-radius:50%;background:radial-gradient(circle,#fffaf0 0 62%,#e4dac5 64% 72%,#f8efd9 74%);box-shadow:0 10px 18px #0007;display:grid;place-items:center}
.s-dish img{width:100px;height:100px;object-fit:contain}
.s-stream{position:absolute;left:50%;top:-40px;width:7px;height:0;border-radius:6px;background:linear-gradient(#fff,#e9d5a1);opacity:0;transform:translateX(-50%);transition:height .15s}
.s-stream.on{opacity:.9;height:80px}
.s-meter{position:absolute;right:76px;top:6px;width:28px;height:150px;border-radius:14px;background:#06101c;border:2px solid #ffffff30;overflow:visible}
.s-fill{position:absolute;left:0;right:0;bottom:0;height:0;border-radius:0 0 12px 12px;background:linear-gradient(0deg,#e8806f,#f6d77a)}
.s-line{position:absolute;left:-8px;right:-8px;height:4px;margin-bottom:-2px;border-radius:2px;background:#7ad7a0;box-shadow:0 0 10px #7ad7a0}
.s-lbl{position:absolute;left:50%;transform:translateX(-50%);top:156px;font-size:11px;font-weight:700;color:#fff;white-space:nowrap;text-shadow:0 1px 4px #000}
.bottles{position:absolute;left:0;right:0;bottom:12px;display:flex;justify-content:center;gap:26px}
.bottle{width:70px;height:128px;background:none;display:flex;flex-direction:column;align-items:center;gap:2px;transition:transform .25s;transform-origin:50% 100%;touch-action:none;color:#fff;font-weight:700;font-size:12px;text-shadow:0 1px 4px #000}
.bottle svg{width:56px;height:100px;filter:drop-shadow(0 6px 6px #0006)}
.bottle:not(.tgt){opacity:.55}
.bottle.tgt{animation:tgt 1.1s ease-in-out infinite}
@keyframes tgt{50%{transform:translateY(-8px)}}
.bottle.tgt svg{filter:drop-shadow(0 0 14px #ffd86b) drop-shadow(0 6px 6px #0006)}
.bottle.tilt{animation:none;transform:translateY(-70px) translateX(-42px) rotate(-55deg)}
.bottle.nope{animation:worry .3s}
/* 플레이팅 */
.p-plate{position:absolute;left:50%;top:0;width:236px;height:236px;transform:translateX(-50%);border-radius:50%;background:radial-gradient(circle,#fffaf0 0 60%,#e4dac5 62% 70%,#f8efd9 72%);box-shadow:0 12px 22px #0008}
.p-glow{position:absolute;inset:-6px;border-radius:50%;opacity:0;box-shadow:0 0 40px 10px #ffe9a3}
.p-plate.done .p-glow{animation:glow .7s ease}
@keyframes glow{40%{opacity:1}100%{opacity:0}}
.slot{position:absolute;left:50%;top:50%;width:72px;height:72px;margin:-36px 0 0 -36px;transform:translate(var(--sx),var(--sy));border-radius:50%;border:3px dashed #b9a98a;display:grid;place-items:center;background:#0000000a}
.slot.filled{border:0;background:none;animation:drop .3s ease}
.slot img{width:66px;height:66px;object-fit:contain;filter:drop-shadow(0 4px 4px #0004)}
.tray{position:absolute;left:0;right:0;bottom:6px;display:flex;justify-content:center;gap:18px}
.tray-i{width:78px;height:78px;border-radius:20px;background:linear-gradient(#f7efe2,#e8dec9);box-shadow:0 6px 14px #0006,inset 0 1px 0 #fff;display:grid;place-items:center;touch-action:none;transition:opacity .2s,transform .15s}
.tray-i img{width:60px;height:60px;object-fit:contain;pointer-events:none}
.tray-i.used{opacity:.2;pointer-events:none}.tray-i.lift{opacity:.4}.tray-i.nope{animation:worry .3s}
.drag-ghost{position:absolute;width:70px;height:70px;transform:translate(-50%,-50%) scale(1.15);pointer-events:none;z-index:70;filter:drop-shadow(0 12px 10px #0008)}
/* 서빙 */
.serve-plate{position:absolute;left:50%;top:60px;width:210px;height:210px;margin-left:-105px;touch-action:none;transition:transform .55s cubic-bezier(.5,0,.8,.4),opacity .55s;cursor:grab;z-index:5}
.serve-plate img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 14px 12px #0008)}
.serve-plate .shine{position:absolute;inset:14%;border-radius:50%;background:radial-gradient(circle at 30% 25%,#ffffffaa,transparent 40%);animation:shine 2s infinite}
@keyframes shine{50%{opacity:.3}}
.serve-plate.fly{transform:translateY(-330px) scale(.35)!important;opacity:0}
.swipe-up{position:absolute;left:50%;bottom:20px;margin-left:-14px;display:flex;flex-direction:column;gap:0}
.swipe-up i{width:28px;height:14px;border-top:5px solid #fff;border-left:5px solid transparent;border-right:5px solid transparent;border-radius:0;clip-path:polygon(50% 0,100% 100%,0 100%);background:#ffffffaa;margin-top:-4px;animation:arrowUp 1.2s infinite;opacity:0}
.swipe-up i:nth-child(2){animation-delay:.2s}.swipe-up i:nth-child(3){animation-delay:.4s}
@keyframes arrowUp{50%{opacity:1;transform:translateY(-8px)}}
/* 반응 카드 */
.react-card{position:absolute;left:50%;top:50%;transform:translate(-50%,-56%);width:250px;text-align:center;padding:22px 16px;border-radius:24px;background:#0b1b2ecc;border:1px solid #ffffff30;animation:bub .5s cubic-bezier(.3,1.5,.5,1)}
.react-card b{display:block;font:700 21px var(--serif);margin:6px 0 2px}.react-card small{color:var(--gold);font-weight:700;font-size:14px}
.react-card.ng b{color:#c7d2dc}
.rs-stars{display:flex;justify-content:center;gap:8px;color:#ffffff2e}.rs-stars span{width:44px;height:44px}
.rs-stars span.on{color:#ffd86b;filter:drop-shadow(0 0 10px #ffd86b);animation:star .5s calc(var(--k)*.15s) both cubic-bezier(.3,1.6,.5,1)}
/* 하단 단계 도크 */
.dock{position:absolute;left:12px;right:12px;top:726px;height:92px;border-radius:24px;z-index:4;display:flex;justify-content:space-around;align-items:center;background:#0b1b2ecc;border:1px solid #ffffff20;backdrop-filter:blur(14px);box-shadow:0 8px 24px #0007}
.dock-i{display:flex;flex-direction:column;align-items:center;gap:5px;color:var(--muted);font-size:11.5px;font-weight:600;min-width:64px}
.dock-c{width:46px;height:46px;border-radius:50%;display:grid;place-items:center;background:#ffffff14;border:1px solid #ffffff22;font-size:22px;transition:all .3s}
.dock-i.cur{color:var(--gold)}
.dock-i.cur .dock-c{width:58px;height:58px;font-size:28px;background:radial-gradient(circle at 35% 30%,#fff3c9,#e9d5a1 50%,#c9a24e);color:#0b1b2e;border:0;box-shadow:0 0 18px #e9d5a199;margin:-6px 0}
.dock-i.done .dock-c{background:#3fb57a33;color:#7ad7a0;border-color:#7ad7a088}

/* ============ 상점 v3 ============ */
.shop-bg{position:absolute;left:0;top:0;width:100%;height:240px;object-fit:cover;object-position:50% 40%;filter:saturate(1.15) brightness(.85)}
.shop-shade{position:absolute;inset:0;background:linear-gradient(#0b1b2e66 0,#0b1b2e00 12%,#0b1b2eb0 22%,#0b1b2e 30%)}
.shop-title{position:absolute;left:20px;top:64px;margin:0;font:700 34px var(--serif);color:var(--gold);text-shadow:0 2px 12px #000a;z-index:2}
.shop-line{position:absolute;left:20px;right:20px;top:110px;margin:0;font-size:12px;line-height:1.5;color:#dfe5e8;min-height:36px;z-index:2}
.shop-grid{position:absolute;left:16px;right:16px;top:160px;display:grid;grid-template-columns:repeat(3,1fr);gap:10px;z-index:2}
.gcard{position:relative;height:140px;padding:10px 6px 8px;border-radius:16px;display:flex;flex-direction:column;align-items:center;justify-content:space-between;text-align:center;background:linear-gradient(160deg,#ffffff1c,#ffffff08);border:1px solid #ffffff26;box-shadow:inset 0 1px 0 #ffffff30;transition:transform .15s,border-color .2s,box-shadow .2s}
.gc-art{width:68px;height:68px;border-radius:18px;background:#0b1b2e99;display:grid;place-items:center;padding:6px}
.gc-art svg{width:100%;height:100%}
.gcard b{font:600 12px var(--sans);color:var(--cream);line-height:1.2}
.gcard small{font-size:10px;color:#cfd5d8;line-height:1.2}
.gc-price{display:inline-flex;align-items:center;gap:3px;font-size:12px;font-weight:700;color:var(--gold);padding:2px 8px;border-radius:99px;background:#0b1b2e99}
.gc-price .ico{width:13px;height:13px}
.gc-own{position:absolute;top:6px;right:6px;font-style:normal;font-size:10px;font-weight:700;padding:2px 6px;border-radius:99px;background:var(--coral);color:#2a1410}
.gc-own.gpop{animation:pop .5s cubic-bezier(.3,1.6,.5,1)}
@keyframes pop{from{transform:scale(0)}}
.gcard.sel{border-color:#e9d5a1;box-shadow:0 0 0 1px #e9d5a1,0 8px 22px #d9b96c44,inset 0 1px 0 #ffffff40;background:linear-gradient(160deg,#e9d5a133,#ffffff0c);transform:translateY(-2px)}
.gcard.locked{background:#ffffff06;border:1.5px dashed #ffffff2a;color:#7f8c97;justify-content:center;gap:6px}
.gcard.locked .gc-art{background:#0b1b2e88;color:#5e6e7b;width:56px;height:56px;padding:12px}
.gcard.locked b{color:#8a98a4;font-size:11.5px}
.gcard.bought{animation:bought .5s ease}
@keyframes bought{40%{transform:scale(1.08)}}
.wrapfx{position:absolute;inset:0;z-index:3;animation:wrapIn .45s cubic-bezier(.3,1.4,.5,1)}
.wrapfx svg{width:100%;height:100%}
.wrapfx.out{animation:wrapOut .35s ease forwards}
@keyframes wrapIn{from{opacity:0;transform:scale(1.4)}}
@keyframes wrapOut{to{opacity:0;transform:translateY(-12px) scale(.8)}}
.gift-slot{position:absolute;left:16px;right:16px;top:616px;height:94px;padding:12px 14px;display:flex;align-items:center;gap:12px;z-index:2;border-radius:20px}
.gs-art{width:62px;height:62px;border-radius:16px;background:#0b1b2eaa;padding:6px;flex:none}.gs-art svg{width:100%;height:100%}
.gs-copy{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.gs-copy small{font-size:11px;color:var(--muted)}.gs-copy b{font:700 15px var(--serif)}
.gs-price{display:inline-flex;align-items:center;gap:4px;color:var(--gold);font-weight:700;font-size:13px}.gs-price .ico{width:15px;height:15px}
.gift-slot .btn{height:44px;min-width:92px}
.shop3 .shop-foot{left:16px;right:16px;bottom:22px}
.shop3 .hud-bar{background:none}

/* ---- 선물 시트(같은 카드) ---- */
.gift-sheet{min-height:0;padding-bottom:26px}
.gift-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;overflow:visible}
.gift-cards .gcard.gift-card{flex:none;height:140px;padding:10px 6px 8px;background:linear-gradient(160deg,#ffffff1c,#ffffff08);cursor:grab;touch-action:none}
.gift-cards .gcard.locked{cursor:default}
.gcard.gift-card.ghost{position:absolute;width:108px;height:140px;margin:0;background:linear-gradient(160deg,#3a4d5f,#1b2f42);transform:translate(-50%,-50%) rotate(-5deg) scale(1.05)}
.gcard.gift-card.ghost.hot{outline:2px solid #e9d5a1}
.gcard.gift-card.ghost.fly-to{transform:translate(-50%,-50%) scale(.2) rotate(18deg)}
.gift-hint{text-align:center;margin:12px 0 0;font-size:12px;color:var(--gold)}

/* ============ 밤 하단 UI ============ */
.night-footer{padding:14px 14px 14px;gap:9px;background:linear-gradient(0deg,#0b1b2eee 62%,#0b1b2e00)}
.night-footer .dialogue{min-height:76px}
.night-bar{display:flex;flex-direction:column;gap:9px}
.candle-box{display:flex;align-items:flex-end;justify-content:space-between;height:44px;padding:0 4px}
.candle-row{height:44px;display:flex;align-items:flex-end;gap:11px;padding:0}
.candle-row span{position:relative;display:block;width:13px;height:26px;margin:0;border-radius:3px 3px 2px 2px;background:linear-gradient(90deg,#d9c9a8,#fff4dc 45%,#d9c9a8);box-shadow:0 2px 4px #0006}
.candle-row span:before{display:none}
.candle-row span .flame{position:absolute;left:50%;top:-14px;width:10px;height:16px;margin-left:-5px;border-radius:50% 50% 50% 50%/65% 65% 35% 35%;background:radial-gradient(circle at 50% 70%,#fff6c8 20%,#ffb347 60%,#e8806f);box-shadow:0 0 12px 3px #ffb34788;animation:candle 1.6s ease-in-out infinite;transform-origin:50% 100%}
.candle-row span:nth-child(2n) .flame{animation-delay:.4s}.candle-row span:nth-child(3n) .flame{animation-delay:.9s}
@keyframes candle{0%,100%{transform:scale(1) rotate(-2deg)}50%{transform:scale(1.08,1.15) rotate(2deg)}}
.candle-row span .smoke{display:none}
.candle-row .used{background:linear-gradient(90deg,#5d6a76,#8896a1 45%,#5d6a76);opacity:1;height:22px;filter:none}
.candle-row .used .flame{display:none}
.candle-row .puff .smoke{display:block;position:absolute;left:50%;top:-6px;width:14px;height:14px;margin-left:-7px;border-radius:50%;background:radial-gradient(#cfd6dc,#cfd6dc00 70%);animation:smokeUp 1.8s ease-out forwards}
@keyframes smokeUp{0%{opacity:.9;transform:translateY(0) scale(.6)}100%{opacity:0;transform:translateY(-38px) scale(2.2)}}
.candle-left{font-size:12px;color:#c4cdd3;padding-bottom:3px}.candle-left b{color:var(--gold);font-size:15px;font-family:var(--serif);margin-right:2px}
.night-footer .night-controls{padding-right:0;gap:8px}
.chat-toggle{height:44px;display:flex;align-items:center;gap:8px;padding:0 16px;font-size:14px}
.chat-toggle .ico{width:18px;height:18px;color:var(--gold)}
.chat-input-row{gap:6px}
.send-btn{display:grid;place-items:center;width:44px;height:44px;font-size:18px}
#chat-input{height:44px}
.gift-button{position:relative;right:auto;bottom:auto;width:44px;height:44px;font-size:22px}
.gift-button:before,.gift-button:after{display:none!important}
.gift-button .dot{display:none;position:absolute;right:3px;top:3px;width:10px;height:10px;border-radius:50%;background:var(--coral);border:2px solid var(--navy)}
.gift-button.has .dot{display:block}
.sleep-btn{width:auto;min-width:68px;padding:0 12px;border-radius:999px;display:flex;gap:5px;font-size:18px}
.sleep-btn small{font-size:11.5px;font-weight:600;color:var(--cream)}
.night-controls.typing .gift-button,.night-controls.typing .sleep-btn{display:none}
.night-footer .quick-replies{padding-right:0;gap:7px}
.quick-chip{display:inline-flex;align-items:center;gap:4px;padding:7px 12px;font-size:12px}
.quick-chip .ico{width:12px;height:12px}
.sleep-bar{display:none;flex-direction:column;gap:10px;bottom:20px;text-align:center}
.screen.out .sleep-bar{display:flex}
.out-note{margin:0;color:var(--gold);font-size:13px;font-weight:600}
.screen.out #nbar{display:none}
.screen.out .night-footer{padding-bottom:120px}

/* ============ 엔딩 / 편지 ============ */
.ending .hgauge{margin-top:4px}
.letter-stage .letter-back{position:absolute;left:95px;bottom:24px;width:200px;z-index:8}
.scene-tint.letter-tint{background:linear-gradient(180deg,#2a1810aa,#1a1024aa 60%,#0b1b2eee)}
.env-wrap{position:absolute;left:50%;top:260px;width:260px;height:176px;margin-left:-130px;perspective:900px;z-index:4;animation:envIn .9s cubic-bezier(.2,.9,.3,1) both;transition:transform 1s ease,opacity .9s ease}
.env-wrap.gone{transform:translateY(300px) scale(.8);opacity:0}
@keyframes envIn{from{opacity:0;transform:translateY(60px) scale(.85)}}
.env{position:relative;width:100%;height:100%;filter:drop-shadow(0 16px 24px #000a)}
.env i{position:absolute;display:block}
.env-back{inset:0;background:#d9c39c;border-radius:6px}
.env-front{inset:0;background:linear-gradient(#e8d6b0,#dcc79f);clip-path:polygon(0 0,50% 58%,100% 0,100% 100%,0 100%);border-radius:6px;z-index:2}
.env-flap{left:0;right:0;top:0;height:60%;background:linear-gradient(#efe0bd,#e1cb9f);clip-path:polygon(0 0,100% 0,50% 100%);transform-origin:50% 0;z-index:3;animation:flap .9s 1s ease forwards}
@keyframes flap{to{transform:rotateX(180deg);z-index:1;filter:brightness(.85)}}
.env-wrap.closed .env-flap{animation:none}
.seal{left:50%;top:50%;width:38px;height:38px;margin:-28px 0 0 -19px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#ff9f8f,#d9503f);display:grid!important;place-items:center;color:#ffd8d0;font-size:20px;z-index:4;box-shadow:0 3px 6px #0006;animation:sealGo .4s 1s ease forwards}
.env-wrap.closed .seal{animation:sealPulse 2s ease-in-out infinite}
@keyframes sealGo{to{opacity:0;transform:scale(.4)}}
@keyframes sealPulse{50%{transform:scale(1.1)}}
.env-soon{position:absolute;left:0;right:0;top:470px;text-align:center;font:600 17px var(--serif);color:var(--gold);z-index:4;animation:bub .8s .6s both}
.paper{position:absolute;left:22px;right:22px;top:84px;bottom:92px;z-index:5;transform:translateY(260px) scale(.55) rotate(-3deg);opacity:0;transform-origin:50% 100%;transition:transform 1.1s cubic-bezier(.2,.9,.3,1),opacity .6s;border-radius:8px;background:
  radial-gradient(circle at 20% 10%,#fffbf0aa,transparent 50%),radial-gradient(circle at 85% 90%,#e6d3b055,transparent 55%),
  repeating-linear-gradient(transparent 0 33px,#b9966a33 33px 34px),#f6ecd9;box-shadow:0 20px 40px #000a,inset 0 0 40px #c9a56a55}
.paper:before{content:'';position:absolute;inset:0;border-radius:8px;background:repeating-linear-gradient(80deg,#8a6a3a06 0 3px,transparent 3px 7px);pointer-events:none}
.paper.up{transform:none;opacity:1}
.paper-in{position:absolute;inset:0;padding:26px 24px 20px;overflow-y:auto;scrollbar-width:none}
.paper-text{font-family:var(--hand);font-size:25px;line-height:34px;color:#3a2718}
.paper-text .ln{margin:0;min-height:34px;opacity:0;transform:translateY(6px);transition:opacity .9s,transform .9s;transition-delay:calc(1.2s + var(--k)*var(--step,.7s))}
.paper.up .ln,.paper.up .paper-sign{opacity:1;transform:none}
.paper-sign{margin-top:14px;text-align:right;font-family:var(--hand);color:#3a2718;opacity:0;transform:translateY(6px);transition:opacity 1s,transform 1s;transition-delay:calc(1.6s + var(--k)*var(--step,.7s))}
.paper-sign span{display:block;font-size:19px;opacity:.75}.paper-sign b{font-size:32px;font-weight:400}

/* ---- CG 컷 / 앨범 ---- */
.cg-view{position:absolute;inset:0;z-index:70;background:#02060c;overflow:hidden;animation:cgin .5s ease both;cursor:pointer}
.cg-view.out{opacity:0;transition:opacity .35s}
@keyframes cgin{from{opacity:0}to{opacity:1}}
.cg-bg{position:absolute;inset:-20px;width:430px;height:884px;object-fit:cover;filter:blur(22px) brightness(.55) saturate(1.1)}
.cg-shade{position:absolute;inset:0;background:linear-gradient(180deg,#0b1b2e30,#0b1b2e10 40%,#0b1b2ee0 92%)}
.cg-frame{position:absolute;left:0;top:0;width:390px;height:604px;overflow:hidden;box-shadow:0 14px 40px #000a;-webkit-mask-image:linear-gradient(#000 88%,transparent);mask-image:linear-gradient(#000 88%,transparent)}
.cg-img{width:390px;height:604px;object-fit:cover;display:block;transform-origin:50% 35%;animation:cgzoom 7s ease-out both}
@keyframes cgzoom{from{transform:scale(1.0) translateY(0)}to{transform:scale(1.07) translateY(-6px)}}
.cg-hearts{position:absolute;left:0;right:0;top:360px;height:200px;pointer-events:none}
.cg-hearts i{position:absolute;bottom:0;width:14px;height:13px;background:#ff9aa8;clip-path:path("M7 13C2 9 0 7 0 4.200 0 2 1.600.600 3.500.600 5 .600 6.200 1.400 7 2.700 7.800 1.400 9 .600 10.500.600 12.400.600 14 2 14 4.200 14 7 12 9 7 13z");opacity:0;animation:cgheart 3.4s ease-in infinite}
.cg-hearts i:nth-child(1){left:70px;animation-delay:.6s}.cg-hearts i:nth-child(2){left:140px;animation-delay:1.4s}.cg-hearts i:nth-child(3){left:220px;animation-delay:.2s}.cg-hearts i:nth-child(4){left:290px;animation-delay:1.9s}.cg-hearts i:nth-child(5){left:180px;animation-delay:2.6s}
@keyframes cgheart{0%{opacity:0;transform:translateY(0) scale(.6)}20%{opacity:.9}100%{opacity:0;transform:translateY(-150px) scale(1.2)}}
.cg-cap{position:absolute;left:18px;right:18px;bottom:34px;padding:16px 18px 14px;border-radius:20px;animation:cgcap .6s .5s both cubic-bezier(.3,1.3,.5,1)}
@keyframes cgcap{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:none}}
.cg-tag{font:600 12px var(--sans);color:#e9d5a1;letter-spacing:.06em;display:flex;align-items:center;gap:8px}
.cg-tag b{background:#e8806f;color:#fff;border-radius:8px;padding:1px 7px;font-size:10.5px;letter-spacing:.08em}
.cg-cap p{margin:8px 0 10px;font:500 14.5px/1.6 var(--serif);color:#fff6e4}
.cg-tap{display:block;text-align:right;font-size:11px;color:#ffffff90;opacity:0}
.cg-view.ready .cg-tap{opacity:1;animation:cgtap 1.4s ease-in-out infinite}
@keyframes cgtap{50%{opacity:.35}}
.cg-album-h{display:flex;justify-content:space-between;align-items:center;margin:16px 2px 8px;font-size:13px}
.cg-album-h span{color:#e9d5a1;font-size:12px}
.cg-album{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.cg-th{position:relative;display:flex;flex-direction:column;align-items:center;gap:4px;padding:0;background:none;color:inherit}
.cg-th img{width:100%;aspect-ratio:3/4;object-fit:cover;object-position:50% 20%;border-radius:10px;border:1.5px solid #e9d5a1aa}
.cg-th small{font-size:10px;color:#ffffffc0;white-space:nowrap}
.cg-th.lock span{display:flex;width:100%;aspect-ratio:3/4;align-items:center;justify-content:center;background:#ffffff14;border-radius:10px;border:1.5px dashed #ffffff30;color:#ffffff60}
.cg-th.lock .ico{width:22px;height:22px}

.gc-art img,.gs-art img{width:100%;height:100%;object-fit:contain;display:block}
/* 엔딩 CG: 아래 84px 빈 띠 없이 그림이 캡션 뒤까지 이어지게 */
.cg-frame{height:760px}.cg-img{height:760px}
