/* Preserve the card artwork and controls while keeping the complete dialog inside the viewport. */
#handCardDialog{box-sizing:border-box;width:min(420px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);padding:14px;overflow:auto;overscroll-behavior:contain;scroll-padding:12px}
#handCardDialog header{margin-bottom:10px;min-height:38px;box-sizing:border-box}
#handCardContent{min-width:0;padding:0 4px 8px;box-sizing:border-box}
#handCardDialog #handCardContent .carditem{box-sizing:border-box;width:100%;min-height:0;overflow:visible;gap:10px;padding:0 4px 6px}
#handCardDialog #handCardContent .card-art{flex:0 0 auto;height:clamp(90px,calc(100vh - 300px),260px);height:clamp(90px,calc(100dvh - 300px),260px);min-height:0}
#handCardDialog #handCardContent .card-art img{object-fit:contain}
#handCardDialog #handCardContent .card-copy{width:100%;box-sizing:border-box;padding:0 2px}
#handCardDialog #handCardContent .card-description{font-size:14px;line-height:1.45;overflow-wrap:anywhere}
#handCardDialog #handCardContent .card-actions{box-sizing:border-box;flex-shrink:0;gap:10px;padding:4px 6px 8px}
#handCardDialog #handCardContent .card-actions>button{box-sizing:border-box;min-height:44px;max-width:100%}
@media(max-height:450px){#handCardDialog{padding:10px}#handCardDialog #handCardContent .carditem{gap:7px}#handCardDialog #handCardContent .card-description{font-size:13px}}
