/* ================================================================
   SNACKIMAL CAFÉ — cozy risograph storybook
   ================================================================ */

:root{
  --paper:#FDF4E3;
  --paper-warm:#F7EAD3;
  --ink:#3B2A20;
  --ink-soft:#6B5849;
  --mint:#DCEFD0;
  --mint-d:#AFD89A;
  --straw:#E8546B;
  --broc:#6FA84A;
  --yolk:#F2B33D;
  --blue:#5566B5;
  --milk:#FFFFFF;
  --wood:#C99A62;
  --wood-d:#A87A45;
  --flat: rgba(59,42,32,.16);
  --r:16px;
  --bw:4px;
}

*,*::before,*::after{box-sizing:border-box;}

html,body{height:100%;}

body{
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:'Nunito',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;
  font-size:16px;
  line-height:1.5;
  overflow:hidden;
  overscroll-behavior:none;
  -webkit-font-smoothing:antialiased;
  -webkit-user-select:none;
  user-select:none;
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
}

/* paper fibre noise over everything */
body::after{
  content:'';
  position:fixed;
  inset:0;
  z-index:9990;
  pointer-events:none;
  opacity:.06;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size:140px 140px;
}

h1,h2,h3,.font-display{font-family:'Fredoka','Nunito',system-ui,sans-serif;font-weight:600;letter-spacing:.2px;}

button{font-family:inherit;color:inherit;}

#app{
  position:fixed;
  inset:0;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}

/* ============================ HUD ============================ */

.hud{
  flex:0 0 auto;
  padding:8px 10px 7px;
  background:var(--paper);
  border-bottom:var(--bw) solid var(--ink);
  display:flex;
  flex-direction:column;
  gap:6px;
}

.meters{display:flex;gap:8px;}

.meter{flex:1 1 0;min-width:0;}

