/* ══════════════════════════════════════════════════════════════════════════
   OVERLAYS — Win, Blitz, Achievement, Timeout, Daily, Modal Buttons
   Layer: OverlayModal
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Win overlay ────────────────────────────────────── */
.overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(60,40,25,.80);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    z-index: 9300;
    opacity: 0;
    pointer-events: none;
    transition: opacity .45s cubic-bezier(.4,0,.2,1), transform .45s cubic-bezier(.22,.61,.36,1);
    transform: scale(0.95) translateY(8px);
}
.overlay.show { opacity: 1; pointer-events: all; transform: scale(1) translateY(0); }

.win-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .7rem;
    padding: 2.2rem 3rem;
    background: linear-gradient(145deg, rgba(85,55,32,.94), rgba(60,38,22,.94));
    border: 1px solid rgba(255,215,0,.12);
    border-radius: 24px;
    text-align: center;
    box-shadow: 0 40px 80px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,240,220,.08);
}

.win-icon  { font-size: 3.2rem; line-height: 1; }

/* Win stars stagger */
.win-star {
    display: inline-block;
    transform: scale(0);
    animation: none;
}
.overlay.show .win-star:nth-child(1) { animation: starPop .55s .1s cubic-bezier(.2,.9,.3,1) forwards; }
.overlay.show .win-star:nth-child(2) { animation: starPop .55s .25s cubic-bezier(.2,.9,.3,1) forwards; }
.overlay.show .win-star:nth-child(3) { animation: starPop .55s .4s cubic-bezier(.2,.9,.3,1) forwards; }

@keyframes starPop {
    0%   { transform: scale(0) rotate(-20deg); filter: drop-shadow(0 0 0 rgba(255,200,0,0)); }
    50%  { transform: scale(1.3) rotate(5deg);  filter: drop-shadow(0 0 12px rgba(255,200,0,.6)); }
    75%  { transform: scale(0.92) rotate(-2deg); filter: drop-shadow(0 0 6px rgba(255,200,0,.3)); }
    100% { transform: scale(1) rotate(0);        filter: drop-shadow(0 0 8px rgba(255,200,0,.4)); }
}

/* Reduced motion: simple crossfade only */
@media (prefers-reduced-motion: reduce) {
    .overlay, .level-select, .blitz-overlay, .sheet-panel {
        transition: opacity .2s ease !important;
        transform: none !important;
    }
    .overlay.show, .blitz-overlay.show {
        transform: none !important;
    }
    .sheet-panel:not(.hidden) {
        transform: none !important;
    }
    .win-star { animation: none !important; transform: scale(1) !important; }
    .win-title { animation: none !important; }
}

.win-title {
    font-family: 'Fredoka', sans-serif;
    font-size: 3rem;
    background: linear-gradient(180deg, #FFD700, #d4873f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 20px rgba(255,200,0,.3));
    animation: winTitleEntrance .6s cubic-bezier(.2,.9,.3,1) forwards;
}
@keyframes winTitleEntrance {
    0%   { transform: scale(0.7); opacity: 0; filter: drop-shadow(0 0 0 rgba(255,200,0,0)); }
    60%  { transform: scale(1.06); opacity: 1; filter: drop-shadow(0 0 28px rgba(255,200,0,.5)); }
    100% { transform: scale(1);    opacity: 1; filter: drop-shadow(0 0 20px rgba(255,200,0,.3)); }
}

.win-sub {
    font-size: .78rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--muted);
}
.win-sub b { color: var(--gold); font-weight: 500; }

