/* 重抽 button: above the right end of the card row. Grey once used (ready again next round). */
#game #builder .pantry #reroll{position:absolute;right:0;bottom:calc(100% + 10px);z-index:5;display:flex;align-items:center;gap:8px;min-height:50px;min-width:124px;padding:4px 16px 4px 12px;font-size:17px;font-weight:900;color:#6d3d3c;white-space:nowrap;pointer-events:auto;animation:rerollIn .3s cubic-bezier(.2,1.5,.5,1)}
#game #builder .pantry #reroll.used{filter:grayscale(1) brightness(1.05) opacity(.62);cursor:default;transform:none;color:#6a6a6a}
#game #builder .pantry #reroll:disabled:hover{transform:none}
.rerollIcon{position:relative;display:inline-block;width:20px;height:20px;flex:none;border:3.5px solid #d4587e;border-right-color:transparent;border-radius:50%;box-sizing:border-box}
.rerollIcon::after{content:"";position:absolute;right:-6px;top:-3px;border:5px solid transparent;border-left:7px solid #d4587e;transform:rotate(40deg)}
#reroll.spin .rerollIcon{animation:rerollSpin .55s cubic-bezier(.3,1.4,.5,1)}
.rerollBadge{display:grid;place-items:center;min-width:22px;height:22px;padding:0 5px;border-radius:11px;background:#e0557f;color:#fff;font-size:13px;line-height:1;text-shadow:none;box-shadow:0 2px 0 #9a3a5a55;box-sizing:border-box}
#reroll.used .rerollBadge{background:#9a9a9a}
@keyframes rerollSpin{from{transform:rotate(0)}to{transform:rotate(360deg)}}
@keyframes rerollIn{from{opacity:0;transform:translateY(10px) scale(.8)}to{opacity:1;transform:none}}

/* An 18-food car (round 3): smaller cells, wrapping if a screen is still too narrow,
   so the row stays clear of the 重抽 button at its right. */
.progCells.many{gap:3px;flex-wrap:wrap;max-width:100%}
.progCells.many .progCell{width:28px;height:28px}
.progCells.many .progCell.carried{width:22px;height:22px}
/* The showcase's row needs no caption (the status line sits right above it); with many combos the chips take two lines. */
#game #builder.showcase #socketBar .slot-caption{display:none}

/* The won round's stars: drawn shapes (no glyphs), popping in one after another; the middle one is bigger. */
#game #roundStars{display:flex;justify-content:center;align-items:flex-end;gap:10px;font-size:0;letter-spacing:0;min-height:62px}
.roundStar{position:relative;width:52px;height:52px;flex:none;animation:starPop .5s cubic-bezier(.2,1.7,.45,1) both}
.roundStar:nth-child(2){width:64px;height:64px;margin-bottom:8px}
.roundStar::before,.roundStar::after{content:"";position:absolute;clip-path:polygon(50% 0%,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%)}
.roundStar::before{inset:0;background:#b9b19c}
.roundStar::after{inset:6px;background:#ece5d2}
.roundStar.on::before{background:#c9761c}
.roundStar.on::after{background:linear-gradient(170deg,#fff3a8 0%,#ffd04d 45%,#f5a623 100%)}
.roundStar:not(.on){animation-name:starDim}
.round-card.enter{animation:pop .3s cubic-bezier(.2,1.5,.5,1)}
#roundDetail{display:flex;flex-direction:column;gap:6px;align-items:center}
#roundDetail .starGap{font-size:14px;font-weight:800;color:#5c7a70;padding:3px 12px;border-radius:12px;background:#ffffffa0;line-height:1.3}
#roundDetail .starGrade{font-size:20px;font-weight:900;color:#b0563c;text-shadow:0 2px #fff}
@keyframes starPop{0%{opacity:0;transform:scale(0) rotate(-40deg)}60%{opacity:1;transform:scale(1.3) rotate(8deg)}100%{opacity:1;transform:scale(1) rotate(0)}}
@keyframes starDim{0%{opacity:0;transform:scale(.4)}100%{opacity:1;transform:scale(1)}}

@media(max-height:540px){
#game #builder .pantry #reroll{min-height:44px;min-width:96px;font-size:14px;padding:2px 10px 2px 8px;gap:5px;border-image-width:13px;bottom:calc(100% + 6px)}
.rerollIcon{width:16px;height:16px;border-width:3px}
.rerollIcon::after{right:-5px;top:-3px;border-width:4px;border-left-width:6px}
.rerollBadge{min-width:18px;height:18px;font-size:11px}
.progCells.many{gap:2px}
.progCells.many .progCell{width:19px;height:19px}
.progCells.many .progCell.carried{width:16px;height:16px}
#game #builder.showcase .progCells.many .progCell{width:19px;height:19px}
#game #builder.showcase .progCells.many .progCell.carried{width:18px;height:18px}
#game #roundStars{min-height:46px;gap:8px}
.roundStar{width:38px;height:38px}
.roundStar:nth-child(2){width:46px;height:46px;margin-bottom:6px}
.roundStar::after{inset:4px}
#roundDetail{gap:4px}
#roundDetail .starGap{font-size:12px;padding:2px 8px}
#roundDetail .starGrade{font-size:16px}
/* The showcase's redo button stays a full 44 px tap target. */
#game #builder #completionSummary #redraft{min-height:44px}
}
