/* Mo's Sorting Shelf: Mo and the rule, painted toys in a soft tray, painted wooden shelves to put them on. */
.og-mo-sorting-shelf #play { background-image: url("art/play.webp"); }
.og-mo-sorting-shelf .og-end { background-image: url("art/play.webp"); }
.mo-top { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; }
.mo-img { flex: none; height: 86px; width: auto; transform-origin: 50% 100%; }
.mo-img.is-cheer { animation: moCheer .6s ease-in-out; }
.mo-rule { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 14px; background: var(--og-glass); border-radius: 18px 22px 17px 21px; box-shadow: var(--og-shadow); }
.mo-rule__k { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.mo-rule__v { font: 400 30px/1.05 var(--display); color: var(--og-ink); }
.mo-rule__p { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
.mo-ic { display: block; width: 30px; height: 30px; object-fit: contain; }
.mo-ic--plain { filter: grayscale(1) brightness(1.2) sepia(.25); }
.mo-ic--small { transform: scale(.6); }
.mo-rule.is-new { animation: moNew .7s ease-out; background: #FFF1C9; }
.mo-rule.is-nudge { animation: moNudge .6s ease-in-out; }
.og-mo-sorting-shelf .og-bubble--plain { display: block; width: fit-content; }
.mo-say { margin: 2px auto 8px !important; font-size: 19px; }

.mo-shelves { display: grid; gap: 8px; }
.mo-shelf { position: relative; display: flex; align-items: flex-end; min-height: 76px; padding-bottom: 15px; border-radius: 14px; cursor: pointer; transition: background .15s, transform .15s; -webkit-tap-highlight-color: transparent; }
.mo-shelf::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 22px; background: url("art/plank.webp") center / 100% 100% no-repeat; filter: drop-shadow(0 5px 4px rgba(74, 48, 20, .35)); pointer-events: none; }
.mo-shelf.is-over { background: rgba(255, 241, 201, .75); transform: scale(1.015); }
.mo-shelf.is-hint { background: rgba(255, 241, 201, .85); animation: moHint 1.4s ease-in-out infinite; }
.mo-lab { position: relative; z-index: 1; flex: none; display: flex; align-items: center; gap: 5px; margin: 0 8px 6px 4px; padding: 4px 10px 4px 6px; background: var(--og-glass); border-radius: 14px; box-shadow: var(--og-shadow); font: 400 19px/1.1 var(--display); }
.mo-lab .mo-ic { width: 26px; height: 26px; }
.mo-slots { position: relative; z-index: 1; flex: 1 1 auto; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 2px; padding: 0 6px; min-width: 0; }
.mo-slots .mo-item { width: 44px !important; height: 44px !important; cursor: default; }

.mo-tray { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 12px; min-height: 88px; margin: 0 0 12px; padding: 8px; background: rgba(255, 249, 234, .62); border-radius: 24px 28px 22px 26px / 26px 22px 28px 24px; }
.mo-item { position: relative; appearance: none; -webkit-appearance: none; padding: 2px; border: 0; background: transparent; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; transition: transform .25s cubic-bezier(.3, 1.3, .5, 1); }
.mo-item[data-size="big"] { width: 78px; height: 78px; }
.mo-item[data-size="small"] { width: 56px; height: 56px; }
.mo-item img { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; -webkit-user-drag: none; filter: drop-shadow(0 4px 3px rgba(74, 48, 20, .35)); }
.mo-item.is-drag { z-index: 30; cursor: grabbing; transition: none; }
.mo-item.is-drag img { filter: drop-shadow(0 10px 8px rgba(74, 48, 20, .35)); }
.mo-item.is-sel img { filter: drop-shadow(0 0 7px #F2B531) drop-shadow(0 0 3px #F2B531); }
.mo-item.is-sel::after { content: ""; position: absolute; inset: -3px; border: 3.5px dashed var(--og-ink); border-radius: 50%; opacity: .6; pointer-events: none; }
.mo-item.is-wob { animation: moWob .5s ease-in-out; }
.mo-item.is-pop { animation: moPop .45s cubic-bezier(.2, 1.5, .4, 1); }
.mo-item.is-gone { opacity: 0; transform: scale(.4); transition: opacity .4s, transform .4s; }
.mo-act { margin-top: 12px; }
@keyframes moCheer { 0%, 100% { transform: none; } 30% { transform: translateY(-9px) rotate(-3deg); } 60% { transform: translateY(0) rotate(2deg); } }
@keyframes moNew { 0% { transform: scale(.88); } 60% { transform: scale(1.05); } 100% { transform: scale(1); } }
@keyframes moNudge { 0%, 100% { transform: none; } 30% { transform: rotate(1.5deg) scale(1.04); } }
@keyframes moWob { 0%, 100% { transform: none; } 25% { transform: translateX(-6px) rotate(-6deg); } 75% { transform: translateX(6px) rotate(6deg); } }
@keyframes moPop { 0% { transform: scale(.5); } 100% { transform: scale(1); } }
@keyframes moHint { 50% { background: rgba(255, 241, 201, .25); } }

@media (max-height: 520px) and (orientation: landscape) {
  #play { display: grid; grid-template-columns: minmax(250px, 42%) 1fr; gap: 4px 18px; align-items: start; }
  #play > .og-hud { grid-column: 1; margin-bottom: 2px; }
  #play > .mo-top { grid-column: 1; margin: 0; }
  #play > .mo-say { grid-column: 1; margin: 2px 0 !important; font-size: 18px; }
  #play > .mo-tray { grid-column: 1; margin: 4px 0 0; min-height: 80px; padding: 6px; }
  #play > .mo-shelves { grid-column: 2; grid-row: 1 / span 5; gap: 6px; }
  #play > .mo-act { grid-column: 1; margin-top: 2px; justify-content: flex-start; }
  .mo-img { height: 62px; }
  .mo-shelf { min-height: 66px; }
  .mo-rule__v { font-size: 26px; }
  .mo-item[data-size="big"] { width: 62px; height: 62px; }
  .mo-item[data-size="small"] { width: 46px; height: 46px; }
  .mo-slots .mo-item { width: 40px !important; height: 40px !important; }
  #play[hidden] { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  .mo-img.is-cheer, .mo-rule.is-new, .mo-rule.is-nudge, .mo-item.is-wob, .mo-item.is-pop, .mo-shelf.is-hint { animation: none; }
  .mo-item.is-wob { outline: 3px dotted var(--og-ink); }
  .mo-shelf.is-over { transform: none; }
}
