/* Food Cart Fun — chunky preschool UI (same family as All Aboard) */

.fc-root {
  --fc-ink: #263238;
  --fc-sun: #ffd54f;
  --fc-sun-deep: #f9a825;
  --fc-orange: #ff9800;
  --fc-pink: #f06292;
  --fc-teal: #26a69a;
  --fc-cream: #fffaf0;
  --outline: 5px;
  --ease-pop: cubic-bezier(0.34, 1.4, 0.64, 1);
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #a8dcff;
  overflow: hidden;
  font-family: "Fredoka", "Nunito", system-ui, sans-serif;
  color: #fff;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
}

/* ───────── top bar ───────── */

.fc-chrome {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  padding: max(0.75rem, env(safe-area-inset-top)) max(0.75rem, env(safe-area-inset-right)) 0.45rem max(0.75rem, env(safe-area-inset-left));
  pointer-events: none;
}
.fc-chrome > * {
  pointer-events: auto;
}
.fc-root.is-loading .fc-chrome {
  visibility: hidden;
}

.fc-exit,
.fc-back {
  display: grid;
  place-items: center;
  height: 3rem;
  border-radius: 999px;
  background: var(--fc-orange);
  border: var(--outline) solid #fff;
  color: #fff;
  font: inherit;
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
  line-height: 1;
  box-shadow: 0 5px 0 rgba(38, 50, 56, 0.18);
  cursor: pointer;
}
.fc-exit {
  width: 3rem;
}
.fc-back {
  padding: 0 1.1rem;
  font-size: 1.15rem;
  font-weight: 800;
  background: var(--fc-teal);
}
.fc-exit[hidden],
.fc-back[hidden] {
  display: none;
}
.fc-exit:active,
.fc-back:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 rgba(38, 50, 56, 0.18);
}

.fc-hud-right {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.fc-debug {
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: #ffeb3b;
  color: var(--fc-ink);
  border: 3px solid var(--fc-ink);
  font-weight: 800;
  font-size: 0.85rem;
}
.fc-debug[hidden] {
  display: none;
}
.fc-debug-btn {
  white-space: nowrap;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: #ffeb3b;
  color: var(--fc-ink);
  border: 3px solid var(--fc-ink);
  font: inherit;
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
}
.fc-debug-btn[hidden] {
  display: none;
}

/* 🫙 Tip Jar: a little glass jar that fills up, and the takings in dollars and cents */
.fc-jar {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.8rem;
  padding: 0.2rem 0.85rem 0.2rem 0.45rem;
  border-radius: 999px;
  background: #fff;
  border: 4px solid var(--fc-ink);
  box-shadow: 0 4px 0 rgba(38, 50, 56, 0.3);
  color: var(--fc-ink);
  font: inherit;
  cursor: pointer;
}
.fc-jar:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 rgba(38, 50, 56, 0.3);
}
.fc-jar.is-bump {
  animation: fc-jar-bump 0.4s var(--ease-pop);
}
@keyframes fc-jar-bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.15); }
  100% { transform: scale(1); }
}
.fc-jar__icon {
  position: relative;
  width: 1.55rem;
  height: 1.85rem;
  border: 3px solid var(--fc-ink);
  border-top-width: 2px;
  border-radius: 0.35rem 0.35rem 0.55rem 0.55rem;
  background: #e3f2fd;
  overflow: hidden;
}
.fc-jar__fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0;
  background: repeating-linear-gradient(135deg, #cfd8dc 0 4px, #b0bec5 4px 7px);
  transition: height 0.4s ease;
}
.fc-jar__lid {
  position: absolute;
  left: -2px;
  right: -2px;
  top: 0;
  height: 0.3rem;
  background: var(--fc-sun-deep);
}
.fc-jar__amount {
  font-weight: 800;
  font-size: 1.2rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.fc-settings-btn {
  flex-shrink: 0;
  width: 2.6rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 999px;
  border: 4px solid #fff;
  background: #7e57c2;
  font-size: 1.2rem;
  line-height: 1;
  box-shadow: 0 4px 0 rgba(38, 50, 56, 0.3);
  cursor: pointer;
}
.fc-settings-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 rgba(38, 50, 56, 0.3);
}

/* ───────── stage ───────── */

.fc-stage {
  flex: 1;
  position: relative;
  min-height: 0;
}
.fc-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}
.fc-stage.is-pointer canvas {
  cursor: pointer;
}

/* 👆 Tap the cart! — bobs over the Drinks cart (positioned by game.js) */
.fc-hint {
  position: absolute;
  z-index: 12;
  left: 0;
  top: 0;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: #fff;
  color: var(--fc-ink);
  border: 4px solid var(--fc-ink);
  box-shadow: 0 4px 0 rgba(38, 50, 56, 0.3);
  font-weight: 800;
  font-size: 1.1rem;
  white-space: nowrap;
  pointer-events: none;
  translate: -50% -100%;
  animation: fc-bob 1.1s ease-in-out infinite;
}
.fc-hint[hidden] {
  display: none;
}
/* 👇 a pointer tip over the next thing to tap at a counter (JG-245; positioned by the prep game) */
.fc-pointer {
  position: absolute;
  z-index: 12;
  font-size: 2.6rem;
  line-height: 1;
  pointer-events: none;
  translate: -50% -100%;
  filter: drop-shadow(0 3px 0 rgba(38, 50, 56, 0.35));
  animation: fc-poke 0.9s ease-in-out infinite;
}
.fc-pointer[hidden] {
  display: none;
}
@keyframes fc-poke {
  0%, 100% { transform: translateY(-10px); }
  50% { transform: translateY(0); }
}
@keyframes fc-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ───────── fenced-stall card ───────── */

