/* The Mixology Lab. Its layout (the fixed overlay, the grid, the room layers and
   the creature slot) is shared with the chamber and the kitchen in potions.css,
   and the pantry, plate and dish styles come from kitchen.css; this file is only
   what is the lab's own. */

#mixology { --mix-cool: #2b5f70; --mix-glow: #8ff3ff; }

/* ---------------------------------------------------------------- the room */

.spring-mouth { fill: #0a1822; }
.spring-crack { fill: none; stroke: var(--rock-far); stroke-width: 5; stroke-linecap: round; }
.spring-flow {
  fill: none; stroke: rgba(255, 255, 255, 0.7); stroke-width: 3; stroke-linecap: round;
  stroke-dasharray: 14 22; animation: spring-flow 1.1s linear infinite;
}
@keyframes spring-flow { to { stroke-dashoffset: -36; } }
.shelf { fill: var(--rock-lit); }
.shelf-bracket { fill: none; stroke: var(--rock-far); stroke-width: 8; stroke-linecap: round; }
.rug-edge-cool { stroke: #1f3f66; }

/* --------------------------------------------------------------- the bench */

/* Drinks have a rim colour of their own, teal, instead of borrowing the violet
   "magic" rim from Potions (UX-REVIEW.md, X4). */
.bench-drinks { --bench-edge: rgba(95, 216, 238, 0.55); }
.bench-drinks .pantry-item { border-color: rgba(95, 216, 238, 0.45); background: linear-gradient(180deg, #1f5f76, #123845); }
.drop-base { width: 38px; height: 38px; }

/* The bases: five tinted bottles standing on the shelf over the creature, each
   with its drink's picture on the label. At least 44 px wide on any screen. */
.shelf-bases {
  position: absolute; transform: translateY(-100%); z-index: 4;
  display: flex; justify-content: center; align-items: flex-end; gap: 2%;
  pointer-events: auto;
}
.base-bottle {
  position: relative; width: max(44px, 13%); flex: none; padding: 0;
  touch-action: none; transition: transform 0.14s ease; transform-origin: 50% 100%;
}
.base-bottle:active { transform: translateY(-5px); }
.bottle-art {
  width: 100%; height: auto; display: block; pointer-events: none;
  filter: drop-shadow(0 6px 5px rgba(7, 4, 15, 0.5));
  transition: filter 0.2s ease;
}
.base-badge {
  position: absolute; left: 50%; bottom: 9%; width: 62%; height: auto;
  transform: translateX(-50%); pointer-events: none;
  filter: drop-shadow(0 1px 2px rgba(7, 4, 15, 0.6));
}
.base-bottle[aria-pressed="true"] .bottle-art { filter: drop-shadow(0 0 10px var(--mix-glow)) drop-shadow(0 0 3px #ffffff); }
.base-bottle.tip { animation: bottle-tip 0.55s ease; }
@keyframes bottle-tip { 35% { transform: translateY(-10px) rotate(-22deg); } 70% { transform: translateY(-4px) rotate(6deg); } }
@media (max-width: 1100px), (max-height: 560px) { .drop-base { width: 32px; height: 32px; } }
.drop-base.filled { background: rgba(143, 243, 255, 0.14); }

/* Tall and narrow: the bench is the only one, so it takes the whole width. */
@media (max-aspect-ratio: 5/6) {
  #mixology .bench-drinks { grid-column: 1 / -1; margin-left: 10px; }
}

/* ----------------------------------------------------------------- the jug */

/* Anchored by its base on the counter top, like the mortar. */
.jug {
  position: absolute; aspect-ratio: 120 / 150; transform: translate(-50%, -100%);
  pointer-events: auto; touch-action: none; cursor: grab;
}
.jug > svg {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: visible;
  filter: drop-shadow(0 8px 8px rgba(7, 4, 15, 0.5));
}
.jug-surface { fill: var(--c-top, transparent); transition: cy 0.4s cubic-bezier(.3, .9, .3, 1), fill 0.35s ease; }
.jug-marks { fill: none; stroke: rgba(255, 255, 255, 0.35); stroke-width: 3; stroke-linecap: round; }
.jug.bump > svg { animation: bowl-bump 0.35s cubic-bezier(.3, 1.5, .5, 1); }
.jug.over > svg { filter: drop-shadow(0 0 18px rgba(143, 243, 255, 0.9)); }
.jug.pour > svg, .jug.pour > .jug-contents { animation: jug-pour 0.7s ease-in-out; transform-origin: 30% 90%; }
@keyframes jug-pour { 40% { transform: rotate(-16deg) translateY(-6%); } }

.jug-contents { position: absolute; left: 24%; right: 24%; top: 36%; height: 42%; pointer-events: none; }
.in-jug {
  position: absolute; width: 48%; height: auto;
  transform: scale(var(--s, 1)); transition: transform 0.25s cubic-bezier(.3, 1.4, .5, 1);
  animation: jug-float 2.4s ease-in-out infinite;
  filter: drop-shadow(0 3px 3px rgba(7, 4, 15, 0.35));
}
.in-jug.slot-0 { left: 0; top: 8%; rotate: -10deg; }
.in-jug.slot-1 { left: 50%; top: 30%; rotate: 12deg; animation-delay: -1.2s; }
@keyframes jug-float { 50% { translate: 0 -8%; } }

/* The rod is drawn pointing up from its stirring end, which sits in the middle of
   the liquid (50%, 72%). Its box is 12% of the jug wide and 97% of the way down it
   is the stirring end. */
.stir-rod {
  position: absolute; width: 12%; left: 44%; top: -5%;
  transform-origin: 50% 97%; transform: rotate(16deg);
  transition: transform 0.3s ease; pointer-events: none;
  filter: drop-shadow(0 4px 4px rgba(7, 4, 15, 0.35));
}
.stir-rod svg { width: 100%; height: auto; display: block; overflow: visible; }
.rod-glass { fill: rgba(220, 245, 255, 0.55); stroke: rgba(255, 255, 255, 0.75); stroke-width: 2; }
.rod-bead  { fill: #bff6ff; stroke: rgba(255, 255, 255, 0.8); stroke-width: 2; }
.rod-shine { fill: none; stroke: #ffffff; stroke-width: 2; stroke-linecap: round; opacity: 0.8; }
.jug.stirring .stir-rod { transition: transform 0.06s linear; }
.jug.ready .stir-rod svg { animation: pestle-wiggle 1.6s ease-in-out infinite; transform-origin: 50% 97%; }
.stir-rod.dip svg { animation: rod-dip 0.28s ease-out; transform-origin: 50% 97%; }
@keyframes rod-dip { 40% { transform: translateY(8%); } }

.jug-fx { position: absolute; inset: 0; pointer-events: none; }
/* The arc rings the jug's mouth, between the rim (17% down) and the liquid (37% to
   52% down). It used to sit across the counter under the jug (UX-REVIEW.md, M1):
   `.jug > svg` stretched it to the jug's whole box, so the arc was centred half the
   jug's height below its `top`. The box is its own again here. */
#m-hint { top: 16%; left: -12%; right: auto; bottom: auto; width: 124%; height: auto; }

/* -------------------------------------------------------------- the drink */

.result-box-cool {
  background: radial-gradient(ellipse at 50% 45%, #2f5a6e, #1a2c48 72%);
  box-shadow: inset 0 0 0 3px rgba(143, 243, 255, 0.45), 0 10px 24px rgba(7, 4, 15, 0.45);
}
.result-reset-cool { color: #bff6ff; border-color: rgba(143, 243, 255, 0.55); }
.dish.drink { filter: drop-shadow(0 10px 10px rgba(7, 4, 15, 0.55)) drop-shadow(0 0 22px var(--glow, rgba(143, 243, 255, 0.45))); }
/* the flavours on the rim, bigger than the kitchen's scattered stars */
.drink-bits img { width: 34%; height: 34%; }

@media (prefers-reduced-motion: reduce) {
  .spring-flow, .in-jug, .jug.ready .stir-rod svg, .base-bottle.tip { animation: none; }
}

/* The jug stands in front of a dark alcove, so its glass is a touch more solid
   than the Potions vials', or it all but vanishes. */
.jug .vessel-glass { fill: rgba(200, 240, 255, 0.16); }
.jug .vessel-edge { stroke: rgba(225, 248, 255, 0.7); }
