/* Juice Bar Mixer. Logical properties, so RTL and LTR share one file.
   Sizes are in em: game.js sets --u (the scale of the whole stage) and --H (its height),
   so one layout fits a small phone, a phone held sideways and a desktop full screen. */
:root {
    --bg: #071d2b; --panel: #0f3447; --panel2: #164a63; --line: #226584; --text: #f2fbff; --muted: #a9d3e6;
    --gold: #ffcf3d; --gold2: #ffb21f; --lime: #7ce06a; --ok: #49d17d; --bad: #ff5f57; --ink: #0f2430;
    --wood: #f2a65a; --wood2: #d9803a;
    --aw1: #7ce06a; --aw2: #fffbe8; --neon: #9dff8a;
    --bl-base: #3c4a5c; --bl-led: #4a5a6e; --bl-glass: rgba(255, 255, 255, .1);
    --font: system-ui, "Segoe UI", Tahoma, "Noto Sans Arabic", "Noto Sans", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); }
body { -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; overflow: hidden; }
button { font: inherit; color: inherit; touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
[hidden] { display: none !important; }
bdi { font-variant-numeric: tabular-nums; }

.game {
    position: relative; display: flex; flex-direction: column; overflow: hidden; margin-inline: auto;
    inline-size: 100%; block-size: var(--H, 640px); font-size: calc(16px * var(--u, 1)); background: var(--bg);
}

/* ---------- top bar ---------- */
.hud { position: relative; z-index: 12; flex: none; display: flex; align-items: center; gap: .4em; block-size: 3.3em; padding: .4em .5em; }
.hud .grow { flex: 1; }
/* the bar lies over the menus: only its own buttons take taps */
.hud { pointer-events: none; }
.hud > :not(.grow) { pointer-events: auto; }
.icon {
    flex: none; inline-size: 2.5em; block-size: 2.5em; border-radius: .8em; cursor: pointer; padding: 0; border: 0;
    background: rgba(0, 0, 0, .4); display: grid; place-items: center; color: var(--text);
}
.icon svg { inline-size: 1.35em; block-size: 1.35em; }
.icon:active { transform: scale(.92); }
.stat {
    position: relative; display: flex; align-items: center; justify-content: center; gap: .3em; block-size: 2.5em; padding-inline: .6em;
    background: rgba(0, 0, 0, .4); border-radius: .8em; font-weight: 800; white-space: nowrap;
}
.stat b { font-size: 1.12em; font-variant-numeric: tabular-nums; }
.stat.score { min-inline-size: 5.6em; justify-content: flex-start; }
.stat .coin { inline-size: 1.2em; block-size: 1.2em; flex: none; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #ffe680, #ffc21f 60%, #c98a00); box-shadow: inset 0 0 0 .1em #e0a400; }
.stat b.bump { animation: jb-bump .3s ease-out; }
@keyframes jb-bump { 40% { transform: scale(1.22); color: var(--gold); } }
.stat.time b.low { color: var(--bad); animation: jb-tick 1s ease-in-out infinite; }
@keyframes jb-tick { 0%, 100% { transform: none; } 10% { transform: scale(1.18); } }
.hearts { display: flex; gap: .1em; align-items: center; }
.hearts svg { inline-size: 1.1em; block-size: 1.1em; transition: transform .2s, opacity .2s; }
.hearts svg.lost { opacity: .22; transform: scale(.8); filter: grayscale(1); }
.hearts svg.back { animation: jb-pop .5s cubic-bezier(.3, 1.6, .5, 1); }
.game.last-heart .hearts svg:not(.lost) { animation: jb-beat .55s ease-in-out infinite; transform-origin: 50% 60%; }
@keyframes jb-beat { 30% { transform: scale(1.25); } }
/* days with star targets: the score fills a bar towards the three stars */
.starbar { display: none; position: absolute; inset-inline: .5em; inset-block-end: .22em; block-size: .26em; border-radius: 9px; background: rgba(255, 255, 255, .2); }
.game.goal .starbar { display: block; }
.game.goal .stat.score { align-items: flex-start; padding-block-start: .22em; min-inline-size: 7.4em; }
.game.goal .stat.score .coin { margin-block-start: .12em; }
.starbar i { display: block; block-size: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gold2), var(--gold)); transform: scaleX(var(--p, 0)); transform-origin: 0 50%; transition: transform .35s ease-out; }
[dir="rtl"] .starbar i { transform-origin: 100% 50%; }
.starbar s {
    position: absolute; inset-block-start: -.3em; inset-inline-start: var(--at, 100%); inline-size: .86em; block-size: .86em; margin-inline-start: -.5em; background: #56707e;
    clip-path: polygon(50% 0, 62% 35%, 98% 37%, 69% 59%, 80% 95%, 50% 73%, 20% 95%, 31% 59%, 2% 37%, 38% 35%); transition: background-color .2s;
}
.starbar s.on { background: var(--gold); animation: jb-pop .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes jb-pop { from { transform: scale(2.4); } }
.game.menu .hud .stat, .game.menu #pause { display: none; }
.game:not(.menu):not(.paused) #music { display: none; }
.game.paused .hud .stat.hp { display: none; }

/* ---------- the place and the bar ---------- */
.play { flex: 1; min-block-size: 0; display: flex; flex-direction: column; }
.scene { position: relative; flex: 1; min-block-size: 0; overflow: hidden; margin-inline: .45em; border-radius: 1em; background: #123a52; }
.sky { position: absolute; inset: 0; background: center bottom / cover no-repeat; }
.scene::before { content: ""; position: absolute; z-index: 1; inset-inline: 0; inset-block-start: 0; block-size: 4.5em; pointer-events: none; background: linear-gradient(rgba(0, 0, 0, .28), transparent); }
.awning {
    position: absolute; z-index: 3; inset-inline: 0; inset-block-start: 0; block-size: 1.9em;
    background: repeating-linear-gradient(90deg, var(--aw1) 0 1.75em, var(--aw2) 1.75em 3.5em);
    -webkit-mask: radial-gradient(.875em .62em at .875em 1.9em, transparent 98%, #000) 0 0 / 1.75em 100% repeat-x;
            mask: radial-gradient(.875em .62em at .875em 1.9em, transparent 98%, #000) 0 0 / 1.75em 100% repeat-x;
    box-shadow: inset 0 -.4em 0 rgba(0, 0, 0, .12);
}
.plant { position: absolute; z-index: 3; inset-block-start: 1.5em; inline-size: 1.9em; block-size: 2.9em; pointer-events: none; transform-origin: 50% 0; animation: jb-sway 4s ease-in-out infinite alternate; }
.plant.a { inset-inline-start: 2%; }
.plant.b { inset-inline-end: 2%; animation-delay: -2s; }
@keyframes jb-sway { from { transform: rotate(-4deg); } to { transform: rotate(4deg); } }
/* the bar's neon name hangs under the awning */
.sign { position: absolute; z-index: 3; inset-inline: 0; inset-block-start: 1.55em; display: flex; justify-content: center; pointer-events: none; }
.sign b {
    font-size: .92em; font-weight: 900; letter-spacing: .02em; color: #fff; padding: .16em .9em .2em; border-radius: 999px;
    border: .12em solid var(--neon); background: rgba(6, 22, 34, .78);
    text-shadow: 0 0 .5em var(--neon), 0 0 1.1em var(--neon);
    box-shadow: 0 0 .9em color-mix(in srgb, var(--neon) 45%, transparent), inset 0 0 .6em color-mix(in srgb, var(--neon) 25%, transparent);
    animation: jb-neon 4s ease-in-out infinite;
}
@keyframes jb-neon { 0%, 47%, 53%, 100% { opacity: 1; } 50% { opacity: .6; } }
.game.frenzy .sign b { animation: jb-rainbow 1.2s linear infinite; }
@keyframes jb-rainbow { to { filter: hue-rotate(360deg); } }
/* one slow thing in every sky: a cloud, a butterfly, a gull, a paper lantern */
.drift { position: absolute; z-index: 1; inset-block-start: 24%; inset-inline-start: 0; inline-size: 5em; block-size: 1.4em; pointer-events: none; opacity: .85; animation: jb-drift 60s linear infinite; background: radial-gradient(closest-side, #fff, rgba(255, 255, 255, 0)); }
.scene[data-pl="1"] .drift { inline-size: .9em; block-size: .7em; inset-block-start: 40%; background: radial-gradient(circle at 25% 50%, #ffd23f 0 34%, transparent 36%), radial-gradient(circle at 75% 50%, #ff8fb1 0 34%, transparent 36%); animation: jb-flutter 26s linear infinite; }
.scene[data-pl="2"] .drift { inline-size: 1.5em; block-size: .6em; inset-block-start: 30%; opacity: .7; background: radial-gradient(.55em .28em at 25% 70%, transparent 60%, #3b2a35 62% 82%, transparent 84%), radial-gradient(.55em .28em at 75% 70%, transparent 60%, #3b2a35 62% 82%, transparent 84%); animation-duration: 38s; }
.scene[data-pl="3"] .drift { inline-size: .55em; block-size: .75em; border-radius: 40% 40% 50% 50%; background: #ffb627; box-shadow: 0 0 .6em .2em rgba(255, 182, 39, .6); inset-block-start: 36%; animation: jb-float 30s linear infinite; }
@keyframes jb-drift { from { transform: translateX(-6em); } to { transform: translateX(110vw); } }
@keyframes jb-flutter { 0% { transform: translate(-2em, 0); } 25% { transform: translate(22vw, -1.6em); } 50% { transform: translate(48vw, .8em); } 75% { transform: translate(74vw, -1.2em); } 100% { transform: translate(106vw, 0); } }
@keyframes jb-float { from { transform: translate(8em, 6em); opacity: 0; } 15% { opacity: 1; } to { transform: translate(16em, -12em); opacity: 0; } }
/* the counter: a wooden top over a tiled front in the bar's colours */
.counter {
    position: absolute; z-index: 4; inset-inline: 0; inset-block-end: 0; block-size: 1.55em;
    background: linear-gradient(#ffd08a 0 .14em, var(--wood) .14em .4em, #a85a26 .4em .5em, transparent .5em),
        repeating-linear-gradient(90deg, var(--aw1) 0 1.1em, var(--aw2) 1.1em 2.2em);
    box-shadow: 0 -.12em .5em rgba(0, 0, 0, .35);
}
.counter::after { content: ""; position: absolute; inset-inline: 0; inset-block-start: .5em; inset-block-end: 0; background: linear-gradient(rgba(0, 0, 0, .1), rgba(0, 0, 0, .28)); }

.slots { position: absolute; z-index: 2; inset-inline: .3em; inset-block: 2.6em 1em; display: grid; grid-template-columns: repeat(3, 1fr); gap: .3em; }
.slot {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; min-inline-size: 0;
    border: 0; background: none; padding: 0; cursor: pointer; border-radius: 1em;
}
.slot:disabled { cursor: default; }
.slot .who { position: relative; inline-size: var(--cw, 6.4em); max-inline-size: 98%; transition: transform .35s cubic-bezier(.2, .9, .3, 1.3), opacity .3s; }
.slot .cust { display: block; inline-size: 100%; block-size: auto; overflow: visible; }
.cust.kid { transform: scale(.8); transform-origin: 50% 100%; }
.slot.in .who { animation: jb-walk-in .5s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes jb-walk-in { from { transform: translate(var(--from, 3em), 1em) scale(.9); opacity: 0; } 60% { transform: translate(0, -.3em); opacity: 1; } }
.slot.leave .ticket { opacity: 0; transform: scale(.85); }
.slot.leave .who { transform: translateX(calc(var(--from, 3em) * -1)) scale(.92); opacity: 0; }
.slot.leave.happy .who { transform: translateY(-.9em) scale(1.05); opacity: 0; }
.slot.match .who { filter: drop-shadow(0 0 .6em rgba(73, 209, 125, .95)); }
.slot.shake .who { animation: jb-shake .35s; }
@keyframes jb-shake { 25% { transform: translateX(-.4em) rotate(-3deg); } 75% { transform: translateX(.4em) rotate(3deg); } }
.slot.happy .who { animation: jb-cheer .4s ease-out; }
@keyframes jb-cheer { 40% { transform: translateY(-.75em) scale(1.06); } }

/* Faces: every mouth is in the picture, CSS shows one. */
.cust .m, .cust .joy { display: none; }
[data-mood="happy"] .cust .m.happy, [data-mood="ok"] .cust .m.ok, [data-mood="meh"] .cust .m.meh, [data-mood="mad"] .cust .m.mad { display: inline; }
.slot.happy .cust .m { display: none; }
.slot.happy .cust .m.wow, .slot.happy .cust .joy { display: inline; }
.slot.happy .cust .eyes { display: none; }
[data-mood="mad"] .cust .b-l { transform: rotate(24deg); transform-origin: 40px 39px; }
[data-mood="mad"] .cust .b-r { transform: rotate(-24deg); transform-origin: 60px 39px; }
[data-mood="meh"] .cust .b-l { transform: rotate(12deg); transform-origin: 40px 39px; }
[data-mood="meh"] .cust .b-r { transform: rotate(-12deg); transform-origin: 60px 39px; }
[data-mood="mad"] .who { animation: jb-fume .6s ease-in-out infinite; }
@keyframes jb-fume { 50% { transform: translateY(-.12em); } }
.cust .eyes { animation: jb-blink 4.2s infinite; transform-origin: 50px 47px; }
.slot:nth-child(2) .cust .eyes { animation-delay: -1.3s; }
.slot:nth-child(3) .cust .eyes { animation-delay: -2.7s; }
@keyframes jb-blink { 0%, 95%, 100% { transform: none; } 97.5% { transform: scaleY(.1); } }
.vip-star { animation: jb-star 2.4s ease-in-out infinite; transform-origin: 50px 13px; }
@keyframes jb-star { 50% { transform: scale(1.2) rotate(12deg); } }

/* Order ticket: one picture for every portion, then the cup it makes. */
.ticket {
    position: relative; inline-size: 100%; max-inline-size: 9.4em; margin-block-end: .4em; padding: .3em .3em .42em;
    background: #fbfff4; color: var(--ink); border-radius: .65em; box-shadow: 0 .25em 0 rgba(0, 0, 0, .22);
    transition: transform .2s, box-shadow .2s, opacity .2s;
}
.ticket::after { content: ""; position: absolute; inset-inline-start: calc(50% - .45em); inset-block-end: -.42em; border: .45em solid transparent; border-block-end: 0; border-block-start-color: #fbfff4; }
.ticket.vip { background: #fff3c4; box-shadow: 0 0 0 .14em #ffd23f, 0 .25em 0 rgba(0, 0, 0, .22); }
.ticket.vip::after { border-block-start-color: #fff3c4; }
.ticket.run { background: #ffe6ea; box-shadow: 0 0 0 .14em #ff4f6d, 0 .25em 0 rgba(0, 0, 0, .22); }
.ticket.run::after { border-block-start-color: #ffe6ea; }
.ticket.color, .ticket.mystery { background: #efe6ff; }
.ticket.color::after, .ticket.mystery::after { border-block-start-color: #efe6ff; }
.ticket.bad { box-shadow: 0 0 0 .2em var(--bad), 0 .25em 0 rgba(0, 0, 0, .22); }
.ticket.hurry { animation: jb-hurry .5s ease-in-out infinite; }
@keyframes jb-hurry { 25% { transform: rotate(-2.5deg); } 75% { transform: rotate(2.5deg); } }
.ticket .tag { display: block; font-size: .58em; font-weight: 900; text-align: center; letter-spacing: .02em; margin-block-end: .25em; color: #a86400; white-space: nowrap; }
.ticket.run .tag { color: #c2254a; }
.ticket.color .tag, .ticket.mystery .tag { color: #5b3fa8; }
.ticket .items { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .14em; }
.ticket .it { position: relative; inline-size: 1.9em; block-size: 1.9em; border-radius: .45em; display: grid; place-items: center; background: #e6f2dc; }
.ticket .it svg { inline-size: 1.62em; block-size: 1.62em; }
.ticket .it.q { background: #ddd0f7; color: #5b3fa8; font-weight: 900; font-size: 1em; }
.ticket .it.ice { background: #dff3ff; }
.ticket .it.done { background: #c4f0d2; }
.ticket .it.done::after {
    content: ""; position: absolute; inset-block-start: -.2em; inset-inline-end: -.2em; inline-size: .78em; block-size: .78em; border-radius: 50%;
    background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 6.2l2 2 4-4.4' fill='none' stroke='white' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / 100%;
}
.ticket .it.q.done { background: #b9a3ef; }
.ticket .it.q.done::after { display: none; }
.ticket .it.next { box-shadow: 0 0 0 .14em var(--gold2); animation: jb-next .8s ease-in-out infinite; }
@keyframes jb-next { 50% { transform: scale(1.1); } }
.ticket .cupx { flex: none; inline-size: 1.45em; block-size: 1.9em; }
.ticket.mystery .cupx { inline-size: 2em; block-size: 2.7em; }
.ticket .cupx.stripes { inline-size: 3.2em; block-size: 4.2em; }
.stripes .st .ck { display: none; }
.stripes .st.done .ck { display: inline; }
.stripes .st rect { transition: opacity .15s; }
.stripes.some .st:not(.done) rect { opacity: .55; }
.patience { block-size: .42em; margin-block-start: .34em; border-radius: 99px; background: #d5e6cc; overflow: hidden; }
.patience i { display: block; block-size: 100%; inline-size: 100%; border-radius: inherit; background: var(--ok); transform-origin: 0 50%; }
[dir="rtl"] .patience i { transform-origin: 100% 50%; }
.scene.calm .patience i { background: #8fd05a !important; }
.scene.calm::after { content: ""; position: absolute; z-index: 1; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 100%, rgba(160, 230, 90, .34), transparent 70%); animation: jb-calm 1.2s ease-in-out infinite alternate; }
@keyframes jb-calm { to { opacity: .55; } }

.kk-float {
    position: absolute; z-index: 5; inset-inline: 0; inset-block-start: 30%; text-align: center; pointer-events: none;
    font-weight: 900; font-size: 1.4em; color: var(--gold); text-shadow: 0 .1em 0 rgba(0, 0, 0, .45), 0 0 .5em rgba(0, 0, 0, .35);
    animation: jb-rise 1.05s ease-out forwards;
}
.kk-float small { display: block; font-size: .5em; font-weight: 800; color: #fff; }
.kk-float.bad { color: var(--bad); }
.kk-float.bad svg { inline-size: 1em; block-size: 1em; vertical-align: -.15em; }
.kk-float.close { color: #b8e6ff; }
.kk-float.vip { color: #ffd23f; font-size: 1.7em; }
@keyframes jb-rise { from { transform: translateY(.6em) scale(.8); opacity: 0; } 20% { transform: none; opacity: 1; } to { transform: translateY(-2.6em); opacity: 0; } }

.rush, .combo { position: absolute; z-index: 6; inset-inline: 0; display: flex; justify-content: center; pointer-events: none; opacity: 0; transition: opacity .25s, transform .25s; transform: scale(.9); }
.rush { inset-block-start: 3.5em; }
.combo { inset-block-end: 2.2em; }
.rush.on, .combo.on { opacity: 1; transform: none; }
.rush span, .combo span {
    background: rgba(7, 29, 43, .92); border: .1em solid var(--gold); border-radius: 999px; padding: .4em 1.05em; max-inline-size: 94%; text-align: center;
    font-weight: 900; font-size: 1.05em; box-shadow: 0 0 1.2em rgba(255, 207, 61, .35);
}
.combo span { border-color: var(--lime); color: #e6ffde; box-shadow: 0 0 1.2em rgba(124, 224, 106, .4); }
.combo.on span { animation: jb-comboin .45s cubic-bezier(.2, .9, .3, 1.5); }
@keyframes jb-comboin { from { transform: scale(.4) rotate(-8deg); } }

/* ---------- the work bench: bin, blender, blend / serve, crates ---------- */
.bench { position: relative; z-index: 4; flex: none; padding: .5em .5em .55em; }
.station { display: grid; grid-template-columns: 4.3em minmax(0, 1fr) 6em; grid-template-rows: minmax(0, 1fr); gap: .5em; block-size: 8.6em; }
.bin, .act { border-radius: 1em; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2em; padding: .3em .2em; border: 0; }
.bin { background: var(--panel); box-shadow: 0 .25em 0 #04121b; color: var(--muted); }
.bin span { font-size: .74em; font-weight: 700; }
.bin svg { inline-size: 1.9em; block-size: 1.9em; }
.bin:active, .act:active { transform: translateY(.14em); }
.bin.warn { color: #fff; background: #a2332f; animation: jb-ready 1s ease-in-out infinite; }
.act { background: var(--panel2); color: #8fb6c9; font-weight: 900; font-size: 1.12em; box-shadow: 0 .22em 0 #04121b; transition: background-color .15s, color .15s; }
.act small { font-size: .58em; font-weight: 700; opacity: .9; text-align: center; line-height: 1.15; }
.act.blend { background: linear-gradient(#ffe066, #ffbe1a); color: var(--ink); box-shadow: 0 .22em 0 #b37a00; }
.act.busy { background: var(--panel2); color: var(--gold); }
.act.serve { background: linear-gradient(#a3ee8f, #5ccf4a); color: #0d2a08; box-shadow: 0 .22em 0 #2f8a24, 0 0 1.1em rgba(124, 224, 106, .5); }
.act.pulse { animation: jb-ready 1s ease-in-out infinite; }
@keyframes jb-ready { 50% { transform: scale(1.05); } }
.jug-wrap { position: relative; min-inline-size: 0; min-block-size: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr); justify-items: center; }
.jug-wrap::before { content: ""; position: absolute; inset: 4% 16% 22%; border-radius: 40%; pointer-events: none; background: radial-gradient(closest-side, var(--glow, rgba(124, 224, 106, .3)), transparent); opacity: 0; transition: opacity .3s; }
.jug-wrap.done::before { opacity: 1; animation: jb-readyglow 1.4s ease-in-out infinite; }
@keyframes jb-readyglow { 50% { opacity: .55; } }
.jug { display: block; inline-size: 100%; block-size: 100%; overflow: visible; position: relative; }
.jug .glass { fill: var(--bl-glass); }
.jug .base { fill: var(--bl-base); }
.jug .led { fill: var(--bl-led); }
.jug .chunk { animation: jb-drop .26s .2s cubic-bezier(.3, 1.4, .5, 1) both; }
@keyframes jb-drop { from { transform: translateY(-40px); opacity: 0; } }
.jug #liquid { transition: y .25s, height .25s; }
.jug-wrap.spin .jug { animation: jb-rattle .12s linear infinite; }
.jug-wrap.spin .led { fill: var(--gold); }
.jug-wrap.spin .blade { animation: jb-blade .15s linear infinite; transform-origin: 80px 128px; }
.jug-wrap.spin #chunks { opacity: .55; filter: blur(2px); transition: opacity .5s, filter .5s; }
.jug-wrap.done .led { fill: var(--ok); }
.jug .bub { animation: jb-bub 1.6s ease-in infinite; }
@keyframes jb-bub { from { transform: translateY(0); opacity: .8; } to { transform: translateY(-30px); opacity: 0; } }
@keyframes jb-rattle { 25% { transform: translateX(-1.5px) rotate(-.6deg); } 75% { transform: translateX(1.5px) rotate(.6deg); } }
@keyframes jb-blade { to { transform: scaleX(-1); } }
.jug .cube { animation: jb-cube .35s cubic-bezier(.3, 1.4, .5, 1) both; }
.jug .cube:nth-child(2) { animation-delay: .06s; }
.jug .cube:nth-child(3) { animation-delay: .12s; }
@keyframes jb-cube { from { transform: translateY(-46px); opacity: 0; } }
.jug-wrap.toss .jug { animation: jb-toss .35s ease-in; }
@keyframes jb-toss { to { transform: translateY(1em) rotate(-14deg); opacity: .3; } }
.jug-wrap.full .jug { animation: jb-shake .3s; }
.jug-wrap.jb-plop .jug { animation: jb-plop .28s ease-out; transform-origin: 50% 100%; }
@keyframes jb-plop { 30% { transform: scale(1.04, .95); } 65% { transform: scale(.98, 1.03); } }
.jb-wave-at { transition: transform .25s; }
.jb-wave { animation: jb-wave 1.6s linear infinite; }
.jug-wrap.spin .jb-wave { animation-duration: .35s; }
@keyframes jb-wave { to { transform: translateX(-40px); } }
.jug-label { margin: 0; min-block-size: 1.3em; font-size: .78em; color: var(--muted); text-align: center; white-space: nowrap; }
.jug-label.bad { color: #ff8a84; font-weight: 800; }

.crates { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: .4em; margin-block-start: .5em; }
.crates.six { grid-template-columns: repeat(3, 1fr); }
.crate {
    position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .05em; block-size: 4.9em; padding: .2em .1em;
    border-radius: .95em; cursor: pointer; border: 0; color: #3a1f08;
    background: repeating-linear-gradient(0deg, transparent 0 .8em, rgba(0, 0, 0, .1) .8em .92em), linear-gradient(#f8cb93, #dd9550);
    box-shadow: 0 .25em 0 #9a5a22, inset 0 .1em 0 rgba(255, 255, 255, .4);
    transition: transform .06s;
}
.crate svg { inline-size: 2.75em; block-size: 2.75em; transition: transform .08s; filter: drop-shadow(0 .12em .06em rgba(0, 0, 0, .25)); }
.crate span { font-size: .68em; font-weight: 800; line-height: 1.1; text-align: center; }
.crate kbd { position: absolute; inset-block-start: .25em; inset-inline-start: .4em; font: 800 .6em var(--font); opacity: .5; }
.crate i.dot { position: absolute; inset-block-start: .35em; inset-inline-end: .4em; inline-size: .62em; block-size: .62em; border-radius: 50%; box-shadow: 0 0 0 .1em rgba(255, 255, 255, .7); }
.crate:active, .crate.hit { transform: translateY(.2em); box-shadow: 0 .05em 0 #9a5a22; }
.crate:active svg, .crate.hit svg { transform: scale(1.14) rotate(-8deg); }
.crate.want { box-shadow: 0 .25em 0 #9a5a22, 0 0 0 .2em var(--gold), 0 0 1em rgba(255, 207, 61, .7); animation: jb-want .7s ease-in-out infinite; }
@keyframes jb-want { 50% { transform: translateY(-.18em); } }
.crate.locked { cursor: default; box-shadow: none; background: rgba(255, 255, 255, .06); }
.crate.locked svg, .crate.locked span, .crate.locked kbd, .crate.locked i.dot { opacity: .2; }
.crate.locked::after { content: ""; position: absolute; inset: 0; background: center / 1.5em no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23cfe6f2' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3Crect x='5.5' y='11' width='13' height='9.5' rx='2.2' fill='%23cfe6f2'/%3E%3C/svg%3E"); }
.crate.fresh { animation: jb-fresh 1.2s ease-out 2; }
@keyframes jb-fresh { 30% { box-shadow: 0 .25em 0 #9a5a22, 0 0 0 .3em var(--lime), 0 0 1.4em rgba(124, 224, 106, .8); transform: scale(1.06); } }
/* the ice bucket and the cane press sit with the crates */
.crate.icebox { color: #e9f8ff; background: linear-gradient(#2d7fa8, #1b5878); box-shadow: 0 .25em 0 #0b2f44, inset 0 .1em 0 rgba(255, 255, 255, .25); }
.crate.icebox:active, .crate.icebox.hit { box-shadow: 0 .05em 0 #0b2f44; }
.crate.icebox.in { background: linear-gradient(#bfe9ff, #7fc8ee); color: #0b2f44; }
.crate.icebox.want, .crate.canebox.want { box-shadow: 0 .25em 0 #0b2f44, 0 0 0 .2em var(--gold), 0 0 1em rgba(255, 207, 61, .7); }
.crate.canebox { color: #efffdc; background: linear-gradient(#3f6f3a, #27492a); box-shadow: 0 .25em 0 #10240f, inset 0 .1em 0 rgba(255, 255, 255, .2); overflow: hidden; }
.crate.canebox::before { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(182, 227, 106, .6), rgba(182, 227, 106, .25)); transform: scaleY(var(--p, 0)); transform-origin: 50% 100%; transition: transform .3s ease-out; }
.crate.canebox > * { position: relative; }
.crate.canebox:not(.ready) svg { opacity: .65; }
.crate.canebox.ready { background: linear-gradient(#c3f06a, #7cc93a); color: #16300a; box-shadow: 0 .25em 0 #3c7a18, 0 0 1.1em rgba(182, 227, 106, .8); animation: jb-ready 1s ease-in-out infinite; }
.crate.off { display: none; }
/* Juice of the Day: the day's fruit wears a gold ring */
.crate.special { box-shadow: 0 .25em 0 #9a5a22, 0 0 0 .16em var(--gold), inset 0 .1em 0 rgba(255, 255, 255, .4); }
.tip-cell { display: flex; align-items: center; justify-content: center; text-align: center; font-size: .7em; line-height: 1.25; color: var(--muted); padding: .3em; border: .1em dashed var(--line); border-radius: 1em; grid-column: span 2; }
/* a streak of five or more: the crates glow in fruit colours (opacity and transform only, cheap on phones) */
.crates::before {
    content: ""; position: absolute; z-index: 0; inset: auto -.25em -.5em; block-size: 2.9em; pointer-events: none; opacity: 0;
    border-radius: 50% 50% 0 0 / 100% 100% 0 0; filter: blur(7px);
    background: radial-gradient(40% 100% at 12% 100%, #ff5f7e, transparent), radial-gradient(35% 100% at 38% 100%, #ffb21f, transparent),
        radial-gradient(40% 100% at 64% 100%, #7ce06a, transparent), radial-gradient(30% 100% at 90% 100%, #a35bd1, transparent);
    transition: opacity .4s;
}
.game.frenzy .crates::before { opacity: .9; animation: jb-glowup .42s ease-in-out infinite alternate; }
@keyframes jb-glowup { from { transform: scaleY(.85); opacity: .65; } to { transform: translateY(-3px) scaleY(1.15); opacity: 1; } }
.game.frenzy .stat.score { box-shadow: 0 0 0 .12em #ff8a3d, 0 0 .9em rgba(255, 138, 61, .6); }
.keys { display: none; }

/* ---------- sideways phones and wide screens: the place on one side, the bench on the other ---------- */
.game.wide .play { flex-direction: row; gap: .5em; padding: 0 .5em .5em; }
.game.wide .scene { flex: 1.3; margin: 0; }
.game.wide .bench { flex: 1; min-inline-size: 0; max-inline-size: 31em; display: flex; flex-direction: column; padding: 0; }
.game.wide .station { flex: 1; min-block-size: 0; block-size: auto; grid-template-columns: 4.6em minmax(0, 1fr) 6.4em; }
.game.wide .crate { block-size: 5.2em; }
.game.wide.short .crate { block-size: 4.3em; }
.game.wide.short .crate span, .game.wide.short .bin span { display: none; }
.game.wide.short .crate svg { inline-size: 3.1em; block-size: 3.1em; }
.game.wide.short .hud { block-size: 3em; padding-block: .25em; }
.game.wide .ticket { max-inline-size: 10.5em; }
@media (hover: none) { .crate kbd { display: none !important; } }

/* ---------- coach: Lamoona's speech bubble and a tapping hand ---------- */
.coach { position: absolute; z-index: 7; inset-inline: .5em; inset-block-start: 1.7em; display: flex; align-items: center; justify-content: center; gap: .3em; pointer-events: none; }
/* the bubble takes the place of the neon sign while Lamoona talks */
.sign { transition: opacity .2s; }
.scene:has(.coach:not([hidden])) .sign { opacity: 0; }
.coach .who { flex: none; inline-size: 3em; block-size: 3em; animation: jb-hop 1.6s ease-in-out infinite; }
.coach .who svg { display: block; inline-size: 100%; block-size: 100%; filter: drop-shadow(0 .15em .15em rgba(0, 0, 0, .35)); }
@keyframes jb-hop { 50% { transform: translateY(-.25em) rotate(-4deg); } }
.coach b {
    position: relative; background: #fff; color: var(--ink); border-radius: 1em; padding: .5em .85em; font-size: .93em; font-weight: 800; line-height: 1.3; text-align: start;
    box-shadow: 0 .25em 0 rgba(0, 0, 0, .25), 0 0 0 .16em var(--gold); animation: jb-enter .35s cubic-bezier(.2, .9, .3, 1.3);
}
.coach b::before { content: ""; position: absolute; inset-inline-start: -.5em; inset-block-start: calc(50% - .4em); border: .4em solid transparent; border-inline-start: 0; border-inline-end-color: var(--gold); }
.hand { position: absolute; z-index: 9; inset-block-start: 0; inset-inline-start: 0; inline-size: 2.8em; block-size: 2.8em; pointer-events: none; will-change: transform; transition: transform .35s cubic-bezier(.3, .9, .3, 1); }
[dir="rtl"] .hand { inset-inline-start: auto; left: 0; }
.hand svg { display: block; inline-size: 100%; block-size: 100%; animation: jb-tap .8s ease-in-out infinite; transform-origin: 30% 10%; filter: drop-shadow(0 .2em .2em rgba(0, 0, 0, .35)); }
@keyframes jb-tap { 50% { transform: translateY(.5em) scale(.92); } }

/* ---------- screens: home, map, briefing, pause, result, my bar, trophies ---------- */
.screen {
    position: absolute; z-index: 10; inset: 0; display: none; flex-direction: column; align-items: center; gap: .7em;
    padding: 3.5em .9em 1em; overflow: hidden auto; overscroll-behavior: contain; text-align: center;
    background: linear-gradient(rgba(7, 29, 43, .86), rgba(7, 29, 43, .95));
}
.screen.on { display: flex; }
.screen.home { background: linear-gradient(rgba(7, 29, 43, .05), rgba(7, 29, 43, .45) 24%, rgba(7, 29, 43, .93) 44%, rgba(7, 29, 43, .97)); }
.screen.center, .screen.home { justify-content: safe center; }
.screen > * { flex: none; }
.screen.on > * { animation: jb-enter .4s cubic-bezier(.2, .9, .3, 1.2) both; }
.screen.on > :nth-child(2) { animation-delay: .05s; }
.screen.on > :nth-child(3) { animation-delay: .1s; }
.screen.on > :nth-child(4) { animation-delay: .15s; }
.screen.on > :nth-child(n+5) { animation-delay: .2s; }
/* the result screen is two groups: stacked on an upright phone, side by side on a wide stage */
.res-a, .res-b { display: contents; }
.res-a > *, .res-b > * { animation: jb-enter .4s cubic-bezier(.2, .9, .3, 1.2) both; }
.res-b > * { animation-delay: .15s; }
.screen.on > .res-a, .screen.on > .res-b { animation: none; }
@keyframes jb-enter { from { opacity: 0; transform: translateY(.9em) scale(.96); } }
.screen h2 { margin: 0; font-size: 1.55em; font-weight: 900; line-height: 1.15; }
.screen p { margin: 0; color: var(--muted); line-height: 1.45; max-inline-size: 30em; }
.chips { position: absolute; z-index: 13; inset-block-start: .45em; inset-inline-start: .5em; display: flex; gap: .4em; animation: none !important; }
.chip { display: inline-flex; align-items: center; gap: .3em; block-size: 2.4em; padding-inline: .65em; border-radius: 99px; background: rgba(0, 0, 0, .45); font-weight: 800; }
.chip svg { inline-size: 1.15em; block-size: 1.15em; }
.chip.stars svg { color: var(--gold); }
button.chip { border: 0; cursor: pointer; }
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .4em; border: 0; border-radius: .95em; padding: .72em 1.6em; font-weight: 900; font-size: 1.08em; cursor: pointer;
    background: linear-gradient(#ffe066, #ffb21f); color: var(--ink); box-shadow: 0 .25em 0 #b37a00;
}
.btn svg { inline-size: 1.15em; block-size: 1.15em; }
.btn:active { transform: translateY(.14em); box-shadow: 0 .1em 0 #b37a00; }
.btn.ghost { background: var(--panel2); color: var(--text); box-shadow: 0 .25em 0 #04121b; }
.btn.small { font-size: .9em; padding: .55em 1em; }
.btn.glow { animation: jb-glow 2.2s 1s ease-in-out infinite; }
@keyframes jb-glow { 50% { box-shadow: 0 .25em 0 #b37a00, 0 0 1.4em rgba(255, 207, 61, .7); } }
.btn:disabled { opacity: .45; cursor: default; }
.row { display: flex; flex-wrap: wrap; gap: .6em; justify-content: center; align-items: center; }
.bar { inline-size: 100%; display: flex; align-items: center; gap: .5em; }
.bar h2 { flex: 1; text-align: start; font-size: 1.3em; }
.note { color: var(--muted); font-size: .86em; }
.note.ok { color: var(--ok); }
.note.bad { color: var(--bad); }

/* home */
.logo { position: relative; inline-size: 8.6em; block-size: 6.6em; margin-block-end: -.6em; filter: drop-shadow(0 .3em .5em rgba(0, 0, 0, .35)); }
.logo > svg { display: block; inline-size: 100%; block-size: 100%; }
.logo .mascot { position: absolute; inset-inline-end: -2.9em; inset-block-end: .1em; inline-size: 3.9em; block-size: 3.9em; }
.mc-wave { animation: jb-waving 1.2s ease-in-out infinite; transform-origin: 80px 58px; }
@keyframes jb-waving { 50% { transform: rotate(14deg); } }
.lg-wave { animation: jb-lgwave 2.4s linear infinite; }
@keyframes jb-lgwave { to { transform: translateX(-28px); } }
.lg-drop { animation: jb-lgdrop 2.6s ease-in-out infinite; }
.lg-drop.b { animation-delay: -.9s; }
.lg-drop.c { animation-delay: -1.7s; }
@keyframes jb-lgdrop { 0%, 100% { transform: translateY(3px); opacity: .5; } 50% { transform: translateY(-4px); opacity: 1; } }
.title { margin: 0; font-size: 2.3em; font-weight: 900; line-height: 1.05; color: #fff; letter-spacing: -.01em; text-shadow: 0 .09em 0 #1f9a55, 0 .18em 0 rgba(0, 0, 0, .3), 0 0 .8em rgba(124, 224, 106, .55); }
.tagline { font-size: .9em; }
.cta { inline-size: min(100%, 20em); display: flex; flex-direction: column; padding: .6em 1em .65em; line-height: 1.15; }
.cta small { font-size: .62em; font-weight: 800; opacity: .8; }
.tiles { inline-size: min(100%, 24em); display: grid; grid-template-columns: 1fr 1fr; gap: .5em; }
.tile {
    position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; gap: .12em; min-block-size: 5.3em; text-align: start; padding: .55em .7em .5em;
    border: 0; border-radius: 1em; cursor: pointer; color: #fff; background: linear-gradient(155deg, var(--c), var(--c2)); box-shadow: 0 .22em 0 rgba(0, 0, 0, .4), inset 0 .1em 0 rgba(255, 255, 255, .25);
}
.tile:active { transform: translateY(.12em); }
.tile .ic { position: absolute; inset-inline-end: -.4em; inset-block-end: -.6em; inline-size: 4em; block-size: 4em; opacity: .26; pointer-events: none; }
.tile .ic svg { display: block; inline-size: 100%; block-size: 100%; }
.tile b { position: relative; font-size: 1.02em; font-weight: 900; line-height: 1.15; }
.tile small { position: relative; font-size: .68em; line-height: 1.25; opacity: .92; max-inline-size: 92%; }
.tile .side { position: relative; margin-block-start: auto; display: inline-flex; align-items: center; gap: .25em; font-size: .7em; font-weight: 800; background: rgba(0, 0, 0, .3); border-radius: 99px; padding: .12em .6em; }
.tile .side:empty { display: none; }
.tile .side svg { inline-size: 1em; block-size: 1em; }
.tile.locked { cursor: default; filter: grayscale(.75) brightness(.8); }
.nav { display: flex; gap: .45em; inline-size: min(100%, 24em); }
.nav button { flex: 1; min-inline-size: 0; display: flex; flex-direction: column; align-items: center; gap: .15em; padding: .5em .15em; border: 0; border-radius: .9em; cursor: pointer; background: var(--panel2); box-shadow: 0 .2em 0 #04121b; font-size: .74em; font-weight: 800; line-height: 1.15; }
.nav button svg { inline-size: 1.7em; block-size: 1.7em; color: var(--gold); }
.nav button:active { transform: translateY(.12em); }
/* tall phones: the spare height goes to the logo, the mode tiles and the gaps, so the home fills the screen */
.game:not(.wide) .screen.home { justify-content: safe flex-end; gap: calc(.7em + var(--sp, 0) * .035em); }
.game:not(.wide) .screen.home > .logo { font-size: calc(1em + var(--sp, 0) * .05em); inset-inline-start: calc(var(--sp, 0) * -.07em); }
.game:not(.wide) .screen.home .tile { min-block-size: calc(5.3em + var(--sp, 0) * .24em); }
.game.wide .screen.home { display: none; background: linear-gradient(to right, rgba(7, 29, 43, .12), rgba(7, 29, 43, .5) 38%, rgba(7, 29, 43, .95) 56%, rgba(7, 29, 43, .97)); }
[dir="rtl"] .game.wide .screen.home { background: linear-gradient(to left, rgba(7, 29, 43, .12), rgba(7, 29, 43, .5) 38%, rgba(7, 29, 43, .95) 56%, rgba(7, 29, 43, .97)); }
.game.wide .screen.home.on { display: grid; grid-template-columns: 1fr 1.1fr; grid-auto-rows: min-content; align-content: center; column-gap: 1.6em; justify-items: center; }
.game.wide .screen.home > .logo, .game.wide .screen.home > .title, .game.wide .screen.home > .tagline, .game.wide .screen.home > .cta { grid-column: 1; }
.game.wide .screen.home > .tiles { grid-column: 2; grid-row: 1 / span 4; align-self: center; }
.game.wide .screen.home > .nav { grid-column: 2; grid-row: 5; }
.game.wide.short .screen.home > .logo { inline-size: 6em; block-size: 4.6em; }
.game.wide.short .screen { padding-block-start: 3em; gap: .45em; }
.game.wide.short .tile { min-block-size: 4.5em; }

/* tour map */
.places { inline-size: min(100%, 30em); display: grid; gap: .65em; }
.place { border-radius: 1.1em; overflow: hidden; background: var(--panel); box-shadow: inset 0 0 0 .08em var(--line); }
.place .head { position: relative; block-size: 4.2em; display: flex; align-items: flex-end; justify-content: space-between; padding: .4em .7em; background: center 70% / cover no-repeat; }
.place .head::before { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 20%, rgba(7, 29, 43, .85)); }
.place .head > * { position: relative; }
.place .head b { font-size: 1.1em; font-weight: 900; text-shadow: 0 .08em .2em rgba(0, 0, 0, .6); }
.place .head .chip { block-size: 1.9em; font-size: .82em; }
.place .days { display: grid; grid-template-columns: repeat(5, 1fr); gap: .35em; padding: .55em .5em .6em; }
.daybtn { position: relative; display: flex; flex-direction: column; align-items: center; gap: .2em; border: 0; background: none; cursor: pointer; padding: 0; }
.daybtn .n { inline-size: 2.6em; block-size: 2.6em; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 1.05em; background: var(--c, var(--panel2)); color: #fff; box-shadow: 0 .2em 0 rgba(0, 0, 0, .35), inset 0 .12em 0 rgba(255, 255, 255, .25); }
.daybtn .n svg { inline-size: 1.1em; block-size: 1.1em; }
.daybtn.locked { cursor: default; }
.daybtn.locked .n { background: #1d3f52; color: #6f95a8; box-shadow: none; }
.daybtn.now .n { animation: jb-now 1.1s ease-in-out infinite; }
@keyframes jb-now { 50% { transform: scale(1.12); box-shadow: 0 .2em 0 rgba(0, 0, 0, .35), 0 0 0 .22em rgba(255, 207, 61, .7); } }
.stars3 { display: inline-flex; gap: .05em; }
.stars3 svg { inline-size: .82em; block-size: .82em; color: #3d5f70; }
.stars3 svg.on { color: var(--gold); }
.game.wide .places { grid-template-columns: 1fr 1fr; inline-size: min(100%, 52em); }

/* briefing and result */
.kicker { font-size: .86em; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); }
.news { display: flex; align-items: center; gap: .6em; text-align: start; background: var(--panel); border-radius: 1em; padding: .6em .8em; max-inline-size: 24em; box-shadow: inset 0 0 0 .08em var(--line); }
.news .pic { flex: none; inline-size: 3.2em; block-size: 3.2em; border-radius: .8em; background: #fbfff4; display: grid; place-items: center; overflow: hidden; }
.news .pic svg { inline-size: 2.6em; block-size: 2.6em; }
.news .pic .cust { inline-size: 3.2em; block-size: 3.8em; margin-block-start: .7em; }
.news .pic .cust .m.happy { display: inline; }
.news span { font-weight: 700; line-height: 1.3; font-size: .94em; }
.targets { display: flex; gap: .5em; justify-content: center; }
.targets div { display: flex; flex-direction: column; align-items: center; gap: .1em; background: rgba(0, 0, 0, .3); border-radius: .8em; padding: .35em .7em; font-weight: 800; font-size: .92em; }
.targets div.got { box-shadow: inset 0 0 0 .1em var(--gold); }
.targets div svg.cupi { inline-size: 1.5em; block-size: 1.5em; }
.face { inline-size: 4.6em; block-size: 4.6em; margin-block-end: -.5em; }
.face svg { display: block; inline-size: 100%; block-size: 100%; }
.bigstars { display: flex; gap: .3em; justify-content: center; }
.bigstars svg { inline-size: 3.1em; block-size: 3.1em; color: #29495a; }
.bigstars svg:nth-child(2) { inline-size: 3.9em; block-size: 3.9em; margin-block-start: -.5em; }
.bigstars svg.on { color: var(--gold); animation: jb-starin .55s cubic-bezier(.3, 1.6, .5, 1) both; filter: drop-shadow(0 0 .5em rgba(255, 207, 61, .7)); }
@keyframes jb-starin { from { transform: scale(3) rotate(-40deg); opacity: 0; } }
.bigcup { inline-size: 4.4em; block-size: 4.4em; }
.bigcup svg { display: block; inline-size: 100%; block-size: 100%; animation: jb-starin .55s .5s cubic-bezier(.3, 1.6, .5, 1) both; filter: drop-shadow(0 0 .6em rgba(255, 207, 61, .5)); }
.big { font-size: 2.9em; font-weight: 900; color: var(--gold); line-height: 1; font-variant-numeric: tabular-nums; }
.big.landed { animation: jb-land .35s ease-out; }
@keyframes jb-land { 40% { transform: scale(1.15); color: #fff; } }
.rank { display: inline-block; font-weight: 900; color: var(--lime); padding: .25em .9em; border: .12em solid currentColor; border-radius: .6em; transform: rotate(-4deg); animation: jb-stamp .5s .35s cubic-bezier(.3, 1.6, .5, 1) both !important; }
@keyframes jb-stamp { from { transform: rotate(-4deg) scale(2.4); opacity: 0; } }
.record { font-weight: 900; font-size: .95em; color: var(--ink); background: linear-gradient(#ffe27a, #ffb627); padding: .3em .9em; border-radius: 999px; box-shadow: 0 0 1.4em rgba(255, 207, 61, .6); animation: jb-stamp2 .5s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes jb-stamp2 { from { transform: scale(2.4); opacity: 0; } }
.stats { display: flex; flex-wrap: wrap; gap: .35em .5em; justify-content: center; max-inline-size: 26em; }
.stats span { background: rgba(0, 0, 0, .3); border-radius: .7em; padding: .28em .6em; font-size: .84em; color: var(--muted); }
.stats b { color: var(--text); }
.gains { display: flex; flex-wrap: wrap; gap: .3em .4em; justify-content: center; max-inline-size: 34em; }
.gains:empty { display: none; }
/* the result screen: a darker veil, and its buttons stay in reach when the list is long */
.screen.result { background: linear-gradient(rgba(7, 29, 43, .9), rgba(7, 29, 43, .97)); }
.acts { position: sticky; inset-block-end: -1em; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: .6em; inline-size: 100%; padding-block: .7em 1em; margin-block-end: -1em; background: linear-gradient(transparent, rgba(7, 29, 43, .96) 34%); }
.gain { display: inline-flex; align-items: center; gap: .35em; font-weight: 800; font-size: .92em; background: rgba(255, 207, 61, .14); color: #ffe6a6; border-radius: 99px; padding: .28em .8em; }
.gain svg { inline-size: 1.15em; block-size: 1.15em; color: var(--gold); }
.count { font-size: 4.5em; font-weight: 900; color: var(--gold); text-shadow: 0 0 .5em rgba(255, 207, 61, .6), 0 .06em 0 rgba(0, 0, 0, .4); animation: jb-countpop .5s cubic-bezier(.2, .9, .3, 1.5) !important; }
@keyframes jb-countpop { from { transform: scale(2.2); opacity: 0; } }
.screen.clear { background: none; pointer-events: none; }
.game.wide .screen.result { flex-direction: row; justify-content: center; align-items: safe center; gap: 2.2em; }
.game.wide .res-a, .game.wide .res-b { display: flex; flex-direction: column; align-items: center; gap: .65em; flex: 0 1 auto; max-inline-size: 47%; }
.game.wide .acts { position: static; background: none; margin: 0; padding: .3em 0 0; }
.game.wide.short .bigstars svg { inline-size: 2.3em; block-size: 2.3em; }
.game.wide.short .bigstars svg:nth-child(2) { inline-size: 2.9em; block-size: 2.9em; }
.game.wide.short .big { font-size: 2.2em; }
.game.wide.short .face { inline-size: 3.2em; block-size: 3.2em; }

/* juice of the day */
.special { display: flex; align-items: center; gap: .7em; text-align: start; background: var(--panel); border-radius: 1em; padding: .6em .9em; max-inline-size: 24em; box-shadow: inset 0 0 0 .1em var(--gold); }
.special .pic { flex: none; inline-size: 3.6em; block-size: 3.6em; border-radius: 50%; background: #fbfff4; display: grid; place-items: center; animation: jb-hop 1.6s ease-in-out infinite; }
.special .pic svg { inline-size: 2.8em; block-size: 2.8em; }
.special b { display: block; font-size: 1.05em; font-weight: 900; }
.special small { display: block; font-size: .78em; color: var(--muted); line-height: 1.3; }

/* my bar: upgrades, colours, blenders */
.tabs { display: flex; gap: .35em; background: rgba(0, 0, 0, .3); padding: .25em; border-radius: 99px; }
.tabs button { border: 0; background: none; border-radius: 99px; padding: .4em .95em; font-weight: 800; font-size: .88em; cursor: pointer; color: var(--muted); }
.tabs button.on { background: var(--gold); color: var(--ink); }
.list { inline-size: min(100%, 30em); display: grid; gap: .5em; }
.item { display: grid; grid-template-columns: 3em 1fr auto; align-items: center; gap: .7em; text-align: start; background: var(--panel); border-radius: 1em; padding: .55em .7em; box-shadow: inset 0 0 0 .08em var(--line); }
.item .ic { inline-size: 3em; block-size: 3em; border-radius: .8em; display: grid; place-items: center; background: var(--panel2); color: var(--gold); }
.item .ic svg { inline-size: 1.8em; block-size: 1.8em; }
.item b { display: block; font-weight: 900; }
.item small { display: block; font-size: .76em; color: var(--muted); line-height: 1.25; }
.pips { display: inline-flex; gap: .2em; margin-block-start: .25em; }
.pips i { inline-size: 1.1em; block-size: .34em; border-radius: 9px; background: #2f5568; }
.pips i.on { background: var(--lime); }
.price { display: inline-flex; align-items: center; gap: .25em; }
.price svg { inline-size: 1.05em; block-size: 1.05em; }
.swatch { inline-size: 3em; block-size: 3em; border-radius: .8em; background: repeating-linear-gradient(90deg, var(--a) 0 .5em, var(--b) .5em 1em); box-shadow: inset 0 -.5em 0 rgba(0, 0, 0, .12), 0 0 .7em var(--n, transparent); }
.swatch.blender { background: linear-gradient(var(--a) 0 16%, transparent 16% 74%, var(--a) 74%), linear-gradient(90deg, transparent 22%, rgba(255, 255, 255, .25) 22% 78%, transparent 78%), var(--panel2); box-shadow: none; }
.game.wide .list { grid-template-columns: 1fr 1fr; inline-size: min(100%, 54em); }

/* trophies */
.trophies { inline-size: min(100%, 30em); display: grid; grid-template-columns: 1fr 1fr; gap: .45em; }
.trophy { display: flex; flex-direction: column; align-items: center; gap: .15em; padding: .6em .4em; border-radius: 1em; background: var(--panel); box-shadow: inset 0 0 0 .08em var(--line); opacity: .55; }
.trophy svg { inline-size: 1.9em; block-size: 1.9em; color: #5b8296; }
.trophy b { font-size: .9em; font-weight: 900; }
.trophy small { font-size: .7em; color: var(--muted); line-height: 1.25; }
.trophy.got { opacity: 1; box-shadow: inset 0 0 0 .1em var(--gold); }
.trophy.got svg { color: var(--gold); }
.game.wide .trophies { grid-template-columns: repeat(4, 1fr); inline-size: min(100%, 54em); }

/* how to play */
.howto { inline-size: min(100%, 26em); display: grid; gap: .4em; text-align: start; counter-reset: step; padding: 0; margin: 0; list-style: none; }
.howto li { display: grid; grid-template-columns: 2em 1fr; gap: .6em; align-items: center; background: var(--panel); border-radius: .9em; padding: .5em .7em; font-size: .92em; line-height: 1.3; }
.howto li::before { counter-increment: step; content: counter(step); inline-size: 2em; block-size: 2em; border-radius: 50%; display: grid; place-items: center; font-weight: 900; background: var(--gold); color: var(--ink); }
.recipe { display: flex; flex-wrap: wrap; justify-content: center; gap: .25em; max-inline-size: 26em; }
.recipe span { display: inline-flex; align-items: center; gap: .2em; font-size: .74em; font-weight: 700; background: rgba(255, 255, 255, .09); border-radius: .6em; padding: .15em .5em .15em .15em; }
.recipe svg { inline-size: 1.6em; block-size: 1.6em; }
.recipe i { inline-size: .8em; block-size: .8em; border-radius: 50%; box-shadow: 0 0 0 .08em rgba(255, 255, 255, .6); }
.game.wide .howto { grid-template-columns: 1fr 1fr; inline-size: min(100%, 52em); }

/* toasts: trophies and unlocks */
.toasts { position: absolute; z-index: 14; inset-block-start: 3.5em; inset-inline: 0; display: flex; flex-direction: column; align-items: center; gap: .35em; pointer-events: none; }
.toast { display: inline-flex; align-items: center; gap: .45em; background: #fbfff4; color: var(--ink); font-weight: 800; font-size: .9em; border-radius: 99px; padding: .4em .95em; max-inline-size: 94%; box-shadow: 0 .25em .9em rgba(0, 0, 0, .4), 0 0 0 .14em var(--gold); animation: jb-toast 3.2s ease-in-out both; }
.toast svg { flex: none; inline-size: 1.25em; block-size: 1.25em; color: #c98a00; }
@keyframes jb-toast { 0% { transform: translateY(-1.5em) scale(.9); opacity: 0; } 8%, 88% { transform: none; opacity: 1; } 100% { transform: translateY(-.8em); opacity: 0; } }

/* ---------- effects: particle layer, edge flashes, flying fruit, the cup hop, compliments ---------- */
.fx { position: absolute; z-index: 11; inset: 0; inline-size: 100%; block-size: 100%; pointer-events: none; }
.game::after { content: ""; position: absolute; z-index: 9; inset: 0; pointer-events: none; opacity: 0; box-shadow: inset 0 0 3.8em .6em rgba(255, 60, 50, .55); }
.game.hurt::after { animation: jb-edge .6s ease-out; }
.game.cheer::after { box-shadow: inset 0 0 3.8em .6em rgba(255, 207, 61, .45); animation: jb-edge .8s ease-out; }
.game.last-heart::after { animation: jb-lastheart 1.1s ease-in-out infinite; }
@keyframes jb-edge { 15% { opacity: 1; } }
@keyframes jb-lastheart { 50% { opacity: .55; } }
.jolt { animation: jb-jolt .32s ease-out; }
@keyframes jb-jolt { 20% { transform: translate(-4px, 2px); } 45% { transform: translate(4px, -1px); } 70% { transform: translate(-2px, 0); } }
.jb-fly, .jb-cup { position: absolute; z-index: 8; pointer-events: none; transform: translate(-50%, -50%); will-change: transform; }
.jb-fly svg { display: block; inline-size: 2.4em; block-size: 2.4em; filter: drop-shadow(0 .2em .12em rgba(0, 0, 0, .3)); }
.jb-cup .jb-cupsvg { display: block; inline-size: 1.9em; block-size: 2.5em; filter: drop-shadow(0 .25em .2em rgba(0, 0, 0, .3)); }
.jb-word {
    position: absolute; z-index: 12; left: 0; top: 0; pointer-events: none; white-space: nowrap;
    font: 900 1.2em var(--font); color: #f2ffe8; letter-spacing: .02em;
    -webkit-text-stroke: 1px rgba(10, 60, 20, .45); text-shadow: 0 .16em 0 #2f8a24, 0 0 .8em rgba(124, 224, 106, .55);
    animation: jb-word .95s cubic-bezier(.2, .9, .3, 1.3) forwards;
}
.jb-word.warm { font-size: 1.4em; color: #ffe066; text-shadow: 0 .16em 0 #c46a00, 0 0 .8em rgba(255, 190, 60, .6); }
.jb-word.hot { font-size: 1.6em; color: #fff; text-shadow: 0 .16em 0 #d0336a, 0 0 1em rgba(255, 95, 138, .85); }
.jb-word.cool { color: #e9ffc4; text-shadow: 0 .16em 0 #3c7a18, 0 0 .8em rgba(182, 227, 106, .8); }
@keyframes jb-word {
    0% { transform: translate(var(--x), var(--y)) translate(-50%, -30%) scale(.3) rotate(-8deg); opacity: 0; }
    22% { transform: translate(var(--x), var(--y)) translate(-50%, -50%) scale(1.15) rotate(3deg); opacity: 1; }
    40% { transform: translate(var(--x), var(--y)) translate(-50%, -50%) scale(1) rotate(0); }
    75% { opacity: 1; }
    100% { transform: translate(var(--x), var(--y)) translate(-50%, -110%) scale(.95); opacity: 0; }
}

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