.fc-card {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(38, 50, 56, 0.35);
}
.fc-card[hidden] {
  display: none;
}
.fc-card__box {
  position: relative;
  width: min(22rem, 100%);
  box-sizing: border-box;
  padding: 1.1rem 1.2rem 1.2rem;
  border-radius: 1.6rem;
  background: var(--fc-cream);
  color: var(--fc-ink);
  border: 5px solid var(--fc-ink);
  box-shadow: 0 8px 0 rgba(38, 50, 56, 0.35);
  text-align: center;
  animation: fc-pop 0.32s var(--ease-pop);
}
@keyframes fc-pop {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.fc-card__close,
.fc-settings__close {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  border: 4px solid var(--fc-ink);
  background: #fff;
  color: var(--fc-ink);
  font: inherit;
  font-weight: 800;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}
.fc-card__close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
}
.fc-card__icon {
  font-size: 3.4rem;
  line-height: 1.1;
}
.fc-card__title {
  margin: 0.2rem 0 0.3rem;
  font-size: 1.6rem;
  font-weight: 800;
}
.fc-card__text {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}
.fc-card__bar {
  height: 1rem;
  margin: 0.7rem 0 0.2rem;
  border-radius: 999px;
  border: 3px solid var(--fc-ink);
  background: #fff;
  overflow: hidden;
}
.fc-card__bar[hidden] {
  display: none;
}
.fc-card__bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--fc-sun-deep);
}
.fc-card__give {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.7rem;
}
.fc-card__give[hidden] {
  display: none;
}
.fc-card__givebtn {
  flex: 1 1 6rem;
  min-height: 2.8rem;
  border-radius: 999px;
  border: 4px solid var(--fc-ink);
  background: #66bb6a;
  color: #fff;
  font: inherit;
  font-weight: 800;
  font-size: 1rem;
  text-shadow: 0 2px 0 rgba(38, 50, 56, 0.35);
  box-shadow: 0 4px 0 var(--fc-ink);
  cursor: pointer;
}
.fc-card__givebtn.is-all {
  background: var(--fc-orange);
}
.fc-card__givebtn:disabled {
  background: #eceff1;
  color: var(--fc-ink);
  text-shadow: none;
  cursor: default;
}
.fc-card__givebtn:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--fc-ink);
}
.fc-card__note {
  margin: 0.4rem 0 0;
  font-size: 0.95rem;
  font-weight: 600;
  opacity: 0.75;
}
.fc-card__say {
  margin-top: 0.7rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 4px solid var(--fc-ink);
  background: var(--fc-sun);
  font-size: 1.3rem;
  box-shadow: 0 4px 0 var(--fc-ink);
  cursor: pointer;
}
.fc-card__say:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--fc-ink);
}

/* ───────── settings ───────── */

.fc-settings {
  position: absolute;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: max(0.75rem, env(safe-area-inset-top)) 0.75rem max(0.75rem, env(safe-area-inset-bottom));
  background: rgba(38, 50, 56, 0.45);
  overflow-y: auto;
}
.fc-settings[hidden] {
  display: none;
}
.fc-settings__card {
  width: min(26rem, 100%);
  box-sizing: border-box;
  padding: 1rem 1.1rem 1.1rem;
  border-radius: 1.6rem;
  background: var(--fc-cream);
  color: var(--fc-ink);
  border: 5px solid var(--fc-ink);
  box-shadow: 0 8px 0 rgba(38, 50, 56, 0.35);
  animation: fc-pop 0.32s var(--ease-pop);
}
.fc-settings__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}
.fc-settings__head h2 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 800;
}
.fc-settings__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}
.fc-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.35rem 0.2rem;
  border-radius: 1rem;
  border: 3px solid var(--fc-ink);
  background: #fff8e1;
}
.fc-stat b {
  font-size: 1.25rem;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.fc-stat span {
  font-size: 0.75rem;
  font-weight: 700;
  opacity: 0.8;
}
.fc-settings__section {
  padding: 0.6rem 0 0.2rem;
  border-top: 2px dashed rgba(38, 50, 56, 0.15);
  margin-top: 0.5rem;
}
.fc-settings__label {
  margin: 0 0 0.35rem;
  font-weight: 800;
  font-size: 1.05rem;
}
.fc-settings__help {
  margin: 0.3rem 0 0;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0.75;
}
.fc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.fc-chip {
  flex: 1 1 auto;
  min-height: 2.6rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  border: 3px solid var(--fc-ink);
  background: #fff;
  color: var(--fc-ink);
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 3px 0 var(--fc-ink);
  cursor: pointer;
}
.fc-chip.is-on {
  background: var(--fc-teal);
  color: #fff;
}
.fc-chip:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--fc-ink);
}
.fc-hold {
  position: relative;
  width: 100%;
  min-height: 3.2rem;
  margin-top: 0.4rem;
  overflow: hidden;
  border-radius: 999px;
  border: 4px solid var(--fc-ink);
  background: #ffcdd2;
  color: #b71c1c;
  font: inherit;
  font-weight: 800;
  font-size: 1.05rem;
  box-shadow: 0 4px 0 var(--fc-ink);
  cursor: pointer;
  touch-action: none;
}
.fc-hold__fill {
  position: absolute;
  inset: 0;
  width: 0;
  background: #ef5350;
}
.fc-hold.is-holding .fc-hold__fill {
  width: 100%;
  transition: width 2s linear;
}
.fc-hold.is-done .fc-hold__fill {
  width: 100%;
}
.fc-hold__text {
  position: relative;
}
.fc-hold.is-holding,
.fc-hold.is-done {
  color: #fff;
}

.fc-fx {
  position: absolute;
  inset: 0;
  z-index: 30;
  pointer-events: none;
}

/* ───────── JG-111: the order ticket, pop words, sparkles ───────── */