.meter-head{display:flex;align-items:center;gap:4px;margin-bottom:3px;min-width:0;}
.meter-ico{width:13px;height:13px;flex:0 0 auto;}
.meter-name{
  font-family:'Fredoka',sans-serif;
  font-size:11px;
  font-weight:500;
  letter-spacing:.3px;
  color:var(--ink);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.meter-track{
  height:13px;
  border:3px solid var(--ink);
  border-radius:999px;
  background:var(--paper-warm);
  overflow:hidden;
}
.meter-fill{height:100%;width:75%;border-radius:999px;transition:none;}
.f-nourish{background:var(--broc);}
.f-energy{background:var(--yolk);}
.f-cheer{background:var(--straw);}

.meter.low .meter-track{animation:lowPulse .7s ease-in-out infinite alternate;}
.meter.low .meter-fill{background:var(--straw);}
@keyframes lowPulse{from{background:var(--paper-warm);}to{background:#F6D3D3;}}

.hud-line{display:flex;align-items:center;gap:7px;min-width:0;}

.chip{
  display:inline-flex;
  align-items:center;
  gap:5px;
  font-size:11.5px;
  font-weight:800;
  letter-spacing:.2px;
  padding:3px 9px;
  border:3px solid var(--ink);
  border-radius:999px;
  background:var(--milk);
  color:var(--ink);
  white-space:nowrap;
}
.chip .sep{opacity:.4;}
.chip-coin{background:var(--yolk);}
.chip-coin svg{width:14px;height:14px;}
.spacer{flex:1 1 auto;}

.icon-btn{
  width:36px;height:36px;
  flex:0 0 auto;
  display:grid;place-items:center;
  border:3px solid var(--ink);
  border-radius:12px;
  background:var(--milk);
  color:var(--ink);
  font-size:16px;
  line-height:1;
  cursor:pointer;
  padding:0;
  box-shadow:0 3px 0 var(--flat);
}
.icon-btn svg{width:18px;height:18px;}
.icon-btn:active{transform:translateY(2px);box-shadow:0 1px 0 var(--flat);}
.icon-btn.off{opacity:.45;}

/* ============================ STAGE ============================ */

.stage{
  position:relative;
  flex:1 1 auto;
  min-height:0;
  overflow:hidden;
  background:var(--paper);
  isolation:isolate;
}

/* painted café scene, sits behind the DOM furniture */
.scene-canvas{
  position:absolute!important;
  inset:0!important;
  z-index:0;
  display:block;
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  aspect-ratio:auto!important;
  pointer-events:none;
  touch-action:none;
  background:var(--paper);
}

.backdrop{position:absolute;inset:0;z-index:1;}
.deco{position:absolute;}

.deco-board{top:5%;left:3%;width:36%;height:21%;}
.deco-board svg{width:100%;height:100%;display:block;}

.deco-window{top:3%;right:3%;width:44%;height:30%;}
.win-glass{
  position:absolute;inset:0;
  border:var(--bw) solid var(--ink);
  border-radius:12px;
  overflow:hidden;
  background:#E4EFF7;
}
.win-sky{position:absolute;inset:0;width:100%;height:100%;display:block;}
.win-bar-v{position:absolute;left:50%;top:0;bottom:0;width:4px;margin-left:-2px;background:var(--ink);}
.win-bar-h{position:absolute;top:52%;left:0;right:0;height:4px;margin-top:-2px;background:var(--ink);}
.win-sill{
  position:absolute;left:-7%;right:-7%;bottom:-9px;height:11px;
  background:var(--wood);border:var(--bw) solid var(--ink);border-radius:5px;
}
.cloud{position:absolute;top:16%;left:-34%;width:34%;animation:drift 26s linear infinite;}
.cloud svg{width:100%;height:auto;display:block;}
@keyframes drift{from{transform:translateX(0);}to{transform:translateX(400%);}}

.deco-shelf{top:31%;left:2%;width:46%;height:17%;}
.deco-shelf svg{width:100%;height:100%;display:block;}

.deco-chili{top:0;left:63%;width:7%;height:38%;}
.deco-chili svg{width:100%;height:100%;display:block;}

/* ---------- seats ---------- */

.seats{
  position:absolute;
  inset:0 0 27% 0;
  z-index:2;
  display:flex;
  gap:5px;
  padding:0 7px;
  align-items:stretch;
}

.seat{
  position:relative;
  flex:1 1 0;
  min-width:0;
  height:100%;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  align-items:center;
  gap:3px;
  transition:opacity .2s ease;
}
.seat.empty{opacity:0;pointer-events:none;}

.seat-name{
  font-family:'Fredoka',sans-serif;
  font-size:10.5px;
  font-weight:500;
  letter-spacing:.2px;
  color:var(--ink-soft);
  background:var(--paper);
  border:3px solid var(--ink);
  border-radius:999px;
  padding:1px 8px;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.bubble{
  position:relative;
  width:100%;
  background:var(--milk);
  border:3px solid var(--ink);
  border-radius:12px;
  padding:5px 5px 6px;
  box-shadow:0 3px 0 var(--flat);
  transform-origin:50% 100%;
  animation:bubbleIn .32s cubic-bezier(.2,1.4,.4,1) both;
}
@keyframes bubbleIn{from{transform:scale(.5);opacity:0;}to{transform:scale(1);opacity:1;}}

.bubble-tail{
  position:absolute;
  left:50%;
  bottom:-9px;
  width:12px;height:12px;
  margin-left:-6px;
  background:var(--milk);
  border-right:3px solid var(--ink);
  border-bottom:3px solid var(--ink);
  transform:rotate(45deg);
  border-bottom-right-radius:3px;
}
.bubble-name{
  font-family:'Fredoka',sans-serif;
  font-size:10.5px;
  font-weight:600;
  line-height:1.15;
  text-align:center;
  color:var(--ink);
  overflow:hidden;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
}
.bubble-ings{display:flex;justify-content:center;gap:2px;margin-top:3px;flex-wrap:wrap;}
.bubble-ing{width:20px;height:20px;display:block;}
.bubble-ing svg{width:100%;height:100%;display:block;}

.patience{
  width:88%;
  height:9px;
  border:3px solid var(--ink);
  border-radius:999px;
  background:var(--milk);
  overflow:hidden;
}
.patience i{display:block;height:100%;width:100%;background:var(--broc);}

.friend{
  position:relative;
  width:100%;
  flex:1 1 auto;
  min-height:0;
  display:flex;
  align-items:flex-end;
  justify-content:center;
}
.friend-img{
  max-width:100%;
  max-height:100%;
  width:auto;
  height:auto;
  display:block;
  object-fit:contain;
  transform-origin:50% 100%;
  -webkit-user-drag:none;
}
.friend-fb{display:none;width:56%;aspect-ratio:1;border-radius:50%;border:var(--bw) solid var(--ink);background:var(--mint);}

.cheeks{position:absolute;left:0;right:0;bottom:34%;display:none;justify-content:center;gap:34%;pointer-events:none;}
.cheeks i{width:11px;height:11px;border-radius:50%;background:#F4A0AE;border:2.5px solid var(--ink);}

.seat.ask .friend-img{animation:bob 2.4s ease-in-out infinite;}
@keyframes bob{0%,100%{transform:translateY(0);}50%{transform:translateY(-4px);}}

.seat.eat .friend-img{animation:chew .3s ease-in-out infinite;}
.seat.eat .cheeks{display:flex;}
@keyframes chew{0%,100%{transform:scale(1,1) rotate(-1.5deg);}50%{transform:scale(1.04,.96) rotate(1.5deg);}}

.seat.happy .friend-img{animation:hop .46s ease-out 2;}
@keyframes hop{0%{transform:translateY(0) scale(1,1);}35%{transform:translateY(-14px) scale(.95,1.08);}70%{transform:translateY(0) scale(1.1,.9);}100%{transform:translateY(0) scale(1,1);}}

.seat.sad .friend-img{animation:wobble .34s ease-in-out 3;}
@keyframes wobble{0%,100%{transform:rotate(0);}30%{transform:rotate(-6deg);}70%{transform:rotate(6deg);}}

.seat.leave .friend-img{animation:leaveOut .62s ease-in forwards;}
@keyframes leaveOut{to{transform:translateY(26px) scale(.86);opacity:0;}}

.seat.droptarget .friend-img{filter:drop-shadow(0 0 0 var(--mint)) drop-shadow(0 4px 0 var(--mint-d));}
.seat.hot{animation:none;}
.seat.hot::after{
  content:'';
  position:absolute;
  inset:-4px -2px 8px -2px;
  border:4px dashed var(--broc);
  border-radius:16px;
  pointer-events:none;
}

/* ---------- counter ---------- */

.counter{
  position:absolute;
  left:0;right:0;bottom:0;
  height:28%;
  z-index:3;
  background:var(--wood);
  border-top:var(--bw) solid var(--ink);
  border-bottom:var(--bw) solid var(--ink);
}
.counter-lip{position:absolute;top:0;left:0;right:0;height:9px;background:var(--wood-d);}
.grain{position:absolute;left:0;right:0;height:2px;background:rgba(59,42,32,.18);}
.g1{top:24%;}
.g2{top:48%;}
.g3{top:72%;}
.counter-foot{position:absolute;left:0;right:0;bottom:0;height:16%;background:var(--wood-d);border-top:3px solid rgba(59,42,32,.35);}

/* ---------- floaties / banner / toast ---------- */

.floaties{position:absolute;inset:0;z-index:20;pointer-events:none;overflow:hidden;}

.float{
  position:absolute;
  font-size:22px;
  line-height:1;
  animation:floatUp 1.15s ease-out forwards;
  will-change:transform,opacity;
}
@keyframes floatUp{
  0%{transform:translate(-50%,0) scale(.5);opacity:0;}
  22%{transform:translate(-50%,-14px) scale(1.15);opacity:1;}
  100%{transform:translate(-50%,-62px) scale(1);opacity:0;}
}

.banner{
  position:absolute;
  left:50%;top:34%;
  transform:translate(-50%,-50%) rotate(-1.4deg);
  z-index:25;
  background:var(--milk);
  border:var(--bw) solid var(--ink);
  border-radius:18px;
  padding:12px 20px;
  text-align:center;
  box-shadow:6px 6px 0 var(--flat);
  animation:bannerIn .45s cubic-bezier(.2,1.5,.4,1) both;
  max-width:86%;
}
.banner .b1{font-family:'Fredoka',sans-serif;font-size:20px;font-weight:600;display:block;letter-spacing:.4px;}
.banner .b2{font-size:12px;font-weight:800;opacity:.7;display:block;margin-top:2px;}
@keyframes bannerIn{from{transform:translate(-50%,-50%) rotate(-1.4deg) scale(.6);opacity:0;}to{transform:translate(-50%,-50%) rotate(-1.4deg) scale(1);opacity:1;}}

.toast{
  position:absolute;
  left:50%;top:8px;
  transform:translate(-50%,-16px);
  z-index:30;
  background:var(--ink);
  color:var(--paper);
  border-radius:999px;
  padding:6px 14px;
  font-size:12.5px;
  font-weight:800;
  opacity:0;
  pointer-events:none;
  transition:opacity .18s ease, transform .18s ease;
  max-width:92%;
  text-align:center;
}
.toast.show{opacity:1;transform:translate(-50%,0);}
.toast.bad{background:var(--straw);color:var(--milk);}
.toast.good{background:var(--broc);color:var(--milk);}

/* ============================ DOCK ============================ */

.dock{
  flex:0 0 auto;
  background:var(--paper);
  border-top:var(--bw) solid var(--ink);
  padding:9px 10px 11px;
  display:flex;
  flex-direction:column;
  gap:9px;
}

.cook-row{display:flex;align-items:center;gap:8px;}

.pot-zone{position:relative;flex:0 0 auto;}

.pot{
  display:flex;
  gap:7px;
  padding:7px;
  border:var(--bw) solid var(--ink);
  border-radius:999px;
  background:#EFE2CC;
  box-shadow:0 4px 0 var(--flat);
  position:relative;
  z-index:2;
}
.pot.hot{animation:potShake .34s ease-in-out 2;}
@keyframes potShake{0%,100%{transform:translateX(0);}25%{transform:translateX(-5px);}75%{transform:translateX(5px);}}

.pot-foot{
  position:absolute;
  left:8%;right:8%;bottom:-5px;height:7px;
  background:var(--wood-d);
  border:3px solid var(--ink);
  border-radius:999px;
  z-index:1;
}

.slot{
  width:42px;height:42px;
  border-radius:50%;
  border:3px dashed rgba(59,42,32,.4);
  background:#FFFBF2;
  display:grid;place-items:center;
  padding:0;
  cursor:pointer;
  transition:transform .12s ease;
}
.slot svg{width:30px;height:30px;display:block;}
.slot.filled{border-style:solid;border-color:var(--ink);background:var(--milk);}
.slot:active{transform:scale(.93);}
.slot-plus{font-family:'Fredoka',sans-serif;font-size:19px;color:rgba(59,42,32,.35);line-height:1;}

.steam{position:absolute;left:50%;bottom:calc(100% - 2px);transform:translateX(-50%);width:70%;height:22px;z-index:3;pointer-events:none;}
.steam i{
  position:absolute;bottom:0;width:11px;height:17px;
  border:2.5px solid var(--ink);
  border-radius:60% 40% 55% 45%;
  border-bottom-color:transparent;
  border-left-color:transparent;
  background:var(--milk);
  opacity:.9;
  animation:curl 2.6s ease-in-out infinite;
}
.steam i:nth-child(1){left:16%;animation-delay:0s;}
.steam i:nth-child(2){left:44%;animation-delay:.55s;}
.steam i:nth-child(3){left:70%;animation-delay:1.1s;}
@keyframes curl{
  0%{transform:translateY(4px) scale(.6);opacity:0;}
  30%{opacity:.95;}
  100%{transform:translateY(-16px) scale(1.05) rotate(12deg);opacity:0;}
}

.dish{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:5px;
  padding:4px 9px 4px 5px;
  border:var(--bw) solid var(--ink);
  border-radius:999px;
  background:var(--mint);
  box-shadow:0 4px 0 var(--flat);
  cursor:grab;
  touch-action:none;
  animation:bubbleIn .3s cubic-bezier(.2,1.5,.4,1) both;
  max-width:44vw;
}
.dish[hidden]{display:none;}
.dish .dish-ings{display:flex;gap:1px;}
.dish .dish-ings span{width:19px;height:19px;display:block;}
.dish .dish-ings svg{width:100%;height:100%;display:block;}
.dish .dish-name{
  font-family:'Fredoka',sans-serif;font-size:11.5px;font-weight:600;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:22vw;
}

.btn{
  border:var(--bw) solid var(--ink);
  border-radius:14px;
  font-family:'Fredoka',sans-serif;
  font-weight:600;
  cursor:pointer;
  padding:0 14px;
  height:52px;
  font-size:16px;
  letter-spacing:.3px;
  background:var(--milk);
  color:var(--ink);
  box-shadow:0 4px 0 var(--flat);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  white-space:nowrap;
}
.btn:active{transform:translateY(3px);box-shadow:0 1px 0 var(--flat);}
.btn:focus-visible{outline:3px solid var(--blue);outline-offset:2px;}
.btn:disabled{opacity:.45;cursor:default;box-shadow:none;transform:none;}

.btn-cook{
  flex:1 1 auto;
  min-width:74px;
  height:56px;
  background:var(--straw);
  color:var(--milk);
  font-size:17px;
}
.btn-cook.ready{animation:cookPulse 1.5s ease-in-out infinite;}
@keyframes cookPulse{0%,100%{box-shadow:0 4px 0 var(--flat);}50%{box-shadow:0 4px 0 var(--flat),0 0 0 5px rgba(232,84,107,.24);}}

.btn-bin{
  flex:0 0 auto;
  width:48px;
  height:48px;
  padding:0;
  border-radius:14px;
  background:var(--paper-warm);
}
.btn-bin svg{width:22px;height:22px;}

.pantry{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:8px;
}

.tile{
  position:relative;
  display:flex;
  align-items:center;
  gap:6px;
  padding:5px 6px;
  height:50px;
  border:3.5px solid var(--ink);
  border-radius:13px;
  background:var(--milk);
  box-shadow:0 3px 0 var(--flat);
  cursor:grab;
  touch-action:none;
  overflow:hidden;
}
.tile:active{transform:translateY(2px);box-shadow:0 1px 0 var(--flat);}
.tile .tile-icon{flex:0 0 auto;width:28px;height:28px;display:block;}
.tile .tile-icon svg{width:100%;height:100%;display:block;}
.tile .tile-label{
  font-family:'Fredoka',sans-serif;
  font-size:11px;
  font-weight:500;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  min-width:0;
}
.tile .tag{
  position:absolute;
  top:-3px;right:-3px;
  width:12px;height:12px;
  border-radius:50%;
  border:2.5px solid var(--ink);
}
.tag-Veggie{background:var(--broc);}
.tag-Protein{background:var(--yolk);}
.tag-Carb{background:var(--wood);}
.tag-Fruit{background:var(--blue);}

.tile.dim{opacity:.45;}

/* ---------- drag ghost ---------- */

#dragLayer{position:fixed;inset:0;z-index:9000;pointer-events:none;}

.ghost{
  position:absolute;
  left:0;top:0;
  pointer-events:none;
  transform-origin:50% 50%;
  filter:drop-shadow(4px 6px 0 rgba(59,42,32,.22));
  opacity:.96;
}
.ghost.tile{width:118px;height:50px;border:3.5px solid var(--ink);border-radius:13px;background:var(--milk);}
.ghost.dish-src{background:var(--mint);}

/* ============================ OVERLAYS ============================ */

.overlay{
  position:fixed;
  inset:0;
  z-index:8000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:14px;
  background:rgba(59,42,32,.42);
  overflow:auto;
  -webkit-overflow-scrolling:touch;
}
.overlay.hidden{display:none;}

.panel{
  width:100%;
  max-width:420px;
  max-height:100%;
  background:var(--paper);
  border:var(--bw) solid var(--ink);
  border-radius:22px;
  padding:20px 18px;
  box-shadow:8px 8px 0 var(--flat);
  transform:rotate(-1deg);
  text-align:center;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
}
.panel-scroll{max-height:88vh;}
.panel h1{font-size:28px;margin:8px 0 6px;line-height:1.1;}
.panel h2{font-size:22px;margin:0 0 8px;line-height:1.15;}

.tagline{font-size:13.5px;line-height:1.55;color:var(--ink-soft);margin:0 0 14px;}
.foot-note{font-size:12px;font-weight:800;color:var(--ink-soft);margin:12px 0 0;}

.title-mascot{
  width:104px;height:104px;
  object-fit:contain;
  display:block;
  margin:0 auto 2px;
}

.btn-primary{
  width:100%;
  height:56px;
  font-size:18px;
  background:var(--straw);
  color:var(--milk);
  margin-bottom:10px;
}
.btn-ghost{background:var(--milk);height:46px;font-size:14px;padding:0 10px;flex:1 1 0;min-width:0;}
.btn-danger{width:100%;background:var(--paper-warm);height:46px;font-size:14px;margin-top:12px;color:var(--straw);}

.btn-row{display:flex;gap:8px;}

.how-list{text-align:left;font-size:13.5px;line-height:1.6;padding-left:20px;margin:0 0 16px;color:var(--ink);}
.how-list li{margin-bottom:7px;padding-left:2px;}
.how-list b{font-family:'Fredoka',sans-serif;font-weight:600;}

/* ---------- recipe book ---------- */

.book-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-bottom:16px;}

.rec{
  border:3.5px solid var(--ink);
  border-radius:14px;
  background:var(--milk);
  padding:8px 7px;
  text-align:center;
  min-height:96px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  gap:4px;
  box-shadow:0 3px 0 var(--flat);
}
.rec.locked{background:#EFE6D6;}
.rec .rec-name{font-family:'Fredoka',sans-serif;font-size:12px;font-weight:600;line-height:1.15;}
.rec .rec-ings{display:flex;gap:2px;flex-wrap:wrap;justify-content:center;}
.rec .rec-ings span{width:22px;height:22px;display:block;}
.rec .rec-ings svg{width:100%;height:100%;display:block;}
.rec .rec-meta{font-size:10.5px;font-weight:800;color:var(--ink-soft);margin-top:auto;}
.rec .rec-coin{display:inline-flex;align-items:center;gap:3px;font-size:11px;font-weight:800;}
.rec .rec-coin i{width:11px;height:11px;border-radius:50%;background:var(--yolk);border:2.5px solid var(--ink);display:block;}
.rec.locked .silhouette{
  width:100%;height:34px;
  border-radius:8px;
  background:var(--ink);
  opacity:.22;
  margin:2px 0;
}
.rec.locked .rec-ings span{opacity:0;}

/* ---------- album ---------- */

.album-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-bottom:16px;}

.friend-card{
  border:3.5px solid var(--ink);
  border-radius:14px;
  background:var(--milk);
  padding:8px 7px 9px;
  text-align:center;
  box-shadow:0 3px 0 var(--flat);
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:4px;
}
.friend-card img{width:60px;height:60px;object-fit:contain;display:block;}
.friend-card .fc-name{font-family:'Fredoka',sans-serif;font-size:12.5px;font-weight:600;}
.friend-card .fc-blurb{font-size:10.5px;line-height:1.4;color:var(--ink-soft);min-height:42px;}
.friend-card .fc-hearts{display:flex;align-items:center;gap:4px;font-size:11.5px;font-weight:800;color:var(--straw);}
.friend-card .fc-hearts svg{width:13px;height:13px;}
.friend-card .fc-tag{font-size:10px;font-weight:800;color:var(--ink-soft);}
.friend-card.unmet{background:#EFE6D6;}
.friend-card.unmet img{filter:brightness(0) opacity(.2);}
.friend-card.unmet .fc-blurb{opacity:.5;}

/* ---------- evening ---------- */

.panel-evening{position:relative;overflow:hidden;}
.ev-sun{
  position:absolute;
  top:-46px;right:-38px;
  width:120px;height:120px;
  border-radius:50%;
  background:var(--yolk);
  border:var(--bw) solid var(--ink);
  opacity:.9;
}
.ev-sub{font-size:13px;font-weight:700;color:var(--ink-soft);margin:0 0 14px;}

.ev-stats{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:6px;}
.ev-stat{
  border:3.5px solid var(--ink);
  border-radius:13px;
  background:var(--milk);
  padding:9px 7px;
  box-shadow:0 3px 0 var(--flat);
}
.ev-stat .es-k{display:block;font-size:10.5px;font-weight:800;color:var(--ink-soft);letter-spacing:.3px;text-transform:uppercase;}
.ev-stat .es-v{display:block;font-family:'Fredoka',sans-serif;font-size:19px;font-weight:600;margin-top:1px;}

/* ============================ COMPACT LAYOUT ============================ */

@media (max-height:640px){
  .hud{padding:6px 9px 5px;gap:4px;}
  .meter-name{font-size:10px;}
  .meter-track{height:11px;}
  .dock{padding:7px 9px 9px;gap:7px;}
  .pantry{grid-template-columns:repeat(8,1fr);gap:6px;}
  .tile{height:50px;padding:4px;justify-content:center;}
  .tile .tile-label{display:none;}
  .tile .tile-icon{width:30px;height:30px;}
  .slot{width:38px;height:38px;}
  .slot svg{width:26px;height:26px;}
  .btn-cook{height:50px;font-size:15px;}
  .btn-bin{width:44px;height:44px;}
  .steam{display:none;}
}

@media (max-height:520px){
  .deco-board,.deco-chili{display:none;}
  .deco-window{height:34%;}
  .deco-shelf{top:24%;height:20%;}
  .seat-name{font-size:9.5px;padding:0 6px;}
  .bubble{padding:4px;}
  .bubble-name{font-size:10px;}
  .bubble-ing{width:16px;height:16px;}
}

/* Very short viewports (editor previews, tiny landscape phones):
   everything folds down so the play area still gets a real box. */
@media (max-height:430px){
  .hud{
    flex-direction:row;
    align-items:center;
    gap:6px;
    padding:4px 7px;
    border-bottom-width:3px;
  }
  .meters{flex:1 1 auto;gap:6px;min-width:0;}
  .hud-line{flex:0 0 auto;gap:5px;min-width:0;}
  .spacer{display:none;}
  .meter-head{margin-bottom:0;gap:3px;}
  .meter-ico{width:10px;height:10px;}
  .meter-name{display:none;}
  .meter-track{height:9px;border-width:2.5px;}
  .chip{font-size:10px;padding:2px 7px;border-width:2.5px;}
  .chip-coin svg{width:12px;height:12px;}
  .icon-btn{width:30px;height:30px;border-width:2.5px;border-radius:9px;font-size:13px;}
  .icon-btn svg{width:15px;height:15px;}

  .dock{padding:4px 7px 5px;gap:4px;border-top-width:3px;}
  .cook-row{gap:5px;}
  .pot{gap:4px;padding:4px;border-width:3px;}
  .pot-foot{height:5px;bottom:-4px;}
  .slot{width:26px;height:26px;}
  .slot svg{width:19px;height:19px;}
  .slot-plus{font-size:14px;}
  .steam{display:none;}
  .btn{height:38px;font-size:13px;padding:0 10px;border-width:3px;border-radius:11px;}
  .btn-cook{height:40px;font-size:14px;min-width:62px;}
  .btn-bin{width:38px;height:38px;}
  .btn-bin svg{width:18px;height:18px;}
  .dish{padding:2px 8px 2px 4px;max-width:34vw;}
  .dish .dish-name{font-size:10.5px;max-width:18vw;}
  .dish .dish-ings span{width:16px;height:16px;}
  .pantry{grid-template-columns:repeat(8,1fr);gap:4px;}
  .tile{height:32px;padding:2px;justify-content:center;border-width:3px;border-radius:10px;}
  .tile .tile-icon{width:22px;height:22px;}
  .tile .tile-label{display:none;}
  .tag{width:10px;height:10px;border-width:2px;}

  .seats{inset:0 0 24% 0;padding:0 5px;gap:4px;}
  .seat-name{font-size:9px;padding:0 5px;border-width:2.5px;}
  .bubble{padding:3px;border-width:3px;border-radius:10px;}
  .bubble-name{font-size:10px;-webkit-line-clamp:1;}
  .bubble-ings{overflow:hidden;}
  .bubble-ing{width:15px;height:15px;}
  .patience{height:8px;border-width:2.5px;}
  .counter{height:24%;}
  .banner{padding:8px 14px;}
  .banner .b1{font-size:15px;}
  .banner .b2{font-size:10.5px;}
  .toast{font-size:11px;padding:5px 11px;}
}

@media (min-width:820px){
  .panel{max-width:520px;}
  .book-grid,.album-grid{grid-template-columns:repeat(3,1fr);}
  .seat-name{font-size:12px;}
  .bubble-name{font-size:13px;}
  .bubble-ing{width:26px;height:26px;}
  .friend-card img{width:74px;height:74px;}
}

@media (min-width:1100px){
  .book-grid,.album-grid{grid-template-columns:repeat(4,1fr);}
  #app{max-width:1100px;margin:0 auto;}
}

/* ============================ REDUCED MOTION ============================ */

@media (prefers-reduced-motion: reduce){
  .cloud,.seat.ask .friend-img,.seat.eat .friend-img,.seat.happy .friend-img,
  .seat.sad .friend-img,.meter.low .meter-track,.steam i,.btn-cook.ready{
    animation:none !important;
  }
  .float{animation-duration:.01s;}
  .banner{animation:none;}
  .bubble{animation:none;}
  .dish{animation:none;}
}