:root{--espresso:#30231d;--mocha:#6e4735;--latte:#9b6a4c;--cream:#f8f0e1;--paper:#fffaf0;--honey:#e4b976;--leaf:#567563;--rose:#bf7775;--border:#e8d7bf;--shadow:0 13px 34px #65463118;--font:'Pretendard','Malgun Gothic','Apple SD Gothic Neo',system-ui,sans-serif}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;min-width:320px;color:var(--espresso);font-family:var(--font);background:radial-gradient(ellipse 750px 500px at -12% 13%,#f9e3c6 0,transparent 65%),radial-gradient(ellipse 650px 600px at 104% 49%,#e6e6ce 0,transparent 65%),#f7f0e6;line-height:1.45}button{font:inherit;cursor:pointer}button:disabled{opacity:.48;cursor:not-allowed;filter:grayscale(.4)}img{max-width:100%}.topbar{min-height:76px;max-width:1600px;margin:auto;padding:12px 25px;display:flex;justify-content:space-between;align-items:center;gap:16px}.brand{display:flex;align-items:center;gap:10px;white-space:nowrap}.brand-symbol{width:52px;height:52px;border-radius:16px;background:linear-gradient(155deg,#f6d9aa,#be9164);display:grid;place-items:center;font-size:27px;box-shadow:0 5px 0 #916b4d36}.brand b{font-family:Georgia,serif;font-size:22px;letter-spacing:.5px}.brand em{font-style:normal;color:#ab714b}.brand small{display:block;font-size:9px;font-weight:800;letter-spacing:3px;color:#af8b6f}.nav-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap;justify-content:flex-end}.save-status{font-size:11px;color:#68816a;margin-right:5px}.outline-btn,.icon-btn{background:#fffcf6;border:1px solid #e4d5bd;padding:10px 12px;color:#6e5445;border-radius:12px;font-weight:800;font-size:12px;box-shadow:0 2px 5px #4a2c1310}.outline-btn:hover,.icon-btn:hover{background:#f6ead6}.icon-btn{width:41px;height:41px}.app{max-width:1600px;margin:auto;padding:0 23px}.hud{display:grid;grid-template-columns:1fr 1fr 1fr 1fr 1.15fr;gap:12px;margin:5px 0 16px}.stat{background:#fffcf5ed;border:1px solid #eaddca;border-radius:18px;min-height:102px;padding:13px 18px;box-shadow:0 6px 18px #77502c10;display:flex;flex-direction:column;justify-content:center;gap:2px;position:relative;overflow:hidden}.stat:after{content:'';position:absolute;background:#f5e4c8;border-radius:50%;width:74px;height:74px;top:-36px;right:-20px;opacity:.4}.stat span{color:#9b7f6c;font-size:11px;font-weight:900;letter-spacing:.6px}.stat strong{font-size:23px;letter-spacing:-.6px;color:#4c3226;font-weight:950;font-variant-numeric:tabular-nums}.stat small{font-size:11px;color:#a08a77;font-weight:700}.clock-track{height:7px;background:#eee2d3;border-radius:99px;overflow:hidden;margin-top:4px}.clock-track i{display:block;height:100%;background:linear-gradient(90deg,#94aa7b,#e6ae65);transition:width .35s}.layout{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(375px,.83fr);gap:19px;align-items:start}.scene-panel,.work-panel{min-width:0}.scene-heading{padding:5px 9px 12px}.section-title{display:flex;align-items:flex-end;justify-content:space-between}.eyebrow{font-size:10px;font-weight:950;letter-spacing:1.8px;color:#a78564}.section-title h1{font-size:23px;margin:2px 0 0;font-weight:950;letter-spacing:-.65px}.day-tag{font-size:12px;font-weight:850;padding:7px 12px;background:#e4eadc;color:#68806c;border-radius:99px}.scene{height:auto;aspect-ratio:16/9;border-radius:24px;overflow:hidden;position:relative;background:#d0a57c;isolation:isolate;box-shadow:0 15px 36px #59392725;border:7px solid #fffcf5}.scene-bg{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:-3}.scene-vignette{position:absolute;inset:0;background:linear-gradient(180deg,#361b1d48 0%,transparent 23%,transparent 70%,#28130b38 100%);z-index:-1;pointer-events:none}.hanging-note{position:absolute;top:15px;left:18px;background:#fff8e6d9;color:#714e3d;font-weight:850;padding:7px 13px;border-radius:30px;font-size:clamp(10px,.85vw,12px);border:1px solid #fff7df;box-shadow:0 4px 15px #4f352b28;z-index:4;max-width:56%;backdrop-filter:blur(4px)}.scene-speech{position:absolute;top:72px;right:8%;background:#fffdf3;box-shadow:0 9px 19px #442b212b;border:2px solid #dfb887;border-radius:19px 19px 8px 19px;padding:11px 15px;color:#5c4033;font-size:clamp(11px,1.2vw,16px);font-weight:900;max-width:41%;min-width:136px;line-height:1.35;z-index:5;transform-origin:bottom right;animation:speechIn .45s ease}.scene-speech:after{content:'';position:absolute;right:18px;bottom:-12px;border-left:13px solid transparent;border-top:14px solid #fffdf3}.bara-sprite{position:absolute;bottom:6%;right:1.5%;height:72%;width:auto;z-index:3;filter:drop-shadow(1px 15px 12px #30180e48);animation:baraBreathe 3s ease-in-out infinite;pointer-events:none;object-fit:contain}.bara-sprite.react{animation:baraPop .48s cubic-bezier(.2,1.5,.5,1) , baraBreathe 3s ease-in-out .5s infinite}.scene-label{position:absolute;bottom:19px;left:26px;color:#fff3d0;font:900 clamp(12px,1.65vw,20px) Georgia,serif;letter-spacing:2px;text-shadow:0 2px 10px #392920;z-index:4}.scene-label span{color:#ffe3a3}.guest-stage{position:absolute;bottom:14%;left:8%;height:47%;width:67%;display:flex;align-items:flex-end;justify-content:flex-start;gap:0;z-index:2;pointer-events:none}.guest-sprite{height:100%;max-width:29%;object-fit:contain;margin-left:-3%;filter:drop-shadow(1px 10px 8px #2c181d4b);transform-origin:50% 95%;animation:guestBounce 2.7s ease-in-out infinite;transition:opacity .25s}.guest-sprite:nth-child(2){height:88%;animation-delay:.45s}.guest-sprite:nth-child(3){height:79%;animation-delay:.8s}.guest-sprite:nth-child(4){height:72%;animation-delay:1.1s}.scene-bottom{min-height:64px;display:flex;align-items:center;gap:15px;justify-content:space-between;padding:10px 16px;margin:0 0 15px;border-radius:0 0 18px 18px;background:#fffaf1;border:1px solid #e9dac7;box-shadow:0 6px 14px #7057390e}.scene-bottom span{font-size:13px;font-weight:750;color:#856e5d}.small-primary{color:#fff7eb;background:#6c503a;border:0;border-radius:12px;padding:11px 17px;font-weight:900;white-space:nowrap}.small-primary:hover{background:#896247}.bottom-panes{display:grid;grid-template-columns:1.35fr .85fr;gap:15px}.upgrades-card,.story-card,.orders-block,.craft-block,.pantry-block{background:#fffdf7ed;border:1px solid #e8dac7;border-radius:20px;box-shadow:var(--shadow);padding:16px;min-width:0}.pane-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:13px}.pane-heading h2{font-size:18px;letter-spacing:-.5px;margin:2px 0 0}.pane-heading>span,#upgradeHint{font-size:10px;font-weight:750;color:#a38770}.upgrades{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.upgrade-item{border:1px solid #e8d7bd;border-radius:14px;background:#faf1e3;padding:12px;text-align:left;transition:transform .16s,background .16s;min-height:93px}.upgrade-item:hover:not(:disabled){background:#f4e4ce;transform:translateY(-2px)}.upgrade-top{display:flex;justify-content:space-between;align-items:center;gap:6px}.upgrade-item b{font-size:12px}.upgrade-item .upgrade-icon{font-size:24px}.upgrade-item small{display:block;font-size:10px;color:#927865;margin:4px 0}.upgrade-item .cost{display:inline-block;font-size:11px;color:#fff;border-radius:9px;background:#866149;padding:4px 8px;font-weight:900}.upgrade-item .lv{font-size:10px;float:right;font-weight:950;color:#759273}.diary-list{margin:8px 0 0;padding:0 0 0 20px;max-height:258px;overflow-y:auto;font-size:12px;color:#755844}.diary-list li{margin:0 0 10px;line-height:1.5;border-bottom:1px dashed #ead9c5;padding-bottom:8px}.work-panel{display:flex;flex-direction:column;gap:14px}.count-pill{display:inline-grid;place-items:center;background:#b78255;color:white;border-radius:100px;font-size:12px;min-width:25px;height:25px;vertical-align:middle}.mini,.muted{color:#aa8d74;font-size:10px}.orders-list{display:grid;grid-template-columns:1fr;gap:8px;max-height:338px;overflow-y:auto}.empty-orders{min-height:78px;border:1.5px dashed #d9c8b4;background:#f9f2e8;border-radius:14px;display:flex;justify-content:center;align-items:center;flex-direction:column;color:#957b64;font-size:12px;font-weight:800}.empty-orders span{font-size:28px;line-height:1.4}.order-ticket{display:flex;align-items:center;gap:10px;text-align:left;background:#faf4e9;border:2px solid transparent;border-radius:15px;padding:7px 9px;width:100%;position:relative;transition:background .15s,transform .15s}.order-ticket:hover{background:#f1e4d2;transform:translateX(2px)}.order-ticket.selected{background:#f4e8d1;border-color:#cbad7c}.order-ticket img{width:59px;height:59px;object-fit:contain;flex:0 0 auto}.ticket-text{flex:1;min-width:0}.ticket-text b{display:block;font-size:13px}.ticket-text small{color:#977d68;font-size:10px}.ticket-tail{display:flex;gap:6px;align-items:center;justify-content:space-between;margin-top:3px}.ticket-tail span{font-weight:900;font-size:12px;color:#866240}.patience{height:5px;background:#dfd0c0;border-radius:22px;overflow:hidden;margin-top:4px}.patience i{height:100%;display:block;background:#90a67f;transition:width .15s linear}.patience.low i{background:#d88477}.vip-mark{font-size:10px;color:#af6b26;background:#fff0bd;padding:4px 7px;border-radius:10px;font-weight:900}.status-pill{color:#9a6d4f;font-size:11px;background:#f5e7d4;padding:5px 9px;border-radius:99px;font-weight:900}.active-order{display:flex;align-items:center;gap:15px;border:1px solid #efdcc3;background:linear-gradient(90deg,#fff6e7,#fffaf2);border-radius:15px;min-height:103px;padding:7px 12px}.active-order img{width:91px;height:89px;object-fit:contain;flex-shrink:0}.active-order b{font-size:15px}.active-order p{font-size:11px;color:#97745f;margin:3px 0 0;line-height:1.4}.recipe-steps{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin:10px 1px;min-height:40px}.step-placeholder{font-size:11px;color:#978572}.recipe-step{display:flex;align-items:center;gap:4px;padding:6px 7px;border:1px solid #eadac8;border-radius:9px;background:#f8f0e7;font-size:11px;font-weight:850;color:#9c8571}.recipe-step.done{border-color:#9fb79c;background:#e6f1e4;color:#55755b}.recipe-step.next{border-color:#d9a56d;box-shadow:0 0 0 2px #f7dfbb;background:#ffeed8;color:#8e5f33}.recipe-step i{font-style:normal;color:#bc9e83}.ingredients-head{display:flex;align-items:center;justify-content:space-between;margin:8px 1px 9px;gap:4px}.ingredients-head b{font-size:12px}.ingredients-head span{font-size:9px;color:#ac8f78}.ingredient-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:6px}.ingredient{background:#fffbf3;border:1px solid #e3d1ba;border-radius:11px;min-width:0;aspect-ratio:1/.98;display:flex;align-items:center;justify-content:center;flex-direction:column;padding:5px 2px;position:relative;transition:transform .15s,background .15s}.ingredient:hover:not(:disabled){transform:translateY(-3px);background:#f4ead9;box-shadow:0 4px 8px #7d553021}.ingredient.highlight{border-color:#9faf7b;background:#edf4dc}.ingredient img{width:48%;height:50%;object-fit:contain}.ingredient b{font-size:9px;white-space:nowrap}.ingredient small{color:#a5896d;font-size:9px;font-weight:800}.ingredient kbd{position:absolute;top:2px;right:4px;color:#a9a097;font-size:9px;font-weight:800}.ingredient.out{border-color:#dfb4a9;background:#faeeea}.prep-actions{display:grid;grid-template-columns:.75fr 1fr 1.15fr;gap:7px;margin-top:12px}.soft-button,.action-button{border-radius:11px;padding:12px 4px;font-size:12px;font-weight:950;border:1px solid #dcc8ae;background:#f8ecdb;color:#735544}.action-button{color:#fff;background:#7b6a52;border-color:#705b45}.action-button.serve{background:linear-gradient(120deg,#738e68,#557b6d);border-color:#577666}.action-button:hover:not(:disabled){filter:brightness(1.08)}.brew-progress{height:7px;background:#f0e5d7;overflow:hidden;border-radius:22px;margin:9px 2px}.brew-progress i{height:100%;background:linear-gradient(90deg,#97b086,#e7c482);width:0%;display:block;transition:width .08s}.prep-hint{color:#987d66;font-size:11px;margin:0;line-height:1.5;min-height:32px}.stock-list{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}.stock-item{padding:6px 4px 7px;background:#f8f0e5;border-radius:10px;border:1px solid #eadbc7;text-align:center}.stock-item strong{font-size:10px}.stock-item span{display:block;font-size:10px;color:#8b735d}.stock-item button{border:0;border-radius:7px;padding:5px 6px;font-size:9px;font-weight:900;background:#e7d5bd;color:#664534;margin-top:3px}.stock-item button:hover:not(:disabled){background:#d8b896}.stock-item.out{background:#f7e6e2;border-color:#d89c91}.footer{text-align:center;color:#aa927c;font-size:11px;padding:28px 12px 35px}.overlay{position:fixed;inset:0;background:#1f1a19c9;display:grid;place-items:center;z-index:200;padding:20px;backdrop-filter:blur(6px);overflow-y:auto}.overlay.hidden{display:none}.intro-card{width:min(900px,97vw);background:#fffaf0;border:7px solid #f9e3bf;border-radius:28px;box-shadow:0 35px 90px #1c130d75;overflow:hidden;animation:popIn .6s cubic-bezier(.2,1.25,.4,1)}.intro-art{background:linear-gradient(90deg,#301d208c,transparent 68%),url('assets/ui/cover.webp') center 53%/cover;min-height:300px;padding:70px 6% 35px;color:#fff5e1;position:relative}.intro-kicker{font-size:11px;font-weight:950;letter-spacing:4px;color:#ffd9a3}.intro-art h2{font-family:Georgia,serif;font-size:clamp(54px,10vw,102px);margin:5px 0 0;line-height:1.1;letter-spacing:-4px;text-shadow:0 4px 18px #321d14a8}.intro-art h2 em{font-style:italic;color:#f0c488}.intro-art p{font-size:22px;font-weight:900;letter-spacing:2px;margin:8px 0}.intro-content{padding:24px 34px 30px;text-align:center}.intro-highlight{font-size:19px;font-weight:950;color:#5a4233}.intro-content p{font-size:14px;color:#947762;line-height:1.75;max-width:650px;margin:10px auto 16px}.intro-chips{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;margin:16px 0 24px}.intro-chips span{background:#f3e4cc;border-radius:99px;padding:7px 13px;color:#83644d;font-size:11px;font-weight:850}.intro-play{display:block;width:min(100%,420px);margin:auto;border:0;background:linear-gradient(110deg,#6d503b,#987052);color:#fff8ef;font-size:16px;font-weight:950;padding:17px;border-radius:15px;box-shadow:0 7px 0 #5136282c}.intro-play:hover{transform:translateY(-2px);filter:brightness(1.05)}.intro-content small{display:block;margin-top:12px;color:#ad9780;font-size:10px}.modal-card{width:min(710px,97vw);max-height:min(92vh,900px);overflow:auto;position:relative;background:#fffbf2;border:5px solid #ecd5b7;border-radius:22px;padding:32px;box-shadow:0 25px 70px #150e095e;animation:popIn .35s ease}.modal-close{position:sticky;top:0;float:right;background:#ead9c4;border:0;border-radius:50%;width:35px;height:35px;z-index:1}.modal-card h2{font-family:Georgia,serif;font-size:29px;margin:0 0 10px}.modal-card h3{color:#684b38;font-size:17px}.modal-card p{font-size:14px;color:#806c5a;line-height:1.75}.modal-card ul{font-size:13px;line-height:2;color:#856e5c;padding-left:20px}.modal-card .modal-actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:24px}.modal-action{border:0;background:#6a513e;color:white;border-radius:12px;padding:12px 18px;font-weight:900}.modal-action.secondary{background:#ead9c3;color:#73513d}.recipe-book{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.recipe-book .recipe-card{text-align:center;background:#f8ecde;border:1px solid #ead5bf;border-radius:15px;padding:10px 5px}.recipe-card img{width:100px;height:90px;object-fit:contain}.recipe-card b{display:block;font-size:13px}.recipe-card small{font-size:10px;color:#806753}.recipe-card.locked{opacity:.52;filter:grayscale(1)}.result-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:18px 0}.result-stats div{background:#f6ead8;border-radius:12px;padding:15px 8px;text-align:center}.result-stats b{font-size:25px;display:block}.result-stats small{font-size:11px;color:#997b61}.toast-region{position:fixed;bottom:22px;left:50%;transform:translateX(-50%);z-index:500;pointer-events:none;display:flex;flex-direction:column;gap:6px;width:min(92vw,490px)}.toast{background:#41322b;color:#fff5e9;padding:13px 19px;border:1px solid #a8835b;border-radius:12px;text-align:center;font-size:13px;font-weight:850;box-shadow:0 8px 22px #39291b5c;animation:popIn .3s ease}.toast.positive{background:#547261}.toast.negative{background:#995f54}.spark{position:absolute;z-index:7;color:#ffec97;animation:riseOut 1.35s ease forwards;pointer-events:none;text-shadow:0 0 5px #5d452b}.weather-particles{position:absolute;inset:0;pointer-events:none;z-index:0;overflow:hidden}.rain-drop{position:absolute;background:#fffdeb7b;width:2px;height:22px;transform:rotate(18deg);animation:rainfall 1s linear infinite}.warm-light{position:absolute;inset:0;background:#eeac5233;pointer-events:none}@keyframes baraBreathe{0%,100%{transform:translateY(0)}50%{transform:translateY(-5px)}}@keyframes baraPop{0%{transform:scale(.87) translateY(10px);opacity:.5}60%{transform:scale(1.07) translateY(-12px);opacity:1}100%{transform:scale(1) translateY(0)}}@keyframes guestBounce{0%,100%{transform:translateY(0) rotate(-1deg)}50%{transform:translateY(-7px) rotate(1deg)}}@keyframes popIn{from{transform:translateY(20px) scale(.96);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}@keyframes speechIn{from{opacity:0;transform:scale(.8) translateY(8px)}to{opacity:1;transform:scale(1)}}@keyframes riseOut{0%{opacity:0;transform:translateY(15px) scale(.5)}15%{opacity:1}100%{opacity:0;transform:translateY(-100px) scale(1.45)}}@keyframes rainfall{from{transform:translateY(-70px) translateX(-30px) rotate(18deg)}to{transform:translateY(700px) translateX(160px) rotate(18deg)}}
@media(min-width:1450px){.ingredient-grid{grid-template-columns:repeat(6,1fr)}.ingredient{min-height:93px}}
@media(max-width:1130px){.layout{grid-template-columns:minmax(0,1fr) minmax(355px,.86fr);gap:12px}.hud{gap:6px}.stat{padding:12px}.stat strong{font-size:19px}.upgrades{grid-template-columns:1fr 1fr}.bottom-panes{grid-template-columns:1fr}.ingredient{aspect-ratio:1/1.18}.bara-sprite{height:73%;right:0}}
@media(max-width:800px){.layout{grid-template-columns:1fr}.hud{grid-template-columns:repeat(3,minmax(0,1fr))}.time-stat{grid-column:span 2}.scene{max-width:100%}.bottom-panes{grid-template-columns:1.2fr .8fr}.work-panel{display:grid;grid-template-columns:1fr 1fr;align-items:start}.orders-block{grid-column:1/2}.craft-block{grid-column:1/-1;grid-row:2}.pantry-block{grid-column:2;grid-row:1}.orders-list{max-height:315px}.ingredient-grid{grid-template-columns:repeat(6,1fr)}.ingredient{min-height:85px}.topbar{align-items:flex-start}.nav-actions{max-width:65%}}
@media(max-width:520px){.topbar{padding:10px;align-items:center}.brand-symbol{width:40px;height:40px;font-size:20px}.brand b{font-size:16px}.brand small{font-size:7px;letter-spacing:1.2px}.nav-actions{max-width:64%;gap:4px}.save-status{display:none}.outline-btn{padding:8px 9px;font-size:10px}.icon-btn{height:35px;width:35px;padding:5px}.nav-actions #helpBtn{display:none}.app{padding:0 8px}.hud{grid-template-columns:repeat(3,1fr);gap:5px;margin:6px 0 12px}.stat{border-radius:12px;min-height:75px;padding:9px}.stat strong{font-size:16px}.stat span,.stat small{font-size:9px}.time-stat{grid-column:span 2}.scene-heading{padding:0 6px 7px}.scene-heading h1{font-size:19px}.day-tag{font-size:10px;padding:5px 8px}.scene{border:3px solid white;border-radius:15px}.hanging-note{top:7px;left:8px;font-size:8px;padding:4px 7px;max-width:57%}.scene-speech{top:28px;right:3%;font-size:10px;padding:7px;min-width:100px;border-radius:11px;max-width:44%}.scene-label{bottom:8px;left:10px;font-size:10px}.scene-bottom{padding:8px;border-radius:0 0 12px 12px;gap:8px}.scene-bottom span{font-size:10px}.small-primary{font-size:11px;padding:8px 9px}.bottom-panes{grid-template-columns:1fr}.work-panel{display:flex;gap:8px}.upgrades-card,.story-card,.orders-block,.craft-block,.pantry-block{padding:12px;border-radius:14px}.pane-heading h2{font-size:16px}.pane-heading{margin-bottom:10px}.upgrades{grid-template-columns:repeat(2,1fr)}.orders-list{max-height:350px}.ingredient{min-height:62px;border-radius:9px}.ingredient img{width:43%;height:48%}.ingredient b{font-size:8px}.ingredient small{font-size:8px}.ingredient kbd{font-size:8px}.ingredient-grid{gap:4px}.stock-list{grid-template-columns:repeat(4,1fr)}.prep-actions{gap:5px}.active-order{min-height:85px}.active-order img{height:68px;width:71px}.intro-art{min-height:220px;padding:60px 6% 10px}.intro-art h2{letter-spacing:-2px;font-size:56px}.intro-art p{font-size:18px}.intro-content{padding:19px 13px 23px}.intro-highlight{font-size:16px}.intro-content p{font-size:12px}.intro-card{border-width:4px}.intro-chips{gap:5px}.intro-chips span{font-size:10px;padding:5px 7px}.intro-play{font-size:13px;padding:13px}.modal-card{padding:18px;border-width:3px}.modal-card h2{font-size:24px}.recipe-book{grid-template-columns:repeat(2,1fr)}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.01ms!important}}
/* Narrow-layout correction: flex children must stretch to full device width. */
@media(max-width:520px){.work-panel{align-items:stretch}.work-panel > section{width:100%;min-width:0}}

/* ---- Cafe BARA illustrated art direction v2 (assets from original user references) ---- */
:root{--espresso:#29170f;--coffee:#54351f;--paper:#fff5df;--gold:#d9a961}
body{background:radial-gradient(ellipse at 12% 0%,#dfc5a4 0,transparent 37%),linear-gradient(175deg,#dfc8aa 0,#f6eedf 30%,#ece0ca 100%)}
.topbar{background:linear-gradient(115deg,#362116,#65432c 48%,#2d1c13);border-bottom:3px solid #ac7950;box-shadow:0 7px 20px #26170f40;color:#fff6e5}
.brand em{color:#f2ce8a}.brand small{color:#ecd1ae}.brand-avatar{width:47px;height:47px;object-fit:cover;border-radius:13px;border:2px solid #d2a66e;background:#fff9ed;box-shadow:0 2px 8px #150d0944}
.topbar .outline-btn,.topbar .icon-btn{background:#6e4a32;color:#fff0d7;border-color:#aa8154;box-shadow:inset 0 1px 2px #ffffff20}.topbar .outline-btn:hover,.topbar .icon-btn:hover{background:#926343;color:white}.save-status{color:#e8cba8}
.stat{background:linear-gradient(125deg,#fffbef,#f5e5ca);border-color:#d5b98d;box-shadow:0 5px 15px #69432517}.stat strong{color:#52331f}
.scene{border:7px solid #d8b081;box-shadow:0 14px 30px #3b211f33,0 0 0 2px #4a2a1b}.scene-bg{object-fit:cover}
/* The scenic background features a barista at the counter, so reaction sprite lives in its own parchment portrait. */
.bara-sprite{right:2%;bottom:12%;width:clamp(75px,13%,125px);height:clamp(75px,17vw,136px);object-fit:cover;object-position:center;border:4px solid #ffe8b8;background:#fff8e7;border-radius:50%;box-shadow:0 8px 24px #32150b80, inset 0 2px 7px #fffaf7;filter:none;animation:baraBreathe 3.4s ease-in-out infinite}
.scene-speech{right:2%;left:auto;max-width:46%;top:17%;background:#fff7e7e8;border-color:#b68a5e}
.hanging-note{background:#3a241fdc;color:#f4dfa8;border-color:#ad8553;max-width:50%}.scene-label{bottom:8px;font-size:clamp(11px,1.5vw,20px)}
.guest-stage{left:2%;bottom:7%;width:49%;height:33%;gap:6px;align-items:end}
.guest-sprite{width:min(28%,105px);height:100%;max-width:unset;object-fit:cover;border:3px solid #fff2db;border-radius:24px 24px 12px 12px;background:#fff6e4;box-shadow:0 7px 16px #311b1370;margin-left:0;filter:none}
.guest-sprite:nth-child(n){height:100%}
.catalog-panel{margin-top:16px;background:#fff9e9;border:1px solid #c7a779;border-radius:20px;box-shadow:var(--shadow);padding:18px;overflow:hidden;position:relative}
.catalog-panel:before{content:'';position:absolute;inset:0;background:url('assets/ui/chalkboard.webp') center/cover;opacity:.09;pointer-events:none}
.catalog-panel>*{position:relative}.catalog-intro{font-size:12px;color:#86674b;margin:-5px 0 13px}.catalog-count{font-size:11px;font-weight:800;color:#795336;white-space:nowrap}
.catalog-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:11px}
.catalog-item{min-width:0;background:#fff8ed;border:1px solid #e0c29b;border-radius:15px;padding:7px;text-align:center;display:flex;flex-direction:column;gap:5px;cursor:pointer;transition:transform .15s,box-shadow .15s;box-shadow:0 3px 8px #552f1b17}
.catalog-item:hover{transform:translateY(-3px);box-shadow:0 6px 17px #552f1b36}.catalog-item img{width:100%;aspect-ratio:1;object-fit:cover;background:#fff9ec;border-radius:10px}.catalog-copy{display:flex;justify-content:space-between;gap:3px;align-items:center;flex-wrap:wrap;color:#53341e}.catalog-copy b{font-size:11px}.catalog-copy small{font-size:10px;color:#9f6b35;font-weight:800}.catalog-locked{opacity:.6}.catalog-locked img{filter:saturate(.45)}
.upgrade-item{position:relative;min-height:105px;padding:8px 11px;background:#fff6e6;border-color:#dac3a6}.upgrade-top{justify-content:flex-start;gap:10px}.upgrade-art{width:68px;height:68px;object-fit:cover;border:2px solid #dcbf94;border-radius:10px;background:#fff2dd;flex:none}.upgrade-item b{font-size:12px}.upgrade-item small{font-size:11px}.upgrade-item .lv{font-weight:800}
.stock-item{min-height:96px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;background:#fff8ec;border-color:#e1c8a3}.stock-art{width:65px;height:55px;object-fit:cover;border-radius:9px;border:1px solid #e9d4b3}.stock-item strong{font-size:11px}.stock-item button{font-weight:800}
.order-ticket{background:#fff7e7;border-color:#e0c39b}.order-ticket img{width:73px;height:73px;object-fit:cover;border-radius:11px;border:1px solid #ecd0a9}.active-order img{border-radius:11px;object-fit:cover}
.ingredient{background:#fff9ed}.ingredient img{object-fit:cover;border-radius:9px;box-shadow:0 2px 4px #42291722}.ingredient.highlight{box-shadow:0 0 0 2px #93a764,inset 0 0 12px #a3bf6b33}
.intro-art{min-height:335px;background:linear-gradient(90deg,#27170dbb 0,#27170d55 55%,#27170d19),url('assets/ui/cover.webp') center/cover}.intro-art h2{font-family:Georgia,serif;font-size:clamp(54px,9vw,93px)}
.recipe-book .recipe-card{background:#fff7e5}.recipe-card img{width:100%;height:auto;aspect-ratio:1;object-fit:cover;border-radius:9px}
.gallery-board{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin-top:14px}.gallery-board figure{margin:0;background:#fff6e8;border:1px solid #e2cca5;padding:7px;border-radius:12px;text-align:center}.gallery-board img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:8px}.gallery-board figcaption{font-size:11px;font-weight:800;color:#64452a;margin-top:3px}.gallery-subtitle{margin-top:22px;color:#663d20;font-size:17px}
@media(max-width:1050px){.catalog-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:700px){.catalog-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.gallery-board{grid-template-columns:repeat(3,minmax(0,1fr))}.guest-stage{left:3%;bottom:9%;width:48%;height:29%;gap:3px}.bara-sprite{width:82px;height:82px;bottom:12%;right:2%}.scene-speech{top:17%;font-size:11px;max-width:60%}.topbar{padding:12px}.brand-avatar{width:38px;height:38px}.catalog-panel{padding:12px}.catalog-copy b{font-size:10px}}
@media(max-width:420px){.catalog-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.catalog-item{padding:6px}.gallery-board{grid-template-columns:repeat(3,minmax(0,1fr))}.scene-speech{top:22%;right:2%;max-width:55%}.bara-sprite{width:65px;height:65px;bottom:13%;border-width:2px}.guest-stage{bottom:8%;height:25%}.guest-sprite{border-width:2px;border-radius:10px}.upgrade-art{width:55px;height:55px}}
@media(prefers-reduced-motion:reduce){.guest-sprite,.bara-sprite{animation:none}}
/* Mobile game loop first: orders and kitchen immediately below the scene, long illustrated catalogue last. */
@media(max-width:700px){
 .layout{display:flex;flex-direction:column;gap:12px}
 .scene-panel{display:contents}
 .scene-heading{order:1}
 .scene{order:2;width:100%}
 .scene-bottom{order:3}
 .work-panel{order:4;width:100%;min-width:0}
 .bottom-panes{order:5;width:100%}
 .catalog-panel{order:6;width:100%;margin-top:0}
}


/* =============================================================
   v3 TRANSPARENT SPRITE STAGE — art atlas + action animation
   Override v2 portraits and opaque cards. No character matte!
   ============================================================= */
.scene {background:#a8784a; isolation:isolate;}
.scene-bg{object-fit:cover;z-index:-3}
.scene-vignette{background:linear-gradient(180deg,#24110e3d 0%,transparent 26%,transparent 72%,#4b27152e 100%);}
.sprite-frame{display:block;position:relative;flex:none;background-repeat:no-repeat;background-color:transparent;background-size:400% 300%;background-position:0% 0%;border:0;border-radius:0;outline:0;box-shadow:none;object-fit:initial;will-change:transform,background-position;-webkit-backface-visibility:hidden;backface-visibility:hidden;}
.bara-sprite{position:absolute;right:4%;bottom:6%;width:clamp(115px,27%,280px);height:auto;aspect-ratio:1;background-image:url('assets/sprites/bara_atlas.webp');background-size:400% 300%;background-color:transparent;border:0;border-radius:0;box-shadow:none;z-index:5;filter:drop-shadow(1px 8px 6px #341c135c);animation:baraStageBreath 3.15s ease-in-out infinite;pointer-events:none;}
.bara-sprite.react{animation:baraReact .5s ease-out,baraStageBreath 3.15s ease-in-out .5s infinite;}
.guest-stage{position:absolute;left:4%;bottom:4%;width:63%;height:43%;display:flex;align-items:flex-end;justify-content:flex-start;gap:0;z-index:4;pointer-events:none;overflow:visible;}
.guest-sprite{height:auto!important;width:clamp(76px,26%,170px);aspect-ratio:1;max-width:none;min-width:0;margin-left:-1.5%;object-fit:initial;border:0;border-radius:0;background-color:transparent;background-image:url('assets/sprites/guests_atlas.webp');background-size:400% 300%;box-shadow:none;filter:drop-shadow(0 8px 5px #2a170f65);transform-origin:center bottom;transition:filter .2s,opacity .18s;animation:guestStageBreath 2.7s ease-in-out infinite;}
.guest-sprite:nth-child(2){animation-delay:-.7s}.guest-sprite:nth-child(3){animation-delay:-1.5s}.guest-sprite:nth-child(4){animation-delay:-2s}
.guest-sprite.active{filter:drop-shadow(0 8px 6px #2a170f8a) drop-shadow(0 0 8px #f7d68e7d);z-index:6;}
.guest-sprite.entering{animation:guestArrive .8s cubic-bezier(.12,.6,.25,1) both;}
.guest-sprite.departing{animation:guestDepart .62s ease-in forwards;pointer-events:none;}
.guest-sprite::after{content:'';position:absolute;left:25%;right:25%;bottom:3%;height:5%;background:#3b241744;filter:blur(6px);border-radius:50%;z-index:-1;pointer-events:none;}
.guest-stage:empty{display:none}.bara-sprite::after{content:'';position:absolute;left:23%;right:23%;bottom:5%;height:4%;background:#39231335;filter:blur(8px);border-radius:50%;z-index:-1;pointer-events:none;}
.scene-speech{top:11%;right:3%;left:auto;max-width:45%;background:#fff7e8ec;border:1px solid #d4b48e;padding:9px 12px;border-radius:12px;z-index:7;}
.scene-speech:after{content:'';position:absolute;right:22%;bottom:-9px;border-left:9px solid transparent;border-right:9px solid transparent;border-top:10px solid #fff7e8ec;}
.scene-label{z-index:6;bottom:12px;left:17px;letter-spacing:.9px;font-size:clamp(10px,1.35vw,15px);pointer-events:none;}
.hanging-note{z-index:8}
@keyframes baraStageBreath{0%,100%{transform:translateY(0) rotate(-.35deg)}50%{transform:translateY(-5px) rotate(.3deg)}}
@keyframes baraReact{0%{transform:scale(.91) translateY(8px)}55%{transform:scale(1.04) translateY(-7px)}100%{transform:scale(1) translateY(0)}}
@keyframes guestStageBreath{0%,100%{transform:translateY(0) rotate(-.4deg)}50%{transform:translateY(-4px) rotate(.4deg)}}
@keyframes guestArrive{0%{transform:translateX(-85%) translateY(5px) scale(.85);opacity:0}75%{opacity:1}100%{transform:translateX(0) translateY(0) scale(1);opacity:1}}
@keyframes guestDepart{0%{opacity:1;transform:translateX(0) translateY(0)}100%{opacity:0;transform:translateX(-70%) translateY(-5px) scale(.94)}}
@media(max-width:700px){.bara-sprite{width:29%;height:auto;right:3%;bottom:5%;border:0;border-radius:0;background-color:transparent;box-shadow:none;filter:drop-shadow(0 4px 3px #35211477)}.guest-stage{left:1%;bottom:2%;width:73%;height:47%;gap:0}.guest-sprite{width:24%;height:auto!important;max-width:none;border:0;border-radius:0;background-color:transparent;margin-left:-2.5%;box-shadow:none;filter:drop-shadow(0 4px 2px #2b160f77)}.guest-sprite:nth-child(n){height:auto!important}.scene-speech{right:3%;max-width:53%;top:13%;font-size:clamp(8px,2vw,11px);padding:4px 7px}.scene-label{font-size:9px;bottom:7px}}
@media(max-width:420px){.bara-sprite{width:28%;height:auto;right:2%;bottom:4%;border:0!important;border-radius:0!important}.guest-stage{height:48%;bottom:2%;left:0;width:76%}.guest-sprite{border:0!important;border-radius:0!important;width:25%;height:auto!important}.scene-speech{top:14%;max-width:53%;right:1%;font-size:8px;min-width:0}.scene-label{font-size:8px;max-width:45%;}}
@media(prefers-reduced-motion:reduce){.guest-sprite,.bara-sprite,.guest-sprite.entering,.guest-sprite.departing{animation:none!important;transition:none!important}}

/* State-aware motion. Actor frame indices are updated in requestAnimationFrame. */
.bara-sprite[data-motion="walk"]{animation:baraWalk .42s ease-in-out infinite alternate;}
.bara-sprite[data-motion="brew"]{animation:baraPour .62s ease-in-out infinite alternate;}
.bara-sprite[data-motion="serve"]{animation:baraServe .85s ease-in-out 1 both;}
.bara-sprite[data-motion="clean"]{animation:baraClean .36s ease-in-out 1;}
.bara-sprite[data-motion="excited"],.bara-sprite[data-motion="love"],.bara-sprite[data-motion="smile"]{animation:baraHappy .52s ease-in-out 2;}
@keyframes baraWalk{from{transform:translateX(6px) translateY(0) rotate(-2deg)}to{transform:translateX(-12px) translateY(-7px) rotate(2deg)}}
@keyframes baraPour{from{transform:translateX(0) translateY(0) rotate(-1deg)}to{transform:translateX(-5px) translateY(-6px) rotate(1deg)}}
@keyframes baraServe{0%{transform:translateX(8px) scale(.96)}45%{transform:translateX(-18px) scale(1.05)}100%{transform:translateX(0) scale(1)}}
@keyframes baraClean{50%{transform:translateY(-5px) rotate(-1deg)}}
@keyframes baraHappy{50%{transform:translateY(-13px) scale(1.03)}}
@media(prefers-reduced-motion:reduce){.bara-sprite[data-motion]{animation:none!important}}