.fc-ticket {
  position: absolute;
  z-index: 22;
  top: calc(max(0.75rem, env(safe-area-inset-top)) + 3.6rem);
  left: max(0.75rem, env(safe-area-inset-left));
  width: min(15rem, calc(100% - 1.5rem));
  border-radius: 0.9rem 0.9rem 0.5rem 0.5rem;
  background: #fffdf5;
  color: var(--fc-ink);
  border: 4px solid var(--fc-ink);
  box-shadow: 0 5px 0 rgba(38, 50, 56, 0.3);
  rotate: -1.5deg;
  transition: transform 0.3s var(--ease-pop), opacity 0.25s;
}
.fc-ticket[hidden] {
  display: none;
}
.fc-ticket.is-away {
  transform: translateX(-130%);
  opacity: 0;
  pointer-events: none;
}
/* a little pin at the top, like an order slip */
.fc-ticket::before {
  content: "";
  position: absolute;
  top: -0.55rem;
  left: 50%;
  width: 0.9rem;
  height: 0.9rem;
  margin-left: -0.45rem;
  border-radius: 50%;
  background: #ef5350;
  border: 3px solid var(--fc-ink);
}
.fc-ticket__head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.fc-ticket__pic {
  font-size: 1.5rem;
  line-height: 1;
}
.fc-ticket__name {
  flex: 1;
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.1;
}
.fc-ticket__chev {
  font-size: 1rem;
  transition: rotate 0.2s;
}
.fc-ticket.is-open .fc-ticket__chev {
  rotate: 180deg;
}
.fc-ticket__list {
  margin: 0;
  padding: 0.1rem 0.7rem 0.6rem;
  list-style: none;
  border-top: 2px dashed rgba(38, 50, 56, 0.25);
  animation: fc-pop 0.25s var(--ease-pop);
}
.fc-ticket__list[hidden] {
  display: none;
}
.fc-ticket__item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.22rem 0;
  font-weight: 700;
  font-size: 1rem;
}
.fc-ticket__box {
  width: 1.3rem;
  height: 1.3rem;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 0.35rem;
  border: 3px solid var(--fc-ink);
  background: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1;
}
.fc-ticket__item.is-done .fc-ticket__box {
  background: #43a047;
  color: #fff;
  animation: fc-pop 0.3s var(--ease-pop);
}
.fc-ticket__item.is-done > span:last-child {
  text-decoration: line-through;
  opacity: 0.6;
}
.fc-ticket__item.is-extra {
  color: #c62828;
}
.fc-ticket__item.is-extra .fc-ticket__box {
  background: #ef5350;
  color: #fff;
}
.fc-ticket__emoji {
  font-size: 1.15rem;
}
.fc-ticket__rule {
  margin: 0.25rem 0;
  border-top: 2px dashed rgba(38, 50, 56, 0.2);
}