/* Restzüge-HUD (Zug-Limit) */
.moves-left.hidden { display: none; }
.moves-left .moves-n { color: var(--gold); }
.moves-left--warn .moves-n { color: #E8897A; animation: movesPulse .6s ease-in-out infinite alternate; }
@keyframes movesPulse { from { transform: scale(1); } to { transform: scale(1.15); } }

.win-stars {
    font-size: 1.6rem;
    letter-spacing: .1em;
    line-height: 1;
}

.win-par {
    font-size: .68rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: -.2rem;
}

.win-actions {
    display: flex;
    gap: .75rem;
    margin-top: .4rem;
}

.win-btn {
    font-family: 'Fredoka', sans-serif;
    font-size: .85rem;
    font-weight: 700;
    letter-spacing: .15em;
    text-transform: uppercase;
    padding: .7rem 2rem;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FF8C00 100%);
    border: none;
    border-radius: 100px;
    color: #4a2000;
    cursor: pointer;
    box-shadow: 0 4px 0 #B8860B, 0 6px 15px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.3);
    transition: transform .1s, box-shadow .1s;
}
.win-btn:hover { transform: translateY(-1px); box-shadow: 0 5px 0 #B8860B, 0 8px 20px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.3); }
.win-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #B8860B, 0 3px 8px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.3); }
.win-btn--secondary {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,215,0,.18);
    color: rgba(255,255,255,.65);
    box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.win-btn--secondary:hover {
    background: rgba(255,255,255,.12);
    border-color: rgba(255,215,0,.35);
    transform: none;
}
.win-btn--secondary:active { transform: scale(.97); box-shadow: none; }

/* ── Win Achievement Progress ─────────────────────────────── */
.win-ach-progress {
    border-top: 1px solid rgba(255,255,255,.08);
    padding-top: .7rem;
    margin-top: .5rem;
    margin-bottom: .3rem;
}
.win-ach-progress:empty { display: none; }
.win-ach-row {
    display: flex; align-items: center; gap: .5rem;
    margin-bottom: .5rem;
}
.win-ach-row:last-child { margin-bottom: 0; }
.win-ach-icon { font-size: 1.1rem; width: 1.5rem; text-align: center; }
.win-ach-info { flex: 1; text-align: left; }
.win-ach-header {
    display: flex; justify-content: space-between;
    margin-bottom: .15rem;
}
.win-ach-name { font-size: .65rem; color: rgba(255,255,255,.5); }
.win-ach-count { font-size: .65rem; color: rgba(255,215,0,.7); font-weight: 600; }
.win-ach-bar {
    height: 4px;
    background: rgba(255,255,255,.08);
    border-radius: 2px;
    overflow: hidden;
}
.win-ach-fill {
    height: 100%;
    background: linear-gradient(90deg, #FFD700, #FFA500);
    border-radius: 2px;
    width: 0;
    transition: width .8s ease;
}
.win-ach-fill.changed {
    animation: achBarPulse 1s ease .8s;
}
@keyframes achBarPulse {
    0%, 100% { filter: brightness(1); }
    50%      { filter: brightness(1.5); }
}

/* ── Blitzrunde overlay ─────────────────────────────────── */
.blitz-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(50,30,18,.90);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    z-index: 9200;
    opacity: 0;
    pointer-events: none;
    transition: opacity .35s ease, transform .35s cubic-bezier(.2,.9,.3,1);
    transform: scale(0.85);
}
.blitz-overlay.show { opacity: 1; pointer-events: all; transform: scale(1); }

.blitz-inner {
    text-align: center;
    padding: 2.5rem 3rem;
    border-radius: 24px;
    border: 1px solid rgba(255,215,0,.12);
    background: linear-gradient(145deg, rgba(78,48,28,.92), rgba(55,32,18,.92));
    box-shadow: inset 0 1px 0 rgba(255,240,220,.08);
    animation: blitz-glow-pulse 1.5s ease-in-out infinite alternate;
}
@keyframes blitz-glow-pulse {
    from { box-shadow: 0 0 40px 0 var(--blitz-color, #7c4dff), inset 0 1px 0 rgba(255,240,220,.08); }
    to   { box-shadow: 0 0 90px 20px var(--blitz-color, #7c4dff), inset 0 1px 0 rgba(255,240,220,.08); }
}

.blitz-title {
    font-family: 'Fredoka', sans-serif;
    font-size: 2rem;
    margin: 0 0 .6rem;
    background: linear-gradient(180deg, #FFD700, #d4873f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: blitz-flicker .4s ease-out;
}
@keyframes blitz-flicker {
    0%,100%{ opacity:1 } 10%,70%{ opacity:.15 } 20%,80%{ opacity:1 }
}
.blitz-level {
    font-family: var(--f-mono);
    font-size: .85rem;
    color: rgba(255,255,255,.55);
    margin: 0 0 .4rem;
    letter-spacing: 2px;
}
.blitz-time {
    font-size: 1.1rem;
    color: rgba(255,255,255,.85);
    margin: 0 0 .3rem;
}
.blitz-sub {
    font-size: .85rem;
    color: rgba(255,255,255,.40);
    margin: 0 0 1.6rem;
    font-style: italic;
}
.blitz-desc {
    font-size: .95rem;
    color: rgba(255,255,255,.85);
    margin: 0 0 1.2rem;
    line-height: 1.4;
}
.blitz-btn {
    font-family: 'Fredoka', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: #4a2000;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FF8C00 100%);
    border: none;
    border-radius: 100px;
    padding: .75rem 2.2rem;
    cursor: pointer;
    box-shadow: 0 4px 0 #B8860B, 0 6px 15px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.3);
    transition: transform .1s, box-shadow .1s;
}
.blitz-btn:hover  { transform: translateY(-1px); box-shadow: 0 5px 0 #B8860B, 0 8px 20px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.3); }
.blitz-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #B8860B, 0 3px 8px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.3); }

/* ── Tetris Tutorial Visualization ────────────────────────── */
.tetris-tut {
    position: relative;
    width: 180px; height: 110px;
    margin: .8rem auto 1rem;
}

/* Three small tubes at the bottom */
.tetris-tut-tubes {
    position: absolute; bottom: 0; left: 50%;
    transform: translateX(-50%);
    display: flex; gap: 12px;
}
.tetris-tut-tube {
    width: 36px; height: 44px;
    border: 2.5px solid rgba(255,255,255,.35);
    border-top: none;
    border-radius: 0 0 10px 10px;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,.06));
    position: relative;
}
.tetris-tut-tube::after {
    content: ''; position: absolute; bottom: 4px; left: 50%;
    transform: translateX(-50%);
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--tube-clr);
    opacity: .55;
}

/* Animated yarn ball swinging left-right */
.tetris-tut-ball {
    position: absolute; top: 4px; left: 50%;
    font-size: 1.5rem; line-height: 1;
    transform: translateX(-50%);
    animation: tetrisTutSwing 2.4s ease-in-out infinite;
}
@keyframes tetrisTutSwing {
    0%, 100% { transform: translateX(-50%); }
    30%      { transform: translateX(-140%); }
    70%      { transform: translateX(40%); }
}

/* Animated hand/finger following the ball */
.tetris-tut-hand {
    position: absolute; top: 32px; left: 50%;
    font-size: 1.3rem; line-height: 1;
    transform: translateX(-50%);
    animation: tetrisTutHand 2.4s ease-in-out infinite;
    opacity: .85;
}
@keyframes tetrisTutHand {
    0%, 100% { transform: translateX(-50%); }
    30%      { transform: translateX(-140%); }
    70%      { transform: translateX(40%); }
}

/* Left/right arrow hints */
.tetris-tut-arrows {
    position: absolute; top: 8px; left: 0; right: 0;
    display: flex; justify-content: space-between;
    pointer-events: none;
}
.tetris-tut-arrow {
    font-size: 1.6rem; font-weight: 700;
    color: rgba(255,255,255,.3);
    animation: tetrisTutArrow 2.4s ease-in-out infinite;
}
.tetris-tut-arrow--l { animation-name: tetrisTutArrowL; }
.tetris-tut-arrow--r { animation-name: tetrisTutArrowR; }
@keyframes tetrisTutArrowL {
    0%, 50%, 100% { opacity: .2; transform: translateX(0); }
    25%           { opacity: .7; transform: translateX(-4px); }
}
@keyframes tetrisTutArrowR {
    0%, 50%, 100% { opacity: .2; transform: translateX(0); }
    75%           { opacity: .7; transform: translateX(4px); }
}

/* ── Dog (Strolch) Tutorial Visualization ─────────────────── */
.dog-tut {
    position: relative;
    width: 200px; height: 120px;
    margin: .8rem auto 1rem;
}

/* Three tubes */
.dog-tut-tubes {
    position: absolute; bottom: 0; left: 50%;
    transform: translateX(-50%);
    display: flex; gap: 14px;
}
.dog-tut-tube {
    width: 40px; height: 54px;
    border: 2.5px solid rgba(255,255,255,.35);
    border-top: none;
    border-radius: 0 0 10px 10px;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,.06));
    display: flex; flex-direction: column; justify-content: flex-end;
    align-items: center; gap: 3px; padding-bottom: 4px;
}
.dog-tut-ball {
    width: 14px; height: 14px; border-radius: 50%;
    opacity: .8;
}

/* The ball being stolen — flies up and to the right toward the dog */
.dog-tut-ball--stolen {
    animation: dogStealBall 2.8s ease-in-out infinite;
}
@keyframes dogStealBall {
    0%, 30%  { transform: translate(0, 0); opacity: .8; }
    55%      { transform: translate(52px, -60px); opacity: .9; }
    70%      { transform: translate(52px, -60px); opacity: 0; }
    71%, 100%{ transform: translate(0, 0); opacity: 0; }
    95%      { opacity: 0; }
    100%     { opacity: .8; }
}

/* Top ball drops down when stolen ball is removed */
.dog-tut-ball--top {
    animation: dogBallDrop 2.8s ease-in-out infinite;
}
@keyframes dogBallDrop {
    0%, 55%  { transform: translateY(0); }
    70%      { transform: translateY(4px); }
    100%     { transform: translateY(0); }
}

/* Animated dog running in, grabbing, running out */
.dog-tut-dog {
    position: absolute; bottom: 8px; right: -10px;
    font-size: 2rem; line-height: 1;
    animation: dogRun 2.8s ease-in-out infinite;
}
@keyframes dogRun {
    0%       { transform: translateX(40px) scaleX(-1); opacity: 0; }
    20%      { transform: translateX(0) scaleX(-1); opacity: 1; }
    45%      { transform: translateX(-5px) scaleX(-1) rotate(-8deg); opacity: 1; }
    60%      { transform: translateX(-5px) scaleX(-1) rotate(0deg); opacity: 1; }
    80%      { transform: translateX(50px) scaleX(-1); opacity: .8; }
    100%     { transform: translateX(50px) scaleX(-1); opacity: 0; }
}

/* ── Mouse Hunt Tutorial Visualization ────────────────────── */
.mouse-tut {
    position: relative;
    width: 200px; height: 100px;
    margin: .8rem auto 1rem;
}
.mouse-tut-holes {
    position: absolute; bottom: 0; left: 50%;
    transform: translateX(-50%);
    display: grid; grid-template-columns: repeat(3, 50px);
    gap: 8px;
}
.mouse-tut-hole {
    width: 50px; height: 28px;
    background: radial-gradient(ellipse, #1a0e08 50%, #3a2518);
    border-radius: 50%;
    border: 2px solid rgba(120,80,50,.4);
    position: relative; overflow: visible;
}
.mouse-tut-mouse {
    position: absolute; bottom: 4px; left: 50%;
    transform: translateX(-50%);
    font-size: 20px; line-height: 1;
    animation: mousePopUp 2.5s ease-in-out infinite;
}
.mouse-tut-mouse--gold {
    filter: saturate(2) brightness(1.3);
    animation: mousePopUp 2.5s ease-in-out 0.8s infinite;
}
.mouse-tut-hedgehog {
    position: absolute; bottom: 4px; left: 50%;
    transform: translateX(-50%);
    font-size: 20px; line-height: 1;
    animation: mousePopUp 3s ease-in-out 1.5s infinite;
}
@keyframes mousePopUp {
    0%, 20%  { transform: translateX(-50%) translateY(20px); opacity: 0; }
    30%      { transform: translateX(-50%) translateY(0); opacity: 1; }
    70%      { transform: translateX(-50%) translateY(0); opacity: 1; }
    85%, 100%{ transform: translateX(-50%) translateY(20px); opacity: 0; }
}
.mouse-tut-paw {
    position: absolute; top: 0; right: 30px;
    font-size: 1.5rem;
    animation: mousePawSwipe 2.5s ease-in-out infinite;
    pointer-events: none;
}
@keyframes mousePawSwipe {
    0%, 25%  { transform: translateY(-10px) rotate(-20deg); opacity: 0; }
    35%      { transform: translateY(0) rotate(0deg); opacity: 1; }
    50%      { transform: translateY(15px) rotate(10deg); opacity: 1; }
    60%      { transform: translateY(15px) rotate(10deg); opacity: 0; }
    100%     { opacity: 0; }
}

/* ── Joker Ball Tutorial Visualization ────────────────────── */
.joker-tut {
    position: relative;
    width: 200px; height: 130px;
    margin: .8rem auto 1rem;
}
.joker-tut-tubes {
    position: absolute; bottom: 0; left: 50%;
    transform: translateX(-50%);
    display: flex; gap: 14px;
}
.joker-tut-tube {
    width: 40px; min-height: 54px;
    border: 2.5px solid rgba(255,255,255,.35);
    border-top: none;
    border-radius: 0 0 10px 10px;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,.06));
    display: flex; flex-direction: column; justify-content: flex-end;
    align-items: center; gap: 3px; padding-bottom: 4px;
}
.joker-tut-ball {
    width: 14px; height: 14px; border-radius: 50%;
    opacity: .8;
}
.joker-tut-ball--joker {
    width: 14px; height: 14px; border-radius: 50%;
    background: linear-gradient(135deg, #c084fc, #f472b6, #60a5fa, #34d399);
    background-size: 300% 300%;
    animation: jokerShimmer 2s ease-in-out infinite, jokerMove 3.5s ease-in-out infinite;
    display: flex; align-items: center; justify-content: center;
    font-size: 9px; line-height: 1; color: #fff;
    opacity: 1;
}
@keyframes jokerShimmer {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}
/* Joker ball moves from its tube into the left tube */
@keyframes jokerMove {
    0%, 25%  { transform: translate(0, 0); }
    40%      { transform: translate(0, -60px); }
    60%      { transform: translate(-54px, -60px); }
    75%      { transform: translate(-54px, -3px); }
    85%, 100%{ transform: translate(-54px, -3px); }
}
/* Arrow follows the joker ball path */
.joker-tut-arrow {
    position: absolute; top: 18px; left: 50%;
    width: 6px; height: 6px;
    border-right: 2.5px solid rgba(255,255,255,.7);
    border-bottom: 2.5px solid rgba(255,255,255,.7);
    transform: translateX(-50%) rotate(45deg);
    animation: jokerArrow 3.5s ease-in-out infinite;
}
@keyframes jokerArrow {
    0%, 25%  { opacity: 0; }
    35%      { opacity: 1; transform: translateX(-50%) rotate(45deg); }
    55%      { opacity: 1; transform: translateX(-80px) rotate(45deg); }
    65%      { opacity: 0; }
    100%     { opacity: 0; }
}
/* Poof when surplus ball is removed */
.joker-tut-poof {
    position: absolute; bottom: 30px; right: 22px;
    font-size: 1.2rem;
    animation: jokerPoof 3.5s ease-in-out infinite;
    pointer-events: none;
}
@keyframes jokerPoof {
    0%, 70%  { opacity: 0; transform: scale(.5); }
    80%      { opacity: 1; transform: scale(1.2); }
    90%      { opacity: 1; transform: scale(1); }
    100%     { opacity: 0; transform: scale(.5) translateY(-10px); }
}

/* ── Ice Ball Tutorial Visualization ─────────────────────── */
.ice-tut {
    position: relative;
    width: 200px; height: 130px;
    margin: .8rem auto 1rem;
}
.ice-tut-tubes {
    position: absolute; bottom: 0; left: 50%;
    transform: translateX(-50%);
    display: flex; gap: 14px;
}
.ice-tut-tube {
    width: 40px; min-height: 54px;
    border: 2.5px solid rgba(255,255,255,.35);
    border-top: none;
    border-radius: 0 0 10px 10px;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,.06));
    display: flex; flex-direction: column; justify-content: flex-end;
    align-items: center; gap: 3px; padding-bottom: 4px;
}
.ice-tut-ball {
    width: 14px; height: 14px; border-radius: 50%;
    opacity: .8;
}
.ice-tut-ball--frozen {
    position: relative;
    box-shadow: 0 0 8px rgba(100,180,255,.6), inset 0 0 4px rgba(200,230,255,.4);
    animation: icePulse 2s ease-in-out infinite alternate;
}
.ice-tut-frost {
    position: absolute; inset: -3px;
    border-radius: 50%;
    border: 2px solid rgba(180,220,255,.7);
    background: rgba(180,220,255,.25);
    animation: iceShimmer 2.5s ease-in-out infinite alternate;
}
@keyframes icePulse {
    0%   { box-shadow: 0 0 6px rgba(100,180,255,.4), inset 0 0 3px rgba(200,230,255,.3); }
    100% { box-shadow: 0 0 12px rgba(100,180,255,.7), inset 0 0 6px rgba(200,230,255,.5); }
}
@keyframes iceShimmer {
    0%   { background: rgba(180,220,255,.15); border-color: rgba(180,220,255,.5); }
    100% { background: rgba(180,220,255,.35); border-color: rgba(180,220,255,.9); }
}
/* Lock icon wobbles to indicate "can't move" */
.ice-tut-lock {
    position: absolute; top: 28px; left: 28px;
    font-size: 1.1rem;
    animation: iceLock 2.5s ease-in-out infinite;
}
@keyframes iceLock {
    0%, 40% { transform: rotate(0); opacity: .8; }
    50%     { transform: rotate(-12deg); opacity: 1; }
    60%     { transform: rotate(10deg); opacity: 1; }
    70%     { transform: rotate(-6deg); opacity: .9; }
    80%, 100% { transform: rotate(0); opacity: .6; }
}
/* Snowflake drifts down to indicate freezing */
.ice-tut-thaw {
    position: absolute; top: 2px; left: 38px;
    font-size: 1.3rem;
    animation: iceThawDrift 3s ease-in-out infinite;
    pointer-events: none;
}
@keyframes iceThawDrift {
    0%       { opacity: 0; transform: translateY(-10px) rotate(0); }
    20%      { opacity: 1; }
    60%      { opacity: 1; transform: translateY(20px) rotate(120deg); }
    80%      { opacity: .5; transform: translateY(30px) rotate(180deg); }
    100%     { opacity: 0; transform: translateY(40px) rotate(220deg); }
}

