.mode-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.mode-picker button {
  min-height: 44px;
  padding: 7px 15px;
  border: 2px solid #703452;
  border-radius: 999px;
  background: #fffaf0;
  color: #703452;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
}

.mode-picker button[data-mode][aria-pressed="true"] {
  background: #703452;
  color: #fff;
  border-color: #703452;
  box-shadow: 0 0 0 3px #ffca55, 0 5px 0 #4b2942;
  transform: translateY(-2px);
}

.mode-picker button[data-mode][aria-pressed="false"] {
  background: #fff;
}

.selection-mark,
.mode-status {
  display: none;
}

.mode-picker button[data-mode][aria-pressed="true"] .selection-mark {
  display: inline;
}

.mode-picker button[data-mode][aria-pressed="true"] .mode-status {
  display: block;
  margin-top: 2px;
  font-size: .7rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.mode-picker .sound-toggle {
  background: #fff0d7;
  border-color: #bd6a50;
}

.mode-picker button:focus-visible {
  outline: 3px solid #a34f21;
  outline-offset: 3px;
}

.play-area {
  padding: 12px 10px;
  text-align: center;
}

.bowl > .bowl-food {
  position: static;
  font-size: clamp(1.2rem, 5vw, 2rem);
}

.food-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: middle;
}

.bowl > .bowl-icon {
  top: -.95em;
}

.order-clues {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: clamp(8px, 3vw, 18px);
  max-width: 100%;
  padding: 12px 10px 21px;
  margin: 4px 0 12px;
  border-radius: 24px;
  background: #fff4df;
}

.order-clues[hidden] {
  display: none;
}

.order-card {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(54px, 18vw, 96px);
  aspect-ratio: 1;
  border: 3px solid #e3c6ac;
  border-radius: 16px;
  background: #fff;
  font-size: clamp(2rem, 9vw, 4rem);
  line-height: 1;
}

.order-card.red-clue {
  background: #ffe1df;
}

.order-card.current {
  border-color: #703452;
  box-shadow: 0 0 0 3px #ffca55;
}

.order-card.current::after {
  position: absolute;
  bottom: -15px;
  border-inline: 8px solid transparent;
  border-top: 9px solid #703452;
  content: "";
}

.order-card.served {
  border-color: #34824f;
  background: #e3f6de;
}

.order-card.served::after,
.retry .order-card.current::before {
  position: absolute;
  top: -8px;
  right: -8px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #28653b;
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
  content: "✓";
}

.retry .order-card.current::before {
  background: #703452;
  content: "↻";
}

.taking-orders .speech,
.taking-orders .progress,
.taking-orders .order-feedback {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.taking-orders .pet {
  font-size: clamp(4.5rem, 16vw, 8rem);
}

.next-icon {
  margin-inline-end: 4px;
  font-size: 1.15em;
}

.repeat-order {
  position: relative;
  z-index: 1;
  min-height: 44px;
  margin: 0 0 5px;
  padding: 6px 16px;
  border: 2px solid #703452;
  border-radius: 999px;
  background: #fffaf0;
  color: #703452;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.repeat-order:focus-visible {
  outline: 3px solid #a34f21;
  outline-offset: 3px;
}

.order-feedback,
.next-order {
  position: relative;
  z-index: 1;
  margin: 8px 0 0;
}

.order-feedback {
  font-weight: 800;
}

.taking-orders .order-feedback.celebration {
  position: relative;
  width: min(100%, 420px);
  height: auto;
  margin: 12px 0 0;
  padding: 12px 18px;
  overflow: visible;
  clip-path: none;
  white-space: normal;
  border: 3px solid #f2a93b;
  border-radius: 20px;
  background: #fff7d9;
  color: #703452;
  line-height: 1.35;
  box-shadow: 0 5px 0 #d58c7244;
}

.order-feedback.celebration strong,
.order-feedback.celebration span {
  display: block;
}

.order-feedback.celebration span + span {
  margin-top: 5px;
}

.order-feedback:empty {
  margin: 0;
}

.session-history {
  margin-top: 24px;
  padding: 16px 20px;
  border-radius: 20px;
  background: #fff0d7;
  font-size: 1rem;
}

.achievement-progress {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 5px 10px;
  margin-top: 14px;
  padding: 9px 14px;
  border-radius: 999px;
  background: #fff0c9;
  text-align: center;
}

.achievement-star {
  font-size: 1.5rem;
}

.achievement-progress #unlock-progress {
  color: #7d4b3a;
}

.pet-choice {
  position: relative;
}

.pet-choice.locked {
  filter: grayscale(.7);
  opacity: .58;
  cursor: default;
}

.pet-choice .pet-lock {
  position: absolute;
  top: -7px;
  right: -6px;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #703452;
  font-size: .9rem;
}

.pet-choice .pet-lock[hidden] {
  display: none;
}

.session-history h2 {
  margin: 0;
  font-size: 1.3rem;
}

.session-history p {
  margin: 5px 0 0;
}

.session-history ol {
  margin: 8px 0;
  padding-left: 1.5em;
}

.session-history li {
  margin-top: 4px;
}

.session-history a {
  color: #703452;
  font-weight: 800;
}

@media (max-width: 560px) {
  .taking-orders .mode-picker button {
    padding-inline: 8px;
    font-size: .9rem;
  }

  .taking-orders .pet-picker,
  .taking-orders .play-area,
  .taking-orders .food-area {
    margin-top: 12px;
  }

  .taking-orders .pet-choice {
    min-width: 58px;
  }

  .taking-orders .pet-choice span {
    font-size: 1.8rem;
  }

  .taking-orders .food-options {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .taking-orders .food-choice {
    min-width: 0;
    min-height: 54px;
    padding-inline: 0;
  }

  .taking-orders .food-choice span {
    font-size: clamp(1.5rem, 8vw, 2.3rem);
  }

  .taking-orders .food-choice small {
    display: none;
  }
}
