.hand-tools{position:absolute;z-index:7;right:108px;bottom:88px;display:flex;flex-direction:column;align-items:stretch;gap:5px;width:76px;padding:6px;border-radius:12px;background:#032c25ed;border:1px solid #aa915766}
.hand-tools[hidden]{display:none}.hand-tools-caption{text-align:center;font-size:11px;line-height:16px;color:#e4d6ab}.hand-tools button{width:100%;height:30px;padding:2px 6px;border-radius:8px;border:1px solid #c4a55e;background:#ffefcc;color:#172c28;font-size:20px;cursor:pointer}.hand-tools button.red{color:#bd332f}.hand-tools button:disabled{color:#a3a6a5;background:#3e514b;border-color:#5a6861;cursor:default;opacity:.65}.hand-tools button[aria-pressed=true]{background:#ffd56b;box-shadow:0 0 0 2px #fff1aa}.hand-tools #lockHandBtn,.hand-tools #unlockHandBtn{height:34px;font-size:11px;line-height:13px}
#hand .locked-card{border-color:#bd841b;box-shadow:inset 0 0 0 2px #d5a13e,1px 3px 5px #0008}#hand .locked-card.selected{box-shadow:inset 0 0 0 2px #d5a13e,0 0 0 3px #61dfff}.hand.stacked-cards .card-group{position:relative}.hand.stacked-cards .card-group[data-label]:after{content:attr(data-label);position:absolute;z-index:3;right:5px;bottom:6px;left:5px;overflow:hidden;padding:2px 3px;border:1px solid #d2a54a;border-radius:6px;background:#fff0b8e8;color:#68430e;font-size:10px;font-weight:700;line-height:13px;text-align:center;text-overflow:ellipsis;white-space:nowrap;pointer-events:none}
@media(max-width:900px){.hand-tools{right:92px}}
@media(max-height:500px){.hand-tools{right:calc(51px + env(safe-area-inset-right,0px));bottom:calc(12px + env(safe-area-inset-bottom,0px));width:58px;height:132px;padding:3px;gap:2px;border-radius:9px}.hand-tools-caption{flex:0 0 12px;overflow:hidden;font-size:9px;line-height:12px}.hand-tools button{flex:0 0 16px;height:16px;min-height:0;padding:0 3px;border-radius:5px;font-size:14px;line-height:14px}.hand-tools #lockHandBtn,.hand-tools #unlockHandBtn{flex-basis:19px;height:19px;font-size:8px;line-height:9px}.hand.stacked-cards .card-group[data-label]:after{right:4px;bottom:4px;left:4px;padding:1px 2px;border-radius:4px;font-size:8px;line-height:10px}}

/* The menu gives touch targets room without raising the player's hand. */
.hand-tools #handMoreBtn{height:26px;min-height:26px;padding:2px;font-size:10px;line-height:14px;background:#294c3d;color:#f6e3b5;border-color:#829775}
#handToolMenu{display:contents}.hand-sort-picker,#handPlanSummary{display:none}
.hand-tools.menu-open #handToolMenu{position:absolute;right:calc(100% + 8px);bottom:0;display:grid;gap:8px;width:190px;padding:12px;background:#f4f4e8;border:1px solid #9faa88;border-radius:10px;color:#1d3b2e;box-shadow:0 8px 28px #0006}
.hand-tools.menu-open .hand-sort-picker{display:grid;gap:6px;font-size:12px}.hand-tools.menu-open .hint-all-picker{display:flex;align-items:center}.hand-tools.menu-open #handPlanSummary{display:block;margin:0;font-size:12px}.hand-tools select{width:100%;min-height:34px;background:white;color:#1d3b2e}.hand-tools.menu-open #handToolMenu button{min-height:34px;height:34px;font-size:12px}.hand-tools input[type=checkbox]{width:18px;height:18px}
#hintExplanation{position:absolute;bottom:100%;left:50%;transform:translateX(-50%);width:max-content;max-width:min(480px,70vw);font-size:12px;line-height:1.5;padding:6px 10px;margin:0 0 7px;border-radius:7px;background:#123c30ed;color:#f3e8c2;text-align:center;pointer-events:none}
@media(max-height:500px){.hand-tools{height:132px;box-sizing:border-box;gap:2px;padding:3px}.hand-tools #handMoreBtn{flex:0 0 20px;height:20px;min-height:20px;font-size:9px}.hand-tools [data-flush]{flex:0 0 24px;height:24px;min-height:24px;font-size:18px;line-height:22px}.hand-tools #handToolMenu{display:none}.hand-tools.menu-open #handToolMenu{display:grid}.hand-tools.menu-open #handToolMenu button{flex:initial;height:34px;min-height:34px}.hand-tools.menu-open #handToolMenu{max-height:calc(100dvh - 24px);overflow:auto}#hintExplanation{font-size:11px;max-width:60vw;padding:3px 6px}}
