/* One quiet memory composition: the story frame above three photo cards. */
body.memory-clean-active.rrdd-adventure:is(:has(#memoryScreen#memoryScreen),:has(#memory#memory),:has(#recall#recall)){overflow:hidden!important}
body.memory-clean-active.rrdd-adventure:is(:has(#memoryScreen#memoryScreen),:has(#memory#memory),:has(#recall#recall)) main{height:var(--mc-main-height)!important;min-height:0!important;overflow:visible!important}
body.memory-clean-active.rrdd-adventure:is(:has(#memoryScreen#memoryScreen),:has(#memory#memory),:has(#recall#recall)) :is(#memoryScreen,#memory,#recall).memory-clean-screen{
 display:flex!important;flex-direction:column!important;position:relative!important;inset:auto!important;
 height:var(--mc-screen-height)!important;min-height:0!important;max-height:none!important;flex:0 0 var(--mc-screen-height)!important;
 box-sizing:border-box!important;margin:0!important;padding:4px!important;gap:0!important;overflow:hidden!important;
}
body.memory-clean-active.rrdd-adventure:is(:has(#memoryScreen#memoryScreen),:has(#memory#memory),:has(#recall#recall)) .memory-clean-screen>:is(.fp-memory-head,.mini-heading,.memory-heading,.mini-header),
body.memory-clean-active.rrdd-adventure:is(:has(#memoryScreen#memoryScreen),:has(#memory#memory),:has(#recall#recall)) .memory-clean-screen .album-heading,
body.memory-clean-active.rrdd-adventure:is(:has(#memoryScreen#memoryScreen),:has(#memory#memory),:has(#recall#recall)) .memory-clean-screen :is(.moon-memory-progress,.thread-memory-progress,.memory-keepsakes,.chimelong-keepsakes,.frame-progress,.moon-memory-note,.thread-memory-note,.memory-frame-note,.chimelong-frame-note),
body.memory-clean-active.rrdd-adventure:is(:has(#memoryScreen#memoryScreen),:has(#memory#memory),:has(#recall#recall)) .memory-clean-screen>:is(#memoryFeedback,#memoryClue),
body.memory-clean-active.rrdd-adventure:is(:has(#memoryScreen#memoryScreen),:has(#memory#memory),:has(#recall#recall)) #recall .recall-card>:is(.card-top,.tap-note,#confirmRecall,#recallChoices,#nextRecall,#recallFeedback){display:none!important}
body.memory-clean-active.rrdd-adventure:is(:has(#memoryScreen#memoryScreen),:has(#memory#memory),:has(#recall#recall)) .memory-clean-screen .memory-clean-body{
 display:flex!important;flex-direction:column!important;flex:1 1 0!important;min-height:0!important;height:0!important;max-height:none!important;
 width:100%!important;margin:0!important;padding:0!important;gap:0!important;border:0!important;box-shadow:none!important;overflow:hidden!important;
}
body.memory-clean-active.rrdd-adventure:is(:has(#memoryScreen#memoryScreen),:has(#memory#memory),:has(#recall#recall)) .memory-clean-screen .memory-clean-board,
body.memory-clean-active.rrdd-adventure:is(:has(#memoryScreen#memoryScreen),:has(#memory#memory),:has(#recall#recall)) .memory-clean-screen.memory-clean-board{
 display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr) clamp(100px,19dvh,200px)!important;
 flex:1 1 0!important;min-height:0!important;height:0!important;max-height:none!important;width:100%!important;
 padding:5px!important;gap:8px!important;box-sizing:border-box!important;overflow:hidden!important;
}
body.memory-clean-active.rrdd-adventure:is(:has(#memoryScreen#memoryScreen),:has(#memory#memory),:has(#recall#recall)) .memory-clean-screen.memory-clean-board{height:var(--mc-screen-height)!important;flex:0 0 var(--mc-screen-height)!important}
body.memory-clean-active.rrdd-adventure:is(:has(#memoryScreen#memoryScreen),:has(#memory#memory),:has(#recall#recall)) .memory-clean-screen .memory-clean-scene{
 display:flex!important;position:relative!important;align-items:center!important;justify-content:center!important;
 grid-column:1!important;grid-row:1!important;min-height:0!important;min-width:0!important;width:100%!important;height:100%!important;
 padding:0!important;margin:0!important;container-type:size;
}
body.memory-clean-active.rrdd-adventure:is(:has(#memoryScreen#memoryScreen),:has(#memory#memory),:has(#recall#recall)) .memory-clean-screen .memory-clean-frame{flex:none!important;min-height:0!important;max-width:100%!important;max-height:100%!important;margin:0!important;box-sizing:border-box!important}
body.memory-clean-active.rrdd-adventure:is(:has(#memoryScreen#memoryScreen),:has(#memory#memory),:has(#recall#recall)) .memory-clean-screen .memory-clean-tray{
 display:grid!important;grid-column:1!important;grid-row:2!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-template-rows:minmax(0,1fr)!important;
 align-items:stretch!important;justify-items:stretch!important;min-height:0!important;min-width:0!important;width:100%!important;height:100%!important;
 max-height:none!important;margin:0!important;padding:0!important;gap:8px!important;box-sizing:border-box!important;
}
body.memory-clean-active.rrdd-adventure:is(:has(#memoryScreen#memoryScreen),:has(#memory#memory),:has(#recall#recall)) .memory-clean-screen .memory-clean-tray .memory-clean-photo{
 display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:4px!important;flex:none!important;
 grid-template-columns:1fr!important;grid-template-rows:minmax(0,1fr) auto!important;width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;
 max-width:none!important;max-height:none!important;box-sizing:border-box!important;margin:0!important;padding:5px!important;transform:none!important;translate:none!important;
 border-radius:16px!important;overflow:hidden!important;clip-path:inset(0 round 16px);box-shadow:none!important;
}
body.memory-clean-active.rrdd-adventure:is(:has(#memoryScreen#memoryScreen),:has(#memory#memory),:has(#recall#recall)) .memory-clean-photo .memory-clean-crop{position:relative!important;display:block!important;flex:1 1 0!important;min-height:0!important;width:100%!important;container-type:size;pointer-events:none}
body.memory-clean-active.rrdd-adventure:is(:has(#memoryScreen#memoryScreen),:has(#memory#memory),:has(#recall#recall)) .memory-clean-photo .memory-clean-crop img{
 display:block!important;position:absolute!important;inset:auto!important;left:50%!important;top:50%!important;transform:translate(-50%,-50%)!important;
 width:min(100cqw,calc(100cqh * var(--mc-photo-ratio,1.777778)))!important;height:min(100cqh,calc(100cqw / var(--mc-photo-ratio,1.777778)))!important;
 max-width:none!important;max-height:none!important;min-height:0!important;aspect-ratio:auto!important;object-fit:contain!important;object-position:center!important;
 border-radius:9px!important;clip-path:inset(0 round 9px);padding:0!important;margin:0!important;border:0!important;pointer-events:none;
}
body.memory-clean-active.rrdd-adventure:is(:has(#memoryScreen#memoryScreen),:has(#memory#memory),:has(#recall#recall)) .memory-clean-photo>span{display:block!important;flex:none!important;width:100%!important;min-height:0!important;font-size:clamp(12px,1.7vw,20px)!important;line-height:1.15!important;text-align:center!important;padding:0!important}
body.memory-clean-active.rrdd-adventure:is(:has(#memoryScreen#memoryScreen),:has(#memory#memory),:has(#recall#recall)) .moon-memory-photo-crop{display:contents!important}
@media(max-width:700px){body.memory-clean-active.rrdd-adventure:is(:has(#memoryScreen#memoryScreen),:has(#memory#memory),:has(#recall#recall)) .memory-clean-screen .memory-clean-board,body.memory-clean-active.rrdd-adventure:is(:has(#memoryScreen#memoryScreen),:has(#memory#memory),:has(#recall#recall)) .memory-clean-screen.memory-clean-board{grid-template-rows:minmax(0,1fr) 104px!important;gap:6px!important;padding:3px!important}body.memory-clean-active.rrdd-adventure:is(:has(#memoryScreen#memoryScreen),:has(#memory#memory),:has(#recall#recall)) .memory-clean-screen .memory-clean-tray{gap:5px!important}body.memory-clean-active.rrdd-adventure:is(:has(#memoryScreen#memoryScreen),:has(#memory#memory),:has(#recall#recall)) .memory-clean-screen .memory-clean-tray .memory-clean-photo{padding:4px!important;border-width:2px!important}body.memory-clean-active.rrdd-adventure:is(:has(#memoryScreen#memoryScreen),:has(#memory#memory),:has(#recall#recall)) .memory-clean-photo>span{font-size:12px!important}}
@media(orientation:landscape) and (max-height:500px){body.memory-clean-active.rrdd-adventure:is(:has(#memoryScreen#memoryScreen),:has(#memory#memory),:has(#recall#recall)) .memory-clean-screen .memory-clean-board,body.memory-clean-active.rrdd-adventure:is(:has(#memoryScreen#memoryScreen),:has(#memory#memory),:has(#recall#recall)) .memory-clean-screen.memory-clean-board{grid-template-rows:minmax(0,1fr) 78px!important;gap:4px!important}body.memory-clean-active.rrdd-adventure:is(:has(#memoryScreen#memoryScreen),:has(#memory#memory),:has(#recall#recall)) .memory-clean-photo>span{font-size:11px!important}}

body.memory-clean-active.rrdd-adventure:has(#memory#memory) #memory#memory.memory-clean-screen.memory-clean-board{display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr) clamp(100px,19dvh,200px)!important}
body.memory-clean-active.rrdd-adventure .practice-nav{padding:2px 8px!important;gap:5px!important;min-height:36px!important;flex-wrap:nowrap!important;font-size:12px!important}
body.memory-clean-active.rrdd-adventure .practice-nav a,body.memory-clean-active.rrdd-adventure .practice-nav button{padding:6px 8px!important;min-height:32px!important;white-space:nowrap!important}
body.memory-clean-active.rrdd-adventure #audioRecovery{position:relative!important;inset:auto!important;transform:none!important;max-width:850px!important;width:calc(100% - 16px)!important;box-sizing:border-box!important;margin:4px auto!important;padding:6px 10px!important;box-shadow:none!important;z-index:1!important;display:flex!important;align-items:center!important;justify-content:center!important;flex-wrap:wrap!important;gap:4px!important}
body.memory-clean-active.rrdd-adventure #audioRecovery[hidden]{display:none!important}
body.memory-clean-active.rrdd-adventure #audioRecovery p{flex:1 1 200px!important;font-size:13px!important;margin:0!important}
body.memory-clean-active.rrdd-adventure #audioRecovery button{flex:none!important;width:auto!important;font-size:13px!important;margin:0!important;min-height:40px!important;padding:6px 10px!important}
body.memory-clean-active.rrdd-adventure>footer{display:none!important}
@media(max-width:700px){body.memory-clean-active.rrdd-adventure:has(#memory#memory) #memory#memory.memory-clean-screen.memory-clean-board{grid-template-rows:minmax(0,1fr) 104px!important}}
@media(orientation:landscape) and (max-height:500px){body.memory-clean-active.rrdd-adventure:has(#memory#memory) #memory#memory.memory-clean-screen.memory-clean-board{grid-template-rows:minmax(0,1fr) 78px!important}}

/* Once a photo is selected, a tap on the frame places it instead of replaying
   the overlaid clue button. Drag targets and clue replay before selection stay intact. */
body.memory-clean-active .memory-clean-selected .memory-clean-frame :is(.moon-memory-question,.thread-memory-question,.memory-frame-question,.chimelong-frame-question,.frame-question),
body.memory-clean-active .memory-clean-selected .memory-clean-frame :is(.moon-memory-question,.thread-memory-question,.memory-frame-question,.chimelong-frame-question,.frame-question) *{pointer-events:none!important}