/* ── Achievement Overlay ──────────────────────────────────── */
.achievement-overlay {
    position: fixed; inset: 0;
    z-index: 9450;
    display: flex; align-items: center; justify-content: center;
    background: rgba(40,22,10,.82);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    opacity: 0; pointer-events: none;
    transition: opacity .4s ease;
}
.achievement-overlay.show { opacity: 1; pointer-events: auto; }

.ach-card {
    background: linear-gradient(145deg, rgba(85,48,22,.95), rgba(52,30,14,.95));
    border: 2px solid rgba(255,215,0,.30);
    border-radius: 24px;
    padding: 2rem 2.5rem;
    text-align: center;
    width: min(300px, 85vw);
    box-shadow: 0 0 40px rgba(255,215,0,.1), 0 20px 60px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,240,220,.08);
    position: relative;
    overflow: hidden;
}
.ach-card::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(circle at 50% 30%, rgba(255,215,0,.08), transparent 60%);
    pointer-events: none;
}

.ach-label {
    font-size: .6rem; letter-spacing: 4px;
    color: rgba(255,215,0,.6);
    text-transform: uppercase;
    margin-bottom: .8rem;
}
.ach-big-icon {
    font-size: 3.5rem;
    filter: drop-shadow(0 0 16px rgba(255,215,0,.5));
    animation: achIconPop .6s cubic-bezier(.175,.885,.32,1.275) both;
    margin-bottom: .5rem;
}
.ach-title {
    font-size: 1.4rem; font-weight: 700;
    color: #FFD700;
    text-shadow: 0 0 12px rgba(255,215,0,.3);
    margin-bottom: .3rem;
}
.ach-desc {
    font-size: .8rem;
    color: rgba(255,255,255,.55);
    margin-bottom: 1.2rem;
}
.ach-cat-teaser {
    border-top: 1px solid rgba(255,215,0,.15);
    padding-top: .8rem;
    display: none;
    align-items: center; justify-content: center; gap: .5rem;
    font-size: .75rem;
    color: rgba(255,215,0,.5);
    animation: achFadeIn 1s ease .8s both;
}
.ach-cat-teaser.visible { display: flex; }
.ach-tap-hint {
    margin-top: 1rem;
    font-size: .6rem;
    color: rgba(255,255,255,.2);
    letter-spacing: 1px;
    animation: achFadeIn 1.5s ease 1.2s both;
}

