@font-face { font-family: CR; src: url(assets/font/CookieRun-Bold.ttf); font-weight: 400; }
@font-face { font-family: CR; src: url(assets/font/CookieRun-Black.ttf); font-weight: 900; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { font-family: CR, 'Apple SD Gothic Neo', sans-serif; color: #5a3418; background: #2a1a12; overflow: hidden; user-select: none; -webkit-user-select: none; }
button { font-family: inherit; color: inherit; border: 0; cursor: pointer; }
.hidden { display: none !important; }
#fx { position: fixed; inset: 0; pointer-events: none; z-index: 60; }
#app { max-width: 540px; height: 100%; margin: 0 auto; display: flex; flex-direction: column; padding: 0 10px env(safe-area-inset-bottom); background: #f6d9a8 radial-gradient(circle at 50% 0, #fff3d6, #f3c98a 70%, #dfa765); }

header { display: flex; align-items: center; gap: 6px; padding: 8px 0 6px; }
.day { margin-right: auto; font-size: 15px; background: #fff8e6; border: 3px solid #7a3d14; border-radius: 12px; padding: 4px 9px; }
.coin { display: flex; align-items: center; gap: 5px; background: #7a3d14; color: #ffe9a8; border-radius: 99px; padding: 5px 11px 5px 6px; font-size: 16px; }
.coin i, .cico { display: inline-block; width: 20px; height: 20px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff6b8, #ffc21a 55%, #c9820a); border: 2px solid #8a5a08; vertical-align: -4px; }
.topbtn { background: #fff; border: 3px solid #7a3d14; border-radius: 12px; padding: 4px 9px; font-size: 15px; box-shadow: 0 3px 0 #7a3d14; }
.topbtn b { color: #d2572a; }
.topbtn:active, .big:active, .jar:active { transform: translateY(2px); }

#stage { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; gap: 7px; padding-bottom: 10px; }
.big { width: 100%; min-height: 56px; background: linear-gradient(#ffd84a, #ffae1a); border: 4px solid #7a3d14; border-radius: 20px; font-size: 21px; font-weight: 900; color: #6a3208; box-shadow: 0 5px 0 #7a3d14; flex: none; }
.big.red { background: linear-gradient(#ff8a5a, #f0502a); color: #fff; }
.big.white { background: #fff; font-size: 15px; }
.big:disabled { filter: grayscale(1); opacity: .65; }
.big small { font-size: 14px; font-weight: 400; }
.row { display: flex; gap: 8px; width: 100%; }
.chip { display: inline-block; font-style: normal; font-size: 12px; color: #fff; border-radius: 8px; padding: 1px 6px; margin: 0 1px; text-shadow: 0 1px 0 rgba(0, 0, 0, .35); }
.chip.hate { background: #555; text-decoration: line-through; }
.chips { font-size: 13px; margin-top: 4px; color: #8a5a3a; }
.coach { width: 100%; background: #2f6fd8; color: #fff; border: 3px solid #173a7a; border-radius: 14px; padding: 7px 12px; font-size: 15px; line-height: 1.35; text-align: center; animation: coach 1s infinite alternate; }
.coach b { color: #ffe86a; }
@keyframes coach { to { box-shadow: 0 0 0 5px rgba(47, 111, 216, .35); } }

/* ── 가게 (1인칭) ── */
.shop { position: relative; flex: 1; min-height: 0; width: 100%; border: 5px solid #5a2d0e; border-radius: 18px; overflow: hidden; background: #8fd0f4; }
.street { position: absolute; inset: 0 0 24% 0; background: url(assets/street.jpg) center 70% / cover; }
.street::after { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(255, 240, 200, .15), rgba(90, 45, 14, .25)); }
.pillar { position: absolute; top: 0; bottom: 20%; width: 9%; background: linear-gradient(90deg, #7a431c, #a8642e 45%, #6a3814); box-shadow: 0 0 14px rgba(0, 0, 0, .35); }
.pillar.l { left: 0; } .pillar.r { right: 0; transform: scaleX(-1); }
.awning { position: absolute; left: 0; right: 0; top: 0; height: 15%; min-height: 54px; background: repeating-linear-gradient(90deg, #e8483a 0 34px, #fff3e0 34px 68px); border-bottom: 5px solid #5a2d0e; box-shadow: 0 8px 14px rgba(0, 0, 0, .3); z-index: 3; display: flex; align-items: center; justify-content: center; }
.awning::after { content: ''; position: absolute; left: 0; right: 0; bottom: -17px; height: 16px; background: radial-gradient(circle at 17px 0, #e8483a 15px, transparent 16px) 0 0 / 68px 16px, radial-gradient(circle at 17px 0, #fff3e0 15px, transparent 16px) 34px 0 / 68px 16px; }
.awning span { background: #7a3d14; color: #ffe9a8; font-weight: 900; font-size: 20px; padding: 3px 18px; border-radius: 12px; border: 3px solid #ffe9a8; z-index: 1; }
.lamp { position: absolute; top: 15%; left: 16%; width: 30px; height: 50px; z-index: 2; background: linear-gradient(#5a2d0e, #5a2d0e) 14px 0 / 3px 26px no-repeat, radial-gradient(circle at 50% 78%, #ffe86a 11px, #c98a2a 12px 14px, transparent 15px); filter: drop-shadow(0 0 14px #ffd84a); animation: sway 3s ease-in-out infinite alternate; transform-origin: 50% 0; }
@keyframes sway { from { transform: rotate(-5deg); } to { transform: rotate(5deg); } }
.counter { position: absolute; left: 0; right: 0; bottom: 0; height: 25%; background: repeating-linear-gradient(90deg, #a8642e 0 58px, #9a5a28 58px 60px), #a8642e; border-top: 5px solid #5a2d0e; z-index: 5; }
.ctop { position: absolute; left: 0; right: 0; top: 0; height: 34%; background: linear-gradient(#e0a868, #c88a48); border-bottom: 4px solid #7a431c; }
.bell { position: absolute; right: 12%; top: -18px; width: 44px; height: 30px; background: radial-gradient(circle at 50% 100%, #ffd84a 21px, transparent 22px); border-bottom: 5px solid #7a5a0e; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .25)); }
.bell::after { content: ''; position: absolute; left: 18px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: #c9820a; }
.cust { position: absolute; left: 50%; bottom: 19%; height: 50%; max-height: 330px; transform: translateX(-50%); z-index: 4; filter: drop-shadow(0 8px 6px rgba(0, 0, 0, .3)); animation: bob 1.6s ease-in-out infinite alternate; }
.cust.enter { animation: enter .7s cubic-bezier(.2, 1.2, .4, 1), bob 1.6s .7s ease-in-out infinite alternate; }
.cust.joy { animation: joy .45s ease-in-out infinite alternate; }
.cust.sad { animation: none; filter: saturate(.5) brightness(.85) drop-shadow(0 8px 6px rgba(0, 0, 0, .3)); transform: translateX(-50%) rotate(-5deg); }
@keyframes enter { from { transform: translateX(160%) rotate(12deg); } }
@keyframes bob { to { transform: translateX(-50%) translateY(-7px); } }
@keyframes joy { to { transform: translateX(-50%) translateY(-22px) rotate(4deg); } }
.made { position: absolute; left: 12%; bottom: 14%; height: 26%; z-index: 6; filter: drop-shadow(0 0 12px #fff8c0); animation: pop .5s cubic-bezier(.2, 1.6, .4, 1); }
.made.burnt { filter: brightness(.13); }
.bubble { position: absolute; left: 11%; right: 11%; top: 18%; z-index: 7; background: #fff; border: 4px solid #5a2d0e; border-radius: 18px; padding: 8px 12px; font-size: 16px; line-height: 1.4; box-shadow: 0 5px 0 rgba(90, 45, 14, .35); animation: pop .35s .35s backwards; }
.bubble::after { content: ''; position: absolute; left: 50%; bottom: -15px; margin-left: -10px; border: 10px solid transparent; border-top: 12px solid #5a2d0e; border-bottom: 0; }
.bubble small { color: #d2572a; font-size: 13px; }
.bubble p { margin: 2px 0; }
.bubble .hello { color: #8a6a4a; font-size: 14px; }
.bubble b { color: #d2572a; } .bubble b.no, .ticket b.no { color: #555; }
.bubble .rumor { font-size: 14px; color: #6a3ab0; border-top: 2px dashed #d8c0f0; padding-top: 4px; margin-top: 4px; }
.receipt { width: 100%; background: #fff8e6; border: 3px solid #7a3d14; border-radius: 14px; padding: 6px 12px; font-size: 15px; line-height: 1.6; text-align: center; }
.receipt b { color: #d2572a; font-size: 18px; }
.payln { font-weight: 900; color: #b0700a; }
.titleBox { position: absolute; left: 8%; right: 8%; top: 26%; z-index: 7; text-align: center; background: rgba(255, 248, 230, .93); border: 5px solid #5a2d0e; border-radius: 22px; padding: 14px; }
.titleBox h1 { margin: 0; font-size: 44px; font-weight: 900; color: #fff; -webkit-text-stroke: 9px #7a3d14; paint-order: stroke fill; }
.titleBox p { margin: 6px 0 0; font-size: 16px; line-height: 1.4; }

/* ── 조리대 ── */
.kitchen { position: relative; flex: 1; min-height: 0; width: 100%; border: 5px solid #5a2d0e; border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; gap: 6px; padding: 8px;
  background: linear-gradient(transparent 46%, #b8743a 46%, #a8642e), linear-gradient(90deg, rgba(120, 90, 60, .22) 2px, transparent 2px) 0 0 / 46px 46px, linear-gradient(rgba(120, 90, 60, .22) 2px, transparent 2px) 0 0 / 46px 46px, #fff3dc; }
.kitchen.dark { background: radial-gradient(circle at 50% 55%, #6a3418, #2a140a 75%); align-items: center; justify-content: center; }
.ticket { display: flex; gap: 8px; align-items: center; background: #fffdf4; border: 3px solid #7a3d14; border-radius: 6px 6px 14px 14px; padding: 5px 9px; font-size: 14px; line-height: 1.35; box-shadow: 0 4px 0 rgba(0, 0, 0, .15); transform: rotate(-.6deg); }
.ticket img { height: 54px; flex: none; }
.ticket p { margin: 0; } .ticket b { color: #d2572a; }
.work { display: flex; gap: 10px; align-items: center; justify-content: center; flex: 1; min-height: 110px; }
.tray { position: relative; height: 100%; max-height: 190px; aspect-ratio: 1; background: linear-gradient(#8d949c, #5d646c); border-radius: 20px; border: 4px solid #3b4046; box-shadow: inset 0 0 0 6px #a7aeb6, 0 6px 0 #3b4046; display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: pointer; flex: none; }
.tray img { position: absolute; width: 74%; height: 82%; object-fit: contain; }
.tray .hole { filter: brightness(0); opacity: .45; }
.tray .dough { filter: brightness(0) invert(.86) sepia(.9) saturate(2.2) hue-rotate(-12deg); clip-path: inset(100% 0 0 0); }
.tray.fill .dough { clip-path: inset(0 0 0 0); transition: clip-path .9s ease-out; }
.tray .tap { position: relative; z-index: 2; color: #fff; font-size: 16px; text-align: center; text-shadow: 0 2px 0 #3b4046; animation: coachT .6s infinite alternate; }
@keyframes coachT { to { transform: scale(1.1); } }
.tray.fill .tap { display: none; }
.pour { position: absolute; top: -10px; left: 50%; width: 20px; height: 0; margin-left: -10px; background: #f1cf8d; border-radius: 0 0 12px 12px; }
.tray.fill .pour { animation: pour 1s ease-out; }
@keyframes pour { 0% { height: 0; } 25% { height: 70%; } 80% { height: 70%; opacity: 1; } 100% { height: 70%; opacity: 0; } }
.tint { position: absolute; inset: 0; mix-blend-mode: multiply; opacity: 0; transition: opacity .3s, background .3s; pointer-events: none; }
.tray.secret { box-shadow: inset 0 0 0 6px #a7aeb6, 0 0 26px 8px #c9a0ff, 0 6px 0 #3b4046; animation: secretGlow .7s infinite alternate; }
@keyframes secretGlow { to { box-shadow: inset 0 0 0 6px #fff, 0 0 40px 16px #ffe86a, 0 6px 0 #3b4046; } }
.side { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.slots { display: flex; gap: 5px; }
.slot { flex: 1; min-width: 0; height: 78px; border: 3px dashed #b98a5a; border-radius: 12px; background: rgba(255, 255, 255, .6); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 12px; color: #b98a5a; padding: 0; }
.slot.on { border-style: solid; border-color: #d2572a; background: #fff; color: #5a3418; animation: pop .3s; }
.slot svg { width: 42px; height: 44px; }
.slot span { font-size: 11px; white-space: nowrap; overflow: hidden; max-width: 100%; }
.mix { background: rgba(255, 255, 255, .85); border: 3px solid #7a3d14; border-radius: 12px; padding: 4px 8px; font-size: 13px; min-height: 48px; }
.mix small { color: #a2643a; } .mix .none { color: #b9a582; font-style: normal; }
.glowtxt { margin: 2px 0 0; color: #8a3ad8; font-size: 13px; animation: coachT .5s infinite alternate; transform-origin: 0 50%; }
.shelf { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; max-height: 44%; overflow-y: auto; background: #7a431c; border-radius: 12px; padding: 6px; border: 3px solid #5a2d0e; flex: none; -webkit-overflow-scrolling: touch; }
.shelf.off { filter: grayscale(.7) brightness(.8); }
.shelf.open { max-height: none; }
.jar { position: relative; background: #fff8e6; border: 3px solid var(--gc, #b98a5a); border-radius: 12px; padding: 3px 1px 4px; display: flex; flex-direction: column; align-items: center; font-size: 12px; line-height: 1.15; min-width: 0; }
.jar svg { width: 38px; height: 40px; }
.jar span { white-space: nowrap; }
.jar em { font-style: normal; display: flex; flex-wrap: wrap; justify-content: center; gap: 1px; margin-top: 2px; }
.jar em .chip { font-size: 10px; padding: 0 4px; margin: 0; }
.jar u { position: absolute; top: 1px; right: 3px; font-size: 11px; text-decoration: none; color: #7a3d14; }
.jar.on { background: #ffe2a8; box-shadow: 0 0 0 3px #ff7a1a; }
.jar.unk { filter: grayscale(1); opacity: .5; }

/* ── 오븐 ── */
.ovnWrap { width: min(78%, 330px); }
.ovn { position: relative; width: 100%; aspect-ratio: 1 / 1.05; background: linear-gradient(#d8483a, #a82a22); border: 6px solid #4a1a12; border-radius: 34px 34px 18px 18px; box-shadow: inset 0 0 0 6px #f07a5a, 0 12px 0 #4a1a12, 0 0 60px rgba(255, 140, 40, .45); }
.ovn .win { position: absolute; left: 13%; right: 13%; top: 20%; bottom: 26%; background: radial-gradient(circle at 50% 80%, #ff9a2a, #5a1a08 75%); border: 6px solid #4a1a12; border-radius: 22px; overflow: hidden; box-shadow: inset 0 0 30px #000; }
.ovn .glow { position: absolute; inset: 0; animation: heat .5s infinite alternate; }
@keyframes heat { to { opacity: .55; } }
.ovn .bk { position: absolute; left: 14%; width: 72%; bottom: 6%; height: 84%; object-fit: contain; transform-origin: 50% 100%; transform: scale(calc(.82 + var(--rise, 0) * .18), calc(.7 + var(--rise, 0) * .3)); }
.bk.raw { filter: brightness(0) invert(.86) sepia(.9) saturate(2.2) hue-rotate(-12deg); }
.bk.gold { filter: brightness(0) invert(.62) sepia(1) saturate(4) hue-rotate(-18deg); opacity: 0; }
.bk.char { filter: brightness(.08); opacity: 0; }
.steam { position: absolute; left: 30%; bottom: 60%; width: 22px; height: 22px; border-radius: 50%; background: rgba(255, 255, 255, .5); animation: smoke 1.4s infinite; }
.steam.s2 { left: 62%; animation-delay: .7s; }
@keyframes smoke { from { transform: translateY(0) scale(.6); opacity: .6; } to { transform: translateY(-80px) scale(1.8); opacity: 0; } }
.ovn .handle { position: absolute; left: 24%; right: 24%; top: 9%; height: 6%; background: linear-gradient(#f4f4f4, #9a9a9a); border: 4px solid #4a1a12; border-radius: 99px; }
.knobs { position: absolute; left: 0; right: 0; bottom: 15%; display: flex; justify-content: center; gap: 14%; }
.knobs i { width: 9%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #b8b8b8); border: 4px solid #4a1a12; }
.flames { position: absolute; left: 12%; right: 12%; bottom: 2%; height: 11%; display: flex; justify-content: space-around; align-items: flex-end; }
.flames i { width: 10%; height: 100%; background: radial-gradient(ellipse at 50% 100%, #fff3a8 20%, #ffb81a 45%, #ff5a1a 70%, transparent 72%); border-radius: 50% 50% 20% 20%; animation: flame .22s infinite alternate; transform-origin: 50% 100%; }
.flames i:nth-child(2n) { animation-duration: .31s; } .flames i:nth-child(3n) { animation-duration: .17s; }
@keyframes flame { from { transform: scaleY(.6) skewX(-6deg); } to { transform: scaleY(1.15) skewX(6deg); } }
.ovn.big { animation: ovenShake .2s infinite alternate; }
@keyframes ovenShake { to { transform: translateY(-2px) rotate(.4deg); } }
.gauge { position: relative; width: 100%; height: 46px; border: 4px solid #7a3d14; border-radius: 16px; background: #c9d6e0; overflow: hidden; flex: none; }
.gauge .z { position: absolute; top: 0; bottom: 0; }
.gauge .zg { background: #ffd84a; } .gauge .zp { background: #3fd85b; }
.gauge .zb { background: repeating-linear-gradient(45deg, #3a2a22, #3a2a22 8px, #5a3a2a 8px, #5a3a2a 16px); }
.gauge .mk { position: absolute; top: -4px; bottom: -4px; width: 9px; margin-left: -4px; background: #fff; border: 2px solid #7a3d14; border-radius: 6px; left: 0; box-shadow: 0 0 8px #fff; }
.glab { display: flex; width: 100%; font-size: 12px; color: #8a5a3a; justify-content: space-between; margin-top: -5px; }

/* ── 등장 컷신 ── */
.cut { position: fixed; inset: 0; z-index: 50; box-shadow: 0 0 0 80px #0a0504; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.cbg { position: absolute; inset: 0; background: radial-gradient(circle at 50% 45%, #3a2218, #0a0504 75%); transition: background .3s; }
.cut.hush .cbg { background: #000; } .cut.hush .cdoor { filter: brightness(.22); }
.cut.rays .cbg { background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--fc) 55%, #000), #0a0504 80%); }
.cart { position: absolute; inset: -4%; background: center / cover no-repeat; opacity: 0; transition: opacity .9s, filter .9s; }
.cart.dim { opacity: .55; filter: brightness(.45) saturate(.8); animation: kenb 9s ease-out forwards; }
.cart.on { opacity: 1; filter: none; animation: kenb 9s ease-out forwards; }
@keyframes kenb { from { transform: scale(1.12); } to { transform: scale(1); } }
.crays { position: absolute; left: 50%; top: 45%; width: 220vmax; aspect-ratio: 1; transform: translate(-50%, -50%); background: repeating-conic-gradient(var(--fc) 0 7deg, transparent 7deg 18deg); opacity: 0; -webkit-mask: radial-gradient(circle, #000 5%, transparent 45%); mask: radial-gradient(circle, #000 5%, transparent 45%); mix-blend-mode: screen; }
.cut.rays .crays { opacity: .5; animation: spin 16s linear infinite; }
.cut.vortex .crays { opacity: .8; animation: spin 1.1s linear infinite; }
.cut.k-일반.rays .crays { opacity: .22; } .cut.k-희귀.rays .crays { opacity: .35; }
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.cpillar { position: absolute; left: 50%; top: 0; bottom: 0; width: 0; transform: translateX(-50%); background: linear-gradient(90deg, transparent, var(--fc) 30%, #fff 50%, var(--fc) 70%, transparent); opacity: 0; mix-blend-mode: screen; }
.cut.beam .cpillar { width: 62%; opacity: .85; transition: width .5s cubic-bezier(.2, 1.4, .4, 1), opacity .3s; animation: pillarP .25s infinite alternate; }
.cut.beam.done .cpillar { opacity: .4; }
@keyframes pillarP { to { filter: brightness(1.35); } }
.cvig { position: absolute; inset: 0; background: radial-gradient(circle, transparent 30%, #c0182a 130%); opacity: 0; }
.cut.pulse .cvig { opacity: .2; }
.cut.bolts::before, .cut.bolts::after { content: ''; position: absolute; top: 0; bottom: 0; width: 5px; background: linear-gradient(#fff, var(--gc), transparent); left: 22%; transform: skewX(-14deg); animation: bolt .5s 2; opacity: 0; z-index: 2; box-shadow: 0 0 18px 4px var(--gc); }
.cut.bolts::after { left: 76%; transform: skewX(11deg); animation-delay: .12s; }
@keyframes bolt { 0%, 40% { opacity: 1; } 20%, 100% { opacity: 0; } }
.cut.glitch > * { animation: glitch .18s steps(2) infinite; }
@keyframes glitch { 0% { transform: translate(-6px, 2px) skewX(-4deg); filter: hue-rotate(40deg); } 100% { transform: translate(6px, -2px) skewX(4deg); filter: hue-rotate(-30deg) saturate(2); } }
.ccracks { position: absolute; left: 50%; top: 45%; z-index: 4; }
.ccracks i { position: absolute; left: 0; top: 0; height: 5px; width: 0; background: linear-gradient(90deg, #fff, #ff3a4a 30%, #c0182a); transform-origin: 0 50%; box-shadow: 0 0 14px 3px #ff3a4a; border-radius: 3px; }
.ccracks i:nth-child(1) { transform: rotate(8deg); } .ccracks i:nth-child(2) { transform: rotate(62deg); } .ccracks i:nth-child(3) { transform: rotate(118deg); } .ccracks i:nth-child(4) { transform: rotate(171deg); } .ccracks i:nth-child(5) { transform: rotate(223deg); } .ccracks i:nth-child(6) { transform: rotate(281deg); } .ccracks i:nth-child(7) { transform: rotate(327deg); }
.cut.cracked .ccracks i { width: 62vmax; transition: width .7s cubic-bezier(.3, 0, .2, 1); }
.cut.cracked.done .ccracks { opacity: 0; transition: opacity .4s; }
.cdoor { position: relative; width: min(64vw, 300px); z-index: 3; transition: transform .45s cubic-bezier(.5, 0, .8, .4), opacity .45s; }
.cdoor .ovn { box-shadow: inset 0 0 0 6px #f07a5a, 0 12px 0 #4a1a12, 0 0 70px 14px var(--gc); transition: box-shadow .2s; }
.cdoor .win { background: radial-gradient(circle at 50% 60%, #fff, var(--gc) 45%, #2a0a04 95%); transition: background .2s; }
.cut.frost .cdoor .win::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(60deg, rgba(255, 255, 255, .55) 0 3px, transparent 3px 16px), repeating-linear-gradient(-55deg, rgba(190, 233, 255, .5) 0 2px, transparent 2px 13px), rgba(160, 220, 255, .45); animation: frostIn .8s; }
@keyframes frostIn { from { opacity: 0; } }
.cdoor.rattle { animation: rattle .11s infinite alternate; }
@keyframes rattle { from { transform: translate(-3px, 1px) rotate(-1.2deg); } to { transform: translate(3px, -2px) rotate(1.2deg); } }
.cdoor.open { animation: none; transform: scale(3.2); opacity: 0; pointer-events: none; }
.cdoor.gone { animation: none; opacity: 0; transform: scale(.6); transition: transform .8s, opacity .8s; }
.cgem { position: absolute; left: 50%; top: 45%; width: 96px; height: 96px; margin: -48px; z-index: 4; transform: rotate(45deg); border-radius: 18px; background: linear-gradient(135deg, #fff, var(--fc) 45%, color-mix(in srgb, var(--fc) 55%, #000)); border: 5px solid #fff; box-shadow: 0 0 50px 14px var(--fc), inset 0 0 22px #fff; }
.cstars { position: absolute; left: 0; right: 0; top: 15%; z-index: 6; display: flex; justify-content: center; gap: 26px; transition: opacity .4s, transform .4s; }
.cstars b { font-size: 60px; color: var(--fc); text-shadow: 0 0 26px var(--fc), 0 4px 0 #000; animation: slam .35s cubic-bezier(.2, 1.6, .4, 1); }
.cstars.away { opacity: 0; transform: translateY(-40px); }
.ctxt { position: absolute; left: 0; right: 0; top: 9%; text-align: center; color: #fff; font-size: 23px; font-weight: 900; text-shadow: 0 0 14px var(--gc), 0 3px 0 #000, 0 0 4px #000; z-index: 6; padding: 0 16px; }
.chero { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); z-index: 4; }
.chero.in-pop { animation: hPop .5s cubic-bezier(.2, 1.7, .4, 1); }
.chero.in-side { animation: hSide .5s cubic-bezier(.1, 1, .3, 1); }
.chero.in-top { animation: hTop .9s cubic-bezier(.2, 1.2, .3, 1); }
.chero.in-rise { animation: hRise 1.5s cubic-bezier(.1, .8, .2, 1); }
.chero.in-slam { animation: hSlam .5s cubic-bezier(.6, 0, .9, .4); }
@keyframes hPop { from { transform: translate(-50%, -20%) scale(.2); opacity: 0; } }
@keyframes hSide { from { transform: translate(140%, -50%) skewX(-22deg); } }
@keyframes hTop { from { transform: translate(-50%, -190%) rotate(-14deg); } }
@keyframes hRise { from { transform: translate(-50%, 60%) scale(.8); opacity: 0; } }
@keyframes hSlam { from { transform: translate(-50%, -50%) scale(3.4); opacity: 0; } }
.chalo { position: absolute; left: 50%; top: 50%; width: 130%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; border: 6px double var(--fc); box-shadow: 0 0 40px var(--fc), inset 0 0 40px var(--fc); opacity: 0; }
.chalo.on { opacity: .9; animation: halo 6s linear infinite; }
@keyframes halo { from { transform: translate(-50%, -50%) rotate(0) scale(1); } 50% { transform: translate(-50%, -50%) rotate(180deg) scale(1.08); } to { transform: translate(-50%, -50%) rotate(360deg) scale(1); } }
.cimg { position: relative; display: block; height: min(44vh, 380px); max-width: 86vw; object-fit: contain; }
.cimg.sil { filter: brightness(0) drop-shadow(0 0 18px var(--fc)) drop-shadow(0 0 40px var(--fc)); }
.cimg.show { filter: drop-shadow(0 0 22px var(--fc)); animation: showIn .55s cubic-bezier(.2, 1.7, .4, 1), floaty 2s .55s ease-in-out infinite alternate; }
@keyframes showIn { from { transform: scale(1.5); filter: brightness(4); } }
@keyframes floaty { to { transform: translateY(-10px); } }
.cimg.burnt { filter: brightness(.12); animation: wob 1.2s .6s infinite alternate; }
@keyframes wob { to { transform: rotate(4deg); } }
.cring { position: absolute; left: 50%; top: 50%; width: 60px; height: 60px; margin: -30px; border-radius: 50%; border: 8px solid var(--fc); opacity: 0; }
.cring.go { animation: ring .8s ease-out; }
@keyframes ring { from { transform: scale(.5); opacity: 1; } to { transform: scale(14); opacity: 0; } }
.cinfo { position: absolute; left: 0; right: 0; bottom: 13%; z-index: 6; text-align: center; }
.ccap { font-size: 19px; color: #fff; text-shadow: 0 0 12px var(--fc), 0 2px 0 #000, 0 0 4px #000; letter-spacing: 2px; min-height: 4px; }
.cword { font-size: 44px; font-weight: 900; color: var(--fc); -webkit-text-stroke: 9px #1a0a04; paint-order: stroke fill; letter-spacing: 2px; animation: slam .45s cubic-bezier(.2, 1.6, .4, 1); text-shadow: 0 0 26px var(--fc); white-space: nowrap; }
.k-burnt .cword { color: #888; }
@keyframes slam { from { transform: scale(4); opacity: 0; } }
.k-전설 .cword, .k-에인션트 .cword, .k-비스트 .cword, .k-드래곤 .cword { animation: slam .45s cubic-bezier(.2, 1.6, .4, 1), wordP .5s .45s infinite alternate; }
@keyframes wordP { to { transform: scale(1.08); filter: brightness(1.3); } }
.cinfo .badge { height: 30px; display: block; margin: 2px auto; }
.cname { font-size: 28px; font-weight: 900; color: #fff; -webkit-text-stroke: 7px #1a0a04; paint-order: stroke fill; min-height: 36px; }
.cflash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 8; }
.cskip { position: absolute; left: 0; right: 0; bottom: 3%; text-align: center; color: rgba(255, 255, 255, .5); font-size: 13px; z-index: 6; }
.cgo { position: absolute; left: 50%; bottom: 3%; width: min(88vw, 480px); transform: translateX(-50%); z-index: 9; animation: pop .3s; }
.cgo:active { transform: translateX(-50%) translateY(2px); }
@keyframes pop { from { transform: scale(.3); opacity: 0; } }

/* ── 재료 상자 ── */
.overlay { position: fixed; inset: 0; background: rgba(40, 20, 8, .72); display: flex; align-items: center; justify-content: center; z-index: 20; }
.gacha { flex-direction: column; gap: 10px; z-index: 40; padding: 12px; }
.gbox { position: relative; width: 150px; height: 130px; cursor: pointer; animation: bobBox 1s ease-in-out infinite alternate; flex: none; }
@keyframes bobBox { to { transform: translateY(-10px); } }
.gbox .body { position: absolute; left: 0; right: 0; bottom: 0; height: 84px; background: linear-gradient(#ffb84a, #e8862a); border: 5px solid #5a2d0e; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 24px; -webkit-text-stroke: 5px #5a2d0e; paint-order: stroke fill; }
.gbox .lid { position: absolute; left: -8px; right: -8px; top: 22px; height: 34px; background: linear-gradient(#ff7a5a, #e8483a); border: 5px solid #5a2d0e; border-radius: 10px; z-index: 1; transition: transform .35s cubic-bezier(.2, 1.5, .4, 1); }
.gbox.shaking { animation: rattle .08s infinite alternate; }
.gbox.open { animation: none; }
.gbox.open .lid { transform: translate(40px, -70px) rotate(35deg); }
.gtxt { color: #fff; font-size: 20px; min-height: 26px; }
.gcards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; width: min(96vw, 520px); }
.gcard { position: relative; background: #fff8e6; border: 4px solid var(--gc); border-radius: 12px; padding: 12px 1px 4px; display: flex; flex-direction: column; align-items: center; font-size: 12px; animation: flip .4s cubic-bezier(.2, 1.5, .4, 1); box-shadow: 0 0 14px var(--gc); min-width: 0; }
@keyframes flip { from { transform: rotateY(90deg) scale(.5); } }
.gcard svg { width: 40px; height: 42px; }
.gcard span { white-space: nowrap; font-size: 11px; }
.gcard small { position: absolute; top: -9px; background: var(--gc); color: #fff; border-radius: 8px; padding: 0 7px; font-size: 11px; }
.gcard em { font-style: normal; display: flex; flex-wrap: wrap; justify-content: center; }
.gcard em .chip { font-size: 10px; padding: 0 4px; }
.gcard u { text-decoration: none; color: #d2572a; }
.gcard.g-전설 { background: #fff3c0; animation: flip .4s, wordP .5s infinite alternate; }
.gok { width: min(88vw, 420px); }

/* ── 하루 마감 ── */
.dayend { flex: 1; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.dayend h2 { font-size: 34px; font-weight: 900; color: #fff; -webkit-text-stroke: 8px #7a3d14; paint-order: stroke fill; margin: 0 0 10px; }
.sum { background: #fff8e6; border: 4px solid #7a3d14; border-radius: 18px; padding: 10px 26px; font-size: 18px; }
.sum p { margin: 6px 0; } .sum b { color: #d2572a; }
.tip { font-size: 16px; } .tip b { color: #d2572a; }

/* ── 도감·창고 ── */
.sheet { width: min(96vw, 560px); height: 92%; background: #fff3d6; border: 5px solid #7a3d14; border-radius: 22px; display: flex; flex-direction: column; overflow: hidden; }
.sheetHead { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: #7a3d14; color: #ffe9a8; font-size: 20px; }
.xbtn { background: #ffe9a8; color: #7a3d14; border-radius: 10px; padding: 4px 12px; font-size: 15px; }
#dexBody, .sbody { flex: 1; overflow-y: auto; padding: 8px 10px 20px; -webkit-overflow-scrolling: touch; }
.sec { display: flex; align-items: center; gap: 8px; margin: 12px 0 6px; font-size: 16px; }
.sec .badge { height: 24px; }
.cells { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; }
.cell { position: relative; background: #fff; border: 3px solid var(--rc, #b9a582); border-radius: 12px; aspect-ratio: .86; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 0; }
.cell img { width: 92%; height: 92%; object-fit: contain; }
.cell.no { background: #ecd9b5; border-color: #cdb48a; }
.cell.no img { filter: brightness(0); opacity: .28; }
.cell u { position: absolute; right: 3px; bottom: 1px; font-size: 12px; text-decoration: none; color: #7a3d14; background: #ffe9a8; border-radius: 6px; padding: 0 4px; }
.notes { background: #fff; border: 3px dashed #b98a5a; border-radius: 14px; padding: 8px 12px; font-size: 14px; line-height: 1.7; }
.notes .q { color: #8a3ad8; } .notes .ok { color: #2f8a3a; } .notes b { color: #2f8a3a; }
.card { width: min(88vw, 360px); background: #fff3d6; border: 5px solid var(--rc); border-radius: 22px; padding: 14px; text-align: center; }
.card img.p { height: 200px; }
.card h3 { margin: 6px 0 2px; font-size: 22px; }
.card p { margin: 3px 0; font-size: 15px; }
.card .badge { height: 26px; }
#detail { z-index: 30; }
.buy { display: flex; gap: 8px; }
.rate { font-size: 13px; line-height: 1.5; text-align: center; color: #8a5a3a; }
.rate b { color: #d2572a; }
.row .big, .buy .big { flex: 1; width: auto; min-width: 0; }

/* 좁은 화면 */
header > * { white-space: nowrap; flex: none; }
@media (max-width: 430px) { .day { font-size: 13px; padding: 4px 6px; } .coin { font-size: 14px; padding: 4px 8px 4px 5px; } .topbtn { font-size: 13px; padding: 4px 7px; } .tray { max-height: 140px; } .bubble { font-size: 15px; left: 6%; right: 6%; } }
@media (max-height: 720px) { .bubble .hello { display: none; } .bubble { top: 14%; padding: 6px 10px; } .awning { height: 11%; min-height: 44px; } .cust { height: 46%; bottom: 17%; } }

/* ── 코덱스 그림으로 바꾼 부분 (assets/art) ── */
.coin i, .cico { background: url(assets/art/coin.webp) center / contain no-repeat; border: 0; border-radius: 0; width: 24px; height: 24px; }
.ing { width: 46px; height: 46px; object-fit: contain; filter: drop-shadow(0 2px 0 rgba(90, 45, 14, .25)); }
.slot .ing { width: 48px; height: 44px; } .gcard .ing { width: 52px; height: 52px; }
.jar.unk .ing { filter: brightness(0); opacity: .35; }
.shop { container-type: size; background: #7cc8f0; }
.shopbg, .counter { position: absolute; left: 0; right: 0; bottom: 0; background: url(assets/art/bg_shop.webp) center bottom -20cqw / 100cqw auto no-repeat; }
.shopbg { top: 0; }
.counter { height: 28cqw; border: 0; z-index: 5; }
.bellimg { position: absolute; right: 9%; bottom: 20cqw; width: 15cqw; z-index: 6; filter: drop-shadow(0 4px 3px rgba(0, 0, 0, .3)); }
.cust { bottom: 23cqw; height: auto; max-height: none; top: 30%; }
.cust.sad { top: 34%; }
.made { bottom: 17cqw; left: 8%; height: 27cqw; }
.bubble { top: 3%; left: 5%; right: 5%; }
.titleBox { top: 12%; }
@media (max-height: 720px) { .bubble { top: 2%; } .cust { height: auto; bottom: 23cqw; top: 26%; } }
.kitchen { background: url(assets/art/bg_kitchen.webp) center 30% / cover no-repeat; }
.kitchen.dark { background: url(assets/art/bg_ovenroom.webp) center / cover no-repeat; }
.tray { background: url(assets/art/tray.webp) center / 100% 100% no-repeat; border: 0; border-radius: 0; box-shadow: none; overflow: visible; filter: drop-shadow(0 6px 4px rgba(0, 0, 0, .3)); }
.tray img { width: 62%; height: 70%; }
.tray .tint { inset: 14%; border-radius: 12px; }
.tray.secret { box-shadow: none; animation: secretGlow2 .7s infinite alternate; }
@keyframes secretGlow2 { from { filter: drop-shadow(0 0 10px #c9a0ff); } to { filter: drop-shadow(0 0 26px #ffe86a) brightness(1.08); } }
.work { position: relative; }
.bowl { position: absolute; left: 2%; top: -6px; width: 74px; z-index: 3; transform-origin: 70% 80%; filter: drop-shadow(0 4px 3px rgba(0, 0, 0, .3)); pointer-events: none; }
.work:has(.tray.fill) .bowl { animation: tilt 1.1s ease-in-out; }
@keyframes tilt { 20%, 70% { transform: translate(26px, -8px) rotate(48deg); } }
.ovn { background: url(assets/art/oven.webp) center / 100% 100% no-repeat; aspect-ratio: 610 / 640; border: 0; border-radius: 0; box-shadow: none; filter: drop-shadow(0 0 40px rgba(255, 140, 40, .5)); }
.ovn .win { left: 17.6%; right: 18%; top: 38.4%; bottom: 33.4%; border: 0; border-radius: 9% / 16%; background: radial-gradient(ellipse at 50% 100%, rgba(255, 150, 40, .55), rgba(40, 10, 4, .2) 75%); box-shadow: inset 0 0 26px rgba(0, 0, 0, .7); }
.ovn .bk { height: 96%; bottom: 2%; }
.cdoor .ovn { box-shadow: none; filter: drop-shadow(0 0 34px var(--gc)) drop-shadow(0 0 12px var(--gc)); transition: filter .2s; }
.cdoor .win { background: radial-gradient(ellipse at 50% 60%, #fff, var(--gc) 50%, rgba(40, 10, 4, .6) 100%); box-shadow: 0 0 30px 6px var(--gc), inset 0 0 20px rgba(0, 0, 0, .4); }
.gbox { width: 190px; height: 170px; }
.gbox img { position: absolute; left: 0; bottom: 0; width: 100%; filter: drop-shadow(0 8px 6px rgba(0, 0, 0, .4)); }
.gbox .b1 { opacity: 0; }
.gbox.open .b0 { opacity: 0; } .gbox.open .b1 { opacity: 1; animation: pop .3s; filter: drop-shadow(0 0 30px #ffd84a); }
.sheetHead b::before { content: ''; }
.cust { max-width: 86%; object-fit: contain; object-position: 50% 100%; }
.made { bottom: 13cqw; left: 6%; height: 36cqw; }
