/* 글꼴: 아케이드의 다른 게임(포털·빙수·합동)과 같은 조합. 제목·버튼·숫자는 주아, 문장은 Pretendard.
   교실 인터넷과 상관없이 똑같이 보이게 파일을 직접 넣었다(라이선스 원문은 assets/fonts/*-OFL.txt, 둘 다 SIL OFL 1.1).
   주아는 굵기가 하나뿐이라 모든 굵기에 같은 파일을 대 준다. 그래야 브라우저가 흐릿한 가짜 굵기를 만들지 않는다.
   Pretendard는 자주 쓰는 한글 2,350자만 담은 가벼운 파일(subset)이다 */
@font-face{font-family:'Jua';src:url('assets/fonts/Jua-Regular.ttf') format('truetype');font-weight:100 900;font-display:swap}
@font-face{font-family:'Pretendard';src:url('assets/fonts/Pretendard-Regular.subset.woff2') format('woff2');font-weight:100 599;font-display:swap}
@font-face{font-family:'Pretendard';src:url('assets/fonts/Pretendard-Bold.subset.woff2') format('woff2');font-weight:600 900;font-display:swap}
:root{
  --bg:#fff1dc;--ink:#3b2a1a;--accent:#ff8a3d;--ok:#2f9e63;--bad:#d94b43;--card:#fffdf8;--line:#ead6b4;--cheese:#ffd24a;--edge:#e0a800;
  /* 교실 태블릿 기준. 본문 16 / 보조 14 미만은 쓰지 않는다 */
  --fs-xs:14px;--fs-sm:15px;--fs-md:16px;--fs-lg:18px;--fs-xl:20px;--fs-2xl:24px;--fs-3xl:28px;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none}
