/* Bake Shop - make up customers' orders, then give change.
   Shared shell, buttons and colours come from kids-common.css. */

.level-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.level-list .stars {
  margin-left: auto;
  font-size: 0.95rem;
  letter-spacing: 1px;
  flex-shrink: 0;
}

/* ===================== The customer ===================== */

.customer {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.customer-face {
  font-size: 3.2rem;
  line-height: 1;
  flex-shrink: 0;
}

.customer-face.arrive {
  animation: bs-arrive 0.5s ease-out;
}

@keyframes bs-arrive {
  from { transform: translateX(-60px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.bubble {
  position: relative;
  flex: 1;
  background: var(--kids-card);
  border: 3px solid var(--kids-border);
  border-radius: 18px;
  padding: 10px 12px;
  font-weight: 800;
  color: var(--kids-ink);
  font-size: 1rem;
  line-height: 1.35;
}

.bubble::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 16px;
  border: 9px solid transparent;
  border-right-color: var(--kids-border);
  border-left: 0;
}

.bubble .speak-btn {
  margin: 8px 0 0;
  padding: 5px 12px;
  font-size: 0.85rem;
}

/* The order as pictures, for children still learning to read. */
.ticket {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #fffdf5;
  border: 2px dashed #e5c98a;
  border-radius: 12px;
  padding: 8px 12px;
  margin-bottom: 10px;
}

.ticket-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--kids-ink);
  flex-wrap: wrap;
}

.ticket-line .swatch {
  width: 24px;
  height: 24px;
}

.ticket-line small {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--kids-muted);
}

.price-board {
  text-align: center;
  font-weight: 800;
  color: var(--kids-amber);
  font-size: 0.95rem;
  margin-bottom: 8px;
}

/* ===================== The box ===================== */

.cake-box {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  background: #f6e3c4;
  border: 4px solid #d9b47a;
  border-radius: 16px;
  padding: 8px;
  min-height: 92px;
}

.cake {
  aspect-ratio: 1;
  border: none;
  border-radius: 12px;
  background: #fff8ee;
  padding: 2px;
  cursor: pointer;
}

.cake svg {
  display: block;
  width: 100%;
  height: 100%;
}

.cake.new {
  animation: kids-pop 0.35s;
}

.cake.bad {
  outline: 3px solid var(--kids-red);
}

.box-empty {
  grid-column: 1 / -1;
  align-self: center;
  text-align: center;
  color: #a88a5c;
  font-weight: 800;
  font-size: 0.95rem;
}

/* ===================== Tools ===================== */

.tool-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--kids-ink-soft);
  margin: 10px 0 4px;
}

.tool-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tool {
  min-width: 52px;
  height: 52px;
  border-radius: 14px;
  border: 3px solid var(--kids-border);
  background: var(--kids-card);
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 6px;
  font-family: inherit;
}

.tool:active {
  transform: scale(0.94);
}

.tool.on {
  border-color: var(--kids-lilac);
  background: #eeecff;
  box-shadow: 0 0 0 3px #c9c4f5;
}

.tool.small {
  font-size: 0.9rem;
  font-weight: 900;
  color: var(--kids-ink-soft);
}

.swatch {
  display: inline-block;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.15);
  vertical-align: middle;
}

.play-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 12px;
}

.play-actions .big-btn {
  max-width: 220px;
}

/* ===================== Change ===================== */

.pay-panel {
  text-align: center;
}

.pay-sum {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--kids-ink);
  margin: 6px 0;
}

.pay-sum small {
  display: block;
  font-size: 0.9rem;
  color: var(--kids-muted);
  font-weight: 800;
}

.coin-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 8px 0;
}

.coin {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 4px solid #a9adb5;
  background: radial-gradient(circle at 35% 30%, #ffffff, #d3d6dc 70%);
  font-family: inherit;
  font-weight: 900;
  font-size: 1rem;
  color: #4a4e57;
  cursor: pointer;
}

.coin.gold {
  border-color: #c79a2b;
  background: radial-gradient(circle at 35% 30%, #fff6cf, #f0c64a 70%);
  color: #6b4c05;
}

.coin:active {
  transform: scale(0.93);
}

.change-tray {
  min-height: 78px;
  border: 3px dashed var(--kids-border);
  border-radius: 16px;
  padding: 6px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  color: var(--kids-muted);
  font-weight: 800;
}

.change-total {
  font-weight: 900;
  color: var(--kids-amber);
  margin-top: 6px;
}

.end-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

@media (max-width: 380px) {
  .tool {
    min-width: 46px;
    height: 46px;
    font-size: 1.45rem;
  }
  .coin {
    width: 54px;
    height: 54px;
  }
}