.fc-meter {
  --k: 0;
  position: fixed;
  z-index: 26;
  width: 5.5rem;
  height: 1.1rem;
  translate: -50% 0;
  border-radius: 999px;
  border: 4px solid var(--fc-ink);
  background: #fff;
  overflow: hidden;
  pointer-events: none;
  box-shadow: 0 3px 0 rgba(38, 50, 56, 0.3);
}
.fc-meter[hidden] {
  display: none;
}
.fc-meter i {
  display: block;
  height: 100%;
  width: calc(var(--k) * 100%);
  background: linear-gradient(90deg, #ef5350, #ffca28 55%, #66bb6a);
  background-size: 5.5rem 100%;
}

.fc-upgrades-btn {
  position: absolute;
  z-index: 22;
  right: max(0.75rem, env(safe-area-inset-right));
  bottom: max(0.9rem, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  width: 4.6rem;
  padding: 0.45rem 0 0.35rem;
  border-radius: 1.2rem;
  border: 4px solid var(--fc-ink);
  background: var(--fc-sun);
  color: var(--fc-ink);
  box-shadow: 0 5px 0 var(--fc-ink);
  font: inherit;
  cursor: pointer;
}
.fc-court-btn {
  background: #a5d6a7;
}
.fc-court-btn .fc-trash__label {
  font-size: 0.7rem;
}
/* JG-146: the cart picker — the other open carts, stacked over 🛠️ (bottom right on their own when it's hidden) */
.fc-cartpick {
  position: absolute;
  z-index: 22;
  right: max(0.75rem, env(safe-area-inset-right));
  bottom: max(0.9rem, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column-reverse;
  gap: 0.9rem;
}
.fc-cartpick.has-upgrades {
  bottom: calc(max(0.9rem, env(safe-area-inset-bottom)) + 5.9rem);
}
.fc-cartpick[hidden] {
  display: none;
}
.fc-cartpick .fc-switch-btn {
  position: relative;
  right: auto;
  bottom: auto;
}
.fc-switch-btn {
  background: #f8bbd0;
}
.fc-switch-btn[data-for="drinks"] {
  background: var(--fc-sun);
}
.fc-switch-btn[data-for="pizza"] {
  background: #a5d6a7;
}
.fc-switch-btn[data-for="grill"] {
  background: #ffab91;
}
.fc-switch-btn .fc-trash__label {
  font-size: 0.68rem;
  line-height: 1.05;
  text-align: center;
}
.fc-upgrades-btn.fc-switch-btn.is-ready::after {
  content: attr(data-waiting);
}
.fc-upgrades-btn[hidden] {
  display: none;
}
.fc-upgrades-btn:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--fc-ink);
}
.fc-upgrades-btn.is-ready::after {
  content: "!";
  position: absolute;
  top: -0.6rem;
  right: -0.5rem;
  width: 1.5rem;
  height: 1.5rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 3px solid var(--fc-ink);
  background: #ef5350;
  color: #fff;
  font-weight: 800;
  animation: fc-bob 1s ease-in-out infinite;
}
.fc-shop__box {
  width: min(24rem, 100%);
}
.fc-shop__tabs {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.5rem;
}
.fc-shop__tabs[hidden] {
  display: none;
}
.fc-shop__tab {
  flex: 1;
  min-height: 2.6rem;
  border-radius: 999px;
  border: 3px solid var(--fc-ink);
  background: #fff;
  color: var(--fc-ink);
  font: inherit;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
}
.fc-shop__tab.is-on {
  background: var(--fc-sun);
  box-shadow: 0 3px 0 var(--fc-ink);
}
.fc-shop__swatch {
  display: inline-block;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.6rem;
  border: 3px solid var(--fc-ink);
}
.fc-shop__list {
  max-height: min(60vh, 30rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 0.2rem;
  touch-action: pan-y;
  display: grid;
  gap: 0.6rem;
  margin-top: 0.6rem;
  text-align: left;
}
.fc-shop__item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.2rem 0.7rem;
  align-items: center;
  padding: 0.7rem;
  border-radius: 1.1rem;
  border: 3px solid var(--fc-ink);
  background: #fff;
}
.fc-shop__pic {
  grid-row: span 3;
  font-size: 2.8rem;
  line-height: 1;
}
/* a new item's own picture (item art, JG-229) */
.fc-shop__art {
  width: 3.6rem;
  height: 3.6rem;
  display: block;
}
.fc-shop__name {
  font-weight: 800;
  font-size: 1.2rem;
}
.fc-shop__blurb {
  font-weight: 600;
  font-size: 0.92rem;
  opacity: 0.8;
}
.fc-shop__buy {
  grid-column: 1 / -1;
  min-height: 3rem;
  margin-top: 0.35rem;
  border-radius: 999px;
  border: 4px solid var(--fc-ink);
  background: #66bb6a;
  color: #fff;
  font: inherit;
  font-weight: 800;
  font-size: 1.15rem;
  text-shadow: 0 2px 0 rgba(38, 50, 56, 0.35);
  box-shadow: 0 4px 0 var(--fc-ink);
  cursor: pointer;
}
.fc-shop__buy:disabled {
  background: #eceff1;
  color: var(--fc-ink);
  text-shadow: none;
  cursor: default;
}
.fc-shop__buy.is-owned {
  background: #e8f5e9;
  color: #2e7d32;
  text-shadow: none;
}
.fc-shop__bar {
  grid-column: 1 / -1;
  height: 0.9rem;
  border-radius: 999px;
  border: 3px solid var(--fc-ink);
  background: #fff;
  overflow: hidden;
}
.fc-shop__bar i {
  display: block;
  height: 100%;
  background: var(--fc-sun-deep);
}
.fc-wish-addon {
  position: absolute;
  right: -0.55rem;
  bottom: -0.35rem;
  font-size: 1.2rem;
  filter: drop-shadow(0 2px 0 rgba(38, 50, 56, 0.35));
}
.fc-banner {
  position: fixed;
  z-index: 71;
  left: 50%;
  top: 38%;
  translate: -50% -50%;
  padding: 0.5rem 1.3rem;
  border-radius: 1.2rem;
  border: 5px solid var(--fc-ink);
  background: var(--fc-sun);
  color: var(--fc-ink);
  box-shadow: 0 6px 0 rgba(38, 50, 56, 0.35);
  font-weight: 800;
  font-size: clamp(1.4rem, 6vw, 2.2rem);
  white-space: nowrap;
  pointer-events: none;
  animation: fc-banner 2.4s var(--ease-pop) forwards;
}
@keyframes fc-banner {
  0% { scale: 0.3; opacity: 0; }
  12% { scale: 1.12; opacity: 1; }
  20% { scale: 1; }
  80% { scale: 1; opacity: 1; }
  100% { scale: 0.9; opacity: 0; translate: -50% -80%; }
}
.fc-banner.is-note {
  top: 24%;
  max-width: calc(100vw - 2rem);
  white-space: normal;
  text-align: center;
  font-size: clamp(1.05rem, 4.4vw, 1.5rem);
  background: #fffdf5;
  animation-duration: 4.2s;
}
.fc-confetti {
  position: fixed;
  z-index: 70;
  top: -2rem;
  font-size: 1.5rem;
  pointer-events: none;
  animation: fc-confetti-fall var(--t, 1.6s) ease-in forwards;
}
@keyframes fc-confetti-fall {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  100% { transform: translate(var(--dx, 0px), 110vh) rotate(var(--r, 360deg)); opacity: 0.8; }
}

.fc-trash {
  position: absolute;
  z-index: 22;
  left: max(0.75rem, env(safe-area-inset-left));
  bottom: max(0.9rem, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  width: 4.6rem;
  padding: 0.45rem 0 0.35rem;
  border-radius: 1.2rem;
  border: 4px solid var(--fc-ink);
  background: #fff;
  color: var(--fc-ink);
  box-shadow: 0 5px 0 var(--fc-ink);
  font: inherit;
  cursor: pointer;
  animation: fc-pop 0.3s var(--ease-pop);
}
.fc-trash[hidden] {
  display: none;
}
.fc-trash:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--fc-ink);
}
.fc-trash__icon {
  font-size: 1.9rem;
  line-height: 1;
}
.fc-trash__label {
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1;
}
.fc-trash.is-dump .fc-trash__icon {
  animation: fc-trash-gulp 0.45s ease-out;
}
@keyframes fc-trash-gulp {
  0% { transform: scale(1); }
  30% { transform: scale(1.3) rotate(-12deg); }
  60% { transform: scale(0.9) rotate(8deg); }
  100% { transform: scale(1); }
}

/* ───────── JG-112: coins on the counter, the running total, coins flying to the jar ───────── */