/* Floating particles */
.ach-particle {
    position: absolute;
    color: rgba(255,215,0,.25);
    pointer-events: none;
}
.ach-particle:nth-child(1) { top: 12%; left: 18%; font-size: .6rem; animation: achFloat 3s ease-in-out infinite; }
.ach-particle:nth-child(2) { top: 22%; right: 20%; font-size: .8rem; animation: achFloat 2.5s ease-in-out infinite .3s; }
.ach-particle:nth-child(3) { bottom: 28%; left: 25%; font-size: .5rem; animation: achFloat 2.8s ease-in-out infinite .5s; }
.ach-particle:nth-child(4) { bottom: 20%; right: 22%; font-size: .7rem; animation: achFloat 3.2s ease-in-out infinite .8s; }

@keyframes achIconPop {
    0%   { transform: scale(0) rotate(-15deg); opacity: 0; }
    60%  { transform: scale(1.15) rotate(3deg); }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}
@keyframes achFadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes achFloat {
    0%, 100% { transform: translateY(0) rotate(0); opacity: .25; }
    50%      { transform: translateY(-12px) rotate(15deg); opacity: .5; }
}

/* ── Daily Mission Overlay ─────────────────────────────────── */
.daily-mission-inner {
    text-align: center;
}
.daily-mission-badge {
    display: inline-block;
    font-family: 'Fredoka', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    padding: .4rem 1.2rem;
    border-radius: 100px;
    background: linear-gradient(135deg, rgba(255,215,0,.2), rgba(255,140,0,.2));
    border: 1px solid rgba(255,215,0,.3);
    color: var(--gold, #FFD700);
    margin-bottom: .8rem;
}
.daily-mission-cat {
    margin: .6rem auto;
}
.daily-mission-cat canvas {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid rgba(255,215,0,.3);
    box-shadow: 0 0 20px rgba(255,215,0,.15);
}
.daily-mission-text {
    font-size: 1rem;
    font-style: italic;
    color: rgba(255,255,255,.85);
    margin: .6rem 1rem;
    line-height: 1.4;
}
.daily-mission-desc {
    font-size: .85rem;
    color: rgba(255,255,255,.5);
    margin: .3rem 1rem .8rem;
}
.daily-mission-date {
    font-size: .75rem;
    color: rgba(255,255,255,.35);
    letter-spacing: 1px;
    margin-bottom: .8rem;
}

/* Rewarded video preview overlay */
.win-btn.hidden { display: none; }

.rewarded-paw {
  animation: rewardedPaw 1s ease-in-out infinite;
}
@keyframes rewardedPaw {
  0%, 100% { transform: scale(1);    opacity: 0.85; }
  50%      { transform: scale(1.15); opacity: 1; }
}
