/* Bento: a red lacquer lunch box, a tray of food, a lid with a cherry blossom. */
.bt-field { position: absolute; inset: 6px 8px; direction: ltr; touch-action: none; user-select: none; -webkit-user-select: none; }

.bt-box {
  position: absolute; box-sizing: border-box; padding: 12px; border-radius: 20px;
  background: linear-gradient(160deg, #EE5A43, #E0452F 45%, #A92C1B);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45), inset 0 2px 0 rgba(255, 255, 255, 0.28), inset 0 -3px 0 rgba(0, 0, 0, 0.22);
}
.bt-well {
  width: 100%; height: 100%; border-radius: 9px;
  background-color: #161026;
  background-image: linear-gradient(rgba(251, 211, 224, 0.13) 1px, transparent 1px), linear-gradient(90deg, rgba(251, 211, 224, 0.13) 1px, transparent 1px);
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.7);
}

.bt-piece, .bt-ghost {
  position: absolute; left: 0; top: 0; transform-origin: 0 0; pointer-events: none;
}
.bt-piece { transition: transform 0.2s cubic-bezier(0.2, 0.9, 0.3, 1.15); filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.4)); }
.bt-piece svg, .bt-ghost svg { display: block; width: 100%; height: 100%; overflow: visible; }
.bt-piece.is-in { filter: none; }
.bt-piece.is-drag { z-index: 6; transition: none; filter: drop-shadow(0 10px 8px rgba(0, 0, 0, 0.5)); }
.bt-piece.is-hint svg { animation: bt-hint 0.7s ease-out; }
.bt-spin { animation: bt-spin 0.18s ease-out; }
.bt-ghost { display: none; opacity: 0.3; z-index: 1; }
@keyframes bt-spin { from { transform: rotate(-90deg) scale(0.9); } }
@keyframes bt-hint { 0%, 60% { filter: brightness(1.5) drop-shadow(0 0 6px #FBD3E0); } }

.bt-lid {
  position: absolute; z-index: 8; box-sizing: border-box; border-radius: 20px; pointer-events: none;
  display: flex; align-items: center; justify-content: center;
  background:
    linear-gradient(90deg, transparent 0 14%, #D9B25F 14% 15.5%, #161026 15.5% 22.5%, #D9B25F 22.5% 24%, transparent 24%),
    linear-gradient(160deg, #F0634C, #E0452F 45%, #A92C1B);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.5), inset 0 2px 0 rgba(255, 255, 255, 0.3), inset 0 -3px 0 rgba(0, 0, 0, 0.25);
  opacity: 0; transform: translateY(-70%) rotate(-7deg) scale(1.06);
  transition: transform 0.45s cubic-bezier(0.3, 0.7, 0.3, 1.2), opacity 0.2s;
}
.bt-lid.is-on { opacity: 1; transform: none; }
.bt-lid svg { width: 46%; max-height: 62%; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.3)); }

@media (prefers-reduced-motion: reduce) {
  .bt-piece, .bt-lid { transition: none; }
}