.fc-coins {
  position: fixed;
  inset: 0;
  z-index: 23;
  pointer-events: none;
  overflow: hidden;
}
.fc-coins[hidden] {
  display: none;
}
.fc-coin {
  position: absolute;
  left: 0;
  top: 0;
  padding: 0;
  border: 0;
  background: none;
  pointer-events: auto;
  cursor: pointer;
  filter: drop-shadow(0 4px 0 rgba(38, 50, 56, 0.35));
  -webkit-tap-highlight-color: transparent;
  will-change: transform;
}
.fc-coin {
  -webkit-touch-callout: none; /* JG-131: a long press hears the coin, no phone menu */
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
/* JG-131: a coin held up to hear its name, and the name over it */
.fc-coin.is-lifted {
  filter: drop-shadow(0 12px 0 rgba(38, 50, 56, 0.3));
}
.fc-coin-name {
  position: absolute;
  left: 0;
  top: 0;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  border: 4px solid var(--fc-ink);
  background: #fffdf5;
  color: var(--fc-ink);
  font-weight: 800;
  font-size: 1.25rem;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 4px 0 var(--fc-ink);
}
.fc-coin-name[hidden] {
  display: none;
}
.fc-coin svg {
  display: block;
  width: 100%;
  height: 100%;
}
.fc-coin.is-hint {
  animation: fc-coin-hop 0.8s ease-in-out infinite;
}
.fc-coin.is-wiggle {
  animation: fc-coin-wiggle 0.5s ease-in-out;
}
@keyframes fc-coin-hop {
  0%, 100% { translate: 0 0; }
  45% { translate: 0 -14px; }
}
@keyframes fc-coin-wiggle {
  0%, 100% { rotate: 0deg; }
  20% { rotate: -14deg; }
  40% { rotate: 12deg; }
  60% { rotate: -8deg; }
  80% { rotate: 5deg; }
}
.fc-total {
  position: absolute;
  left: 0;
  top: 0;
  padding: 0.2rem 0.8rem;
  border-radius: 999px;
  border: 4px solid var(--fc-ink);
  background: #fffdf5;
  color: var(--fc-ink);
  box-shadow: 0 4px 0 rgba(38, 50, 56, 0.3);
  font-weight: 800;
  font-size: 1.6rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  pointer-events: none;
}
.fc-total[hidden] {
  display: none;
}
.fc-total.is-bump {
  animation: fc-total-bump 0.3s var(--ease-pop);
}
.fc-total.is-done {
  background: var(--fc-sun);
  animation: fc-total-bump 0.45s var(--ease-pop);
}
@keyframes fc-total-bump {
  0% { scale: 1; }
  40% { scale: 1.3; }
  100% { scale: 1; }
}
.fc-coin-fly {
  position: fixed;
  z-index: 30;
  translate: -50% -50%;
  pointer-events: none;
  animation: fc-coin-fly 0.62s cubic-bezier(0.5, 0, 0.75, 0) both;
}
@keyframes fc-coin-fly {
  0% { transform: translate(0, 0) scale(1.2); opacity: 1; }
  50% { transform: translate(calc(var(--dx) * 0.45), calc(var(--dy) * 0.45 - 60px)) scale(1); }
  100% { transform: translate(var(--dx), var(--dy)) scale(0.5); opacity: 0.9; }
}

.fc-pop {
  position: fixed;
  z-index: 27;
  translate: -50% -100%;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: #fff;
  color: var(--fc-ink);
  border: 3px solid var(--fc-ink);
  font-weight: 800;
  font-size: 1.05rem;
  white-space: nowrap;
  pointer-events: none;
  animation: fc-pop-rise 1.25s ease-out forwards;
}
.fc-pop.is-good {
  background: #e8f5e9;
  color: #1b5e20;
}
.fc-pop.is-big {
  font-size: 1.6rem;
  background: var(--fc-sun);
}
@keyframes fc-pop-rise {
  0% { opacity: 0; transform: translateY(10px) scale(0.6); }
  15% { opacity: 1; transform: translateY(0) scale(1.1); }
  30% { transform: translateY(-4px) scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-34px); }
}
.fc-spark {
  position: fixed;
  z-index: 27;
  font-size: 1.2rem;
  pointer-events: none;
  translate: -50% -50%;
  animation: fc-spark-fly 0.85s ease-out forwards;
}
@keyframes fc-spark-fly {
  0% { opacity: 1; transform: translate(0, 0) scale(0.4); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.1); }
}

/* ───────── loading + title screen ───────── */