html,body{margin:0;height:100%;height:100dvh;background:#2a1a10;color:var(--ink);font-family:'Pretendard','Malgun Gothic','Apple SD Gothic Neo',system-ui,sans-serif;font-size:var(--fs-md);line-height:1.45;overflow:hidden;overscroll-behavior:none;touch-action:none}
/* 제목·버튼·숫자·짧은 표시는 주아 */
h1,h2,.btn,.btn-end-hud,.upg,.hud .title,.hud .coins,.timer-txt,.src-x,.src-lock,.flo,.combo,.oven-focus-title,#ovenFocusStat,#intro li>b,.step>b{font-family:'Jua','Pretendard','Malgun Gothic',sans-serif}
button{font:inherit;color:inherit}
input{font:inherit}
button{cursor:pointer}
.screen{
  position:absolute;inset:0;display:none;flex-direction:column;
  padding:max(8px,env(safe-area-inset-top,0px)) max(14px,env(safe-area-inset-right,0px))
    max(8px,env(safe-area-inset-bottom,0px)) max(14px,env(safe-area-inset-left,0px));
}
.screen.on{display:flex}
h1{margin:0;font-size:var(--fs-3xl)}
h2{margin:0 0 6px;font-size:var(--fs-lg);font-weight:800}
.sub{margin:2px 0 10px;color:#8a6a45;font-size:var(--fs-sm)}
.card{background:var(--card);border:2px solid var(--line);border-radius:3px;padding:10px}
/* 버튼: 위쪽 밝은 선 + 아래 두꺼운 턱으로 눌리는 입체감을 준다 */
.btn{min-height:50px;min-width:50px;padding:8px 16px;border:2px solid #b9561a;border-radius:3px;background:linear-gradient(180deg,#ffa75e 0%,#ff8a3d 55%,#f5772a 100%);color:#fff;font-weight:700;font-size:var(--fs-lg);box-shadow:inset 0 2px 0 rgba(255,255,255,.4),0 4px 0 #a94c14;text-shadow:0 1px 0 rgba(140,60,10,.55)}
.btn:active{transform:translateY(3px);box-shadow:inset 0 2px 0 rgba(255,255,255,.3),0 1px 0 #a94c14}
.btn.ghost{background:linear-gradient(180deg,#fffdf7 0%,#f6e7cb 100%);color:#5a3a1e;border:2px solid #b88a55;box-shadow:inset 0 2px 0 #fff,0 3px 0 #8a5a2b;text-shadow:none}
.btn.ghost:active{box-shadow:inset 0 2px 0 #fff,0 1px 0 #8a5a2b}
.btn.off{opacity:.45;pointer-events:none}
.row{display:flex;gap:12px;align-items:center}
.cols{display:flex;gap:14px;align-items:flex-start}
.cols>.card{flex:1;min-width:0;padding:14px}
.cols-one{max-width:720px;margin:0 auto;width:100%}
.cols-result{flex-wrap:wrap}
.cols-result>.card{flex:1 1 260px}
.row-center{justify-content:center;margin:12px 0 20px}
.row-end{justify-content:flex-end;margin:8px 0 20px}
.mt{margin-top:14px}
/* intro — 무대는 항상 720×360. 어둡게 누른 주방 위에 양순이·제목·빵 진열, 아래 얇은 입력 바 */
#intro{
  padding:0;overflow:hidden;justify-content:flex-end;
  background:#2a1a10 url('assets/kitchen-bg-v3.png') center / cover no-repeat;
}
#intro::before{
  content:'';position:absolute;inset:0;z-index:1;pointer-events:none;
  background:
    radial-gradient(ellipse 46% 60% at 64% 44%,rgba(255,196,110,.22),rgba(255,196,110,0) 70%),
    radial-gradient(ellipse 30% 55% at 16% 62%,rgba(255,214,150,.18),rgba(255,214,150,0) 70%),
    linear-gradient(180deg,rgba(18,9,3,.62) 0%,rgba(18,9,3,.30) 38%,rgba(18,9,3,.38) 70%,rgba(18,9,3,.82) 100%);
  /* 어두운 막은 처음부터 깐다. 서서히 나타나게 하면 첫 순간 밝은 주방만 보여 다른 화면이 잠깐 뜬 것 같았다(사용자) */
}
@keyframes introFade{from{opacity:0}to{opacity:1}}
.intro-hero{
  position:absolute;left:10px;bottom:84px;width:220px;height:272px;z-index:2;
  pointer-events:none;display:flex;align-items:flex-end;justify-content:center;
}
.intro-hero img{
  width:100%;height:100%;object-fit:contain;object-position:center bottom;
  image-rendering:pixelated;transform-origin:50% 100%;
  filter:drop-shadow(0 6px 10px rgba(0,0,0,.35));
  animation:chefIn .9s cubic-bezier(.22,1,.36,1) .1s both,chefBreath 2.8s ease-in-out 1s infinite;
}
@keyframes chefIn{from{opacity:0;transform:translateY(24px)}to{opacity:1;transform:translateY(0)}}
@keyframes chefBreath{
  0%,100%{transform:scaleX(1.02) scaleY(0.988)}
  32%{transform:scaleX(0.978) scaleY(1.032)}
  52%{transform:scaleX(1.012) scaleY(0.99)}
  74%{transform:scaleX(0.992) scaleY(1.014)}
}
.intro-title{
  position:absolute;left:120px;width:480px;top:8px;z-index:4;text-align:center;pointer-events:none;
}
.intro-title>*{animation:titleIn .8s cubic-bezier(.22,1,.36,1) both}
.intro-title>:nth-child(1){animation-delay:.25s}
.intro-title>:nth-child(2){animation-delay:.38s}
.intro-title>:nth-child(3){animation-delay:.52s}
@keyframes titleIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}
.intro-kind{
  display:inline-block;margin:0 0 6px;padding:2px 10px;
  font-size:14px;font-weight:700;letter-spacing:.06em;color:#ffd98a;
  border:1px solid rgba(255,217,138,.55);border-radius:999px;background:rgba(30,14,5,.45);
}
#intro h1{
  margin:0;font-size:34px;line-height:1.05;color:#fff3d8;letter-spacing:.01em;
  text-shadow:
    3px 0 0 #3a1d0c,-3px 0 0 #3a1d0c,0 3px 0 #3a1d0c,0 -3px 0 #3a1d0c,
    2px 2px 0 #3a1d0c,-2px 2px 0 #3a1d0c,2px -2px 0 #3a1d0c,-2px -2px 0 #3a1d0c,
    0 7px 0 rgba(20,8,2,.55),0 12px 18px rgba(0,0,0,.35);
}
#intro .sub{
  display:inline-block;margin:0 0 6px;padding:3px 14px 4px;
  font-size:13px;font-weight:700;line-height:1.25;letter-spacing:.02em;
  color:#ffd98a;white-space:nowrap;
  background:rgba(36,18,8,.78);
  border:1.5px solid rgba(255,214,140,.82);
  border-radius:999px;
  transform-origin:center center;
  animation:pillChew .8s cubic-bezier(.22,1,.36,1) .12s both;
}
@keyframes pillChew{
  0%{opacity:0;transform:scaleX(1.2) scaleY(.7)}
  42%{opacity:1;transform:scaleX(.96) scaleY(1.1)}
  68%{transform:scaleX(1.04) scaleY(.97)}
  100%{opacity:1;transform:scaleX(1) scaleY(1)}
}
/* 오븐은 게임 화면과 같은 자리. 그림에 벽·카운터가 함께 들어 있어 배경에 그대로 겹친다 */
.intro-oven{
  position:absolute;left:73.4375%;top:21.875%;width:25%;height:53.125%;z-index:2;pointer-events:none;
}
.intro-oven img{
  position:absolute;left:-2.5%;top:-50%;width:108.75%;height:207.94%;max-width:none;pointer-events:none;
  animation:ovenIn 1s cubic-bezier(.22,1,.36,1) .2s both;
}
.intro-oven::after{
  content:'';position:absolute;left:2%;top:38%;width:34%;height:28%;pointer-events:none;
  background:radial-gradient(circle,rgba(255,150,40,.55),rgba(255,90,20,0) 68%);
  mix-blend-mode:screen;animation:ember 2.6s ease-in-out 1.2s infinite;
}
@keyframes ovenIn{from{opacity:0}to{opacity:1}}
@keyframes ember{0%,100%{opacity:.45}50%{opacity:1}}
.intro-show{
  position:absolute;left:194px;top:82px;width:332px;height:188px;z-index:3;pointer-events:none;
  animation:introFade .4s ease-out .15s both;
}
.intro-show canvas{display:block;width:100%;height:100%}
.intro{
  max-width:780px;margin:auto;text-align:center;display:flex;flex-direction:column;
  gap:12px;align-items:center;width:100%;max-height:100%;overflow:auto;
  -webkit-overflow-scrolling:touch;padding:4px 0 12px;
}
#intro .intro{
  position:relative;z-index:3;flex:none;min-height:0;max-height:none;width:auto;max-width:none;
  margin:0;overflow:hidden;gap:0;padding:8px 16px 6px;
  background:linear-gradient(180deg,rgba(28,13,5,.78),rgba(18,8,3,.92));
  border-top:1px solid rgba(255,217,138,.35);
  animation:barIn .7s cubic-bezier(.22,1,.36,1) .45s both;
}
@keyframes barIn{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:translateY(0)}}
.intro-go{width:100%;display:flex;flex-direction:column;align-items:center;gap:2px}
.intro-go-row{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap}
#intro .profile-lead{margin:0 0 2px;font-size:13px;font-weight:600;color:rgba(255,236,205,.78)}
#intro .profile{margin:0}
#intro .pf label{color:#ffe2ae}
#intro .pf input{width:150px;min-height:40px;padding:6px 12px;border:1px solid rgba(255,217,138,.6);border-radius:6px;background:#fffaf0}
/* 로딩 막대(2026-09-29, prism-tycoon과 같은 방식): 그림을 다 받을 때까지 시작 버튼을 잠근다 */
#intro .load-wrap{width:min(320px,80%);margin:6px auto 0}
#intro .load-track{height:6px;border-radius:5px;background:rgba(0,0,0,.35);border:1px solid rgba(255,210,74,.45);overflow:hidden}
#intro .load-fill{display:block;height:100%;width:100%;transform:scaleX(0);transform-origin:left;background:linear-gradient(90deg,#f5a623,#ffd24a);transition:transform .2s}
#intro .load-label{display:none;margin:4px 0 0;text-align:center;font-size:12px;font-weight:700;color:#ffd24a}
#intro .load-wrap.ready .load-fill{background:linear-gradient(90deg,#34d399,#86efac)}
#intro .load-wrap.ready .load-label{color:#86efac}
/* 입력 바가 두꺼워지면 가운데 빵 진열을 덮는다(모바일 가로). 다 받으면 막대를 접는다 */
#intro .load-wrap.ready{display:none}
#intro #startBtn:disabled,#intro #openingBtn:disabled{filter:grayscale(.6);opacity:.7}
#intro .startBtn,#intro #startBtn,#intro #openingBtn{min-height:42px;padding:6px 20px;white-space:nowrap;border-radius:6px}
/* 「건너뛰기」는 「오프닝 보기」 옆의 작은 버튼(2026-09-29) */
#intro #startBtn{background:#fff8ec;color:#6e4220;box-shadow:0 3px 0 #c9a878;padding:6px 14px}
#intro #startBtn[hidden]{display:none}
#intro .perr{min-height:0;line-height:1.2;color:#ff9c8a}
#intro .priv{position:absolute;right:12px;top:7px;margin:0;font-size:12px;line-height:1.4}   /* 아래 막대 오른쪽 위(학교 모드에서 아래쪽은 건너뛰기 버튼에 가려졌다, 2026-10-01) */
#intro .priv a{color:rgba(255,230,190,.6)}
/* play — 배경 한 장 위 카운터 장면 */
.play-scene{
  padding:0;overflow:hidden;
  background:#c9a57a;
}
.play-scene .scene-bg{
  position:absolute;inset:0;z-index:0;pointer-events:none;
  background:#e8d4b0;
}
.play-scene .hud,
.play-scene .scene-body{position:relative;z-index:1}
.play-scene .hud{
  position:absolute;left:0;right:0;top:0;z-index:5;
  height:48px;margin:0;padding:8px 108px 0 12px;
  background:linear-gradient(180deg,rgba(60,40,24,.22),transparent);
  gap:10px;
}
.play-scene .hud .title,
.play-scene .hud .coins{
  background:rgba(255,248,236,.94);border:2px solid #8a5a2b;border-radius:3px;
  padding:6px 14px;box-shadow:0 2px 0 rgba(59,42,26,.16);
  font-size:var(--fs-xl);font-weight:800;
}
.play-scene .timer{
  background:rgba(255,248,236,.94);border:2px solid #8a5a2b;border-radius:3px;height:28px;
}
.play-scene .timer-txt{font-size:var(--fs-md)}
.play-scene .btn-end-hud{min-height:40px;padding:6px 12px;font-size:var(--fs-md);border-radius:3px}
.play-scene .scene-body{
  flex:1;min-height:0;display:flex;flex-direction:column;
  padding:52px 10px 10px;
}
.play-scene .custrow{
  flex:1 1 38%;min-height:96px;max-height:46%;
  margin:0;padding:0 4px 0;border:0;align-items:flex-end;
}
.play-scene .counter{
  flex:0 0 auto;min-height:0;
  display:flex;flex-direction:column;justify-content:flex-end;
}
.play-scene .counter-rail{
  display:flex;align-items:stretch;gap:8px;
  min-height:clamp(180px,36vh,300px);
  padding:10px 8px 8px;
  background:linear-gradient(180deg,rgba(92,58,32,.12),rgba(92,58,32,0));
  border-radius:3px 3px 0 0;
}
.play-scene .station{min-width:0;display:flex;flex-direction:column;gap:6px}
.play-scene .trash-station{flex:0 0 76px;align-items:center;justify-content:flex-end}
.play-scene .trash{
  width:70px;height:84px;margin:0;padding:0;border:0;border-radius:3px;
  background-color:transparent;
  background-image:url('assets/trash.png?v=3');
  background-position:center;background-size:contain;background-repeat:no-repeat;
  box-shadow:none;
}
.play-scene .trash small{display:none}
.play-scene .trash.drop{outline:3px solid #4f86f7;outline-offset:2px;background-color:transparent}
.play-scene .shelf-station{flex:1.2 1 0;min-width:140px}
.play-scene .bench-station{
  flex:1.1 1 0;min-width:150px;padding:8px;
  background:transparent;border:0;border-radius:0;box-shadow:none;
}
.play-scene .oven-station{
  flex:0 0 clamp(150px,21vw,230px);padding:0;background:transparent;border:0;border-radius:0;
  box-shadow:none;min-height:170px;
}
.play-scene .oven-station #ovenCv{flex:1 1 auto;min-height:130px;height:100%;width:100%;object-fit:contain}
.play-scene .station-label{
  font-size:clamp(18px,2.4vw,22px);font-weight:800;color:#3b2a1a;min-height:24px;
  text-align:center;text-shadow:0 1px 0 rgba(255,248,236,.8);
}
.play-scene .bench-actions{gap:8px;margin-top:8px}
.play-scene .bench-actions .btn{
  min-height:48px;font-size:var(--fs-lg);padding:6px 10px;border-radius:3px;
}
.play-scene .shelfgrid{gap:8px;height:100%;align-content:end}
/* 선반: 그림·숫자 위주 */
.play-scene .mold{
  background:linear-gradient(180deg,#c9a06a,#a8733e);
  border:3px solid #5a3418;border-radius:3px;padding:8px 6px 8px;
  box-shadow:0 4px 0 #4a2a14, inset 0 1px 0 rgba(255,248,236,.28);
}
.play-scene .mold.on{
  border-color:#ffd24a;background:linear-gradient(180deg,#d8b888,#c09050);
  box-shadow:0 0 0 3px rgba(255,210,74,.5),0 4px 0 #4a2a14;
}
.play-scene .mold-head{gap:6px;justify-content:space-between}
.play-scene .mold-head canvas{width:52px;filter:drop-shadow(0 2px 0 rgba(59,42,26,.22))}
.play-scene .mold-meta{display:none}
.play-scene .mold .upb{
  background:rgba(255,248,236,.95);color:#3b2a1a;box-shadow:0 3px 0 #6e4220;
  min-width:52px;min-height:44px;padding:6px 8px;border-radius:3px;
  font-size:15px;font-weight:800;line-height:1.1;
}
.play-scene .mold .upb.can{background:#ffc247;color:#4a2a14;box-shadow:0 3px 0 #b8742a}
.play-scene .mold .lock{
  background:rgba(45,30,18,.82)!important;border-radius:3px;color:#fff8ec;
  font-size:34px;gap:4px;
}
.play-scene .mold .lock .lk{
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;
  font-size:34px;line-height:1;
}
.play-scene .mold .lock .lk-cost{
  font-size:18px;font-weight:800;color:#ffd24a;letter-spacing:0.02em;
}
.play-scene .mold.canbuy .lock{background:rgba(59,36,18,.92)!important}
.play-scene .oven .upg{
  min-width:56px;min-height:44px;padding:6px 10px;border-radius:3px;
  font-size:15px;font-weight:800;background:rgba(255,248,236,.95);color:#3b2a1a;
  box-shadow:0 3px 0 #6e4220;
}
.play-scene .oven .upg.can{background:#ffc247;color:#4a2a14;box-shadow:0 3px 0 #b8742a}
.play-scene .oven .upg small{display:none}
.play-scene .chips{gap:4px}
.play-scene .chip{
  min-height:56px;border:0;border-radius:0;background:transparent;box-shadow:none;
  background-image:url('assets/bag.png?v=4');background-size:contain;background-repeat:no-repeat;background-position:center bottom;
  color:#3b2a1a;font-size:18px;padding:0 0 2px;align-items:flex-end;
}
.play-scene .chip .cl{
  display:inline-block;min-width:1.6em;padding:2px 7px;margin-bottom:12px;
  background:rgba(255,248,236,.96);border:2px solid #5a3418;border-radius:3px;
  font-weight:800;font-size:17px;line-height:1.15;box-shadow:0 2px 0 rgba(59,42,26,.2);
}
.play-scene .chip:active{transform:translateY(2px)}
.play-scene .chip.locked{opacity:1;filter:none}
.play-scene .chip .ck{
  background:rgba(45,30,18,.78);border-radius:3px;color:#fff8ec;
  font-size:22px;gap:2px;flex-direction:column;
}
.play-scene .chip .ck .ck-cost{font-size:15px;font-weight:800;color:#ffd24a}
.play-scene .chip.canbuy .ck{background:rgba(59,36,18,.92)!important}
.play-scene .chip.off{opacity:.35}
.play-scene .benchwrap{
  background:#c9a06a url('assets/bench.png?v=2') center / cover no-repeat;
  border:3px solid #5a3418;border-radius:3px;
  box-shadow:0 4px 0 rgba(59,42,26,.2);
  min-height:120px;
}
.play-scene .bench-actions .btn.ghost{
  background:linear-gradient(180deg,#fffdf7 0%,#f3e2c2 100%);border:2px solid #5a3418;color:#3b2a1a;
  box-shadow:inset 0 2px 0 #fff,0 3px 0 #6e4220;
}
.play-scene .bench-actions #toOven{box-shadow:inset 0 2px 0 rgba(255,255,255,.4),0 4px 0 #a94c14;font-weight:800}
.hud{display:flex;align-items:center;gap:12px;height:42px;flex:none;padding-right:108px;box-sizing:border-box}
.hud .title{font-weight:800;font-size:var(--fs-lg);white-space:nowrap}
.timer{flex:1;height:22px;background:#f0dfc0;border-radius:0;overflow:hidden;position:relative}
.timer i{display:block;height:100%;width:100%;background:linear-gradient(90deg,#ffb347,#ff8a3d);transform-origin:left}
.timer-txt{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:var(--fs-sm);color:#3b2a1a;text-shadow:0 1px 0 rgba(255,255,255,.7);pointer-events:none}
.timer.warn .timer-txt{color:#7a1f1a}
.coins{font-weight:800;font-size:var(--fs-xl);min-width:0;text-align:right;flex:none}
.btn-end-hud{
  flex:none;display:block;visibility:hidden;pointer-events:none;min-height:36px;min-width:0;padding:4px 10px;margin:0;
  border:0;border-radius:3px;background:#a3453a;color:#fff;font-weight:800;font-size:var(--fs-sm);
  box-shadow:0 2px 0 #7a2f28;cursor:pointer;
}
.btn-end-hud.on{visibility:visible;pointer-events:auto}
.btn-end-hud:active{transform:translateY(2px);box-shadow:0 0 0 #7a2f28}
.custrow{display:flex;gap:8px;flex:none;margin:0 0 2px;padding-bottom:4px;border-bottom:5px solid #d9553f;align-items:flex-end}
.slot{
  flex:1;min-width:0;background:transparent;border:0;border-radius:0;
  position:relative;display:flex;flex-direction:column;align-items:center;gap:2px;
  padding:0;cursor:pointer;overflow:visible;transition:transform .12s;
}
.slot .bubble{
  position:relative;width:100%;background:transparent;border:0;border-radius:0;
  overflow:visible;min-height:52px;box-shadow:none;
}
.slot .bubble-body{
  position:relative;width:100%;background:#fff;border:2.5px solid #e0c9a0;border-radius:3px;
  overflow:hidden;box-shadow:0 2px 0 rgba(59,42,26,.08);min-height:52px;
}
.slot .bubble-fill{
  position:absolute;left:0;right:0;bottom:0;height:0%;
  background:linear-gradient(180deg,rgba(255,120,100,.15),rgba(217,75,67,.72));
  pointer-events:none;z-index:0;
}
.slot .bubble canvas{position:relative;z-index:1;display:block;width:100%;height:52px}
/* 말풍선 꼬리 */
.slot .bubble::after{
  content:'';position:absolute;left:50%;bottom:-7px;transform:translateX(-50%);
  width:0;height:0;border-left:7px solid transparent;border-right:7px solid transparent;
  border-top:8px solid #fff;z-index:2;pointer-events:none;
}
.slot .bubble::before{
  content:'';position:absolute;left:50%;bottom:-10px;transform:translateX(-50%);
  width:0;height:0;border-left:8px solid transparent;border-right:8px solid transparent;
  border-top:9px solid #e0c9a0;z-index:1;pointer-events:none;
}
/* 손님은 이 게임의 주인공이다. 「거인이 큰 빵을 주문한다」가 한눈에 읽히려면
   손님이 실제로 커야 한다. 넓은 화면에는 세로 여유가 남아돌았다(1280x800에서
   손님 줄 109px / 주방 551px). 그 여유를 손님에게 돌린다.
   좁은 화면(.compact)은 세로가 없으므로 작은 값을 그대로 쓴다. */
.slot .cat{
  font-size:clamp(30px,11vh,104px);line-height:1;margin-top:6px;position:relative;z-index:1;
  display:flex;align-items:flex-end;justify-content:center;min-height:clamp(52px,14vh,120px);
}
.slot .cat img.guest-spr{
  display:block;width:auto;height:clamp(52px,14vh,120px);max-width:100%;
  object-fit:contain;pointer-events:auto;filter:drop-shadow(0 3px 0 rgba(59,42,26,.18));
}
.slot.drop .cat img.guest-spr{filter:drop-shadow(2px 0 0 #4f86f7) drop-shadow(-2px 0 0 #4f86f7) drop-shadow(0 2px 0 #4f86f7) drop-shadow(0 -2px 0 #4f86f7) drop-shadow(0 3px 0 rgba(59,42,26,.18))}
.slot .cat .md{position:absolute;top:0;right:8%;font-size:clamp(14px,3vh,22px);line-height:1}
.slot.empty{opacity:.4}
.slot.empty .bubble{visibility:hidden}
.slot.happy .bubble-body{border-color:#9bd6b3;background:#f0faf4}
.slot.angry .bubble-body{border-color:#e2aaa5;background:#fdf4f3}
.slot.sad .bubble-body{border-color:#efb98a;background:#fff6ee}
.slot.drop .bubble-body{box-shadow:0 0 0 4px #4f86f7;border-color:#4f86f7}
.slot.enter{animation:enter .45s ease-out}
.slot.giant .bubble-body{border-color:#d94b43;box-shadow:0 0 0 2px #f6c9c5}
.slot.giant .cat{font-size:clamp(34px,13vh,124px)}
.slot.giant .cat img.guest-spr{height:clamp(64px,17vh,148px)}
.slot.low .bubble-body{border-color:#d94b43}
.slot.low .bubble-fill{background:linear-gradient(180deg,rgba(255,100,80,.25),rgba(200,40,35,.85))}
.slot.giant .bubble::before{border-top-color:#d94b43}
.slot.happy .bubble::before{border-top-color:#9bd6b3}
.slot.angry .bubble::before{border-top-color:#e2aaa5}
@keyframes enter{from{transform:translateY(-20px);opacity:0}to{transform:none;opacity:1}}
.kitchen{display:flex;flex-direction:column;gap:8px;flex:1;min-height:0;position:relative}
.kitchen>.card,.cook-row>.card{display:flex;flex-direction:column;min-height:0}
.shelf-strip{flex:0 0 auto;padding:6px 8px}
.shelf-strip h2{margin-bottom:4px}
.cook-row{display:flex;gap:10px;flex:1;min-height:0}
.oven{flex:0 0 clamp(260px,30vw,340px);width:auto;display:flex;flex-direction:column;gap:4px}
.oven-head{display:flex;align-items:center;gap:6px;flex:none;min-width:0}
.oven-head h2{flex:1;min-width:0;margin:0;white-space:nowrap}
.oven .upg{
  flex:none;width:auto;min-width:56px;min-height:0;margin:0;padding:4px 7px;
  border:0;border-radius:3px;background:#e8dfcb;color:#8a7a5c;
  font-weight:800;font-size:11px;line-height:1.15;box-shadow:0 2px 0 #cfc3a8;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;
  cursor:pointer;
}
.oven .upg small{font-size:10px;font-weight:800}
.oven .upg.can{background:#ffc247;color:#4a2a14;box-shadow:0 2px 0 #b8742a;animation:glow 1.1s infinite}
#ovenCv{width:100%;height:auto;display:block;border-radius:3px;touch-action:none;flex:1;min-height:0;object-fit:contain}
.oven.drop{box-shadow:0 0 0 5px #4f86f7}
.bench{flex:1 1 auto;min-width:0;display:flex;flex-direction:column}
.shelfgrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;overflow:hidden}
.mold{position:relative;background:#fff;border:2px solid var(--line);border-radius:3px;padding:4px 6px 5px;display:flex;flex-direction:column;align-items:stretch;gap:3px;min-width:0;box-shadow:0 3px 0 var(--line)}
.mold-head{display:flex;align-items:center;gap:6px;width:100%;cursor:pointer;min-height:0}
.mold-head canvas{width:36px;height:auto;flex:none;display:block}
.mold-meta{flex:1;min-width:0;display:flex;flex-direction:column;align-items:flex-start;line-height:1.15}
.mold-meta b{font-size:var(--fs-sm);color:#4a3320}
.mold-meta span{font-size:var(--fs-xs);font-weight:700;color:#6b5236;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.mold .upb{
  flex:none;margin:0;border:0;border-radius:3px;background:#e8dfcb;color:#8a7a5c;
  font-weight:800;font-size:11px;line-height:1.15;padding:4px 6px;width:auto;min-width:52px;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;
  box-shadow:0 2px 0 #cfc3a8;cursor:pointer;
}
.mold .upb small{font-size:10px;font-weight:800;opacity:.95}
.mold .upb.can{background:#ffc247;color:#4a2a14;box-shadow:0 2px 0 #b8742a;animation:glow 1.1s infinite}
.mold.on{border-color:#4f86f7;background:#eef4ff}
.mold.orig{border-style:dashed}
.mold .lock{display:none;position:absolute;inset:0;border-radius:3px;background:rgba(228,230,233,.93)!important;align-items:center;justify-content:center;flex-direction:column;font-size:26px;text-align:center;line-height:1.2;cursor:pointer;z-index:2}
.mold.locked{cursor:not-allowed}
.mold.locked .lock{display:flex}
.mold .lock small{font-size:var(--fs-xs);font-weight:700;color:#5b5b5b}
.mold.canbuy .lock{background:rgba(255,226,150,.96)!important;animation:glow 1.1s infinite}
.chips{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;width:100%;margin:0}
.chip{position:relative;display:flex;align-items:center;justify-content:center;min-height:44px;padding:2px 0;border:2px solid var(--line);border-radius:3px;background:#fff;box-shadow:0 2px 0 var(--line);font-weight:800;font-size:var(--fs-sm);line-height:1.1;cursor:pointer;overflow:hidden;touch-action:manipulation}
.chip:active{transform:translateY(2px);box-shadow:0 0 0 var(--line)}
.chip.off{opacity:.45;pointer-events:none}
.chip.locked{background:#eee7d8;opacity:.9}
.chip .ck{display:none;position:absolute;inset:0;background:rgba(232,226,212,.96);align-items:center;justify-content:center;flex-direction:column;font-size:var(--fs-sm);line-height:1.15;font-weight:800}
.chip.locked .ck{display:flex}
.chip .ck small{font-size:11px;font-weight:700}
.chip.canbuy .ck{background:rgba(255,226,150,.96)!important;animation:glow 1.1s infinite}
.benchwrap{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;background:#fff8ec;border-radius:3px;border:2px dashed var(--line)}
.benchwrap.sel,#ovenCv.sel{outline:4px solid #4f86f7}
.benchwrap.drop{outline:4px solid #4f86f7;background:#eef4ff}
canvas#benchCv{width:100%;max-height:100%;height:auto;touch-action:none}
.benchinfo{font-size:var(--fs-sm);color:#6b5236;margin:6px 0;min-height:22px;text-align:center}
#ovenCv{width:100%;height:auto;display:block;border-radius:3px;touch-action:none;flex:1;min-height:0;object-fit:contain}
.oven.drop{box-shadow:0 0 0 5px #4f86f7}
.bench-actions{display:flex;gap:6px;margin-top:6px;flex:none}
.bench-actions .btn{flex:1;min-width:0;min-height:44px;font-size:var(--fs-sm);padding:6px 8px}
.bench-actions #toOven{flex:1.4}
@keyframes pulse{0%,100%{transform:scale(1)}50%{transform:scale(1.04)}}
.title2{font-size:var(--fs-sm);color:#8a6a45;font-weight:400}
.trash{margin-top:auto;border:3px dashed #c9b28a;border-radius:3px;text-align:center;padding:6px 4px;font-size:28px;line-height:1.1;background:#f7efe0;transition:background .12s,border-color .12s}
.trash small{display:block;font-size:var(--fs-xs);color:#8a6a45;margin-top:2px}
.trash.drop{background:#ffe1dc;border-color:var(--bad)}
.toast{position:fixed;left:50%;top:252px;transform:translateX(-50%);background:#3b2a1a;color:#fff;padding:10px 18px;border-radius:3px;font-size:var(--fs-md);opacity:0;transition:opacity .2s;pointer-events:none;z-index:60;max-width:92%;text-align:center}
.toast.on{opacity:1}
#ghost{position:fixed;left:0;top:0;pointer-events:none;z-index:70;display:none;opacity:.92;filter:drop-shadow(0 5px 0 rgba(0,0,0,.25))}
/* guide — viewport 고정 (stage 밖) */
.guide{
  position:fixed;inset:0;z-index:80;
  display:none;align-items:center;justify-content:center;
  padding:max(12px,env(safe-area-inset-top,0px)) max(16px,env(safe-area-inset-right,0px))
    max(12px,env(safe-area-inset-bottom,0px)) max(16px,env(safe-area-inset-left,0px));
  background:rgba(59,42,26,.55);box-sizing:border-box;
}
.guide[hidden]{display:none!important}
.guide.is-on{display:flex}
/* 오븐 집중 모드: 화면은 가리지 않는다. 탭만 받고, 박자 안내만 왼쪽에 둔다 */
.oven-focus{
  position:fixed;inset:0;z-index:85;
  display:none;align-items:center;justify-content:flex-start;
  background:transparent;
  padding:0 0 0 max(16px,4vw);
  box-sizing:border-box;
  cursor:pointer;touch-action:manipulation;
  user-select:none;-webkit-user-select:none;
}
html.oven-focus-on #play .hud,
html.oven-focus-on #play .custrow,
html.oven-focus-on #play .sources,
html.oven-focus-on #play .trash-station,
html.oven-focus-on #play .bench-station{filter:brightness(.62)}
.oven-focus[hidden]{display:none!important}
.oven-focus.is-on{display:flex}
html.oven-focus-on #stage{pointer-events:none}
.oven-focus-panel{   /* 굽기 판(2026-09-28 도트 분위기로): 진한 나무 판 + 굵은 도트 테두리. 글자 자리는 고정(들썩이지 않게) */
  position:fixed;left:0;top:0;box-sizing:border-box;width:232px;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;
  text-align:center;color:#ffe7b0;
  background:#3a2414;border:3px solid #1f120a;border-radius:0;padding:10px 12px 12px;
  box-shadow:inset 0 0 0 3px #8a5a2b,inset 0 0 0 6px #4a2e18,0 5px 0 #1f120a;
  user-select:none;-webkit-user-select:none;touch-action:manipulation;
  cursor:pointer;pointer-events:none;
}
.oven-focus-title{font-size:17px;font-weight:400;margin:0;white-space:nowrap;color:#ffe7b0;
  text-shadow:2px 0 0 #1f120a,-2px 0 0 #1f120a,0 2px 0 #1f120a,0 -2px 0 #1f120a,0 3px 0 #1f120a}
.oven-focus-ring-wrap{position:relative;width:128px;height:128px;flex:none;margin-top:24px}   /* 위 24px = 판정 글자 자리 */
#ovenFocusCv{width:128px;height:128px;display:block;pointer-events:none;image-rendering:pixelated}
.oven-focus-tok{position:absolute;left:0;right:0;top:50%;transform:translateY(-52%);font-family:'Jua','Pretendard',sans-serif;font-size:22px;line-height:1;color:#fff8e6;
  text-shadow:2px 0 0 #6a2a0c,-2px 0 0 #6a2a0c,0 2px 0 #6a2a0c,0 -2px 0 #6a2a0c;pointer-events:none}
/* 판정 글자: 원 위에 따로 톡 튀어 올랐다 사라진다(다른 글자를 밀지 않게 absolute) */
.oven-focus-grade{position:absolute;left:50%;top:-30px;transform:translate(-50%,0);white-space:nowrap;font-family:'Jua','Pretendard',sans-serif;font-size:25px;line-height:1;
  opacity:0;pointer-events:none;text-shadow:2px 0 0 #1f120a,-2px 0 0 #1f120a,0 2px 0 #1f120a,0 -2px 0 #1f120a,0 3px 0 #1f120a}
.oven-focus-grade.show{animation:gradePop .7s steps(7,end) forwards}
@keyframes gradePop{0%{opacity:1;transform:translate(-50%,6px) scale(.6)}20%{opacity:1;transform:translate(-50%,-6px) scale(1.15)}35%{transform:translate(-50%,-4px) scale(1)}80%{opacity:1;transform:translate(-50%,-8px)}100%{opacity:0;transform:translate(-50%,-12px)}}
.oven-focus-grade.g-perfect{color:#7cf0a4}.oven-focus-grade.g-good{color:#ffd24a}.oven-focus-grade.g-close{color:#ffab66}.oven-focus-grade.g-miss{color:#ff8a80}
/* 진행: 도트 칸(판정 색으로 채움) */
.oven-focus-dots{display:flex;gap:6px;height:16px}
.oven-focus-dots i{width:16px;height:16px;box-sizing:border-box;background:#22140b;border:2px solid #8a5a2b;display:block}
.oven-focus-dots i.on{border-color:#1f120a;box-shadow:inset 0 -3px 0 rgba(0,0,0,.25),inset 0 2px 0 rgba(255,255,255,.35)}
.oven-focus-dots i.pop{animation:dotPop .3s steps(3,end)}
@keyframes dotPop{0%{transform:scale(1.5)}100%{transform:scale(1)}}
.oven-focus-dots i.g-perfect{background:#5fd08a}.oven-focus-dots i.g-good{background:#ffc93a}.oven-focus-dots i.g-close{background:#ff9a4a}.oven-focus-dots i.g-miss{background:#e0564a}
.oven-focus-stat{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}   /* 읽기용(화면에는 도트 칸) */
/* 안내창: 양피지 색 판 + 나무색 테두리 + 안쪽 밝은 선 */
.gcard{background:linear-gradient(180deg,#fffaf0 0%,#fbecd0 100%);border:3px solid #8a5a2b;border-radius:3px;padding:22px 28px;max-width:860px;width:min(94vw,640px);max-height:min(90vh,90dvh);overflow:auto;margin:auto;box-shadow:inset 0 0 0 3px #f1d9ae,0 8px 0 #5a3418,0 18px 36px rgba(0,0,0,.45)}
.gcard h2{color:#6e4220}
.gcard.h-center{text-align:center}
.gcard h2{font-size:var(--fs-2xl);margin-bottom:10px}
.gcard .ri-ico{font-size:clamp(40px,8vw,56px);line-height:1}
.gcard .ri-desc{font-size:var(--fs-lg);line-height:1.65;margin:8px 0 16px}
/* 튜토리얼: 누를 곳은 금빛으로 숨 쉰다 */
.tut-glow{outline:3px solid #ffd24a!important;outline-offset:2px;animation:tutGlow 1s ease-in-out infinite!important;border-radius:4px}
@keyframes tutGlow{0%,100%{box-shadow:0 0 0 0 rgba(255,210,74,.0)}50%{box-shadow:0 0 14px 6px rgba(255,210,74,.9)}}
/* 냥순이는 손님 자리에서 아래에서 위로 쏙 올라온다(보통 손님은 옆에서 걸어 들어온다) */
html.scene-v2 #play .slot.k-tut.enter .cat{animation:tutRise .7s cubic-bezier(.25,1.35,.5,1) both}
/* 냥순이는 다른 손님보다 작은 고양이(사용자): 보통 손님 높이 107.5%의 약 80% */
html.scene-v2 #play .slot.k-tut .cat{height:86%;bottom:-12%}
/* 냥순이 움직임: 숨 쉬듯 들썩이며 고개를 살짝 갸웃한다. 눈 깜빡임은 표정 프레임(intro-nyangsooni-blink) */
html.scene-v2 #play .slot.k-tut .cat img.guest-spr{animation:tutIdle 3.4s ease-in-out infinite}
@keyframes tutIdle{0%,100%{transform:translateY(0) rotate(0)}25%{transform:translateY(-1.5%) rotate(-1.6deg)}50%{transform:translateY(0) rotate(0)}75%{transform:translateY(-1.5%) rotate(1.6deg)}}
/* 냥순이 귀 쫑긋: 오른쪽 귀가 두 번 까딱 */
html.scene-v2 #play .slot.ear-on .cat .fr.fr-ear{opacity:1}
/* 귀 프레임은 원래 귀 자리가 비어 있어, 까딱이는 동안 아래 원래 그림을 숨긴다(안 그러면 원래 귀가 비쳐 보인다) */
html.scene-v2 #play .slot.ear-on:not(.happy):not(.angry) .cat>img.guest-spr{opacity:0}   /* 켜는 때는 game.js의 earOn(불규칙·소리에 반응) */
html.scene-v2 #play .slot.happy .cat .fr.fr-ear,html.scene-v2 #play .slot.angry .cat .fr.fr-ear{opacity:0}   /* 기쁜 얼굴 위에 기본 얼굴 귀 프레임이 겹치지 않게 */
/* 냥순이와 만드는 동안은 시간 막대를 숨긴다(시계가 멈춰 있다) */
html.tut-on #play .hud .timer{visibility:hidden}
@keyframes tutRise{from{transform:translateY(100%)}to{transform:none}}
.steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:8px 0 14px}
.step{background:#fff8ec;border:2px solid var(--line);border-radius:3px;padding:10px;font-size:var(--fs-sm);line-height:1.5;text-align:center}
.step .ic{font-size:32px}
.gcard .foot{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.gcard .foot span{font-size:var(--fs-sm);color:#6b5236;flex:1;min-width:180px}
.gcard .foot .btn{flex:none}
/* result — 논리 720×360 안에 스크롤 없이. 장부 글씨는 본문보다 크게 */
.res{max-width:1000px;margin:0 auto;width:100%;overflow:hidden;flex:1;min-height:0;display:flex;flex-direction:column}
.res h2{font-size:var(--fs-lg)}
/* 라운드 끝·결과: 어둡게 깐 빵집 그림 위에 양피지 카드 */
#roundEnd,#result{overflow:hidden;padding:6px 18px 8px;z-index:40;background:linear-gradient(rgba(30,18,10,.74),rgba(30,18,10,.8)),url('assets/kitchen-bg-v3.png') center / cover no-repeat #2a1a10}
#roundEnd h1,#result h1{color:#ffe2a8;text-shadow:0 3px 0 #3a2210}
#roundEnd .sub,#result .sub{color:#f0dcb8}
#roundEnd .card,#result .card{background:linear-gradient(180deg,#fffaf0,#fbecd0);border:3px solid #8a5a2b;box-shadow:inset 0 0 0 2px #f1d9ae,0 5px 0 #5a3418}
#roundEnd h1,#result h1{font-size:26px;line-height:1.15}
#roundEnd .sub,#result .sub{font-size:16px;margin:1px 0 6px}
#roundEnd .cols,#result .cols{flex:1;min-height:0}
#roundEnd .card,#result .card{padding:8px 14px}
#roundEnd h2,#result h2{font-size:18px;margin:0 0 2px}
#roundEnd td,#roundEnd th,#result td,#result th{font-size:18px;padding:5px 8px;line-height:1.25}
#roundEnd .total td,#result .total td{font-size:20px}
#roundEnd .row-center,#result .row-end{margin:8px 0 0;flex:none}
#roundEnd .btn,#result .btn{min-height:42px;font-size:18px}
#result .cols{min-height:0;overflow:hidden;align-items:stretch}
#result .card{padding:6px 10px;max-height:100%;overflow:auto}
#result h2{font-size:17px}
#result td,#result th{font-size:17px;padding:3px 6px}
#result .insight{font-size:16px;padding:5px 8px;margin:4px 0 0;line-height:1.3}
#result .row-end{margin:6px 0 0}
#result .title2{font-size:16px;margin:0 0 2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
table{border-collapse:collapse;width:100%}
td,th{padding:7px 10px;border-bottom:1px solid var(--line);text-align:left;font-size:var(--fs-md)}
td.r,th.r{text-align:right}
.total td{font-weight:800;font-size:var(--fs-xl);border-top:2px solid var(--ink)}
.insight{background:#fff7d6;border:2px solid #f0d67a;border-radius:3px;padding:10px 14px;margin:10px 0;line-height:1.55;font-size:var(--fs-md)}
.insight[hidden]{display:none!important}
#rot{
  position:fixed;inset:0;background:var(--bg);z-index:99;display:none;align-items:center;justify-content:center;
  font-size:var(--fs-2xl);font-weight:700;text-align:center;padding:24px;
  padding:max(24px,env(safe-area-inset-top)) max(24px,env(safe-area-inset-right))
    max(24px,env(safe-area-inset-bottom)) max(24px,env(safe-area-inset-left));
}
/* 세로 화면 안내(2026-09-29): 다른 게임(three-chances·prism-tycoon)과 같다. 폭 1024 이하 세로면 막고,
   안드로이드는 「가로 모드로 전환」 버튼(전체 화면 + 방향 잠금, 안 되면 화면을 돌려 보여 줌), iOS는 돌리라는 그림만 */
@media (orientation:portrait) and (max-width:1024px){html:not(.force-landscape) #rot{display:flex}}
#rot{background:rgba(42,26,16,.96);color:#fff8ec}
/* 아이폰(돌리라는 그림)·안드로이드(버튼) 중 무엇을 보일지는 game.js가 정한다. 정하기 전에는 내용을 숨겨, 안드로이드에서 아이폰용 그림이 잠깐 뜨지 않게(사용자) */
#rot:not(.ready) .rot-card{visibility:hidden}
.rot-card{text-align:center;max-width:300px}
.rot-title{margin:0 0 8px;font-size:1.3rem;font-weight:800}
.rot-desc{margin:0;font-size:.95rem;font-weight:500;line-height:1.45;opacity:.85}
#rotBtn{margin-top:16px;touch-action:manipulation}
#rotBtn.hidden,.rot-phone.hidden{display:none}
.rot-phone{width:46px;height:76px;margin:0 auto 18px;border:3px solid #ffd24a;border-radius:10px;position:relative;animation:rotPhoneHint 1.7s ease-in-out infinite}
.rot-phone::after{content:"";position:absolute;left:50%;bottom:8px;width:12px;height:3px;border-radius:2px;background:#ffd24a;transform:translateX(-50%)}
@keyframes rotPhoneHint{0%,18%{transform:rotate(0)}42%,62%{transform:rotate(90deg)}86%,100%{transform:rotate(0)}}
/* ===== 세로로 든 기기: 막지 않고 화면을 돌려서 보여 준다 =====
   화면 회전 잠금을 켜 둔 학생은 기기를 돌려도 가로가 되지 않아, 「돌려 주세요」
   안내 앞에서 그대로 막혀 버린다. prism-tycoon과 같은 방식으로 게임 상자를 돌린다.
   body를 돌리면 그 안의 position:fixed 요소(안내창·오븐 집중 모드·토스트)도
   같은 좌표계에 들어가 함께 돌아간다. */
/* 돌리는 규칙은 화면이 실제로 세로일 때만 쓴다. 기기를 가로로 눕히는 순간 CSS가 먼저 풀려서,
   스크립트가 class를 떼기 전 한 프레임 동안 가로 화면에서 한 번 더 돌아가 흔들리는 일이 없다 */
@media (orientation:portrait){
html.force-landscape,html.force-landscape body{overflow:hidden;touch-action:none}
html.force-landscape body{
  position:fixed;top:0;left:100vw;left:100dvw;
  width:100vh;width:100dvh;height:100vw;height:100dvw;
  transform:rotate(90deg);transform-origin:top left;
}
/* 반대 방향으로 든 경우. 기기 기울기로 고른다 */
html.force-landscape.force-landscape-ccw body{top:100vh;top:100dvh;left:0;transform:rotate(-90deg)}
html.force-landscape input,html.force-landscape textarea,
html.force-landscape button,html.force-landscape a{touch-action:manipulation}
}
/* 돌려서 보여 주는 중이면 「돌려 주세요」 안내는 필요 없다 */
html.force-landscape #rot{display:none!important}
#stage{position:absolute;left:0;top:0;transform-origin:0 0;overflow:hidden;border-radius:0;background:var(--bg)}
#chrome{
  position:absolute;z-index:60;display:flex;gap:6px;align-items:flex-start;
  right:max(8px,env(safe-area-inset-right,0px));top:max(6px,env(safe-area-inset-top,0px));
}
#chrome button{min-height:44px;min-width:44px;padding:4px 12px;font-size:var(--fs-md);border-radius:3px;background:rgba(59,42,26,.72);color:#fff;border:0;font-weight:700;box-shadow:none}
#fsBtn{display:none}
#fsBtn.on{display:block}
.flo{position:absolute;transform:translate(-50%,-50%);font-weight:800;pointer-events:none;z-index:50;white-space:nowrap;animation:flo 1.05s ease-out forwards;text-shadow:2px 0 0 #fff,-2px 0 0 #fff,0 2px 0 #fff,0 -2px 0 #fff,0 4px 0 rgba(59,42,26,.35)}
.flo.coin{color:#d98600;font-size:var(--fs-2xl)}
.flo.bad{color:#d94b43;font-size:var(--fs-lg)}
.flo.ok{color:#2f9e63;font-size:var(--fs-xl)}
.coinfly{position:absolute;pointer-events:none;z-index:60;font-size:20px;line-height:1;opacity:0;filter:drop-shadow(0 2px 0 rgba(80,40,0,.45))}
@keyframes flo{0%{opacity:0;transform:translate(-50%,-50%) scale(.55)}16%{opacity:1;transform:translate(-50%,-88%) scale(1.14)}100%{opacity:0;transform:translate(-50%,-185%) scale(1)}}
.combo{position:absolute;left:50%;top:46%;transform:translate(-50%,-50%);font-size:44px;font-weight:800;color:#ff8a3d;text-shadow:3px 0 0 #fff,-3px 0 0 #fff,0 3px 0 #fff,0 -3px 0 #fff,0 6px 0 rgba(201,99,31,.6);pointer-events:none;z-index:55;animation:cmb 1.15s ease-out forwards}
@keyframes cmb{0%{opacity:0;transform:translate(-50%,-50%) scale(.4) rotate(-8deg)}22%{opacity:1;transform:translate(-50%,-50%) scale(1.18) rotate(3deg)}70%{opacity:1;transform:translate(-50%,-50%) scale(1) rotate(0)}100%{opacity:0;transform:translate(-50%,-90%) scale(.95)}}
/* 콤보 단계가 오를수록 배너가 커지고 색이 뜨거워진다. 끊기면 회색으로 아래로 떨어진다(2026-09-29) */
.combo.lv2{font-size:52px;color:#ff6a2a}
.combo.lv3{font-size:60px;color:#f0432a}
.combo.lv4{font-size:68px;color:#e0287a;text-shadow:3px 0 0 #fff,-3px 0 0 #fff,0 3px 0 #fff,0 -3px 0 #fff,0 6px 0 rgba(160,20,80,.6),0 0 18px #ffd24a}
.combo.broke{font-size:36px;color:#7a6a5a;text-shadow:3px 0 0 #fff,-3px 0 0 #fff,0 3px 0 #fff,0 -3px 0 #fff;animation:cmbBroke 1.3s ease-in forwards}
@keyframes cmbBroke{0%{opacity:0;transform:translate(-50%,-50%) scale(1.2)}15%{opacity:1;transform:translate(-50%,-50%) scale(1)}25%{transform:translate(-52%,-50%) rotate(-3deg)}35%{transform:translate(-48%,-50%) rotate(3deg)}45%{transform:translate(-50%,-50%) rotate(0)}75%{opacity:1}100%{opacity:0;transform:translate(-50%,-10%) rotate(4deg)}}
.timer.warn i{background:linear-gradient(90deg,#ff7a6d,#d94b43);animation:tw .55s infinite}
/* 추가 시간: 막대는 가득 찬 빨강으로 깜빡이고, 글자는 진한 테두리를 두른 흰색(진할 때도 연할 때도 읽힌다) */
.timer.over i{background:linear-gradient(90deg,#ff7a6d,#d94b43);animation:tw .55s infinite}
.timer.over .timer-txt{color:#fff;text-shadow:1px 0 0 #7a1f1a,-1px 0 0 #7a1f1a,0 1px 0 #7a1f1a,0 -1px 0 #7a1f1a,0 2px 0 #7a1f1a}
@keyframes tw{0%,100%{opacity:1}50%{opacity:.45}}
.coins.bump{animation:bump .34s ease-out}
/* 받은 금액이 클수록 지갑이 더 크게 튀고(2단계), 금빛으로 번쩍인다(3단계 이상) */
.coins.bump2{animation:bump2 .55s ease-out}
.coins.bump3{animation:bump3 .8s ease-out}
/* 말랑한 출렁임: 가로로 퍼졌다 세로로 늘었다 가라앉는다 */
@keyframes bump2{0%{transform:none}20%{transform:scale(1.45,.8)}45%{transform:scale(.88,1.2)}70%{transform:scale(1.08,.95)}100%{transform:none}}
@keyframes bump3{0%{transform:none;box-shadow:0 0 0 0 rgba(255,210,74,0)}18%{transform:scale(1.7,.72);box-shadow:0 0 0 6px rgba(255,210,74,.9),0 0 18px 8px rgba(255,190,40,.8)}40%{transform:scale(.85,1.3)}62%{transform:scale(1.12,.92)}82%{transform:scale(.97,1.04)}100%{transform:none;box-shadow:0 0 0 0 rgba(255,210,74,0)}}
/* 동전 하나가 닿을 때마다 살짝 꿀렁 */
.coins.tick{animation:ctick .16s ease-out}
@keyframes ctick{0%{transform:none}40%{transform:scale(1.12,.9)}100%{transform:none}}
/* 받은 금액이 클수록 「+금액」 글자도 커진다 */
/* 큰 금액은 더 크고 더 오래 떠 있다(game.js floatText의 life와 맞춤) */
.flo.coin.big{font-size:var(--fs-3xl);animation-duration:1.4s}
.flo.coin.huge{font-size:44px;animation-duration:2.4s;color:#ffc93a;text-shadow:2px 0 0 #7a4a10,-2px 0 0 #7a4a10,0 2px 0 #7a4a10,0 -2px 0 #7a4a10,0 4px 0 rgba(80,40,0,.5)}
/* 지갑 반짝이 폭죽(3단계 이상) */
.wspark{position:absolute;pointer-events:none;z-index:61;font-size:16px;line-height:1;color:#ffd24a;text-shadow:0 0 4px rgba(255,200,60,.9)}
@keyframes bump{0%{transform:none}30%{transform:scale(1.26)}100%{transform:none}}
#dbg{position:fixed;right:4px;bottom:4px;z-index:80;background:rgba(59,42,26,.82);color:#fff;font:12px/1.4 monospace;padding:4px 7px;border-radius:3px;white-space:pre;pointer-events:none;display:none}
.slot.boss .bubble-body{border-color:#d94b43;box-shadow:0 0 0 2px #f6c9c5}
.slot .cat .md{font-size:14px;vertical-align:top}
.shoprow{display:flex;align-items:center;gap:10px;padding:8px 6px;border-bottom:1px solid var(--line)}
.shoprow .si{font-size:30px;width:40px;text-align:center}
.shoprow .sx{flex:1;line-height:1.4}
.shoprow .sx b{display:block;font-size:var(--fs-md)}
.shoprow .sx span{font-size:var(--fs-sm);color:#8a6a45}
.shoprow .btn{min-width:108px;min-height:44px;font-size:var(--fs-md);padding:4px 10px}
.shoprow .btn.done{background:#dcefe3;color:#2f7a4c;box-shadow:none}
.shoprow .btn.lockd{background:#e3e3e3;color:#777;box-shadow:none}
.shoph{font-size:var(--fs-sm);font-weight:800;color:#8a5a2b;margin:8px 0 0}
.upb.can,.upg.can{background:#ffc247;color:#4a2a14;box-shadow:0 2px 0 #b8742a;animation:glow 1.1s infinite}
@keyframes glow{0%,100%{filter:none}50%{filter:brightness(1.12)}}
/* 좁은 화면(폰 가로): 간격·열 폭만 줄이고, 글씨는 14px 미만으로 내리지 않는다 */
.compact{
  --fs-xs:14px;--fs-sm:14px;--fs-md:15px;--fs-lg:16px;--fs-xl:18px;--fs-2xl:20px;--fs-3xl:24px;
}
.compact .screen{
  padding:max(4px,env(safe-area-inset-top,0px)) max(8px,env(safe-area-inset-right,0px))
    max(4px,env(safe-area-inset-bottom,0px)) max(8px,env(safe-area-inset-left,0px));
}
.compact.play-scene .scene-body,
html.compact .play-scene .scene-body{padding:36px 4px 4px}
.compact.play-scene .counter-rail,
html.compact .play-scene .counter-rail{min-height:140px;gap:4px;padding:4px}
.compact.play-scene .trash-station,
html.compact .play-scene .trash-station{flex-basis:56px}
.compact.play-scene .trash,
html.compact .play-scene .trash{width:48px;height:58px}
.compact.play-scene .chip{min-height:48px}
.compact.play-scene .chip .cl{margin-bottom:10px;font-size:15px;padding:1px 6px}
.compact.play-scene .mold-head canvas{width:40px}
.compact.play-scene .mold{padding:6px 5px 6px}
.compact.play-scene .mold .upb{min-height:40px;font-size:14px}
.compact.play-scene .station-label{font-size:16px}
.compact .custrow{margin:0 0 2px;padding-bottom:2px;border-bottom-width:4px;gap:6px}
.compact .play-scene .custrow{border-bottom-width:0;padding-bottom:0}
.compact .slot .bubble,.compact .slot .bubble-body{min-height:44px;border-radius:3px}
.compact .slot .bubble canvas{height:44px}
.compact .slot .cat,.compact .cust .cat{font-size:26px;margin-top:4px}
.compact .slot .cat img.guest-spr{height:clamp(40px,12vh,72px)}
.compact .slot.giant .cat{font-size:30px}
.compact .slot.giant .cat img.guest-spr{height:clamp(48px,14vh,88px)}
.compact .hud{height:36px;gap:8px;padding-right:96px}
.compact .timer{height:20px}
.compact .coins{min-width:0;font-size:var(--fs-lg)}
.compact .btn-end-hud{min-height:32px;padding:3px 8px;font-size:var(--fs-xs)}
.compact .card{padding:5px 6px;border-radius:3px}
.compact .kitchen{gap:6px}
.compact .cook-row{gap:6px}
.compact .shelf-strip{padding:4px 6px}
.compact .oven{flex-basis:clamp(200px,28vw,280px)}
.compact .oven .upg{min-width:48px;padding:3px 5px;font-size:10px}
.compact .oven .upg small{font-size:9px}
.compact .trash{font-size:22px;padding:3px;border-width:2px}
.compact .trash small{display:none}
.compact .benchinfo{margin:2px 0;min-height:18px}
.compact .gcard{padding:14px 16px;width:min(96vw,560px);border-radius:3px}
.compact .gcard .ri-ico{font-size:40px}
.compact .steps{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.compact .step{padding:8px}
.compact .step .ic{font-size:26px}
.compact .gcard .foot{flex-direction:column;align-items:stretch}
.compact .gcard .foot .btn{width:100%;min-height:48px}
.compact #intro .intro{gap:0;padding:8px 16px 6px}
.compact #chrome button{min-height:40px;padding:3px 10px}
.compact .pf input{min-height:44px;width:min(46vw,170px);padding:6px 10px}
.compact .cols-result>.card{flex:1 1 220px}
.compact .profile{gap:8px}
.compact h2{margin-bottom:4px}
/* ===== 폰 가로: 줄이지 않고 실제 크기로 배치한다 =====
   축소하면 글자가 10px, 터치 칸이 31px까지 내려가 쓸 수 없다. 그래서 배율은 1로 두고
   대신 세로로 자리를 아낀다. 아래 값들은 640x300(작은 폰 가로)에서 작업판 칸이
   넘치지 않도록 실제로 재서 맞춘 것이다. */
.compact .bench>h2{font-size:var(--fs-sm);margin-bottom:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.compact .oven-head h2{font-size:var(--fs-sm)}
/* 캔버스를 폭이 아니라 높이에 맞춘다. 폭 기준이면 칸이 줄어도 캔버스가 안 줄어 넘친다 */
.compact canvas#benchCv{width:auto;height:100%;max-width:100%;max-height:100%}
/* 오븐 캔버스도 같은 이유로 높이 기준. height:0 + flex:1 이라야 칸이 줄 때 같이 준다 */
.compact #ovenCv{width:100%;height:0;flex:1 1 0;min-height:0;object-fit:contain}
.compact .oven-head{margin-bottom:0}
.compact .cook-row>.card{padding:4px 5px}
/* margin-top은 auto를 유지한다. 고정값을 주면 자리가 빠듯할 때도 그만큼 무조건 더 먹는다 */
.compact .trash{border-width:1.5px}
.compact .oven{gap:2px}
/* 선반 머리글은 작게. 지우면 「개수를 톡!」 안내까지 사라진다 */
.compact .shelf-strip h2{font-size:var(--fs-xs);margin-bottom:2px}
.compact .shelf-strip{padding:3px 5px}
/* 말풍선을 조금 낮춘다. 「닮음비 1 : k」는 캔버스 안에서 따로 키운다 */
.compact .slot .bubble,.compact .slot .bubble-body{min-height:40px}
.compact .slot .bubble canvas{height:40px}
/* 좁은 화면도 높이에 여유가 있으면 손님을 키운다. 545px 태블릿에는 자리가 있고
   340px 폰에는 없다 — vh로 묶어 두면 기기마다 알아서 갈린다 */
/* 7.6vh는 눈대중이 아니다. 300px 폰에서 정확히 최소값(23px)이 되도록 잡았다.
   더 키우면 작은 폰에서 주방 칸이 넘친다 */
.compact .slot .cat,.compact .cust .cat{font-size:clamp(23px,7.6vh,58px);margin-top:3px}
.compact .slot .cat img.guest-spr{height:clamp(36px,11vh,64px)}
.compact .slot.giant .cat img.guest-spr{height:clamp(44px,13vh,78px);transform:none}
/* 자이언트는 transform으로 키운다. font-size로 키우면 손님 줄이 몇 px 늘어나고
   그게 주방 칸을 밀어내 작은 폰에서 넘친다. transform은 배치를 건드리지 않는다 */
.compact .slot.giant .cat{transform:scale(1.2);transform-origin:bottom center}
.compact .trash{font-size:16px;padding:1px}
.compact .benchwrap{min-height:0;border-width:1.5px}
.compact .bench-actions{gap:4px;margin-top:4px}
.compact .bench-actions .btn{min-height:40px;font-size:var(--fs-xs);padding:4px 6px}
.compact .trash{font-size:18px;padding:2px;border-width:2px;border-radius:3px}
.compact .chips{gap:3px}
.compact .chip{min-height:40px}
.compact .mold{padding:3px 5px 4px;gap:2px}
.compact .mold-head canvas{width:28px}
.compact .shelfgrid{gap:5px}
/* 이름·학번 */
.profile-lead{margin:10px 0 4px;font-size:var(--fs-sm);font-weight:700;color:#6b5236;line-height:1.45}
.profile{display:flex;gap:12px;flex-wrap:wrap;justify-content:center;margin:2px 0 0}
.pf{display:flex;align-items:center;gap:7px}
.pf label{font-size:var(--fs-sm);font-weight:800;color:#6b5236}
.pf input{font:inherit;font-size:16px;padding:9px 12px;min-height:46px;width:190px;border:2px solid var(--line);border-radius:3px;background:#fff;color:var(--ink);-webkit-user-select:text;user-select:text;touch-action:manipulation}
.pf input:focus{outline:3px solid #4f86f7;border-color:#4f86f7}
.perr{min-height:20px;font-size:var(--fs-sm);font-weight:700;color:var(--bad)}
.priv{font-size:var(--fs-xs);color:#8a6a45;margin-top:2px}
.priv a{color:#8a6a45}
/* 랭킹 */
#rankTable td,#rankTable th{font-size:var(--fs-md);padding:6px 8px}
#result #rankTable td,#result #rankTable th,#result #ledger td,#result #ledger th{font-size:17px;padding:3px 6px;line-height:1.25}
#rankTable .me td{font-weight:800;color:#c9631f;background:#fff7e6}
#rankMsg.ok{color:var(--ok);font-weight:700}
#rankMsg.err{color:var(--bad);font-weight:700}

/* =====================================================================
   장면 배치 (html.scene-v2)
   무대 = 논리 720×360. 배경 kitchen-bg-v3.png(1280×640) 한 장 위에 조작 요소를 올린다.
   좌표는 배경 그림에서 잰 px를 %로 적은 것이다: 가로 = px/12.8, 세로 = px/6.4.
   글자 크기는 cqh(장면 높이 360의 1%)로 적는다. 폰(배율 1)에서 3.9cqh ≈ 14px.
   오븐(oven-v3.png)과 쓰레기통(trash-*-v3.png)은 배경에서 오려 낸 조각을 제자리에 다시 얹는다
   (design-refs/generated-2026-09-24/cutout-positions.json).
   ===================================================================== */
html.in-play,html.in-play body{background:#1e130b}
html.scene-v2 #play{background:#2a1a10;overflow:hidden;padding:0}
html.scene-v2 #play .scene-bg{display:none}
html.scene-v2 #play .scene-body{
  position:absolute;inset:0;padding:0;display:block;container-type:size;
  background:url('assets/kitchen-bg-v3-tray.png?v=2') 0 0 / 100% 100% no-repeat;
}
html.scene-v2 #play .counter,
html.scene-v2 #play .counter-rail{display:contents}
html.scene-v2 #play .shelf-station{display:none}          /* 예전 칩 카드 */

/* HUD: 그림 위쪽 50px 띠. HUD는 장면(.scene-body) 밖이라 cqh를 못 쓴다. 무대가 늘 720×360이라 px로 적는다 */
html.scene-v2 #play .hud{
  position:absolute;left:0;right:0;top:0;height:28px;z-index:5;margin:0;
  padding:3px 4px 0 5px;gap:5px;background:linear-gradient(180deg,rgba(40,26,16,.55),rgba(40,26,16,0));
}
html.scene-v2 #play .hud .title{
  background:rgba(255,248,236,.95);border:2px solid #8a5a2b;border-radius:3px;
  padding:0 8px;height:23px;display:flex;align-items:center;font-size:14px;font-weight:800;box-shadow:none;
}
html.scene-v2 #play .hud .coins{
  background:none;border:0;border-radius:0;box-shadow:none;
  padding:0;height:23px;display:flex;align-items:center;gap:5px;
  font-size:14px;font-weight:800;color:#fff8e8;
  text-shadow:1px 0 0 #4a2a14,-1px 0 0 #4a2a14,0 1px 0 #4a2a14,0 -1px 0 #4a2a14,0 2px 0 #4a2a14;
}
html.scene-v2 #play .hud .coins .ico{vertical-align:0}
/* 하트 5개: 화나서 떠난 손님 수만큼 오른쪽부터 비운다. 시간 막대와 코인 사이 */
html.scene-v2 #play .hearts{
  display:flex;align-items:center;gap:3px;flex:none;
  background:none;border:0;border-radius:0;
  padding:0;height:23px;box-sizing:border-box;
}
html.scene-v2 #play .hearts i{
  width:13px;height:11px;display:block;background:#c4ad90;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 6'%3E%3Cpath fill='%23000' d='M1 0h2v1H1zM4 0h2v1H4zM0 1h7v2H0zM1 3h5v1H1zM2 4h3v1H2zM3 5h1v1H3z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 6'%3E%3Cpath fill='%23000' d='M1 0h2v1H1zM4 0h2v1H4zM0 1h7v2H0zM1 3h5v1H1zM2 4h3v1H2zM3 5h1v1H3z'/%3E%3C/svg%3E") center/contain no-repeat;
}
html.scene-v2 #play .hearts i.on{background:#e23b3d}
html.scene-v2 #play .hearts{position:relative}
/* 빈 자리는 하트가 쪼개질 때까지 숨었다가 말랑하게 튀어나온다(heartBreak) */
html.scene-v2 #play .hearts i.pop{animation:heartPop .75s linear}
@keyframes heartPop{0%,45%{transform:scale(0)}60%{transform:scale(1.35,.75)}72%{transform:scale(.85,1.2)}84%{transform:scale(1.08,.94)}93%{transform:scale(.97,1.03)}100%{transform:scale(1)}}
html.scene-v2 #play .hearts i.heart-half{position:absolute;margin:0;pointer-events:none;z-index:5}
/* 목숨 -1: 하트 칸 바로 앞(장면 위)에 크게 띄운다. 하트 모양은 칸 속 하트와 같다 */
.heart-loss{
  position:absolute;z-index:70;display:flex;align-items:center;gap:4px;
  pointer-events:none;animation:heartLoss 1.35s ease-out forwards;
}
.heart-loss i{
  width:34px;height:28px;display:block;flex:none;background:#e23b3d;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 6'%3E%3Cpath fill='%23000' d='M1 0h2v1H1zM4 0h2v1H4zM0 1h7v2H0zM1 3h5v1H1zM2 4h3v1H2zM3 5h1v1H3z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 6'%3E%3Cpath fill='%23000' d='M1 0h2v1H1zM4 0h2v1H4zM0 1h7v2H0zM1 3h5v1H1zM2 4h3v1H2zM3 5h1v1H3z'/%3E%3C/svg%3E") center/contain no-repeat;
  filter:drop-shadow(2px 0 0 #fff) drop-shadow(-2px 0 0 #fff) drop-shadow(0 2px 0 #fff) drop-shadow(0 -2px 0 #fff);
}
.heart-loss b{
  font-family:'Jua','Pretendard','Malgun Gothic',sans-serif;
  font-size:36px;line-height:1;font-weight:800;color:#e23b3d;
  text-shadow:2px 0 0 #fff,-2px 0 0 #fff,0 2px 0 #fff,0 -2px 0 #fff,0 4px 0 rgba(90,20,16,.45);
}
@keyframes heartLoss{
  0%{opacity:0;transform:translate(-50%,8px) scale(.35)}
  16%{opacity:1;transform:translate(-50%,-6px) scale(1.18)}
  28%{opacity:1;transform:translate(-50%,0) scale(1)}
  72%{opacity:1;transform:translate(-50%,-8px) scale(1)}
  100%{opacity:0;transform:translate(-50%,-36px) scale(.92)}
}
/* 시간 막대(2026-09-27 도트 느낌, 사용자 요청): 둥근 모서리·부드러운 그라데이션 없이 딱 끊기는 색 단계와 칸 무늬.
   진한 윤곽 → 나무 홈 → 꿀색 막대(위 밝은 줄·아래 그늘 줄). 칸 눈금은 넣지 않는다(사용자). 줄어들 때는 clip-path로 자른다 */
html.scene-v2 #play .timer{height:20px;background:#3a2414;border:2px solid #1f120a;border-radius:0;
  box-shadow:inset 0 2px 0 #22140b,0 0 0 2px #6e4220}
html.scene-v2 #play .timer i{position:absolute;left:2px;top:2px;bottom:2px;width:calc(100% - 4px);height:auto;border-radius:0;transform:none!important;
  background:linear-gradient(180deg,#fff1b8 0 3px,#ffc24a 3px 9px,#f09a2a 9px 12px,#c86a14 12px 100%);
  image-rendering:pixelated}
html.scene-v2 #play .timer-txt{font-size:14px;color:#fff8e8;
  text-shadow:1px 0 0 #4a2a14,-1px 0 0 #4a2a14,0 1px 0 #4a2a14,0 -1px 0 #4a2a14,0 2px 0 #4a2a14}
html.scene-v2 #play .timer.warn i,html.scene-v2 #play .timer.over i{
  background:linear-gradient(180deg,#ffc4b4 0 3px,#f0604a 3px 9px,#d4402c 9px 12px,#9a2616 12px 100%);animation:tw .55s infinite}
html.scene-v2 #play .timer.warn .timer-txt,html.scene-v2 #play .timer.over .timer-txt{color:#fff8e8;
  text-shadow:1px 0 0 #6a1a10,-1px 0 0 #6a1a10,0 1px 0 #6a1a10,0 -1px 0 #6a1a10,0 2px 0 #6a1a10}
html.scene-v2 #play .btn-end-hud{min-height:0;height:23px;padding:0 8px;font-size:14px;border-radius:3px}

/* 손님: 카운터 난간 윗선(그림 y=284)에서 잘려 카운터 뒤에 선 것처럼 보인다. 칸 = (70+300i, 72)~(+290, 284).
   예전에는 y=262에서 잘려 손님 몸 아래로 바닥이 띠처럼 보였다. 크기는 그대로 두고 줄 전체를 22px(3.44%) 내렸다 */
html.scene-v2 #play .custrow{
  position:absolute;left:0;top:3.44%;width:100%;height:40.94%;margin:0;padding:0;border:0;
  display:block;overflow:hidden;z-index:2;
}
html.scene-v2 #play .slot{position:absolute;top:19.08%;width:22.66%;height:80.92%;display:block;padding:0}
html.scene-v2 #play .slot:nth-child(1){left:5.47%}
html.scene-v2 #play .slot:nth-child(2){left:28.91%}
html.scene-v2 #play .slot:nth-child(3){left:52.34%}
/* 주문 카드(110×160): 손님 왼쪽. 오른쪽 세로 막대 = 남은 인내심 */
/* 주문 카드는 아래 끝이 카운터 난간 윗선(손님 줄이 잘리는 선)에 닿게 내려 둔다(2026-09-27, 사용자 제안).
   - 특대 손님 그림 중 몸이 캔버스 옆 끝에서 잘린 것(코뿔소·호랑이)의 잘린 선이 카드 뒤로 숨는다.
     예전(top 15%)에는 카드 아래와 난간 사이 약 21px 틈으로 잘린 몸이 보였다.
   - 카드 위, 손님 머리 옆에 빈자리가 생긴다(나중에 손님 대사창 자리). 「특대」 도장은 카드 위에 그대로 붙는다 */
html.scene-v2 #play .slot .bubble{
  position:absolute;left:3.45%;top:24.5%;width:37.93%;height:75.47%;min-height:0;z-index:2;
}
/* 카드 사이, 그리고 3번 카드와 오븐 사이 여유를 같게(약 174px) 맞춘다. 1번 카드는 그대로 두고 2·3번만 왼쪽으로 당긴다. */
html.scene-v2 #play .slot:nth-child(2) .bubble{left:-2.08%}
html.scene-v2 #play .slot:nth-child(3) .bubble{left:-7.57%}
/* 카드 테두리·바탕색은 변수로 두고 오른쪽 꼬리도 같은 변수를 쓴다(2026-09-28: 상태가 바뀌어도 꼬리만 갈색·흰색으로 남았다) */
html.scene-v2 #play .slot .bubble{--bd:#c9a878;--bg:#fffdf6}
html.scene-v2 #play .slot .bubble-body{
  position:absolute;inset:0;min-height:0;border-radius:0.5cqh;border:2px solid var(--bd);background:var(--bg);
  box-shadow:0 0.6cqh 0 rgba(40,24,12,.35);overflow:hidden;
}
html.scene-v2 #play .slot .bubble canvas{position:absolute;inset:0;width:100%;height:100%}
html.scene-v2 #play .slot .pat{
  position:absolute;right:6%;top:6%;bottom:6%;width:9%;border-radius:2px;background:#3a2414;overflow:hidden;z-index:1;
  box-shadow:inset 0 0 0 1px #6e4220,inset 1px 2px 2px rgba(0,0,0,.55);
}
/* 남은 인내심: 넉넉(초록) → 보통(꿀색) → 부족(빨강). 왼쪽에 윤기 한 줄, 위쪽 끝에 밝은 턱 */
html.scene-v2 #play .slot .pat .bubble-fill{
  position:absolute;left:1px;right:1px;bottom:1px;top:auto;height:100%;border-radius:1px;
  background:linear-gradient(90deg,#b8ec8e,#5cbf4a 55%,#3f9a35);
  box-shadow:inset 0 2px 0 rgba(255,255,255,.55),inset -1px 0 0 rgba(0,0,0,.18);
  transition:height .25s linear;
}
html.scene-v2 #play .slot .pat .bubble-fill[data-lv="mid"]{background:linear-gradient(90deg,#ffe49a,#ffb840 55%,#e08a1c)}
html.scene-v2 #play .slot .pat .bubble-fill[data-lv="lo"]{background:linear-gradient(90deg,#ffab96,#e8503c 55%,#b8321f);animation:tw .55s infinite}
/* 카드에서 손님 쪽을 가리키는 꼬리 */
html.scene-v2 #play .slot .bubble::before,
html.scene-v2 #play .slot .bubble::after{left:auto;bottom:auto;top:38%;transform:none}
/* 바깥 삼각형(테두리색)은 카드 바깥 가장자리에서 시작하고, 안쪽 삼각형(바탕색)은 카드 테두리(2px) 안쪽에서 시작해 테두리 선을 덮는다.
   예전에는 안쪽 삼각형이 카드 밖에서 시작해 입구에 테두리 선이 남아 「|>」로 보였다(2026-09-28, 사용자) */
/* 테두리 두께는 브라우저가 정수 px로 내림하므로 cqh 대신 무대 px로 적는다(무대는 늘 720×360이고 통째로 확대된다) */
html.scene-v2 #play .slot .bubble::before{right:-6px;border:4px solid transparent;border-left:6px solid var(--bd);border-right:0;width:0;height:0}
html.scene-v2 #play .slot .bubble::after{right:-4px;border:3px solid transparent;border-left:6px solid var(--bg);border-right:0;width:0;height:0;margin-top:1px}
html.scene-v2 #play .slot.happy .bubble{--bd:#6cc28b;--bg:#f0faf4}
html.scene-v2 #play .slot.angry .bubble,
html.scene-v2 #play .slot.low .bubble{--bd:#d94b43}
html.scene-v2 #play .slot.sad .bubble{--bd:#efb98a;--bg:#fff6ee}
html.scene-v2 #play .slot.giant .bubble{--bd:#d94b43}
html.scene-v2 #play .slot.giant .bubble-body{box-shadow:0 0 0 2px #f6c9c5}
html.scene-v2 #play .slot.giant .bubble::before{filter:drop-shadow(2px 0 0 #f6c9c5)}   /* 특대 카드의 분홍 바깥선이 꼬리까지 이어지게 */
html.scene-v2 #play .slot.drop .bubble{--bd:#ffc247}
html.scene-v2 #play .slot.drop .bubble-body{box-shadow:0 0 0 2px #ffd24a,0 0 2.4cqh 0.6cqh rgba(255,200,60,.9)}
html.scene-v2 #play .slot.drop .cat img.guest-spr{filter:drop-shadow(0 0 1.4cqh rgba(255,206,70,.95))}
/* 손님 그림: 가운데 = 칸의 65.5%. 그림(1024 정사각)에는 위아래 여백이 약 10%씩 있어서,
   보이는 몸이 약 182px이 되게 상자를 228px로 잡고 발끝(그림 y≈298)은 난간(262) 아래로 숨긴다 */
/* 손님은 그림 아래쪽 약 14%만 카운터 밑으로 숨긴다(예전 -27.8%는 캥거루 주머니의 아기가 잘렸다) */
html.scene-v2 #play .slot .cat{
  position:absolute;left:31%;width:69%;bottom:-15%;height:107.5%;margin:0;min-height:0;
  display:flex;align-items:flex-end;justify-content:center;font-size:24cqh;line-height:1;z-index:1;
}
/* 손님은 자기 카드 오른쪽 끝과 다음 경계(다음 카드, 3번은 오븐)의 한가운데에 선다. */
html.scene-v2 #play .slot:nth-child(1) .cat{left:36.87%}
html.scene-v2 #play .slot:nth-child(2) .cat{left:31.34%}
html.scene-v2 #play .slot:nth-child(3) .cat{left:25.86%}
/* 자이언트: 보통 손님(107.5%)의 약 1.4배. 손님 줄 맨 위에서 머리가 잘리지 않는 최대 크기다 */
/* 특대 손님 그림은 몸 아래가 둥글게 좁아지거나(사자·하마·코끼리) 옆이 캔버스 끝에서 잘려(곰) 있다.
   조금 더 내려서 그 부분이 진열대 뒤로 숨게 한다(2026-09-27). 머리 위가 손님 줄 위쪽에서 잘리던 것도 함께 준다 */
/* (2026-09-28 사용자: 너무 큼) 진열대 위로 보이는 높이를 보통 손님의 약 1.22배 → 1.12배로. 아래가 숨는 비율(약 25%)은 그대로 */
html.scene-v2 #play .slot.giant .cat{height:138%;bottom:-34%;transform:none}
html.scene-v2 #play .slot .cat img.guest-spr{height:100%;width:auto;max-width:none;display:block}
html.scene-v2 #play .slot .cat .md{top:4%;right:4%;font-size:5cqh}
html.scene-v2 #play .slot.empty{opacity:1}
html.scene-v2 #play .slot.empty .cat{visibility:hidden}
/* 손님 움직임. 그림 한 장을 상태(.enter .happy .angry .sad .low)에 따라 움직인다.
   기다릴 때는 숨 쉬듯 들썩이고, 자리마다 박자를 어긋나게 해서 똑같아 보이지 않게 한다 */
html.scene-v2 #play .slot .cat img.guest-spr{transform-origin:50% 100%;animation:custIdle 2.6s ease-in-out infinite}
html.scene-v2 #play .slot:nth-child(2) .cat img.guest-spr{animation-delay:-0.9s;animation-duration:2.9s}
html.scene-v2 #play .slot:nth-child(3) .cat img.guest-spr{animation-delay:-1.7s;animation-duration:2.4s}
html.scene-v2 #play .slot.giant .cat img.guest-spr{animation-duration:3.4s}
@keyframes custIdle{0%,100%{transform:translateY(0) scale(1,1)}50%{transform:translateY(-1.5%) scale(1.012,.99)}}
/* 들어올 때: 카운터 뒤에서 통 튀어 오르고, 주문 카드가 뿅 나타난다 */
html.scene-v2 #play .slot.enter{animation:none}
/* (2026-09-28 시험) 옆에서 통통 걸어 들어온다(오른쪽 → 제자리). 걷는 그림 없이 앞모습 그대로 */
html.scene-v2 #play .slot.enter .cat{animation:custWalkIn .8s linear both}
html.scene-v2 #play .slot.enter .bubble{animation:cardPop .38s .6s cubic-bezier(.3,1.6,.5,1) both}
@keyframes custRise{from{transform:translateY(45%)}to{transform:none}}
@keyframes cardPop{from{transform:scale(.4);opacity:0}to{transform:none;opacity:1}}
/* 인내심이 얼마 안 남음: 빨리 들썩이며 초조해한다 */
html.scene-v2 #play .slot.low .cat img.guest-spr{animation:custFret .42s ease-in-out infinite}
@keyframes custFret{0%,100%{transform:rotate(-1.6deg)}50%{transform:rotate(1.6deg) translateY(-1%)}}
/* 잘못 받음: 고개를 좌우로 젓는다 */
html.scene-v2 #play .slot.sad .cat img.guest-spr{animation:custNo .5s ease-in-out 2}
@keyframes custNo{0%,100%{transform:none}25%{transform:translateX(-3%) rotate(-2deg)}75%{transform:translateX(3%) rotate(2deg)}}
/* 서빙 성공: 두 번 폴짝 뛰고 카운터 아래로 쏙 내려가며 떠난다.
   칭찬 대사가 있으면(.bye) 1.3초까지 서 있다가, 사라지는 순간에 맞춰 내려간다. 먼저 내려가면 맨 아래 모습이 남는다 */
html.scene-v2 #play .slot.happy .cat img.guest-spr{animation:custHop .3s ease-out 2}
html.scene-v2 #play .slot.happy .cat{animation:custLeave .35s .55s ease-in both}
html.scene-v2 #play .slot.happy.bye .cat{animation:custLeave .35s .95s ease-in both}
/* 캥거루의 이어진 주문: 내려가지 않고 그 자리에서 한 번 폴짝. 주문 카드만 살짝 커졌다가 1:1로 남는다 */
/* 캥거루는 주머니가 보이게 다른 손님보다 조금 올려 세운다(2026-09-28) */
html.scene-v2 #play .slot.k-roo .cat,html.scene-v2 #play .slot.k-joey .cat{bottom:-6%}
/* 아기 캥거루 등장(2026-09-28, JOEY_POP 1.3초): 주머니가 들썩이고 → 아기가 주머니 선 아래에서 크게 솟아 튀고 → 도트 별이 반짝 퍼진다.
   그동안 주문 카드는 숨겼다가 끝나면 뿅. 아기 그림(cust2-kangaroo-joey-pop.png)은 아기 든 그림에서 아기만 오린 것(1024 기준 (390,600) 235×335), 주머니 선 y≈880 */
html.scene-v2 #play .slot.joey-pop .cat img.guest-spr{animation:pouchWiggle .16s ease-in-out 3}
@keyframes pouchWiggle{0%,100%{transform:none}50%{transform:scale(1.035,.965)}}
html.scene-v2 #play .slot.joey-pop .bubble{visibility:hidden}
html.scene-v2 #play .slot.joey-card .bubble{animation:cardPop .38s cubic-bezier(.3,1.6,.5,1) both}
/* 냥순이는 인사만 하다가 「주문할게요」라고 말할 때 카드를 내민다(2026-09-29) */
html.scene-v2 #play .slot.no-card .bubble{visibility:hidden}
html.scene-v2 #play .slot .cat .fr.fr-joey{opacity:1;display:none}
html.scene-v2 #play .slot .cat .fr.fr-joey.on{display:flex}   /* 켜지는 순간 애니메이션이 처음부터 돈다 */
html.scene-v2 #play .joey-box{position:relative;height:100%;aspect-ratio:1/1;flex:none}
/* 솟는 동안은 주머니 선(y≈880) 아래를 가려 주머니에서 나오는 것처럼, 다 솟으면(.8초) 가림을 풀어 앞발이 주머니 턱에 걸친다 */
html.scene-v2 #play .joey-clip{position:absolute;left:30%;top:40%;width:39%;height:51.3%;clip-path:inset(0 0 10.45% 0);animation:joeyPaws 0s .8s both}
@keyframes joeyPaws{to{clip-path:inset(0 0 0 0)}}
html.scene-v2 #play .joey-clip img{position:absolute;left:20.74%;top:36.24%;width:58.85%;height:auto;transform-origin:50% 100%;
  animation:joeyRise .6s .45s cubic-bezier(.3,1.6,.5,1) both}
@keyframes joeyRise{0%{transform:translateY(90%) scale(.9)}60%{transform:translateY(-14%) scale(1.12,1.18)}80%{transform:translateY(0) scale(1.08,.94)}100%{transform:none}}
/* 도트 별 반짝: 아기 머리 둘레로 여섯 개가 퍼졌다 사라진다 */
html.scene-v2 #play .jsp{position:absolute;left:49%;top:66%;width:1cqh;height:1cqh;background:#fff6b0;
  box-shadow:0 -1cqh 0 #ffd24a,0 1cqh 0 #ffd24a,-1cqh 0 0 #ffd24a,1cqh 0 0 #ffd24a;opacity:0;animation:jsp .45s .72s steps(5,end) both}
html.scene-v2 #play .jsp:nth-of-type(1){--dx:-600%;--dy:-1000%}
html.scene-v2 #play .jsp:nth-of-type(2){--dx:600%;--dy:-1000%}
html.scene-v2 #play .jsp:nth-of-type(3){--dx:-1300%;--dy:-200%}
html.scene-v2 #play .jsp:nth-of-type(4){--dx:1300%;--dy:-200%}
html.scene-v2 #play .jsp:nth-of-type(5){--dx:-1000%;--dy:-1700%;animation-delay:.8s}
html.scene-v2 #play .jsp:nth-of-type(6){--dx:1000%;--dy:-1700%;animation-delay:.8s}
@keyframes jsp{0%{opacity:0;transform:translate(0,0) scale(.6)}1%{opacity:1;transform:translate(0,0) scale(.6)}50%{opacity:1;transform:translate(var(--dx),var(--dy)) scale(1.3)}100%{opacity:0;transform:translate(calc(var(--dx)*1.3),calc(var(--dy)*1.3)) scale(.6)}}
@keyframes cardNudge{0%{transform:scale(1)}40%{transform:scale(1.08)}100%{transform:scale(1)}}
@keyframes custHop{0%,100%{transform:none}40%{transform:translateY(-9%) scale(.97,1.04)}80%{transform:translateY(0) scale(1.05,.95)}}
/* 화나서 떠남: 부르르 떨다 떠나는 순간(1.4초)에 맞춰 내려간다. 먼저 내려가면 맨 아래 모습이 오래 남는다 */
html.scene-v2 #play .slot.angry .cat img.guest-spr{animation:custShake .09s linear 5;filter:sepia(.35) saturate(1.6) hue-rotate(-18deg)}
html.scene-v2 #play .slot.angry .cat{animation:custLeave .35s 1.05s ease-in both}
/* (2026-09-28) 걸어 나가기는 뺐다: 돌아서면 그림의 잘린 아래·옆이 다 드러난다(사용자). 나갈 때는 예전처럼 카운터 아래로 */
@keyframes custShake{0%,100%{transform:translateX(0)}25%{transform:translateX(-2.5%)}75%{transform:translateX(2.5%)}}
@keyframes custLeave{from{transform:none}to{transform:translateY(105%)}}
/* 걷기: 한 걸음마다 살짝 뜬다.  */
@keyframes custWalkIn{0%{transform:translateX(140%);opacity:0}8%{opacity:1}
  14%{transform:translateX(118%) translateY(-5%)}28%{transform:translateX(96%)}42%{transform:translateX(74%) translateY(-5%)}
  56%{transform:translateX(52%)}70%{transform:translateX(30%) translateY(-5%)}84%{transform:translateX(10%)}92%{transform:translateX(3%) translateY(-2%)}100%{transform:none}}
/* 💖 💢 표시는 튀어나오듯 나타난다 */
html.scene-v2 #play .slot .cat .md{animation:mdPop .35s cubic-bezier(.3,1.8,.5,1) both}
html.scene-v2 #play .slot.low .cat .md{animation:mdPop .35s cubic-bezier(.3,1.8,.5,1) both,mdBeat .6s .35s ease-in-out infinite}
@keyframes mdPop{from{transform:scale(0)}to{transform:none}}
@keyframes mdBeat{0%,100%{transform:scale(1)}50%{transform:scale(1.25)}}
/* 표정 프레임(game.js의 FACE_FRAMES): 기본 그림과 같은 자리에 겹친 두 장. 평소에는 숨긴다.
   눈 감은 그림은 몇 초마다 잠깐 켜져 깜빡이고(자리마다 박자가 다름), 서빙 성공 때는 웃는 그림이 켜진다 */
html.scene-v2 #play .slot .cat .fr{position:absolute;inset:0;display:flex;align-items:flex-end;justify-content:center;pointer-events:none;opacity:0}
html.scene-v2 #play .slot .cat .fr-blink{animation:blinkShow 3.8s steps(1,end) infinite}
html.scene-v2 #play .slot:nth-child(2) .cat .fr-blink{animation-duration:4.6s;animation-delay:-1.3s}
html.scene-v2 #play .slot:nth-child(3) .cat .fr-blink{animation-duration:3.3s;animation-delay:-2.1s}
@keyframes blinkShow{0%{opacity:0}94%{opacity:1}97.5%{opacity:0}}
html.scene-v2 #play .slot.happy .cat .fr-happy{opacity:1}
/* 목 소품(game.js의 accLayer): 늘 보인다. 표정 프레임보다 위에 겹친다 */
html.scene-v2 #play .slot .cat .fr-acc{opacity:1}
html.scene-v2 #play .slot.happy .cat .fr-blink,html.scene-v2 #play .slot.angry .cat .fr-blink{animation:none;opacity:0}
@media (prefers-reduced-motion:reduce){html.scene-v2 #play .slot .cat img.guest-spr{animation:none}}
/* 새 손님 종류(game.js의 KINDS). 그림이 생기기 전까지는 이모지(.guest-emo)로 보인다 */
html.scene-v2 #play .slot .cat .guest-emo{display:block;line-height:1;white-space:nowrap;transform-origin:50% 100%;animation:custIdle 2.6s ease-in-out infinite}
html.scene-v2 #play .slot.k-roo .cat .guest-emo,html.scene-v2 #play .slot.k-joey .cat .guest-emo,html.scene-v2 #play .slot.k-hurry .cat .guest-emo{font-size:26cqh}
/* 급한 손님: 주황 카드 테두리 + 똑딱이는 시계 배지 */
html.scene-v2 #play .slot.k-hurry .bubble{--bd:#ff8a3d}
html.scene-v2 #play .slot.k-hurry .bubble-body{box-shadow:0 0 0 2px #ffd0a8,0 0.6cqh 0 rgba(40,24,12,.35)}
html.scene-v2 #play .slot .cat .kind-badge{position:absolute;right:6%;top:2%;font-size:6.5cqh;line-height:1;z-index:2;
  filter:drop-shadow(0 0.4cqh 0 rgba(40,24,12,.4));animation:clockTick .5s steps(2,end) infinite}
@keyframes clockTick{0%{transform:rotate(-12deg)}100%{transform:rotate(12deg)}}
/* 자이언트: 주문 카드 왼쪽 위 모서리 바깥에 빵집 도장처럼 찍힌 「특대」. 주문 숫자를 가리지 않게 카드 위로 비켜 두고, 그 자리를 위해 카드를 조금 내렸다. 들어올 때 도장이 찍히듯 나타난다 */
html.scene-v2 #play .slot .giant-stamp{display:none}
html.scene-v2 #play .slot.giant .giant-stamp{
  display:block;position:absolute;left:-13%;top:-17%;z-index:3;pointer-events:none;
  font-family:'Jua','Pretendard',sans-serif;font-weight:400;font-size:4.2cqh;line-height:1;color:#c8322a;
  padding:0.5cqh 0.9cqh;border:0.45cqh solid #c8322a;border-radius:0.6cqh;background:rgba(255,246,236,.92);
  transform:rotate(-14deg);box-shadow:0 0.3cqh 0 rgba(90,20,10,.25);
}
/* 손님 대사: 주문 카드 위 빈자리. 꼬리는 오른쪽 아래 손님 얼굴 쪽. 톡 튀어나왔다 사라진다 */
html.scene-v2 #play .slot .say{
  position:absolute;left:22%;top:3%;z-index:4;pointer-events:none;white-space:nowrap;   /* 손님 줄 맨 위에서 잘리지 않게 칸 안쪽, 「특대」 도장 오른쪽 */
  font-family:'Jua','Pretendard',sans-serif;font-weight:400;font-size:3.6cqh;line-height:1.2;color:#3b2a1a;
  padding:1.3cqh 1.6cqh 0.9cqh;background:#fffdf6;border:2px solid #5a3a1c;border-radius:1cqh;   /* Jua는 글자가 위로 치우쳐 위 여백을 더 준다 */
  box-shadow:0 0.5cqh 0 rgba(40,24,12,.3);
  opacity:0;transform:scale(.4);transform-origin:85% 120%;transition:opacity .12s,transform .12s;
}
/* 꼬리: 테두리(::before) 위에 바탕색(::after)을 겹쳐 말풍선과 한 몸으로(2026-09-29, 사용자: 꼬리가 어색함) */
html.scene-v2 #play .slot .say::before,html.scene-v2 #play .slot .say::after{content:'';position:absolute;width:0;height:0}
/* 두께는 브라우저가 정수 화소로 내림하므로 무대 px로 적는다(cqh면 안쪽 삼각형이 테두리 선을 덜 덮어 꼬리 입구에 선이 남았다). 안쪽 삼각형은 테두리(2px)보다 1px 위에서 시작한다 */
html.scene-v2 #play .slot .say::before{right:16%;bottom:-8px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:8px solid #5a3a1c}
html.scene-v2 #play .slot .say::after{right:calc(16% + 2px);bottom:-5px;border-left:3px solid transparent;border-right:3px solid transparent;border-top:6px solid #fffdf6}
/* 냥순이 말풍선: 옆 손님 자리가 비어 있어 머리 오른쪽 빈 공간에 둔다 */
html.scene-v2 #play .slot.k-tut .say{left:78%;top:12%;white-space:normal;width:max-content;max-width:112%;word-break:keep-all;transform-origin:8% 120%}   /* 오른쪽은 오븐 앞에서 줄바꿈 */
/* 꼬리는 아래쪽 왼편에서 냥순이 쪽으로 비스듬히 내려간다(사용자) */
html.scene-v2 #play .slot.k-tut .say::before{right:auto;left:8%;bottom:-9px;border:0;border-top:9px solid #5a3a1c;border-right:10px solid transparent}
html.scene-v2 #play .slot.k-tut .say::after{right:auto;left:calc(8% + 2px);bottom:-5px;border:0;border-top:6px solid #fffdf6;border-right:7px solid transparent}
/* 인라인으로 두어야 앞 글자와 붙은 채 줄바꿈된다(인라인 블록이면 ▸만 다음 줄로 떨어질 수 있다). 그래서 transform 대신 left로 움직인다 */
html.scene-v2 #play .slot .say .say-next{position:relative;left:0;color:#c8742a;animation:sayNext .8s ease-in-out infinite}
@keyframes sayNext{0%,100%{left:0}50%{left:0.6cqh}}
html.scene-v2 #play .slot .say.on{opacity:1;transform:none;animation:sayPop .32s cubic-bezier(.3,1.6,.5,1)}
@keyframes sayPop{from{transform:scale(.4)}to{transform:none}}
html.scene-v2 #play .slot.giant.enter .giant-stamp{animation:stampIn .35s .3s cubic-bezier(.3,1.5,.5,1) both}
@keyframes stampIn{from{transform:rotate(-14deg) scale(2.2);opacity:0}to{transform:rotate(-14deg) scale(1);opacity:1}}

/* 재료 자리: 버튼마다 left/top/width/height는 game.js가 그림 좌표로 넣는다 */
html.scene-v2 #play .sources{position:absolute;inset:0;display:block;z-index:3;pointer-events:none}
html.scene-v2 #play .src{
  position:absolute;display:block;background:none;border:0;padding:0;margin:0;min-width:0;min-height:0;
  box-shadow:none;pointer-events:auto;cursor:pointer;touch-action:manipulation;
}
html.scene-v2 #play .src canvas{display:block;width:100%;pointer-events:none}
html.scene-v2 #play .src .src-x{
  position:absolute;left:50%;bottom:0.3cqh;transform:translateX(-50%);white-space:nowrap;pointer-events:none;
  padding:0 1.1cqh;border-radius:0.5cqh;background:rgba(50,32,18,.9);color:#fff4dc;
  font-size:3.9cqh;font-weight:800;line-height:1.35;
}
html.scene-v2 #play .src.locked canvas{filter:brightness(.45) saturate(.6)}
html.scene-v2 #play .src.off{opacity:.45;pointer-events:none}
html.scene-v2 #play .src.tap canvas{animation:srcTap .24s ease-out}
@keyframes srcTap{0%{transform:scale(1)}35%{transform:scale(.9,.84)}72%{transform:scale(1.06,1.1)}100%{transform:scale(1)}}
/* 자물쇠 가격표(A안, 2026-09-28 사용자): 칸 가운데에 작은 진한 판 하나, 자물쇠 아래에 금테 가격(코인+값).
   그림은 이미 어둡게 눌려 있고 ×n 표는 남으니 칸 전체를 덮지 않는다. 넓고 낮은 칸(.wide)은 가격을 자물쇠 옆에 둔다 */
html.scene-v2 #play .src .src-lock{
  position:absolute;left:4%;right:4%;top:6%;bottom:30%;display:none;align-items:center;justify-content:center;
  color:#fff8ec;font-size:4cqh;line-height:1;pointer-events:none;
}
html.scene-v2 #play .src.locked .src-lock{display:flex}
/* 가격표가 칸보다 크면 위로 자라게(아래 ×n 표를 가리지 않게) */
html.scene-v2 #play .src-lock:not(.wide){align-items:flex-end}
/* 자물쇠·오븐 업그레이드: 판 없이 아이콘 옆에 숫자만(2026-09-28, 사용자: 화면이 정신없다). 숫자는 금색 + 어두운 테두리 */
html.scene-v2 #play .lk-tag{display:flex;flex-direction:row;align-items:center;gap:0.4cqh;flex:none}
html.scene-v2 #play .lk-tag>.ico{flex:none;margin:0;filter:drop-shadow(0 0 0.3cqh rgba(0,0,0,.6))}
html.scene-v2 #play .lk-tag small{display:inline;
  font-size:3.4cqh;font-weight:800;line-height:1;color:#ffd24a;white-space:nowrap;
  text-shadow:0.3cqh 0 0 #2a1608,-0.3cqh 0 0 #2a1608,0 0.3cqh 0 #2a1608,0 -0.3cqh 0 #2a1608;
}
/* 살 수 있으면 숫자가 금빛으로 숨 쉰다 */
html.scene-v2 #play .src.canbuy .lk-tag small,html.scene-v2 #play .oven .upg.can .lk-tag small{animation:upGlowNum 1.6s ease-in-out infinite}
@keyframes upGlowNum{0%,100%{color:#ffd24a}50%{color:#fff3b0}}
/* 살 수 있는 재료 묶음: 둘레 금빛 번짐(칸보다 넓게 퍼졌다) 대신 그 재료 그림만 밝아지며 윤곽을 따라 반짝인다(2026-09-28, 사용자) */
html.scene-v2 #play .stand-item.locked.canbuy{animation:itemCanBuy 1.6s ease-in-out infinite}
@keyframes itemCanBuy{0%,100%{filter:brightness(.85) drop-shadow(0 0 0.4cqh rgba(255,210,80,.6))}50%{filter:brightness(1.12) drop-shadow(0 0 1cqh rgba(255,210,80,.95))}}
/* 살 수 있는 자물쇠는 오븐 화살표처럼 통통 뛴다(2026-09-29, 업그레이드가 눈에 잘 띄게) */
html.scene-v2 #play .src.canbuy .lk-tag>.ico{animation:upArrowHop .8s ease-in-out infinite}
html.scene-v2 #play .src.canbuy .lk-tag small{font-size:4cqh}
/* 방금 산 재료 묶음: 톡 튀며 번쩍, 금빛 고리가 퍼지고 「×n 열림!」이 떠오른다 */
html.scene-v2 #play .stand-item.justgot,html.scene-v2 #play .src.justgot canvas{animation:bagGot 1.2s ease-out}
@keyframes bagGot{0%{transform:scale(1);filter:brightness(1)}18%{transform:scale(1.35);filter:brightness(1.8) drop-shadow(0 0 1.5cqh #ffd24a)}45%{transform:scale(.95);filter:brightness(1.3) drop-shadow(0 0 1cqh #ffd24a)}70%{transform:scale(1.06)}100%{transform:scale(1);filter:brightness(1)}}
html.scene-v2 #play .src.justgot::after{content:"";position:absolute;left:50%;top:50%;width:100%;padding-top:100%;border-radius:50%;
  border:0.8cqh solid #ffd24a;transform:translate(-50%,-50%) scale(.3);opacity:1;pointer-events:none;animation:bagRing .9s ease-out forwards}
@keyframes bagRing{to{transform:translate(-50%,-50%) scale(1.8);opacity:0}}
html.scene-v2 #play .bag-new{position:absolute;left:50%;bottom:60%;transform:translateX(-50%);white-space:nowrap;pointer-events:none;z-index:5;
  font-size:4.2cqh;font-weight:900;color:#ffd24a;
  text-shadow:0.3cqh 0 0 #2a1608,-0.3cqh 0 0 #2a1608,0 0.3cqh 0 #2a1608,0 -0.3cqh 0 #2a1608;animation:bagNew 1.7s ease-out forwards}
@keyframes bagNew{0%{opacity:0;transform:translate(-50%,40%) scale(.6)}15%{opacity:1;transform:translate(-50%,0) scale(1.15)}30%{transform:translate(-50%,0) scale(1)}75%{opacity:1}100%{opacity:0;transform:translate(-50%,-90%)}}
/* 2단 진열대(반죽·식빵): 그림은 누르지 않고, 칸마다 투명 버튼이 그 위에 놓인다 */
html.scene-v2 #play .stand-art,html.scene-v2 #play .stand-item{position:absolute;display:block;pointer-events:none;user-select:none;-webkit-user-drag:none}
html.scene-v2 #play .stand-item{transform-origin:50% 100%}
html.scene-v2 #play .stand-item.locked{filter:brightness(.45) saturate(.6)}
html.scene-v2 #play .stand-item.off{opacity:.45}
html.scene-v2 #play .stand-item.tap{animation:srcTap .24s ease-out}
/* 아직 보여 주지 않는 칸: 그림·표·누르는 영역을 모두 숨겨 빈 선반으로 둔다 */
html.scene-v2 #play .src.hide,html.scene-v2 #play .stand-item.hide{visibility:hidden}
html.scene-v2 #play .src-cell .src-lock{left:0;right:0}

/* 도마(배경에 그려진 도마) 위 빵 캔버스: 큰 빵이 들어가게 도마 위쪽으로 넉넉히. (440,150)~(1000,470) */
html.scene-v2 #play .bench-station{
  position:absolute;left:34.375%;top:23.4375%;width:43.75%;height:60%;z-index:4;   /* 2026-09-28 아래로 늘림(예전 50%): 빵 더미를 도마 앞쪽까지 내리려고. 캔버스 525×360 */
  padding:0;background:none;border:0;border-radius:0;box-shadow:none;display:block;
  pointer-events:none;
}
html.scene-v2 #play .benchwrap{pointer-events:none}
html.scene-v2 #play .bench-actions,
html.scene-v2 #play .bench-actions .btn,
html.scene-v2 #play canvas#benchCv{pointer-events:auto}
/* 도마 개수 표(2026-09-28): 도마 왼쪽 앞 모서리에 고정. 자물쇠 가격표와 같은 진한 판 + 금색 글씨 */
html.scene-v2 #play .bench-station .station-label{
  display:none;position:absolute;left:3%;top:86%;margin:0;padding:0.6cqh 1.4cqh;z-index:3;pointer-events:none;
  background:rgba(36,22,12,.88);box-shadow:0 0 0 0.3cqh #1a0f07,inset 0 0 0 0.3cqh #8a5a2b;
  font-family:'Jua','Pretendard',sans-serif;font-size:4.2cqh;line-height:1.1;color:#ffd24a;white-space:nowrap;
}

html.scene-v2 #play .benchwrap{position:absolute;inset:0;background:none;border:0;box-shadow:none;min-height:0;border-radius:0}
html.scene-v2 #play canvas#benchCv{width:100%;height:100%;object-fit:contain}
/* 되돌리기·비우기·굽기: 수납장 문짝 위 (640,500)~(1000,600) */
html.scene-v2 #play .bench-actions{
  position:absolute;left:35.7%;top:100%;width:64.3%;height:26.04%;   /* 2026-09-28 화면 아래쪽으로 내림(무대 83~99%). 예전 109.4%·31.25%(칸 50% 기준) */margin:0;display:flex;gap:2.5%;
}
html.scene-v2 #play .bench-actions .btn{
  flex:1;min-width:0;min-height:0;height:100%;padding:0 0.4cqh;font-size:3.9cqh;border-radius:0.5cqh;white-space:nowrap;
}
html.scene-v2 #play .bench-actions #toOven{flex:1.15;font-size:4.6cqh}
/* 도마를 눌러 고른 빵: 네모 테두리 대신 빵 둘레가 금빛으로 은은하게 빛난다 */
html.scene-v2 #play .benchwrap.sel,html.scene-v2 #play #ovenCv.sel{outline:0}
html.scene-v2 #play .benchwrap.sel canvas#benchCv{animation:selGlow 1.3s ease-in-out infinite}
@keyframes selGlow{0%,100%{filter:drop-shadow(0 0 0.6cqh rgba(255,214,90,.85))}50%{filter:drop-shadow(0 0 1.8cqh rgba(255,200,60,1))}}

/* 쓰레기통: 오려 낸 뚜껑·몸통을 수납장 칸 안에 0.8배로. (85,513)~(165,632) */
html.scene-v2 #play .trash-station{position:absolute;left:6.64%;top:80.16%;width:6.25%;height:18.6%;z-index:3;padding:0;display:block}
html.scene-v2 #play .trash{position:relative;width:100%;height:100%;margin:0;padding:0;background:none!important;border:0;box-shadow:none;outline:0}
html.scene-v2 #play .trash img{position:absolute;display:block;pointer-events:none}
html.scene-v2 #play .trash .trash-body{left:1%;top:20.2%;width:98%;height:80%}
html.scene-v2 #play .trash .trash-lid{left:0;top:0;width:100%;height:29.6%;transform-origin:88% 95%;transition:transform .16s ease-out}
html.scene-v2 #play .trash.drop .trash-lid,
html.scene-v2 #play .trash.gulp .trash-lid{transform:translateY(-10%) rotate(22deg)}
html.scene-v2 #play .trash.drop .trash-body{filter:drop-shadow(0 0 1.4cqh rgba(255,206,70,.95))}

/* 오븐: 오려 낸 오븐 그림 + 굽는 동안 옆면 투시 캔버스. 칸 = (940,140)~(1260,480) */
html.scene-v2 #play .oven-station{
  position:absolute;left:73.4375%;top:21.875%;width:25%;height:53.125%;z-index:3;
  padding:0;background:none;border:0;border-radius:0;box-shadow:none;min-height:0;display:block;
}
html.scene-v2 #play .oven-station .oven-art{
  position:absolute;left:-2.5%;top:-50%;width:108.75%;height:207.94%;pointer-events:none;max-width:none;
}
html.scene-v2 #play .oven-station.drop .oven-art{filter:drop-shadow(0 0 2cqh rgba(255,196,60,.95)) brightness(1.08)}
html.scene-v2 #play .oven.drop{box-shadow:none}
/* 오븐 업그레이드 연출(2026-09-29) */
html.scene-v2 #play .oven-station.upgraded .oven-art{transform-origin:50% 90%;animation:ovenUp 1s cubic-bezier(.3,1.6,.5,1)}
@keyframes ovenUp{0%{transform:scale(1);filter:brightness(1)}15%{transform:scale(1.15,.8);filter:brightness(2.6)}40%{transform:scale(.92,1.14);filter:brightness(1.6) drop-shadow(0 0 3cqh #ffd24a)}65%{transform:scale(1.04,.97);filter:brightness(1.2) drop-shadow(0 0 2cqh #ffd24a)}100%{transform:scale(1);filter:brightness(1)}}
html.scene-v2 #play .oven-upfx{position:absolute;inset:0;pointer-events:none;z-index:6}
html.scene-v2 #play .oven-upfx .ring{position:absolute;left:50%;top:40%;width:100%;padding-top:100%;border-radius:50%;border:1.2cqh solid #ffd24a;
  transform:translate(-50%,-50%) scale(.2);opacity:0;animation:ovenRing .9s ease-out forwards}
html.scene-v2 #play .oven-upfx .ring.r2{border-color:#fff3b0;animation-delay:.18s}
@keyframes ovenRing{0%{opacity:1;transform:translate(-50%,-50%) scale(.2)}100%{opacity:0;transform:translate(-50%,-50%) scale(1.9)}}
html.scene-v2 #play .oven-upfx .spark{position:absolute;left:50%;top:40%;width:2.2cqh;height:2.2cqh;margin:-1.1cqh;background:#ffd24a;
  clip-path:polygon(50% 0,62% 38%,100% 50%,62% 62%,50% 100%,38% 62%,0 50%,38% 38%);opacity:0;animation:ovenSpark .9s ease-out forwards}
@keyframes ovenSpark{0%{opacity:1;transform:translate(0,0) scale(.4) rotate(0)}70%{opacity:1}100%{opacity:0;transform:translate(var(--dx),var(--dy)) scale(1.2) rotate(180deg)}}
html.scene-v2 #play .oven-upname,html.scene-v2 #play .oven-updesc{position:absolute;left:50%;white-space:nowrap;
  text-shadow:0.35cqh 0 0 #2a1608,-0.35cqh 0 0 #2a1608,0 0.35cqh 0 #2a1608,0 -0.35cqh 0 #2a1608;animation:ovenName 2.2s ease-out forwards}
html.scene-v2 #play .oven-upname{top:-12%;font-size:5.5cqh;font-weight:900;color:#ffd24a}
html.scene-v2 #play .oven-updesc{top:0;font-size:3.6cqh;font-weight:800;color:#fff8ec;animation-delay:.12s;opacity:0}
@keyframes ovenName{0%{opacity:0;transform:translate(-50%,50%) scale(.5)}14%{opacity:1;transform:translate(-50%,0) scale(1.2)}26%{transform:translate(-50%,0) scale(1)}80%{opacity:1;transform:translate(-50%,-20%)}100%{opacity:0;transform:translate(-50%,-60%)}}
html.scene-v2 #play .oven-station #ovenCv{position:absolute;inset:0;width:100%;height:100%;min-height:0;border-radius:0}
/* 업그레이드 버튼: 오븐 받침 (1080,548)~(1240,600) */
html.scene-v2 #play .oven-head{position:absolute;left:43.75%;top:120%;width:50%;height:15.3%;margin:0;z-index:4}
/* 재료 자물쇠 가격표와 같은 양식(2026-09-28): 버튼은 투명, 가운데에 진한 판(위 화살표 도트 + 금테 가격)을 옆으로 눕혀 둔다 */
html.scene-v2 #play .oven .upg{
  width:100%;height:100%;min-height:0;min-width:0;padding:0;border:0;border-radius:0;
  display:flex;align-items:center;justify-content:center;
  font-size:4cqh;line-height:1;background:transparent;color:#fff8ec;box-shadow:none;
}
html.scene-v2 #play .oven .upg .lk-tag{gap:0.8cqh}
/* 오븐 업그레이드는 눈에 띄게(2026-09-28, 사용자): 숫자·화살표를 크게, 살 수 있으면 화살표가 통통 튄다 */
html.scene-v2 #play .oven .upg .lk-tag small{font-size:5cqh}
html.scene-v2 #play .oven .upg .lk-tag>.ico{width:1.5em;height:1.5em}
html.scene-v2 #play .oven .upg:not(.can) .lk-tag{opacity:.8}
html.scene-v2 #play .oven .upg.can .lk-tag>.ico{animation:upArrowHop .8s ease-in-out infinite}
@keyframes upArrowHop{0%,100%{transform:translateY(0)}50%{transform:translateY(-35%)}}
html.scene-v2 #play .oven .upg small{font-size:3.4cqh}
html.scene-v2 #play .oven .upg.can{background:transparent;animation:none}
html.scene-v2 #play .oven .upg{position:relative}
html.scene-v2 #play .oven .upg.can::before{content:"";position:absolute;left:-18%;right:-18%;top:-45%;bottom:-45%;pointer-events:none;z-index:-1;
  background:radial-gradient(closest-side,rgba(255,214,110,.75),rgba(255,190,60,.3) 55%,rgba(255,180,40,0));animation:upHalo 1.6s ease-in-out infinite}

/* 끌고 가는 동안은 캔버스가 손님·쓰레기통 판정을 가리지 않게 */
html.dragging #play canvas#benchCv,
html.dragging #play canvas#ovenCv{pointer-events:none!important}

#flyCv{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:30}
html:not(.in-play) #flyCv{visibility:hidden}
/* 영업 화면에서는 전체화면·소리 버튼을 HUD 높이에 맞춘다 */
html.in-play #chrome{top:2px;right:4px}
html.in-play #chrome button{min-height:24px;min-width:30px;padding:0 6px;font-size:14px;border-radius:3px}

/* ===== 가게 붕괴 신호 (game.js의 shopWarn) =====
   .shop-dim은 배경 그림만 덮는다(z-index 1: 손님·카드·재료·도마보다 아래). 주문 카드 숫자 읽기를 막지 않는다.
   먼지는 벽과 오븐 쪽에서 떨어진다. 자리(left)는 game.js dustFall이 주문 카드를 피해 잡는다. */
html.scene-v2 #play .shop-dim{position:absolute;inset:0;z-index:1;background:#0c0703;opacity:0;pointer-events:none}
html.scene-v2 #play .shop-dim.flick{animation:shopFlick .22s steps(1,end)}
@keyframes shopFlick{0%{opacity:.55}30%{opacity:.08}55%{opacity:.45}100%{opacity:0}}
html.scene-v2 #play .shop-unstable:not(.shop-collapse) .shop-dim:not(.flick){animation:shopTremble 1.4s steps(1,end) infinite}
@keyframes shopTremble{0%{opacity:0}18%{opacity:.07}30%{opacity:.02}62%{opacity:.09}74%{opacity:0}88%{opacity:.05}}
/* 벽 금(3번째 하트): 작은 도트 금(tools/dot-cracks.py). 벽돌 줄눈을 따라 꺾인다. 몇 단계에 걸쳐 툭툭 끊기며 나타난다 */
html.scene-v2 #play .shop-cracks{position:absolute;inset:0;z-index:1;pointer-events:none;opacity:0;
  background:url('assets/shop-cracks.png') 0 0 / 100% 100% no-repeat;image-rendering:pixelated;clip-path:inset(0 0 100% 0)}
html.scene-v2 #play .shop-cracked .shop-cracks{opacity:1;animation:crackGrow .9s steps(5,end) forwards}
/* 4번째: 작은 금은 그대로 두고, 큰 금 그림을 한 겹 더 얹어 위쪽 절반쯤까지만 펼친다.
   5번째(무너짐): 그 자리에서 이어서 끝까지 갈라진다(사용자) */
html.scene-v2 #play .shop-cracks::after{content:'';position:absolute;inset:0;background:url('assets/shop-cracks-big.png') 0 0 / 100% 100% no-repeat;
  image-rendering:pixelated;opacity:0;clip-path:inset(0 0 100% 0)}
html.scene-v2 #play .shop-cracked2 .shop-cracks::after{opacity:1;animation:crackMid .8s steps(4,end) forwards}
html.scene-v2 #play .shop-collapse .shop-cracks::after{opacity:1;animation:crackGrow .8s steps(6,end) forwards}
html.scene-v2 #play .shop-cracked2.shop-collapse .shop-cracks::after{animation:crackRest .6s steps(4,end) forwards}
/* 무너질 때는 금이 어두워지는 막 위에 오고(같은 z, 뒤에 붙은 요소가 위), 조명은 금이 다 갈라진 뒤(.7초) 꺼지기 시작한다 */
html.scene-v2 #play .shop-collapse .shop-cracks{z-index:20}
@keyframes crackGrow{from{clip-path:inset(0 0 100% 0)}to{clip-path:inset(0 0 0 0)}}
/* 큰 금 그림은 위쪽 4~33%에 있다. 19%까지 펼치면 네 줄기가 절반쯤 내려온다 */
@keyframes crackMid{from{clip-path:inset(0 0 100% 0)}to{clip-path:inset(0 0 81% 0)}}
@keyframes crackRest{from{clip-path:inset(0 0 81% 0)}to{clip-path:inset(0 0 0 0)}}
html.scene-v2 #play .shop-dust{position:absolute;inset:0;z-index:6;pointer-events:none;overflow:hidden}
html.scene-v2 #play .shop-dust i{position:absolute;top:-2%;width:1.15cqh;height:1.15cqh;border-radius:50%;
  background:#5c4636;box-shadow:1.4cqh 2.2cqh 0 -0.2cqh #3d2e22,-0.9cqh 4.2cqh 0 -0.25cqh #6e5644;
  animation:dustDrop 1.2s linear both}
html.scene-v2 #play .shop-dust i.bit{width:2.3cqh;height:2.3cqh;background:#6a5040}
html.scene-v2 #play .shop-dust i.chunk{width:4.2cqh;height:3.1cqh;border-radius:0.35cqh;background:#4e3828;
  box-shadow:0.8cqh 1cqh 0 -0.1cqh #2e2118,1.6cqh 2.4cqh 0 -0.35cqh #6a5040}
@keyframes dustDrop{0%{transform:translate(0,0);opacity:0}10%{opacity:1}100%{transform:translate(1.5cqh,70cqh);opacity:0}}
/* 5회: 조명이 꺼지며 무너진다. 어두운 막은 가게 그림 위만 덮고, 위쪽 하트·시간 막대는 그대로 밝다. 마지막은 90%. */
html.scene-v2 #play .shop-collapse .shop-dim{z-index:20;animation:lightsOut 1.3s .7s ease-in both}
@keyframes lightsOut{0%{opacity:.2}15%{opacity:.7}25%{opacity:.25}40%{opacity:.8}100%{opacity:.9}}
html.scene-v2 #play .shop-collapse .shop-dust{z-index:21}
html.scene-v2 #play .shop-collapse .shop-dust i{border-radius:0.3cqh;background:#8a6a44;animation-duration:.75s}
html.scene-v2 #play .shop-collapse .shop-dust i.chunk{width:4.2cqh;height:3.1cqh}
/* 동작 줄이기는 3회째의 계속되는 미세한 떨림만 끈다.
   무너질 때는 .shop-unstable이 그대로 남아 있는데, 그 규칙이 lightsOut보다 세면 불이 안 꺼진다. */
@media (prefers-reduced-motion:reduce){
  html.scene-v2 #play .shop-unstable:not(.shop-collapse) .shop-dim:not(.flick){animation:none}
}

/* 도트 아이콘(tools/dot-icons.py → assets/icons/). 글자 크기(1em)에 맞춰 칸 그대로 키운다 */
.ico{display:inline-block;width:1.1em;height:1.1em;vertical-align:-0.2em;background:center/contain no-repeat;image-rendering:pixelated}
.ico-coin{background-image:url('assets/icons/coin.png')}
.ico-clock{background-image:url('assets/icons/clock.png')}
.ico-heart{background-image:url('assets/icons/heart.png')}
.ico-anger{background-image:url('assets/icons/anger.png')}
.ico-drop{background-image:url('assets/icons/drop.png')}
.ico-lock{background-image:url('assets/icons/lock.png')}
.ico-up{background-image:url('assets/icons/up.png')}
.coinfly .ico{width:1em;height:1em;vertical-align:top}

/* ===== 엔딩(2026-09-30) ===== 그림(1280×720)을 720×360 무대에 가득 채우고 천천히 다가간다. 케이크는 그 위 캔버스에 코드로 */
#ending{padding:0;background:#1d130c;overflow:hidden;cursor:pointer}
#ending .end-scene{position:absolute;inset:0;opacity:0;transition:opacity .7s ease}
#ending .end-scene.on{opacity:1;animation:endPan 14s ease-out forwards}
#ending .end-img,#ending .end-cv{position:absolute;left:0;top:-22.5px;width:720px;height:405px;image-rendering:pixelated}
#ending .end-cv{top:0;height:360px}
#ending.is-true .end-scene.on{animation-duration:10s}
@keyframes endPan{from{transform:scale(1)}to{transform:scale(1.06)}}
#ending .end-order{position:absolute;right:92px;top:40px;width:88px;height:128px;background:#fffdf6;border:2px solid #d94b43;border-radius:8px;
  box-shadow:0 3px 0 rgba(0,0,0,.25);opacity:0;transform:scale(.4);transition:opacity .35s,transform .45s cubic-bezier(.3,1.6,.5,1)}
#ending .end-order.on{opacity:1;transform:scale(1)}
#ending .end-order canvas{width:100%;height:100%;image-rendering:pixelated}
#ending .end-say{position:absolute;left:50%;bottom:14px;transform:translateX(-50%);max-width:680px;min-width:220px;white-space:nowrap;padding:8px 16px 8px 16px;
  background:#fffdf6;border:2px solid #3b2a1a;border-radius:12px;font:700 17px/1.4 Jua,Pretendard,'Malgun Gothic',sans-serif;color:#3b2a1a;
  text-align:center;word-break:keep-all;box-shadow:0 3px 0 rgba(0,0,0,.3);z-index:2}
#ending .end-say .say-next{position:relative;left:0;margin-left:6px;color:#c8742a;font-style:normal;animation:sayNext .8s ease-in-out infinite}
#ending .end-skip{position:absolute;left:10px;top:8px;z-index:3;padding:4px 10px;border:0;border-radius:999px;background:rgba(0,0,0,.45);
  color:#fff;font:700 13px Jua,Pretendard,'Malgun Gothic',sans-serif;cursor:pointer}
#ending:not(.is-true) .end-skip{display:none}   /* 평범한 엔딩은 두 마디뿐이라 건너뛰기가 필요 없다 */
/* 진엔딩 ★(2026-09-30, 사용자: 이름에 적은 글자 별과 구분되게 움직인다): 살짝 흔들리며 반짝이고, 가끔 빛이 번진다 */
.rank-star{display:inline-block;margin-left:4px;color:#f2b400;text-shadow:0 1px 0 #7a4a00;transform-origin:50% 55%;
  animation:rankStar 2.4s ease-in-out infinite}
tr:nth-child(2n) .rank-star{animation-delay:-.8s}
tr:nth-child(3n) .rank-star{animation-delay:-1.6s}
@keyframes rankStar{
  0%,100%{transform:rotate(-8deg) scale(1);color:#f2b400;text-shadow:0 1px 0 #7a4a00}
  45%{transform:rotate(8deg) scale(1.12)}
  55%{transform:rotate(0) scale(1.28);color:#fff3b0;text-shadow:0 1px 0 #7a4a00,0 0 6px #ffd84a,0 0 12px rgba(255,200,60,.8)}
  70%{transform:rotate(-4deg) scale(1)}
}
@media (prefers-reduced-motion:reduce){.rank-star{animation:none;transform:scale(1.15);text-shadow:0 1px 0 #7a4a00,0 0 5px #ffd84a,0 0 10px rgba(255,200,60,.7)}}   /* 움직임 줄이기 설정이면 멈춘 채 빛만 번지게 해서 글자 별과 구분 */
#ending.say-top .end-say{bottom:auto;top:40px;left:auto;right:14px;transform:none}   /* 잔치: 오른쪽 위 하늘에 둔다(코끼리 얼굴·케이크를 가리지 않게) */

/* ===== 첫 화면 명예의 전당(2026-09-30, 사용자: 다른 게임처럼) ===== 오븐 위 벽에 1위 카드, 누르면 Top 20 창 */
#intro .intro-champ{position:absolute;left:12px;top:6px;z-index:5;max-width:200px;display:flex;align-items:center;gap:5px;
  padding:2px 9px;cursor:pointer;font:inherit;font-size:12px;line-height:1.4;white-space:nowrap;
  color:#ffd98a;background:rgba(255,217,138,.08);border:1px solid rgba(255,217,138,.45);border-radius:999px}
#intro .intro-champ:hover{background:rgba(255,217,138,.18);border-color:rgba(255,217,138,.8)}
#intro .ic-lab{font-weight:700;opacity:.9}
#intro .ic-name{min-width:0;overflow:hidden;text-overflow:ellipsis;font-weight:800;color:#fff3d8}
#intro .ic-score{font-weight:700;color:#ffd24a}
#intro .ic-go{color:#ffd98a;opacity:.8}
#intro .ic-name .rank-star{margin-left:2px}
#rankModal .rank-card{width:min(440px,92vw);max-height:86vh;display:flex;flex-direction:column}
#rankModal h2{margin:0 0 8px}
#rankModal .rank-scroll{overflow:auto;min-height:0;flex:1;margin-bottom:10px}
.rank-table{width:100%;border-collapse:collapse}
.rank-table td,.rank-table th{font-size:16px;padding:5px 8px;border-bottom:1px solid rgba(120,80,40,.15);text-align:left}
.rank-table .r{text-align:right}
.rank-table .me td{font-weight:800;color:#c9631f;background:#fff7e6}

/* ===== 수업 전용 칠판(?teach=1) ===== */
#teach{padding:0;background:#2a1a10 url('assets/kitchen-bg-v3.png') center / cover no-repeat}
#teach::before{content:'';position:absolute;inset:0;background:rgba(18,9,3,.55);pointer-events:none}
#teach .teach-top{position:relative;z-index:2;display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;padding:8px 56px 4px 10px}
#teach .teach-seg,#pracBar .teach-seg{display:flex;border:2px solid #8a5a2b;border-radius:8px;overflow:hidden;background:#fffaf0}
#teach .teach-seg button,#pracBar .teach-seg button{border:0;background:none;padding:5px 10px;font:800 15px Jua,Pretendard,'Malgun Gothic',sans-serif;color:#6e4220;cursor:pointer}
#teach .teach-seg button.on,#pracBar .teach-seg button.on{background:#f5a623;color:#fff}
#teach .teach-k,#pracBar .teach-k{display:flex;align-items:center;gap:6px;background:#fffaf0;border:2px solid #8a5a2b;border-radius:8px;padding:2px 6px}
#teach .teach-k b,#pracBar .teach-k b{min-width:58px;text-align:center;font:800 18px Jua,Pretendard,'Malgun Gothic',sans-serif;color:#d94b43}
#teach .teach-k button,#pracBar .teach-k button{width:28px;height:28px;border:0;border-radius:6px;background:#8a5a2b;color:#fff;font:800 18px/1 Jua,sans-serif;cursor:pointer}
#teach .teach-k button:disabled,#pracBar .teach-k button:disabled{opacity:.35;cursor:default}
#teach .teach-act,#pracBar .teach-act{border:2px solid #8a5a2b;border-radius:8px;background:#fffaf0;padding:5px 10px;font:800 14px Jua,Pretendard,'Malgun Gothic',sans-serif;color:#6e4220;cursor:pointer}
#teach .teach-act.on,#pracBar .teach-act.on{background:#d94b43;border-color:#a8332c;color:#fff}
#teach #teachCv{position:relative;z-index:1;width:720px;height:314px;display:block}

#teach .teach-title{font:800 20px Jua,Pretendard,'Malgun Gothic',sans-serif;color:#ffd98a;margin-right:6px}
#teach .teach-act:disabled{opacity:.4;cursor:default}
#teach .teach-next{background:#f5a623;border-color:#c9761a;color:#fff}
/* 수업 전용 연습: 위쪽 HUD 대신 문제 고르기 막대. 시간·하트·코인·끝내기·굽기·오븐 업그레이드는 숨긴다 */
#pracBar{position:absolute;left:0;right:0;top:4px;z-index:30;display:flex;align-items:center;justify-content:center;gap:8px}
#pracBar[hidden]{display:none}
html.practice-on #play .hud{visibility:hidden}
html.practice-on #ovenUp,html.practice-on .oven-head{display:none}
html.practice-on #endBtn{display:none}
/* 수업 전용: 오븐 자리를 치우고 도마를 그만큼 넓힌다(캔버스 760×360, 원래 525×360 → 폭 43.75% × 760/525) */
html.practice-on #play .oven-station{display:none}
html.practice-on #play .bench-station{width:63.33%}
/* 도마가 넓어져도 버튼은 원래 크기·자리(캔버스 비율 525/760만큼 줄인다). 굽기가 없어 두 개 */
html.practice-on #play .bench-actions{left:24.66%;width:44.42%}
html.practice-on #play .slot .pat{display:none}   /* 수업 전용: 주문표 옆 인내심 막대도 숨긴다(사용자) */
/* 정답 보기 「다음 ▸」: 넘길 단계가 남아 있으면 벌떡벌떡(사용자). 마지막 단계에서 꺼지면 멈춘다 */
#teach .teach-next:not(:disabled){animation:nextBeat 1.1s ease-in-out infinite;transform-origin:50% 60%}
@keyframes nextBeat{0%,55%,100%{transform:scale(1)}15%{transform:scale(1.14) translateY(-2px)}30%{transform:scale(.96)}42%{transform:scale(1.06)}}
@media (prefers-reduced-motion:reduce){#teach .teach-next:not(:disabled){animation:none;box-shadow:0 0 0 3px rgba(255,210,74,.6)}}
/* 수업 전용 배경: 카운터·도마를 오른쪽 끝 근처까지 늘린 그림(tools/practice-bg-long.py) */
html.practice-on.scene-v2 #play .scene-body{background-image:url('assets/kitchen-bg-v3-tray-long.png?v=1')}
/* 수업 전용 도마 캔버스 760×520: 위로 170 늘림(760×530)(무대 축척 0.6 유지). 버튼 줄은 원래 무대 자리·높이 */
html.practice-on #play .bench-station{top:-5%;height:88.33%}
html.practice-on #play .bench-actions{height:17.69%}
/* 수업 전용: 첫 화면(이름 입력·오프닝)은 쓰지 않는다. 그림을 받는 동안에도 비치지 않게 */
html.practice-on #intro{display:none!important}
/* 수업 전용 로딩 창 */
#pracLoad{position:fixed;inset:0;z-index:100000;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;
  background:#2a1a10;color:#ffd98a;font:800 20px Jua,Pretendard,'Malgun Gothic',sans-serif;transition:opacity .35s}
#pracLoad.done{opacity:0;pointer-events:none}
#pracLoad .pl-cat{width:120px;height:120px;background:url('assets/intro-nyangsooni.png') center bottom / contain no-repeat;image-rendering:pixelated;animation:plBob 1.1s ease-in-out infinite}
@keyframes plBob{0%,100%{transform:translateY(0)}50%{transform:translateY(-8px)}}
#pracLoad .pl-track{width:min(260px,70vw);height:8px;border-radius:6px;background:rgba(0,0,0,.4);border:1px solid rgba(255,210,74,.5);overflow:hidden}
#pracLoad .pl-track i{display:block;height:100%;width:100%;transform:scaleX(0);transform-origin:left;background:linear-gradient(90deg,#f5a623,#ffd24a);transition:transform .2s}
#pracLoad span{font-size:14px;color:#ffe2ae}
