/* Food Fling styles */
.fling #front {
  cursor: grab;
  touch-action: none;
}

.fling #front.aiming {
  cursor: grabbing;
}

.fling .brand h1,
.fling .brand .score,
.fling .brand .best {
  color: #fff7e8;
  text-shadow: 0 2px 7px rgba(24, 14, 10, 0.78);
}

.fling .brand .best {
  color: rgba(255, 240, 215, 0.92);
}

.fling-badge {
  display: inline-block;
  margin-left: 5px;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 800;
  vertical-align: middle;
  background: rgba(110, 82, 196, 0.45);
  border: 1.5px solid #c8b6ff;
  color: #f3ecff;
  text-shadow: none;
}

.food-tray {
  position: fixed;
  z-index: 4;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
  width: min(96vw, 760px);
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 20px;
  background: rgba(34, 21, 18, 0.88);
  border: 2px solid rgba(255, 232, 196, 0.28);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  pointer-events: auto;
}

.power-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 800;
  color: #fff4dd;
  text-align: center;
}

.power-bar #activeFoodName {
  color: #ffd23f;
}

.food-stat-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 800;
  background: rgba(255, 210, 63, 0.16);
  border: 1px solid rgba(255, 210, 63, 0.45);
  color: #ffe8a3;
}

.power-sep {
  opacity: 0.5;
}

.tray-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.queue-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 0;
  scrollbar-width: thin;
}

.q-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 34px;
  padding: 0 10px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 245, 230, 0.1);
  color: #fff7e8;
  font: 800 0.78rem/1 var(--body);
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.q-chip:hover {
  border-color: rgba(255, 210, 63, 0.7);
  transform: translateY(-1px);
}

.q-chip.active {
  border-color: #ffd23f;
  background: rgba(255, 210, 63, 0.28);
  box-shadow: 0 0 0 1px #ffd23f;
}

.q-chip.used {
  opacity: 0.3;
  pointer-events: none;
  text-decoration: line-through;
}

.fling-pill {
  flex: none;
  min-height: 38px;
  padding: 6px 16px;
  border-radius: 99px;
  border: 2.5px solid #fff;
  background: #d9532f;
  color: #fff7e8;
  font: 800 0.85rem/1 var(--body);
  box-shadow: 0 3px 0 #7a2612, 0 4px 12px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.12s ease;
}

.fling-pill:not(:disabled) {
  border-color: #ffd23f;
  box-shadow: 0 3px 0 #7a2612, 0 0 16px rgba(255, 210, 63, 0.6);
}

.fling-pill:disabled {
  opacity: 0.45;
  cursor: default;
}

.fling-pill:not(:disabled):active {
  transform: translateY(2px);
}

.book.end {
  text-align: center;
  width: min(92vw, 420px);
}

.end h2 {
  font-size: 1.9rem;
  margin-top: 4px;
}

.end-stars {
  font-size: 2.3rem;
  letter-spacing: 6px;
  color: #f4b337;
  text-shadow: 0 2px 0 #7a4c00;
  margin: 4px 0 6px;
}

.endbtns {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
}

.btn {
  min-height: 44px;
  padding: 8px 18px;
  border-radius: 99px;
  font-weight: 800;
  border: 2px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.btn.go {
  background: var(--gold);
  border-color: #fff;
  color: #3a2400;
  box-shadow: 0 3px 0 var(--gold-ink);
}

@media (max-width: 600px) {
  .food-tray {
    width: 97vw;
    padding: 6px 8px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 6px);
  }
  .power-bar {
    font-size: 0.74rem;
  }
  .q-chip {
    height: 30px;
    padding: 0 8px;
    font-size: 0.72rem;
  }
  .fling-pill {
    min-height: 34px;
    padding: 5px 12px;
    font-size: 0.78rem;
  }
}
