#game-dialog.has-replay .game-overlay{display:flex;flex-direction:column;justify-content:safe center;gap:0;overflow:auto}
#game-dialog.has-replay .game-overlay>*{flex-shrink:0}
#game-dialog.has-replay[data-phase=intro] .overlay-icon,#game-dialog.has-replay[data-phase=intro] .game-overlay>.eyebrow{display:none}
#game-dialog.has-replay .game-overlay h3{font-size:clamp(27px,4vw,36px);margin-bottom:10px}
#game-dialog.has-replay .game-overlay>p:not(.eyebrow){font-size:1rem;line-height:1.5;max-width:560px}
#game-dialog.has-replay .mode-choices{margin-top:14px}
#replay-setup{width:min(620px,100%);margin:16px 0 0}
.replay-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.replay-choices>button{min-height:70px;display:flex;flex-direction:column;justify-content:center;gap:5px;text-align:left;padding:13px 15px;border-radius:12px;border:1px solid #485884;background:#191e2d;color:#e9edf8;transition:background .15s,border-color .15s}
.replay-choices>button:hover{background:#262e45;border-color:#9badde}.replay-choices>button[aria-pressed=true]{border-color:#a3b4e0;background:#a3b4e010;box-shadow:inset 3px 0 #a3b4e0}
.replay-choices strong{font-size:.9375rem;line-height:1.35}.replay-choices span{font-size:.8125rem;color:#a0b1e0;line-height:1.4}
.replay-explainer{font-size:.875rem;line-height:1.55;color:#c0cbea;margin:12px 0 0;min-height:2.8em}
.replay-series{display:flex;align-items:center;justify-content:center;gap:10px;min-height:48px;font-size:.875rem;color:#d5dcf1}.replay-series input{width:20px;height:20px;accent-color:#a3b4e0;flex-shrink:0}
#replay-result{width:min(540px,100%);margin:16px 0}
.replay-goals{display:flex;gap:8px}.replay-goals>span{display:flex;align-items:center;justify-content:center;flex:1;min-width:0;min-height:48px;padding:9px 6px;border:1px solid #435179;border-radius:10px;background:#1a1f2e;color:#91a4da;font-size:.875rem;line-height:1.4}
.replay-goals>span.is-earned{color:#a3b4e0;background:#a3b4e010;border-color:#a3b4e070}
#replay-result>p{font-size:.875rem;line-height:1.5;color:#c2cceb;margin:10px 0 0}#replay-result>.replay-next{color:#a3b4e0}
#replay-fresh{margin-top:10px;padding:12px 19px;min-height:48px;font-size:.9375rem}#replay-change{margin-top:6px;min-height:44px}#game-dialog.has-replay[data-phase=result] #back-to-catalog{margin-top:0}
.replay-select{width:100%;min-height:48px;padding:10px 12px;border:1px solid #596ca1;background:#1d2334;color:#eef1fa;border-radius:9px;font:inherit;font-size:.9375rem;color-scheme:dark}
.replay-select:focus-visible,.replay-series input:focus-visible{outline:3px solid #a3b4e0;outline-offset:3px}
.memory-host-label{display:block;margin:12px auto;max-width:320px;color:#aebce4;font-size:.875rem;line-height:1.5}
#game-dialog .memory-board[data-pairs='6'],#game-dialog .online-memory-board[data-pairs='6']{grid-template-columns:repeat(4,1fr);grid-template-rows:repeat(3,minmax(0,1fr))}
#game-dialog .memory-board[data-pairs='10'],#game-dialog .online-memory-board[data-pairs='10']{grid-template-columns:repeat(4,1fr);grid-template-rows:repeat(5,minmax(0,1fr))}
.mine-hint{min-height:48px;padding:10px 14px;background:#2d3753;border:1px solid #7f8eb8;color:#e7ebf7;border-radius:9px;font:inherit;font-size:.875rem}
.mines-options .mine-explanation{max-width:230px;font-size:.8125rem;line-height:1.4;max-height:100px;overflow:auto}.fugaz-arena-name{color:#a3b4e0!important;font-weight:700;margin:16px 0!important}#fugaz-host-label{display:block;font-size:.875rem;line-height:1.6;margin-top:12px;max-width:360px}
#fugaz-next-arena{font-size:.875rem;line-height:1.5;color:#aebce4}
@media(max-width:600px){
 #game-dialog.has-replay .game-overlay{padding:20px 16px}#game-dialog.has-replay .game-overlay>p:not(.eyebrow){font-size:.9375rem}.replay-choices>button{padding:11px;min-height:77px}.replay-choices strong{font-size:.875rem}
 .replay-goals{gap:5px}.replay-goals>span{font-size:.8125rem}.replay-explainer{min-height:0}.replay-series{align-items:flex-start;text-align:left;margin-top:12px;line-height:1.5}
 .mines-options .mine-explanation{max-width:100%;max-height:45px;font-size:.75rem}
}
@media(max-height:500px) and (orientation:landscape){
 #game-dialog.has-replay .game-overlay{justify-content:flex-start;padding:14px 22px}.replay-choices{grid-template-columns:repeat(2,minmax(0,1fr))}.replay-choices>button{min-height:60px}
 #game-dialog .memory-board[data-pairs='10'],#game-dialog .online-memory-board[data-pairs='10']{grid-template-columns:repeat(5,1fr);grid-template-rows:repeat(4,minmax(0,1fr))}
 .mines-options .mine-explanation{max-height:60px}
}
@media(prefers-reduced-motion:reduce){.replay-choices>button{transition:none}}
.board-wide .mines-options{max-height:100%;overflow:auto;align-self:stretch;justify-content:safe center}.board-wide .mines-options>button{flex-shrink:0}
