/* Boba On The Block - styles. The game is drawn on a fixed 1280x720 stage that is scaled to fit the window. */
@font-face {
  font-family: 'Baloo 2';
  src: url('../assets/fonts/baloo2.woff2') format('woff2');
  font-weight: 400 800;
  font-display: swap;
}

:root {
  --ink: #2a2144;
  --cream: #fff6e5;
  --paper: #fffdf7;
  --coral: #ff6b5e;
  --teal: #1fb6a6;
  --sun: #ffc93c;
  --grape: #7b5cd6;
  --night: #221a3a;
  --rail: #3a2f66;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--night); overscroll-behavior: none; }
body { font-family: 'Baloo 2', ui-rounded, 'Arial Rounded MT Bold', 'Trebuchet MS', system-ui, sans-serif; color: var(--ink); -webkit-user-select: none; user-select: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; touch-action: manipulation; }
button:focus-visible, [role="button"]:focus-visible, input:focus-visible { outline: 4px solid var(--sun); outline-offset: 3px; }
h2, h3, h4, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
svg { display: block; }
.hidden { display: none !important; }

#viewport { position: fixed; inset: 0; overflow: hidden; }
#stage {
  position: absolute; left: 50%; top: 50%; width: 1280px; height: 720px; transform-origin: center center;
  overflow: hidden; background: var(--night); touch-action: none; font-size: 18px; line-height: 1.2;
  --wall: #bfeee4; --wall2: #a9e4d8; --ctr: #e0a565; --ctr2: #c98b4b; --aw: #ff6b5e;
}
.screen { position: absolute; inset: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 6px 22px 4px;
  background: var(--paper); border: 4px solid var(--ink); border-radius: 18px; box-shadow: 0 5px 0 var(--ink);
  font-weight: 800; font-size: 20px; letter-spacing: .3px; transition: transform .08s, box-shadow .08s, filter .15s;
}
.btn:hover { filter: brightness(1.05); transform: translateY(-1px); box-shadow: 0 6px 0 var(--ink); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.btn.primary { background: var(--coral); color: #fff; text-shadow: 0 2px 0 rgba(42, 33, 68, .35); }
.btn.big { min-height: 62px; font-size: 26px; padding: 6px 34px 4px; }
.btn.huge { min-height: 84px; font-size: 36px; padding: 6px 48px 2px; border-radius: 26px; box-shadow: 0 8px 0 var(--ink); }
.btn.small { min-height: 40px; font-size: 16px; padding: 4px 14px 2px; border-width: 3px; box-shadow: 0 3px 0 var(--ink); margin-top: 8px; }
.btn.danger { background: #ffe1dd; color: #c2362a; }
.btn.cant { background: #e6e0f2; color: #8a82a3; }
.btn svg { width: 24px; height: 24px; }
.row { display: flex; justify-content: center; gap: 16px; margin-top: 18px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 14px 1px; border-radius: 99px; background: #fff; border: 3px solid var(--ink); font-weight: 700; font-size: 17px; }
.chip svg { width: 20px; height: 20px; }
.note { text-align: center; font-size: 17px; opacity: .8; margin-top: 12px; }
.text-input { font: inherit; font-weight: 700; font-size: 20px; color: var(--ink); padding: 8px 14px 6px; border: 4px solid var(--ink); border-radius: 14px; background: #fff; width: 100%; -webkit-user-select: text; user-select: text; }
.scroll { overflow-y: auto; touch-action: pan-y; scrollbar-width: thin; scrollbar-color: var(--ink) transparent; }

/* ---------- awning (title + window) ---------- */
.awning { position: absolute; left: 0; right: 0; top: 0; height: 80px; z-index: 3; pointer-events: none; filter: drop-shadow(0 4px 0 var(--ink)); }
.awn-top { height: 48px; background: repeating-linear-gradient(90deg, var(--aw) 0 58px, #fff 58px 116px); border-bottom: 4px solid rgba(42, 33, 68, .18); }
.awn-scallop { height: 30px; background: radial-gradient(circle at 29px 0, var(--aw) 28px, transparent 29px) 0 0/116px 30px repeat-x, radial-gradient(circle at 87px 0, #fff 28px, transparent 29px) 0 0/116px 30px repeat-x; }
.shop-sign {
  position: absolute; left: 50%; top: 9px; transform: translateX(-50%); max-width: 520px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: var(--ink); color: var(--sun); border: 4px solid #fff; border-radius: 14px; padding: 2px 24px 0; font-weight: 800; font-size: 24px; letter-spacing: 1px; text-transform: uppercase;
}

/* ---------- title ---------- */
#screen-title { background: linear-gradient(#8fd6ff 0%, #c7ecff 38%, #ffe9c4 66%); }
.title-street { position: absolute; left: 0; right: 0; top: 30px; height: 470px; }
.title-street svg, .street svg { width: 100%; height: 100%; }
.title-ground { position: absolute; left: 0; right: 0; top: 500px; bottom: 0; background: repeating-linear-gradient(90deg, transparent 0 156px, rgba(42, 33, 68, .12) 156px 160px), #d8d2c4; border-top: 5px solid var(--ink); }
.title-card {
  position: absolute; left: 50%; top: 112px; transform: translateX(-50%); width: 700px; padding: 22px 30px 24px; text-align: center;
  background: var(--cream); border: 5px solid var(--ink); border-radius: 36px; box-shadow: 0 10px 0 var(--ink); z-index: 2;
}
.logo { display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 14px; }
.logo-cup { width: 150px; margin: -12px 0 -6px -30px; transform: rotate(-8deg); }
.logo-words { display: flex; flex-direction: column; align-items: flex-start; line-height: .8; font-weight: 800; }
.logo-top, .logo-bot { font-size: 104px; letter-spacing: 2px; -webkit-text-stroke: 10px var(--ink); paint-order: stroke fill; text-shadow: 0 7px 0 var(--ink); }
.logo-top { color: var(--coral); }
.logo-bot { color: var(--teal); margin-left: 34px; }
.logo-mid { font-size: 34px; color: var(--ink); background: var(--sun); border: 4px solid var(--ink); border-radius: 12px; padding: 6px 14px 0; transform: rotate(-5deg); margin: -4px 0 -2px 120px; z-index: 1; line-height: 1; }
.title-row { display: flex; justify-content: center; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.title-row .btn { font-size: 18px; padding: 4px 15px 2px; min-height: 48px; }
.title-stats { display: flex; justify-content: center; gap: 10px; margin-top: 16px; }
.title-pals { position: absolute; left: 4px; bottom: 22px; display: flex; z-index: 1; }
.title-pals.right { left: auto; right: 4px; }
.title-pals svg { width: 170px; margin: 0 -16px; animation: bob 2.6s ease-in-out infinite; }
.title-pals svg:nth-child(2) { animation-delay: -1.3s; }
@keyframes bob { 50% { transform: translateY(-9px); } }

/* ---------- play layout ---------- */
#hud {
  position: absolute; left: 0; right: 0; top: 0; height: 64px; background: var(--ink); color: #fff; z-index: 5;
  display: flex; align-items: center; gap: 14px; padding: 0 14px; font-weight: 700;
}
.pill.day { background: var(--coral); border: 3px solid #fff; border-radius: 99px; padding: 2px 16px 0; font-weight: 800; font-size: 22px; letter-spacing: 1px; }
.hud-event { color: var(--sun); font-size: 19px; white-space: nowrap; }
.hud-served { font-size: 19px; opacity: .92; white-space: nowrap; }
.hud-served b { color: var(--sun); font-size: 22px; }
.hud-rank { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.lvl { background: var(--grape); border: 3px solid #fff; border-radius: 12px; padding: 2px 9px 0; font-weight: 800; font-size: 17px; white-space: nowrap; }
.rank-col { display: flex; flex-direction: column; gap: 2px; width: 172px; }
.rank-name { font-size: 15px; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xpbar { height: 10px; border-radius: 9px; background: rgba(255, 255, 255, .22); overflow: hidden; }
.xpbar i { display: block; height: 100%; background: var(--sun); border-radius: 9px; transition: width .5s; }
.hud-streak { display: flex; align-items: center; gap: 2px; font-size: 20px; color: #ffb27a; }
.hud-streak.off { visibility: hidden; }
.hud-streak svg { width: 26px; height: 26px; }
.hud-coins { display: flex; align-items: center; gap: 6px; background: #fff; color: var(--ink); border-radius: 99px; padding: 3px 16px 1px 6px; font-size: 22px; font-weight: 800; border: 3px solid var(--sun); }
.hud-coins svg { width: 30px; height: 30px; }
.hud-btn { height: 46px; min-width: 46px; padding: 0 8px; border-radius: 14px; background: rgba(255, 255, 255, .14); display: flex; align-items: center; justify-content: center; gap: 4px; font-weight: 800; color: #fff; font-size: 18px; }
.hud-btn:hover { background: rgba(255, 255, 255, .28); }
.hud-btn svg { width: 30px; height: 30px; }

#rail { position: absolute; left: 0; top: 64px; bottom: 0; width: 120px; background: var(--rail); display: flex; flex-direction: column; gap: 12px; padding: 14px 10px; z-index: 4; border-right: 5px solid var(--ink); }
.rail-btn {
  position: relative; flex: 1; border-radius: 20px; background: #4b3f80; color: #fff; border: 4px solid var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-weight: 800; font-size: 19px; letter-spacing: .5px;
  box-shadow: 0 5px 0 var(--ink); transition: transform .08s;
}
.rail-btn svg { width: 58px; height: 58px; }
.rail-btn .num { position: absolute; left: 8px; top: 5px; font-size: 16px; opacity: .6; }
.rail-btn:active { transform: translateY(3px); }
.rail-btn.on { background: var(--cream); color: var(--ink); transform: translateX(6px); }
.rail-btn.glow { animation: glow 1s ease-in-out infinite; }
@keyframes glow { 0%, 100% { box-shadow: 0 5px 0 var(--ink), 0 0 0 0 rgba(255, 201, 60, .9); } 50% { box-shadow: 0 5px 0 var(--ink), 0 0 0 9px rgba(255, 201, 60, .55); background: #6a5bb0; } }
.rail-btn .badge { position: absolute; right: -6px; top: -8px; min-width: 32px; height: 32px; border-radius: 99px; background: var(--coral); border: 3px solid #fff; font-style: normal; font-size: 18px; display: flex; align-items: center; justify-content: center; animation: pop .5s ease infinite alternate; }
@keyframes pop { to { transform: scale(1.18); } }

#scene { position: absolute; left: 120px; top: 64px; width: 870px; height: 656px; overflow: hidden; }
.scene { position: absolute; inset: 0; overflow: hidden; }
.wall { background: linear-gradient(var(--wall2) 4px, transparent 4px) 0 -2px/60px 60px, linear-gradient(90deg, var(--wall2) 4px, transparent 4px) -2px 0/60px 60px, var(--wall); }
.worktop { position: absolute; left: 0; right: 0; top: 500px; bottom: 0; background: linear-gradient(var(--ctr) 0 26px, var(--ctr2) 26px); border-top: 5px solid var(--ink); }
.worktop.low { top: 535px; }
.scene-shake .worktop { top: 520px; }

.coach {
  position: absolute; left: 14px; right: 14px; top: 12px; height: 46px; z-index: 6; display: flex; align-items: center; gap: 12px; padding: 0 18px 0 8px;
  background: var(--paper); border: 4px solid var(--ink); border-radius: 99px; font-weight: 700; font-size: 20px; box-shadow: 0 4px 0 rgba(42, 33, 68, .25); pointer-events: none;
}
.scene-window .coach { top: 92px; }
.pip { position: relative; width: 30px; height: 30px; border-radius: 50%; background: #3a2418; border: 3px solid var(--ink); flex: none; animation: bob 1.6s ease-in-out infinite; }
.pip i { position: absolute; top: 8px; width: 5px; height: 7px; border-radius: 50%; background: #fff; }
.pip i:first-child { left: 6px; } .pip i:last-child { right: 6px; }
#coach-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-top: 2px; }

/* ---------- window station ---------- */
.street { position: absolute; left: 0; right: 0; top: 0; height: 400px; background: linear-gradient(#8fd6ff 0%, #c7ecff 50%, #ffe9c4 100%); }
.sidewalk { position: absolute; left: 0; right: 0; top: 400px; height: 130px; background: repeating-linear-gradient(90deg, transparent 0 142px, rgba(42, 33, 68, .12) 142px 146px), #d8d2c4; border-top: 5px solid var(--ink); }
.counter { position: absolute; left: 0; right: 0; bottom: 0; height: 132px; background: linear-gradient(var(--ctr) 0 30px, var(--ctr2) 30px); border-top: 5px solid var(--ink); z-index: 2; }
.tipjar { position: absolute; left: 34px; top: 30px; width: 86px; height: 88px; background: rgba(255, 255, 255, .55); border: 4px solid var(--ink); border-radius: 12px 12px 20px 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 800; }
.tipjar::before { content: ''; position: absolute; top: -13px; left: -8px; right: -8px; height: 13px; background: var(--sun); border: 4px solid var(--ink); border-radius: 8px; }
.tipjar span { font-size: 15px; letter-spacing: 1px; }
.tipjar b { font-size: 24px; color: #0f8a7c; }
.counter-sign { position: absolute; right: 30px; top: 44px; background: var(--ink); color: var(--sun); border-radius: 14px; padding: 6px 18px 3px; font-weight: 800; font-size: 20px; transform: rotate(-2deg); border: 3px solid #fff; }
.cust { position: absolute; bottom: 104px; width: 210px; margin-left: -105px; cursor: pointer; z-index: 1; display: flex; flex-direction: column; align-items: center; }
.cust.enter { animation: walkin .6s cubic-bezier(.2, .9, .3, 1.2) both; }
@keyframes walkin { from { transform: translateY(220px); opacity: 0; } }
.cust.s-leaving { animation: walkout 1s ease-in both; pointer-events: none; }
@keyframes walkout { 25% { transform: translateY(-14px); } to { transform: translate(60px, 240px); opacity: 0; } }
.cust-art { width: 196px; }
.cust.s-wait .cust-art { animation: bob 1.2s ease-in-out infinite; }
.cust:hover .cust-art { filter: brightness(1.06); }
.nametag { position: absolute; bottom: 30px; background: #fff; border: 3px solid var(--ink); border-radius: 10px; padding: 0 12px; font-weight: 800; font-size: 17px; z-index: 3; }
.bubble { background: #fff; border: 4px solid var(--ink); border-radius: 20px; font-weight: 700; text-align: center; position: relative; margin-bottom: 8px; }
.bubble::after { content: ''; position: absolute; left: 50%; bottom: -12px; width: 16px; height: 16px; background: inherit; border: solid var(--ink); border-width: 0 4px 4px 0; transform: translateX(-50%) rotate(45deg); }
.bubble.ask { padding: 2px 16px 0; background: var(--sun); display: flex; align-items: center; gap: 8px; animation: pop .55s ease-in-out infinite alternate; }
.bubble.ask b { font-size: 34px; line-height: 1; color: var(--coral); -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; }
.bubble.ask span { font-size: 16px; line-height: 1.05; width: 96px; text-align: left; }
.bubble.say { width: 250px; padding: 8px 12px 6px; font-size: 18px; line-height: 1.15; z-index: 5; animation: sayin .25s ease both; }
@keyframes sayin { from { transform: scale(.6); opacity: 0; } }
.bubble.chip { padding: 2px 12px 0; font-size: 15px; background: var(--tc, #fff); color: #fff; white-space: nowrap; max-width: 250px; overflow: hidden; text-overflow: ellipsis; }
.bubble.chip.thanks { background: var(--teal); } .bubble.chip.gone { background: #8a82a3; }
.pbar { width: 130px; height: 14px; border: 3px solid var(--ink); border-radius: 9px; background: #fff; overflow: hidden; margin-bottom: 2px; }
.pbar i { display: block; height: 100%; width: 100%; background: var(--teal); }

/* ---------- cup ---------- */
.cup-holder { position: absolute; width: 234px; height: 270px; margin-left: -117px; z-index: 3; pointer-events: none; }
.cup-holder.glide { transition: left .19s ease-out; }
.cup-holder.shakeable { pointer-events: auto; cursor: grab; touch-action: none; }
.cup-holder.dragging { cursor: grabbing; transition: none; }
.cup-svg { width: 100%; height: 100%; overflow: visible; }
.cup-svg text { font-family: inherit; }
.cup-svg .drop { animation: dropin .34s cubic-bezier(.4, 0, .7, 1.4) both; }
@keyframes dropin { from { transform: translateY(-230px); opacity: .3; } }
.cup-svg .guide { animation: guide 1s ease-in-out infinite; }
@keyframes guide { 50% { opacity: .55; } }

/* ---------- scoop station ---------- */
.shelf { position: absolute; left: 70px; right: 70px; top: 150px; height: 16px; background: var(--ctr2); border: 4px solid var(--ink); border-radius: 8px; }
.jar { position: absolute; bottom: 12px; width: 62px; height: 78px; background: linear-gradient(transparent 26%, var(--c) 26%); border: 4px solid var(--ink); border-radius: 12px; }
.jar::before { content: ''; position: absolute; left: 6px; right: 6px; top: -14px; height: 12px; background: #fff; border: 4px solid var(--ink); border-radius: 6px; }
.jar:nth-child(1) { left: 20px; } .jar:nth-child(2) { left: 100px; } .jar:nth-child(3) { right: 100px; }
.plant { position: absolute; right: 16px; bottom: 12px; width: 56px; height: 44px; background: var(--coral); border: 4px solid var(--ink); border-radius: 6px 6px 16px 16px; }
.plant::before { content: ''; position: absolute; left: 2px; bottom: 36px; width: 44px; height: 54px; background: #4cbf6b; border: 4px solid var(--ink); border-radius: 50% 50% 12px 12px; }
.mat { position: absolute; left: 315px; top: 492px; width: 240px; height: 30px; background: rgba(42, 33, 68, .22); border-radius: 50%; }
.bins { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 10px; z-index: 4; }
.bin { position: relative; width: 100px; height: 112px; background: var(--paper); border: 4px solid var(--ink); border-radius: 18px; box-shadow: 0 5px 0 var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 17px; font-weight: 800; transition: transform .08s; }
.bin:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.bin-art { position: relative; width: 76px; height: 54px; border: 4px solid var(--ink); border-radius: 10px 10px 16px 16px; background: #dcd6ea; overflow: hidden; }
.bin-art i { position: absolute; width: 22px; height: 22px; border-radius: 50%; background: var(--c); border: 3px solid var(--ink); }
.bin-art i:nth-child(1) { left: 2px; top: 22px; } .bin-art i:nth-child(2) { left: 22px; top: 12px; } .bin-art i:nth-child(3) { left: 44px; top: 20px; }
.bin-art i:nth-child(4) { left: 12px; top: 34px; } .bin-art i:nth-child(5) { left: 34px; top: 32px; }
.bin-art.cube i, .bin-art.icebin i { border-radius: 5px; transform: rotate(12deg); }
.bin-art.bean i { height: 16px; }
.bin-art.blob i { border-radius: 9px; width: 26px; }
.bin-art.icebin { background: #bfe9ff; }
.bin-art.icebin i { background: #f2fbff; border-color: #5fb4dc; }
.bin em, .pump em { position: absolute; right: -8px; top: -10px; min-width: 36px; height: 36px; padding: 2px 6px 0; border-radius: 99px; background: var(--teal); color: #fff; border: 3px solid var(--ink); font-style: normal; font-size: 19px; font-weight: 800; display: none; align-items: center; justify-content: center; }
.bin em.show, .pump em.show { display: flex; animation: countpop .25s ease; }
@keyframes countpop { from { transform: scale(1.5); } }
.trash-btn { width: 84px; height: 112px; border-radius: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; color: var(--ink); background: rgba(255, 255, 255, .5); border: 4px dashed rgba(42, 33, 68, .5); margin-left: 12px; line-height: 1; }
.trash-btn svg { width: 54px; height: 54px; }
.trash-btn:active { transform: scale(.94); }

/* ---------- pour station ---------- */
.disp-rail { position: absolute; left: 0; right: 0; top: 96px; height: 20px; background: #c9c3dd; border: solid var(--ink); border-width: 4px 0; }
.disp { position: absolute; top: 68px; width: 132px; margin-left: -66px; display: flex; flex-direction: column; align-items: center; z-index: 2; touch-action: none; transition: transform .08s; }
.disp.pouring { transform: translateY(4px); }
.urn-lid { width: 84px; height: 16px; background: #a59dc2; border: 4px solid var(--ink); border-bottom: 0; border-radius: 12px 12px 0 0; }
.urn-body { position: relative; width: 126px; height: 126px; background: linear-gradient(90deg, #f4f2fa, #d6d0e6); border: 4px solid var(--ink); border-radius: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding-left: 22px; }
.urn-glass { position: absolute; left: 10px; top: 12px; bottom: 12px; width: 20px; border: 3px solid var(--ink); border-radius: 10px; background: linear-gradient(#fff 22%, var(--c) 22%); }
.urn-body b, .carton-body b { background: var(--ink); color: #fff; border-radius: 10px; padding: 2px 10px 0; font-size: 18px; font-weight: 800; border-bottom: 5px solid var(--c); }
.disp small { font-size: 13px; font-weight: 800; letter-spacing: 1.5px; opacity: .55; margin-top: 4px; }
.disp.pouring small { opacity: 1; color: var(--coral); }
.spout { width: 30px; height: 26px; background: #8a82a3; border: 4px solid var(--ink); border-top: 0; border-radius: 0 0 10px 10px; }
.carton-top { width: 0; height: 0; border-left: 50px solid transparent; border-right: 50px solid transparent; border-bottom: 30px solid var(--ink); position: relative; margin-top: -12px; }
.carton-top::after { content: ''; position: absolute; left: -42px; top: 6px; border-left: 42px solid transparent; border-right: 42px solid transparent; border-bottom: 24px solid #fff; }
.carton-body { width: 100px; height: 126px; background: linear-gradient(#fff 0 54%, var(--c) 54%); border: 4px solid var(--ink); border-radius: 4px 4px 12px 12px; display: flex; flex-direction: column; align-items: center; padding-top: 16px; }
.carton-body small { margin-top: 30px; color: #fff; opacity: .9; }
.stream { position: absolute; top: 236px; width: 14px; height: 296px; border-radius: 0 0 7px 7px; z-index: 2; display: none; box-shadow: inset 3px 0 0 rgba(255, 255, 255, .35); }
.stream.on { display: block; animation: stream .2s linear infinite; }
@keyframes stream { 50% { transform: scaleX(.8); } }
.track { position: absolute; left: 20px; right: 20px; top: 533px; height: 9px; border-radius: 6px; background: rgba(42, 33, 68, .25); z-index: 1; }
.pumps { position: absolute; left: 0; right: 0; bottom: 8px; display: flex; justify-content: center; align-items: flex-end; gap: 10px; z-index: 4; }
.pump { position: relative; width: 94px; height: 96px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; font-weight: 800; font-size: 15px; line-height: 1; }
.pump-head { width: 34px; height: 12px; background: #fff; border: 4px solid var(--ink); border-radius: 6px 12px 0 0; margin-left: 10px; transition: transform .08s; position: relative; }
.pump-head::after { content: ''; position: absolute; left: 6px; top: 8px; width: 8px; height: 12px; background: var(--ink); }
.pump-body { width: 62px; height: 46px; background: var(--c); border: 4px solid var(--ink); border-radius: 14px 14px 8px 8px; margin: 8px 0 4px; box-shadow: inset 8px 0 0 rgba(255, 255, 255, .35); }
.pump b { background: var(--paper); border: 3px solid var(--ink); border-radius: 9px; padding: 3px 7px 1px; white-space: nowrap; }
.pump.squirt .pump-head { animation: squirt .22s ease; }
@keyframes squirt { 40% { transform: translateY(9px); } }
.pump em { right: 0; top: -2px; }
.scene-pour .trash-btn { height: 92px; }

/* ---------- shake station ---------- */
.sealer { position: absolute; left: 50px; top: 68px; width: 300px; height: 457px; background: var(--grape); border: 5px solid var(--ink); border-radius: 26px 26px 0 0; padding: 12px 18px; display: flex; flex-direction: column; align-items: center; gap: 10px; z-index: 1; }
.sealer-head { color: #fff; font-weight: 800; font-size: 26px; letter-spacing: 3px; line-height: 1; }
.sealer-bay { position: absolute; left: 22px; right: 22px; top: 176px; bottom: 0; background: #2f2755; border: 5px solid var(--ink); border-bottom: 0; border-radius: 18px 18px 0 0; box-shadow: inset 0 12px 0 rgba(0, 0, 0, .25); }
.seal-meter { position: relative; width: 100%; height: 30px; background: #ff9a8f; border: 4px solid var(--ink); border-radius: 12px; overflow: hidden; }
.seal-meter .zone { position: absolute; top: 0; bottom: 0; }
.seal-meter .zone.ok { left: 26%; right: 26%; background: var(--sun); }
.seal-meter .zone.best { left: 41%; right: 41%; background: #37d67a; }
#seal-mark { position: absolute; top: -4px; bottom: -4px; width: 10px; margin-left: -5px; background: #fff; border: 3px solid var(--ink); border-radius: 5px; left: 0; }
.seal-btn { width: 100%; min-height: 56px; font-size: 26px; letter-spacing: 2px; }
.sealer.done .seal-meter, .sealer.done .seal-btn { opacity: .35; pointer-events: none; }
.shake-zone { position: absolute; left: 372px; top: 76px; width: 200px; text-align: center; }
.shake-label { background: var(--teal); color: #fff; border: 4px solid var(--ink); border-radius: 16px; padding: 6px 8px 2px; font-weight: 800; font-size: 22px; letter-spacing: 1px; line-height: 1; }
.shake-label small { display: block; font-size: 14px; letter-spacing: 0; opacity: .95; margin-top: 3px; padding-bottom: 3px; }
.shake-pad { position: absolute; left: -22px; top: 430px; width: 240px; height: 34px; border-radius: 50%; background: rgba(42, 33, 68, .22); }
.mix-meter { position: absolute; left: 592px; top: 196px; width: 44px; text-align: center; font-weight: 800; font-size: 16px; z-index: 2; }
.mix-track { position: relative; width: 34px; height: 290px; margin: 2px auto 0; background: #fff; border: 4px solid var(--ink); border-radius: 17px; overflow: hidden; }
.mix-track i { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: linear-gradient(#37d67a, var(--teal)); transition: height .1s; }
.mix-track u { position: absolute; left: 0; right: 0; bottom: 90%; height: 4px; background: var(--ink); }
.straw-jar { position: absolute; left: 672px; top: 300px; width: 120px; z-index: 2; }
.straws { display: flex; justify-content: center; gap: 6px; height: 132px; align-items: flex-end; margin-bottom: -26px; }
.straw { width: 20px; height: 126px; background: var(--c); border: 4px solid var(--ink); border-radius: 8px; transition: transform .1s; box-shadow: inset 5px 0 0 rgba(255, 255, 255, .4); }
.straw:nth-child(odd) { transform: rotate(-5deg); height: 116px; } .straw:nth-child(even) { transform: rotate(4deg); }
.straw:hover { transform: translateY(-10px); }
.jar-body { position: relative; height: 122px; background: #b9b0d6; border: 4px solid var(--ink); border-radius: 10px 10px 18px 18px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 12px; font-weight: 800; letter-spacing: 1px; font-size: 17px; }
.serve-btn { position: absolute; right: 22px; bottom: 18px; width: 250px; height: 94px; background: var(--coral); color: #fff; border: 5px solid var(--ink); border-radius: 26px; box-shadow: 0 7px 0 var(--ink); display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 800; font-size: 36px; letter-spacing: 2px; z-index: 4; text-shadow: 0 2px 0 rgba(42, 33, 68, .35); }
.serve-btn svg { width: 58px; height: 58px; }
.serve-btn:active { transform: translateY(5px); box-shadow: 0 2px 0 var(--ink); }
.scene-shake .trash-btn { position: absolute; left: 12px; bottom: 12px; z-index: 4; margin: 0; }

/* ---------- order board ---------- */
#board { position: absolute; right: 0; top: 64px; bottom: 0; width: 290px; background: #c79a63; border-left: 5px solid var(--ink); padding: 10px 12px; z-index: 4; display: flex; flex-direction: column; gap: 8px; background-image: radial-gradient(rgba(42, 33, 68, .12) 2px, transparent 2.5px); background-size: 16px 16px; }
.board-title { text-align: center; font-weight: 800; letter-spacing: 4px; color: #fff; font-size: 17px; text-shadow: 0 2px 0 rgba(42, 33, 68, .5); line-height: 1; padding-top: 2px; }
#board .tabs { display: flex; gap: 6px; flex-wrap: wrap; min-height: 44px; align-items: center; }
.tab { min-width: 50px; height: 42px; padding: 2px 10px 0; border-radius: 12px; background: var(--tc); color: #fff; border: 4px solid var(--ink); font-weight: 800; font-size: 20px; opacity: .72; box-shadow: 0 3px 0 var(--ink); }
.tab.on { opacity: 1; transform: translateY(-3px) scale(1.06); box-shadow: 0 5px 0 var(--ink); }
.no-tabs { font-weight: 700; color: rgba(42, 33, 68, .7); font-size: 16px; margin: 0 auto; }
.ticket { flex: 1; min-height: 0; background: var(--paper); border: 4px solid var(--ink); border-radius: 6px 6px 16px 16px; border-top: 16px solid var(--tc, var(--ink)); padding: 8px 12px 10px; display: flex; flex-direction: column; gap: 7px; box-shadow: 0 6px 0 rgba(42, 33, 68, .35); }
.ticket.empty { justify-content: center; text-align: center; gap: 12px; font-weight: 700; font-size: 18px; color: #6c6488; border-top-color: #8a82a3; }
.ticket-head { display: flex; align-items: center; gap: 8px; }
.mini-face { width: 58px; height: 58px; flex: none; border-radius: 50%; background: #e9f6ff; border: 3px solid var(--ink); overflow: hidden; }
.mini-face svg { width: 74px; margin: -4px 0 0 -8px; }
.ticket-who { flex: 1; min-width: 0; line-height: 1.05; }
.ticket-who b { display: block; font-size: 18px; }
.ticket-who span { display: block; font-size: 19px; font-weight: 800; color: #c2362a; }
.price { background: var(--sun); border: 3px solid var(--ink); border-radius: 10px; padding: 1px 8px 0; font-weight: 800; font-size: 17px; white-space: nowrap; }
.ticket .pbar { width: 100%; }
.steps { display: flex; flex-direction: column; gap: 4px; border-top: 3px dashed rgba(42, 33, 68, .3); padding-top: 8px; }
.steps li { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 18.5px; line-height: 1.1; }
.tick { width: 24px; height: 24px; flex: none; border: 3px solid var(--ink); border-radius: 8px; background: #fff; position: relative; }
.steps li.ok { color: #0f7c70; } .steps li.ok .tick { background: #37d67a; }
.steps li.ok .tick::after, .goals li.done .tick::after { content: ''; position: absolute; left: 6px; top: 1px; width: 6px; height: 12px; border: solid #fff; border-width: 0 4px 4px 0; transform: rotate(40deg); }
.steps li.off { color: #c2362a; } .steps li.off .tick { background: var(--coral); }
.steps li.off .tick::after { content: '!'; position: absolute; inset: 0; color: #fff; font-weight: 800; font-size: 17px; line-height: 21px; text-align: center; }

/* ---------- modals ---------- */
.veil { position: absolute; inset: 0; background: rgba(34, 26, 58, .62); z-index: 20; display: flex; align-items: center; justify-content: center; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } }
.modal { position: relative; width: 640px; max-height: 664px; background: var(--cream); border: 5px solid var(--ink); border-radius: 34px; box-shadow: 0 10px 0 var(--ink); padding: 46px 30px 24px; display: flex; flex-direction: column; animation: modalin .28s cubic-bezier(.2, .9, .3, 1.25); }
.modal.wide { width: 940px; }
.modal.result { width: 800px; }
@keyframes modalin { from { transform: translateY(40px) scale(.94); opacity: 0; } }
.ribbon { position: absolute; left: 50%; top: -30px; transform: translateX(-50%) rotate(-2deg); background: var(--coral); color: #fff; border: 5px solid var(--ink); border-radius: 18px; padding: 6px 34px 0; font-size: 36px; font-weight: 800; white-space: nowrap; letter-spacing: 1px; box-shadow: 0 6px 0 var(--ink); text-shadow: 0 3px 0 rgba(42, 33, 68, .35); }
.card { background: var(--paper); border: 4px solid var(--ink); border-radius: 22px; padding: 14px 18px; }
.card h4, .lab-opts h4, .settings h4, .shop-style h4 { font-size: 16px; letter-spacing: 2px; text-transform: uppercase; color: #6c6488; margin-bottom: 6px; }
h4 small { text-transform: none; letter-spacing: 0; font-weight: 600; opacity: .8; }

.howto { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.howto-card { position: relative; background: var(--paper); border: 4px solid var(--ink); border-radius: 22px; padding: 16px 12px 12px; text-align: center; }
.howto-card svg { width: 84px; height: 84px; margin: 0 auto 4px; }
.howto-card h3 { font-size: 24px; }
.howto-card p { font-size: 17px; line-height: 1.2; }
.howto-num { position: absolute; left: -10px; top: -12px; width: 40px; height: 40px; border-radius: 50%; background: var(--sun); border: 4px solid var(--ink); font-weight: 800; font-size: 22px; display: flex; align-items: center; justify-content: center; padding-top: 3px; }

.intro-event { text-align: center; margin-bottom: 14px; }
.intro-event h3 { font-size: 34px; color: var(--grape); line-height: 1; }
.intro-event p { font-size: 20px; }
.intro-grid { display: grid; grid-template-columns: 300px 1fr; gap: 16px; }
.bignum { font-size: 84px; font-weight: 800; line-height: .9; color: var(--coral); }
.intro-grid .card:first-child { text-align: center; }
.chip-line { margin-top: 10px; }
.goals { display: flex; flex-direction: column; gap: 8px; }
.goals li { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; }
.goals .g-text { flex: 1; }
.goals .g-num { color: #6c6488; font-size: 17px; }
.goals .g-reward { background: var(--sun); border: 3px solid var(--ink); border-radius: 10px; padding: 1px 8px 0; font-weight: 800; font-size: 16px; }
.goals li.done .tick { background: #37d67a; }
.goals li.missed { opacity: .5; }
.sum-stars { display: flex; align-items: center; gap: 2px; margin-bottom: 6px; }
.sum-stars svg { width: 34px; height: 34px; }
.sum-stars span { margin-left: 8px; font-weight: 800; }
.card.sum { text-align: left !important; }
.sum-row { display: flex; justify-content: space-between; font-size: 19px; font-weight: 600; border-top: 2px dashed rgba(42, 33, 68, .2); padding-top: 3px; }
.sum-row b { font-weight: 800; }
.wallet { display: flex; align-items: center; gap: 8px; font-size: 21px; margin-top: 14px; }
.wallet svg { width: 30px; height: 30px; }

.result-top { display: flex; align-items: center; gap: 12px; }
.result-face { width: 170px; flex: none; animation: bob 1.4s ease-in-out infinite; }
.result-mid { flex: 1; text-align: center; }
.result-cup { width: 128px; flex: none; }
.quote { background: #fff; border: 4px solid var(--ink); border-radius: 20px; padding: 10px 14px 6px; font-size: 26px; font-weight: 800; line-height: 1.05; }
.quote span { display: block; font-size: 16px; font-weight: 600; opacity: .7; margin-top: 4px; }
.stars { display: flex; justify-content: center; gap: 4px; margin-top: 10px; }
.star svg { width: 58px; height: 58px; }
.star.on { animation: starpop .4s cubic-bezier(.2, .9, .3, 1.6) both; }
@keyframes starpop { from { transform: scale(0) rotate(-40deg); } }
.gauges { display: flex; justify-content: space-between; gap: 8px; margin: 14px 10px 0; }
.gauge { text-align: center; font-size: 17px; flex: 1; }
.ring { width: 78px; height: 78px; margin: 0 auto 2px; border-radius: 50%; border: 4px solid var(--ink); background: conic-gradient(var(--c) calc(var(--p) * 1%), #e6e0f2 0); display: flex; align-items: center; justify-content: center; }
.ring span { width: 48px; height: 48px; border-radius: 50%; background: var(--paper); border: 3px solid var(--ink); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 19px; padding-top: 2px; }
.coach-tip { text-align: center; margin-top: 10px; font-size: 18px; background: #fff1c9; border-radius: 12px; padding: 5px 10px 3px; }
.coach-tip.good { background: #d8f6e6; }
.earn { display: flex; justify-content: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.earn-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 14px 2px; border-radius: 99px; border: 4px solid var(--ink); background: #fff; font-weight: 700; font-size: 20px; }
.earn-chip b { font-weight: 800; font-size: 23px; }
.earn-chip svg { width: 26px; height: 26px; }
.earn-chip.coin { background: var(--sun); } .earn-chip.tip { background: #c9f3e8; } .earn-chip.xp { background: #e2d8ff; } .earn-chip.hot { background: #ffd9bd; } .earn-chip.heart { background: #ffd6de; }

.rank-big { text-align: center; font-size: 26px; }
.rank-big b { color: var(--grape); }
.unlock-card { display: flex; align-items: center; gap: 12px; background: var(--paper); border: 4px solid var(--ink); border-radius: 22px; padding: 8px 18px; margin-top: 14px; }
.unlock-card svg { width: 110px; flex: none; }
.unlock-card h3 { font-size: 30px; line-height: 1; color: var(--coral); }
.unlock { text-align: center; margin-top: 12px; font-size: 20px; }

.recipes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-height: 470px; padding: 4px 6px 8px 2px; }
.recipe { display: flex; align-items: center; gap: 8px; background: var(--paper); border: 4px solid var(--ink); border-radius: 20px; padding: 6px 14px 6px 6px; }
.recipe > svg { width: 84px; flex: none; }
.recipe h3 { font-size: 22px; line-height: 1.05; }
.recipe p { font-size: 16px; line-height: 1.2; opacity: .85; }
.recipe.locked { opacity: .6; border-style: dashed; }
.recipe.lab { background: #efe8ff; grid-column: 1 / -1; }
.lock { width: 84px; height: 84px; flex: none; border-radius: 18px; background: #e6e0f2; border: 4px dashed var(--ink); display: flex; align-items: center; justify-content: center; font-size: 46px; font-weight: 800; color: #8a82a3; }

.lab { display: grid; grid-template-columns: 250px 1fr; gap: 18px; }
.lab-preview { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.lab-preview svg { width: 220px; order: 2; }
.lab-opts { max-height: 452px; padding-right: 6px; }
.lab-opts h4 { margin-top: 7px; margin-bottom: 4px; }
.lab-opts h4:first-child { margin-top: 0; }
.opts, .swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { display: inline-flex; align-items: center; gap: 7px; background: #fff; border: 3px solid var(--ink); border-radius: 14px; padding: 4px 12px 2px 7px; font-weight: 700; font-size: 17px; }
.opt i { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--ink); }
.opt.on { background: var(--sun); box-shadow: 0 3px 0 var(--ink); transform: translateY(-2px); }

.pals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; max-height: 440px; padding: 12px 6px 8px 2px; }
.pal { position: relative; background: var(--paper); border: 4px solid var(--ink); border-radius: 20px; padding: 8px 10px 10px; text-align: center; }
.pal-art { width: 112px; margin: 0 auto; }
.pal h4 { font-size: 22px; }
.pal p { font-size: 15px; line-height: 1.15; min-height: 18px; }
.pal .fav { opacity: .85; }
.pal.unmet .pal-art { filter: brightness(0) opacity(.25); }
.pal.bff { background: #fff1c9; }
.hearts { display: flex; justify-content: center; gap: 3px; margin-top: 5px; }
.hearts svg { width: 26px; height: 26px; }
.sticker { position: absolute; right: -8px; top: -10px; background: var(--coral); color: #fff; border: 3px solid var(--ink); border-radius: 10px; font-weight: 800; font-size: 13px; padding: 2px 8px 0; transform: rotate(8deg); }

.shop-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.shop-head .tabs { display: flex; gap: 8px; }
.tabbtn { padding: 6px 20px 3px; border-radius: 14px; border: 4px solid var(--ink); background: #fff; font-weight: 800; font-size: 20px; }
.tabbtn.on { background: var(--ink); color: var(--sun); }
.shop-head .hud-coins { border-color: var(--ink); }
.shop-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-height: 400px; padding: 2px 6px 8px 2px; }
.shop-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--paper); border: 4px solid var(--ink); border-radius: 20px; padding: 10px 14px; }
.shop-item h4 { font-size: 21px; }
.shop-item p { font-size: 16px; line-height: 1.15; opacity: .85; }
.pips { display: inline-flex; gap: 3px; margin-left: 6px; vertical-align: 2px; }
.pips i { width: 13px; height: 13px; border-radius: 50%; border: 3px solid var(--ink); background: #fff; }
.pips i.on { background: var(--teal); }
.buy { flex: none; min-width: 104px; }
.owned { font-weight: 800; color: #0f7c70; flex: none; }
.shop-style { max-height: 424px; padding: 2px 6px 6px 2px; }
.shop-style h4 { margin-top: 8px; }
.name-row { display: flex; gap: 10px; }
.name-row .text-input { max-width: 380px; }
.swatch { display: flex; flex-direction: column; align-items: center; gap: 1px; width: 88px; padding: 5px 4px 2px; border: 4px solid transparent; border-radius: 16px; font-weight: 700; font-size: 14px; line-height: 1.1; }
.swatch i { width: 40px; height: 40px; border-radius: 50%; border: 4px solid var(--ink); }
.swatch.on { border-color: var(--ink); background: #fff; }
.swatch.locked i { opacity: .55; }
.swatch.locked span { background: var(--sun); border: 2px solid var(--ink); border-radius: 8px; padding: 0 7px; font-weight: 800; }

.settings { display: flex; flex-direction: column; gap: 12px; }
.set-row { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 21px; background: var(--paper); border: 4px solid var(--ink); border-radius: 18px; padding: 8px 12px 6px 18px; }
.toggle { min-width: 84px; padding: 5px 0 2px; border-radius: 12px; border: 4px solid var(--ink); background: #e6e0f2; font-weight: 800; font-size: 19px; }
.toggle.on { background: #37d67a; color: #fff; }
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mode { background: var(--paper); border: 4px solid var(--ink); border-radius: 18px; padding: 10px 10px 8px; display: flex; flex-direction: column; gap: 3px; text-align: center; }
.mode b { font-size: 22px; } .mode span { font-size: 15px; line-height: 1.15; opacity: .85; }
.mode.on { background: var(--sun); box-shadow: 0 4px 0 var(--ink); transform: translateY(-3px); }

/* ---------- toasts + effects ---------- */
#toast-root { position: absolute; left: 120px; width: 870px; top: 196px; z-index: 30; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.toast { background: var(--ink); color: #fff; border: 4px solid #fff; border-radius: 99px; padding: 6px 26px 3px; font-weight: 800; font-size: 24px; animation: toast 2.1s ease both; white-space: nowrap; }
.toast.good { background: #12a182; } .toast.bad { background: #d6453a; }
@keyframes toast { 0% { transform: translateY(16px) scale(.8); opacity: 0; } 10% { transform: none; opacity: 1; } 82% { opacity: 1; } 100% { opacity: 0; transform: translateY(-14px); } }
#fx-root { position: absolute; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
.confetti { position: absolute; top: -20px; width: 13px; height: 18px; border-radius: 3px; animation: confetti 1.6s ease-in both; }
@keyframes confetti { to { transform: translate(var(--drift), 780px) rotate(var(--spin)); opacity: .9; } }

/* ---------- small phones held upright ---------- */
#rotate { display: none; position: fixed; left: 0; right: 0; bottom: 0; padding: 10px 16px; text-align: center; background: var(--sun); color: var(--ink); font-weight: 800; font-size: 16px; z-index: 99; }
@media (orientation: portrait) and (max-width: 720px) { #rotate { display: block; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01s !important; animation-iteration-count: 1 !important; transition-duration: .01s !important; }
  .confetti { display: none; }
}