.fc-title {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(0.5rem, 2.4vh, 1.2rem);
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  box-sizing: border-box;
  background:
    radial-gradient(circle at 50% 120%, #ffe082 0 30%, transparent 31%),
    linear-gradient(180deg, #b3e5fc 0%, #e1f5fe 62%, #fff3d6 100%);
  color: var(--fc-ink);
  transition: opacity 0.45s ease;
}
.fc-title.is-done {
  opacity: 0;
  pointer-events: none;
}
.fc-title__exit {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  left: 12px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--fc-orange);
  border: 4px solid #fff;
  color: #fff;
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 4px 0 rgba(38, 50, 56, 0.3);
}
.fc-title__name {
  margin: 0;
  font-size: clamp(2.4rem, 10vw, 4rem);
  font-weight: 800;
  color: var(--fc-sun);
  text-align: center;
  line-height: 1.05;
  text-shadow:
    -3px -3px 0 var(--fc-ink), 3px -3px 0 var(--fc-ink), -3px 3px 0 var(--fc-ink), 3px 3px 0 var(--fc-ink),
    0 7px 0 var(--fc-ink);
  letter-spacing: 0.02em;
}

/* a little CSS cart: striped awning, yellow body, two wheels, drinks hopping on the counter */
.fc-title__cart {
  position: relative;
  width: min(68vw, 260px);
  height: min(56vw, 214px, 34vh);
  aspect-ratio: auto;
}
.fc-title__awning {
  position: absolute;
  left: 2%;
  right: 2%;
  top: 0;
  height: 30%;
  border: 4px solid var(--fc-ink);
  border-radius: 1rem 1rem 0.4rem 0.4rem;
  background: repeating-linear-gradient(90deg, var(--fc-sun) 0 14%, #fff 14% 28%);
  box-shadow: 0 5px 0 rgba(38, 50, 56, 0.2);
}
.fc-title__cart::before,
.fc-title__cart::after {
  content: "";
  position: absolute;
  top: 28%;
  width: 3%;
  height: 24%;
  background: #fff;
  border: 3px solid var(--fc-ink);
  border-radius: 999px;
}
.fc-title__cart::before { left: 12%; }
.fc-title__cart::after { right: 12%; }
.fc-title__body {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 50%;
  height: 34%;
  display: grid;
  place-items: center;
  border: 4px solid var(--fc-ink);
  border-radius: 0.6rem;
  background: linear-gradient(180deg, #fff8e1 0 22%, var(--fc-sun-deep) 22%);
}
.fc-title__lemon {
  font-size: clamp(1.6rem, 7vw, 2.4rem);
  margin-top: 10%;
}
.fc-title__wheel {
  position: absolute;
  bottom: 0;
  width: 22%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 4px solid var(--fc-ink);
  background: radial-gradient(circle, #ffd54f 0 22%, #8d6e63 24% 100%);
  animation: fc-wheel 2.4s linear infinite;
}
.fc-title__wheel.is-l { left: 12%; }
.fc-title__wheel.is-r { right: 12%; }
@keyframes fc-wheel {
  to { transform: rotate(360deg); }
}
.fc-title__drink {
  position: absolute;
  bottom: calc(50% - 6px); /* standing on the counter */
  line-height: 1;
  font-size: clamp(1.4rem, 6vw, 2rem);
  animation: fc-hop 1.4s ease-in-out infinite;
}
.fc-title__drink.is-a { left: 20%; }
.fc-title__drink.is-b { left: 44%; animation-delay: 0.2s; }
.fc-title__drink.is-c { left: 66%; animation-delay: 0.4s; }
@keyframes fc-hop {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-12px); }
}
.fc-title__msg {
  margin: 0;
  padding: 6px 18px;
  background: #fff;
  border: 4px solid var(--fc-ink);
  border-radius: 999px;
  box-shadow: 0 4px 0 rgba(38, 50, 56, 0.3);
  font-weight: 700;
  font-size: clamp(1rem, 4.4vw, 1.25rem);
}
.fc-title__msg[hidden] {
  display: none;
}
.fc-title__dots i {
  font-style: normal;
  animation: fc-dot 1.2s infinite;
}
.fc-title__dots i:nth-child(2) { animation-delay: 0.2s; }
.fc-title__dots i:nth-child(3) { animation-delay: 0.4s; }
@keyframes fc-dot {
  0%, 60%, 100% { opacity: 0.2; }
  30% { opacity: 1; }
}
.fc-title__play {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 4.4rem;
  padding: 0 2rem 0 1.4rem;
  border: 0;
  border-radius: 999px;
  background: radial-gradient(circle at 35% 30%, #81c784, #2e7d32 75%);
  box-shadow:
    0 0 0 5px var(--fc-ink),
    0 8px 0 5px var(--fc-ink);
  color: #fff;
  font: inherit;
  font-weight: 800;
  font-size: 1.8rem;
  letter-spacing: 0.05em;
  text-shadow: 0 2px 0 rgba(38, 50, 56, 0.45);
  cursor: pointer;
  animation: fc-pop 0.4s var(--ease-pop), fc-breathe 1.6s 0.4s ease-in-out infinite;
}
.fc-title__play[hidden] {
  display: none;
}
.fc-title__play:focus {
  outline: none;
}
.fc-title__play:focus-visible {
  outline: 4px dashed #fff;
  outline-offset: 6px;
}
.fc-title__play svg {
  width: 2.2rem;
  height: 2.2rem;
}
.fc-title__play:active {
  transform: translateY(5px) scale(0.97);
  box-shadow:
    0 0 0 5px var(--fc-ink),
    0 3px 0 5px var(--fc-ink);
}
@keyframes fc-breathe {
  0%, 100% { scale: 1; }
  50% { scale: 1.05; }
}

@media (max-width: 430px) {
  .fc-exit,
  .fc-back {
    height: 2.6rem;
    border-width: 4px;
  }
  .fc-exit { width: 2.6rem; font-size: 1.3rem; }
  .fc-back { font-size: 1rem; padding: 0 0.8rem; }
  .fc-jar { min-height: 2.5rem; padding-right: 0.65rem; }
  .fc-jar__amount { font-size: 1.05rem; }
  .fc-settings-btn { width: 2.25rem; height: 2.25rem; border-width: 3px; font-size: 1rem; }
  .fc-debug span { display: none; }
}
@media (max-height: 480px) and (orientation: landscape) {
  .fc-title__name { font-size: 2.2rem; }
  .fc-title__cart { height: 30vh; width: 40vh; }
}
@media (prefers-reduced-motion: reduce) {
  .fc-title { transition: none; }
  .fc-title__wheel,
  .fc-title__drink,
  .fc-title__dots i,
  .fc-title__play,
  .fc-hint,
  .fc-pointer { animation: none; }
  .fc-title__dots i { opacity: 1; }
}

/* ───────── paying (redone 2026-10-17): count out the price from coin stacks into the tray ───────── */

.fc-pay {
  position: absolute;
  left: 50%;
  bottom: max(0.8rem, env(safe-area-inset-bottom));
  translate: -50% 0;
  box-sizing: border-box;
  width: min(calc(100vw - 1.2rem), 27rem);
  padding: 0.6rem 0.75rem 0.7rem;
  border-radius: 1.4rem;
  border: 4px solid var(--fc-ink);
  background: #fffdf5;
  color: var(--fc-ink);
  box-shadow: 0 6px 0 var(--fc-ink);
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.fc-pay[hidden] {
  display: none;
}
.fc-pay.is-in {
  animation: fc-pay-in 0.35s var(--ease-pop);
}
@keyframes fc-pay-in {
  from { translate: -50% 120%; }
  to { translate: -50% 0; }
}
.fc-pay__price {
  text-align: center;
  font-weight: 800;
  font-size: 1.35rem;
}
.fc-pay__price b {
  display: inline-block;
  padding: 0 0.45rem;
  border-radius: 0.6rem;
  background: var(--fc-sun);
  font-size: 1.7rem;
  font-variant-numeric: tabular-nums;
}
/* the tray: dashed, with the coins in it and their total on the right */
.fc-pay__tray {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 4.2rem;
  margin: 0.5rem 0 0.6rem;
  padding: 0.35rem 0.5rem;
  border-radius: 1rem;
  border: 3px dashed #90a4ae;
  background: #eef5f8;
}
.fc-pay__tray.is-over {
  border-color: #e53935;
  background: #ffebee;
}
.fc-pay__tray.is-right {
  border-color: #43a047;
  background: #e8f5e9;
}
.fc-pay__tray.is-shake {
  animation: fc-tray-shake 0.4s ease-in-out;
}
@keyframes fc-tray-shake {
  0%, 100% { translate: 0 0; }
  20% { translate: -8px 0; }
  40% { translate: 7px 0; }
  60% { translate: -5px 0; }
  80% { translate: 3px 0; }
}
.fc-pay__coins {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem;
  min-height: 3rem;
}
.fc-pay__coin {
  width: calc(2.9rem * var(--s));
  height: calc(2.9rem * var(--s));
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  filter: drop-shadow(0 3px 0 rgba(38, 50, 56, 0.3));
}
.fc-pay__coin svg,
.fc-pay__flyer svg {
  display: block;
  width: 100%;
  height: 100%;
}
.fc-pay__coin.is-hint {
  animation: fc-coin-hop 0.8s ease-in-out infinite;
}
.fc-pay__sum {
  flex: none;
  max-width: 45%;
  text-align: right;
  font-weight: 800;
  font-size: 1.3rem;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.fc-pay__tray.is-over .fc-pay__sum {
  color: #c62828;
}
.fc-pay__tray.is-right .fc-pay__sum {
  color: #2e7d32;
}
.fc-pay__sum.is-bump {
  animation: fc-total-bump 0.3s var(--ease-pop);
}
.fc-pay.is-done .fc-pay__sum {
  color: var(--fc-ink);
  padding: 0.1rem 0.5rem;
  border-radius: 0.7rem;
  background: var(--fc-sun);
}
/* the stacks: three coins piled up, with the coin's name under */
.fc-pay__stacks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}
.fc-pay__stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.35rem 0 0.3rem;
  border-radius: 1rem;
  border: 3px solid var(--fc-ink);
  background: #fff;
  color: var(--fc-ink);
  font: inherit;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--fc-ink);
  touch-action: none;
}
.fc-pay__stack.is-press {
  animation: fc-stack-press 0.22s ease-out;
}
@keyframes fc-stack-press {
  40% { transform: translateY(3px); box-shadow: 0 1px 0 var(--fc-ink); }
}
.fc-pay__stack.is-hint .fc-pay__pile {
  animation: fc-coin-hop 0.8s ease-in-out infinite;
}
.fc-pay__stack.is-lifted .fc-pay__pile {
  translate: 0 -10px;
  scale: 1.1;
}
.fc-pay__pile {
  position: relative;
  width: 4rem;
  height: calc(4rem * 0.92);
  transition: translate 0.15s, scale 0.15s;
}
.fc-pay__pile svg {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: calc(3.4rem * var(--s));
  height: calc(3.4rem * var(--s));
  translate: -50% 0;
  filter: drop-shadow(0 2px 0 rgba(38, 50, 56, 0.35));
}
.fc-pay__pile svg:nth-child(2) {
  bottom: 0.3rem;
}
.fc-pay__pile svg:nth-child(3) {
  bottom: 0.6rem;
}
.fc-pay__name {
  font-weight: 800;
  font-size: 0.95rem;
}
.fc-pay__label {
  position: absolute;
  translate: -50% -110%;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  border: 4px solid var(--fc-ink);
  background: #fffdf5;
  font-weight: 800;
  font-size: 1.2rem;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 4px 0 var(--fc-ink);
}
.fc-pay__label[hidden] {
  display: none;
}
.fc-pay__flyer {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 31;
  pointer-events: none;
  filter: drop-shadow(0 4px 0 rgba(38, 50, 56, 0.3));
}

/* speech bubbles: long lines wrap on a narrow phone instead of running off the edge */
.fc-root .aa-quip {
  max-width: min(14rem, 46vw);
  white-space: normal;
  text-align: center;
}

/* item art (2026-10-17): pictures of the drinks and treats instead of emojis */
.aa-wish__pic.fc-wish-art {
  width: 4.3rem;
  height: 4.3rem;
  border-radius: 1.5rem;
}
.fc-wish-art img {
  width: 92%;
  height: 92%;
  object-fit: contain;
  pointer-events: none;
}
.fc-ticket__pic img {
  display: block;
  width: 2.6rem;
  height: 2.6rem;
  margin: -0.5rem 0;
  object-fit: contain;
}
.fc-panel-art {
  display: block;
  width: 3.2rem;
  height: 3.2rem;
  object-fit: contain;
}

/* JG-149: the $1 bill in the payment card — a pile of notes, wider than the coins */
.fc-pay__stacks {
  grid-template-columns: minmax(0, 1.25fr) repeat(3, minmax(0, 1fr));
}
.fc-pay__stack {
  min-width: 0;
}
.fc-pay__stack.is-bill .fc-pay__pile svg {
  width: 4.6rem;
  height: calc(4.6rem / 2.364);
}
.fc-pay__stack.is-bill .fc-pay__pile {
  width: 4.8rem;
}
.fc-pay__stack.is-bill .fc-pay__pile svg:nth-child(2) {
  bottom: 0.35rem;
  translate: calc(-50% + 3px) 0;
}
.fc-pay__stack.is-bill .fc-pay__pile svg:nth-child(3) {
  bottom: 0.7rem;
  translate: calc(-50% - 2px) 0;
}
.fc-pay__coin.is-bill {
  width: 4.2rem;
  height: calc(4.2rem / 2.364);
}
@media (max-width: 400px) {
  .fc-pay__stacks {
    gap: 0.35rem;
  }
  .fc-pay__stack.is-bill .fc-pay__pile svg {
    width: 3.9rem;
    height: calc(3.9rem / 2.364);
  }
  .fc-pay__stack.is-bill .fc-pay__pile {
    width: 4rem;
  }
  .fc-pay__pile {
    width: 3.4rem;
  }
  .fc-pay__name {
    font-size: 0.85rem;
  }
}

/* mini pictures of the ingredients and toppings (icons.js) in the recipe checklist and the ticket's title */
.fc-ticket__emoji .fc-icon {
  display: block;
  width: 1.9rem;
  height: 1.9rem;
  margin: -0.25rem 0;
  object-fit: contain;
}
.fc-icon.is-inline {
  display: inline-block;
  width: 1.55rem;
  height: 1.55rem;
  margin: -0.35rem -0.05rem;
  vertical-align: middle;
  object-fit: contain;
}

/* JG-167: the price in two parts (dollars, then cents) for the first few big payments; a tray that holds 8+ */
.fc-pay__split {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.25rem;
  font-weight: 800;
  font-size: 1.1rem;
}
.fc-pay__split[hidden] {
  display: none;
}
.fc-pay__split .is-dollars,
.fc-pay__split .is-cents {
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  border: 3px solid var(--fc-ink);
}
.fc-pay__split .is-dollars {
  background: #dcedc8;
}
.fc-pay__split .is-cents {
  background: #eceff1;
}
.fc-pay__and {
  font-size: 0.95rem;
  opacity: 0.7;
}
.fc-pay__coins {
  row-gap: 0.15rem;
}
.fc-pay__coins:has(> :nth-child(6)) .fc-pay__coin {
  width: calc(2.4rem * var(--s));
  height: calc(2.4rem * var(--s));
}
.fc-pay__coins:has(> :nth-child(6)) .fc-pay__coin.is-bill {
  width: 3.4rem;
  height: calc(3.4rem / 2.364);
}

/* JG-169: the sticker book */
.fc-stickers-btn {
  position: relative;
  background: #ffb74d;
}
.fc-stickers-btn.is-ready::after {
  content: "!";
  position: absolute;
  top: -0.45rem;
  right: -0.4rem;
  width: 1.2rem;
  height: 1.2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid var(--fc-ink);
  background: #ef5350;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
}
.fc-book__count {
  margin: 0.1rem 0 0.5rem;
  text-align: center;
  font-weight: 800;
}
.fc-book__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(5.4rem, 1fr));
  gap: 0.5rem;
  max-height: min(60vh, 30rem);
  overflow-y: auto;
  padding: 0.2rem;
  touch-action: pan-y;
}
.fc-sticker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.4rem 0.2rem 0.35rem;
  border-radius: 1rem;
  border: 3px dashed #b0bec5;
  background: #f5f7f8;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.1;
  color: #607d8b;
}
.fc-sticker.is-got {
  border: 3px solid var(--fc-ink);
  background: #fffdf5;
  color: var(--fc-ink);
  box-shadow: 0 3px 0 rgba(38, 50, 56, 0.3);
}
.fc-sticker.is-new {
  animation: fc-sticker-pop 0.6s var(--ease-pop);
}
@keyframes fc-sticker-pop {
  0% { transform: scale(0.3) rotate(-20deg); }
  70% { transform: scale(1.15) rotate(6deg); }
  100% { transform: scale(1) rotate(0); }
}
.fc-sticker__pic {
  width: 3.2rem;
  height: 3.2rem;
  display: grid;
  place-items: center;
  font-size: 2.2rem;
  line-height: 1;
}
.fc-sticker__pic img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.fc-sticker:not(.is-got) .fc-sticker__pic {
  filter: grayscale(1) brightness(1.25) opacity(0.45);
}
.fc-sticker__bar {
  width: 80%;
  height: 0.35rem;
  border-radius: 999px;
  background: #cfd8dc;
  overflow: hidden;
}
.fc-sticker__bar i {
  display: block;
  height: 100%;
  background: #66bb6a;
}

