/* Recipe Recall */
.rr-table { width: 100%; height: 100%; max-width: 560px; margin: 0 auto; padding: 6px 12px 10px; display: flex; flex-direction: column; gap: 8px; box-sizing: border-box; }
.rr-main { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 6px; }
.rr-top { display: flex; align-items: center; gap: 8px; min-height: 30px; }
.rr-tag { flex: none; padding: 4px 10px; border-radius: 999px; background: var(--w-crust); color: var(--w-pan); font: 400 14px/1.2 var(--font-display); white-space: nowrap; }
.rr-status { flex: 1 1 auto; min-width: 0; margin: 0; text-align: center; color: var(--w-butter); font: 400 17px/1.2 var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rr-lives { flex: none; display: flex; gap: 3px; direction: ltr; }
.rr-heart { width: 22px; height: 22px; color: var(--w-tomato); transition: transform 0.3s, color 0.3s, opacity 0.3s; }
.rr-heart svg { display: block; width: 100%; height: 100%; }
.rr-heart.is-lost { color: var(--mist-dim); opacity: 0.4; transform: scale(0.8); }

/* the order ticket: one slot per ingredient */
.rr-ticket { display: flex; justify-content: center; gap: 4px; height: 30px; padding: 3px 8px; direction: ltr; border-radius: 10px; background: rgba(255, 246, 227, 0.07); box-shadow: inset 0 0 0 1px var(--hairline); box-sizing: border-box; }
.rr-slot { flex: 0 1 24px; min-width: 0; height: 24px; border-radius: 50%; background: rgba(255, 246, 227, 0.12); box-shadow: inset 0 0 0 2px rgba(255, 246, 227, 0.16); transition: background 0.15s, transform 0.15s; display: flex; align-items: center; justify-content: center; }
.rr-slot.is-on { background: var(--w-butter); box-shadow: none; transform: scale(1.06); }
.rr-slot svg { width: 82%; height: 82%; display: block; }

/* the pot */
.rr-scene { flex: 1 1 auto; min-height: 96px; position: relative; display: flex; align-items: center; justify-content: center; }
.rr-rig { --u: 2px; position: relative; flex: none; width: calc(var(--u) * 120); height: calc(var(--u) * 100); direction: ltr; }
.rr-rig > * { position: absolute; }
.rr-rig svg { display: block; width: 100%; height: 100%; overflow: visible; }
.rr-pot { left: calc(var(--u) * 20); top: calc(var(--u) * 38); width: calc(var(--u) * 80); height: calc(var(--u) * 60); transform-origin: 50% 100%; }
.rr-pot--front.is-plop { animation: rr-plop 0.3s ease-out; }
.rr-call { left: calc(var(--u) * 45); top: calc(var(--u) * 3); width: calc(var(--u) * 30); height: calc(var(--u) * 30); }
.rr-item { width: 100%; height: 100%; animation: rr-drop 700ms both; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.25)); }
.rr-item::before { content: ""; position: absolute; inset: -12%; border-radius: 50%; background: var(--w-cream); box-shadow: 0 0 0 calc(var(--u) * 1.2) var(--w-butter); z-index: -1; animation: rr-halo inherit; animation-name: rr-halo; animation-duration: inherit; animation-fill-mode: both; }
.rr-bub { left: calc(var(--u) * 32); top: calc(var(--u) * 50); width: calc(var(--u) * 56); height: calc(var(--u) * 8); pointer-events: none; }
.rr-bub i { position: absolute; bottom: 0; width: calc(var(--u) * 4); height: calc(var(--u) * 4); border-radius: 50%; background: #FFD9A0; opacity: 0; }
.rr-bub i:nth-child(1) { left: 8%; } .rr-bub i:nth-child(2) { left: 28%; } .rr-bub i:nth-child(3) { left: 48%; } .rr-bub i:nth-child(4) { left: 68%; } .rr-bub i:nth-child(5) { left: 86%; }
.rr-bub.is-pop i { animation: rr-bubble 0.45s ease-out; }
.rr-bub.is-pop i:nth-child(odd) { animation-delay: 0.06s; }
.rr-bub.is-boil i { animation: rr-bubble 0.5s ease-out infinite; }
.rr-bub.is-boil i:nth-child(2) { animation-delay: 0.12s; } .rr-bub.is-boil i:nth-child(3) { animation-delay: 0.3s; } .rr-bub.is-boil i:nth-child(4) { animation-delay: 0.2s; } .rr-bub.is-boil i:nth-child(5) { animation-delay: 0.38s; }
.rr-dish { left: calc(var(--u) * 28); top: calc(var(--u) * 2); width: calc(var(--u) * 64); height: calc(var(--u) * 48); opacity: 0; pointer-events: none; filter: drop-shadow(0 4px 0 rgba(0, 0, 0, 0.28)); }
.rr-dish.is-up { animation: rr-rise 0.7s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
.rr-steam { animation: rr-steam 1.1s ease-in-out infinite alternate; }
.rr-rays { left: calc(var(--u) * 16); top: calc(var(--u) * -18); width: calc(var(--u) * 88); height: calc(var(--u) * 88); border-radius: 50%; opacity: 0; transition: opacity 0.3s;
  background: repeating-conic-gradient(rgba(255, 212, 92, 0.34) 0 15deg, rgba(255, 212, 92, 0) 15deg 30deg);
  -webkit-mask: radial-gradient(closest-side, #000 30%, transparent 100%); mask: radial-gradient(closest-side, #000 30%, transparent 100%); }
.rr-rays.is-on { opacity: 1; animation: rr-spin 9s linear infinite; }
.rr-rig.is-shake { animation: rr-shake 0.36s; }

/* the shelf */
.rr-shelf { flex: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; direction: ltr; transition: opacity 0.2s, filter 0.2s; opacity: 0.45; filter: saturate(0.6); }
.rr-shelf.is-open { opacity: 1; filter: none; }
.rr-jar { height: clamp(54px, 10.5vh, 86px); padding: 5px; border: 0; border-radius: 16px; background: var(--w-cream); box-shadow: inset 0 -6px 0 var(--w-crust), 0 3px 0 rgba(0, 0, 0, 0.3); cursor: pointer; display: flex; align-items: center; justify-content: center; touch-action: manipulation; -webkit-tap-highlight-color: transparent; transition: transform 0.08s; }
.rr-jar svg { height: 86%; max-height: 62px; aspect-ratio: 1; display: block; margin-top: -5px; pointer-events: none; }
.rr-jar:disabled { cursor: default; }
.rr-jar:not(:disabled):active { transform: translateY(3px) scale(0.96); }
.rr-jar:focus-visible { outline: 3px solid var(--w-butter); outline-offset: 2px; }
.rr-jar.is-wrong { animation: rr-wrong 0.4s; }
.rr-fly { position: fixed; z-index: 30; pointer-events: none; transition: transform 0.32s cubic-bezier(0.45, 0, 0.8, 0.6), opacity 0.32s ease-in; }
.rr-fly svg { display: block; width: 100%; height: 100%; }

@keyframes rr-drop { 0% { transform: scale(0.3); opacity: 0; } 14% { transform: scale(1.12); opacity: 1; } 24%, 66% { transform: none; opacity: 1; } 92% { opacity: 1; } 100% { transform: translateY(calc(var(--u) * 40)) scale(0.45) rotate(160deg); opacity: 0; } }
@keyframes rr-halo { 0%, 60% { opacity: 1; } 78%, 100% { opacity: 0; } }
@keyframes rr-plop { 0% { transform: none; } 35% { transform: scale(1.05, 0.94); } 70% { transform: scale(0.98, 1.03); } 100% { transform: none; } }
@keyframes rr-bubble { 0% { transform: scale(0.4); opacity: 0.95; } 100% { transform: translateY(calc(var(--u) * -12)) scale(1.3); opacity: 0; } }
@keyframes rr-rise { 0% { transform: translateY(calc(var(--u) * 46)) scale(0.2); opacity: 0; } 30% { opacity: 1; } 100% { transform: none; opacity: 1; } }
@keyframes rr-steam { from { opacity: 0.25; transform: translateY(2px); } to { opacity: 0.9; transform: translateY(-2px); } }
@keyframes rr-spin { to { transform: rotate(360deg); } }
@keyframes rr-shake { 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
@keyframes rr-wrong { 0%, 100% { background: var(--w-cream); transform: none; } 25% { background: #F9A99C; transform: translateX(-5px); } 60% { background: #F9A99C; transform: translateX(5px); } }

/* short and wide screens: pot on the left, shelf on the right */
@media (orientation: landscape) and (max-height: 520px) {
  .rr-table { flex-direction: row; max-width: 860px; align-items: stretch; gap: 14px; }
  .rr-main { flex: 1 1 50%; }
  .rr-shelf { flex: 1 1 50%; align-content: center; }
  .rr-jar { height: clamp(48px, 20vh, 76px); }
}
@media (max-height: 600px) and (orientation: portrait) { .rr-table { gap: 6px; padding-bottom: 6px; } .rr-shelf { gap: 6px; } .rr-ticket { height: 26px; } .rr-slot { height: 20px; flex-basis: 20px; } }
@media (prefers-reduced-motion: reduce) {
  .rr-item, .rr-dish.is-up, .rr-rays.is-on, .rr-steam, .rr-pot--front.is-plop, .rr-rig.is-shake, .rr-bub i { animation-name: rr-fade !important; }
  .rr-item::before { animation: none; }
  .rr-dish.is-up { opacity: 1; }
  .rr-rays.is-on { animation: none; }
}
@keyframes rr-fade { 0% { opacity: 0; } 15%, 85% { opacity: 1; } 100% { opacity: 0; } }
/* nothing lives in the dock: give its room to the kitchen */
.fa-dock:empty { display: none; }
.rr-table { padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
.fa-title.rr-title { font-size: clamp(13.5px, 4.2vw, 22px); }