/* JG-185: making change — what they paid (the bill to tap into the register), and a count-up bar from the price to it */
.fc-pay.is-change .fc-pay__stacks {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.fc-pay.is-change .fc-pay__stacks:has(.fc-pay__stack.is-bill:not([hidden])) {
  grid-template-columns: minmax(0, 1.25fr) repeat(3, minmax(0, 1fr));
}
.fc-pay__stack[hidden] {
  display: none;
}
.fc-pay__given {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.6rem;
  white-space: nowrap;
  font-weight: 800;
  font-size: 1.15rem;
}
.fc-pay__given[hidden],
.fc-pay__count[hidden] {
  display: none;
}
.fc-pay__given b {
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
}
.fc-pay__bill {
  display: flex;
  gap: 0.2rem;
  padding: 0.25rem 0.35rem;
  border-radius: 0.8rem;
  border: 3px solid var(--fc-ink);
  background: #e8f5e9;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--fc-ink);
  touch-action: manipulation;
}
.fc-pay__bill svg {
  display: block;
  width: 4.4rem;
  height: calc(4.4rem / 2.364);
  filter: drop-shadow(0 2px 0 rgba(38, 50, 56, 0.3));
}
.fc-pay__bill.is-hint {
  animation: fc-coin-hop 0.8s ease-in-out infinite;
}
.fc-pay__bill.is-shake {
  animation: fc-tray-shake 0.4s ease-in-out;
}
.fc-pay__bill.is-in {
  opacity: 0.35;
  box-shadow: none;
  translate: 0 4px;
  cursor: default;
}
/* JG-246: making change as a written subtraction — They paid − Price = Change, the answer filled by the coins */
.fc-pay__count {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: center;
  align-items: center;
  column-gap: 1.2rem;
  row-gap: 0.15rem;
  margin-top: 0.3rem;
  font-weight: 800;
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
}
.fc-pay__count b {
  justify-self: end;
  font-size: 1.35rem;
}
.fc-pay__sub-word i {
  font-style: normal;
  font-size: 1.5rem;
  line-height: 0;
  color: #c62828;
}
.fc-pay__sub-rule {
  grid-column: 1 / -1;
  height: 4px;
  border-radius: 2px;
  background: var(--fc-ink);
}
.fc-pay__answer {
  min-width: 4.6rem;
  padding: 0.05rem 0.5rem;
  border-radius: 0.7rem;
  border: 3px dashed var(--fc-ink);
  background: #fff;
  text-align: center;
  transition: background 0.2s;
}
.fc-pay__count.is-right .fc-pay__answer {
  border-style: solid;
  background: #c8e6c9;
}
.fc-pay__count.is-over .fc-pay__answer {
  border-style: solid;
  background: #ffcdd2;
}
/* (with the sum up, the price and paid rows above it step aside: it shows both) */
.fc-pay.is-sub .fc-pay__price,
.fc-pay.is-sub .fc-pay__given {
  display: none;
}
@media (max-width: 400px) {
  .fc-pay__given {
    gap: 0.35rem;
    font-size: 1rem;
  }
  .fc-pay__bill svg {
    width: 3.5rem;
    height: calc(3.5rem / 2.364);
  }
}
/* JG-226: following someone — a little banner at the bottom with an ✕ */
.fc-follow {
  position: absolute;
  left: 50%;
  bottom: max(1rem, env(safe-area-inset-bottom));
  translate: -50% 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.4rem 0.35rem 0.9rem;
  border-radius: 999px;
  border: 3px solid var(--fc-ink);
  background: #fffdf5;
  color: var(--fc-ink);
  font-weight: 800;
  font-size: 1.05rem;
  white-space: nowrap;
  box-shadow: 0 4px 0 var(--fc-ink);
  pointer-events: auto;
  z-index: 5;
}
.fc-follow[hidden] {
  display: none;
}
.fc-follow__x {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 3px solid var(--fc-ink);
  background: var(--fc-sun);
  color: var(--fc-ink);
  font: inherit;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
}
