.thermometer-block {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin: 30px auto;
    padding: 24px 28px 36px;
    border-radius: 18px;
    box-sizing: border-box;
    overflow: visible;
}

.thermometer-header {
    text-align: center;
    margin-bottom: 24px;
}

.thermometer-label {
    margin: 0 0 4px;
    font-size: 15px;
    opacity: 0.85;
}

.thermometer-value {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    min-height: 34px;
}

.thermometer-value .char {
    display: inline-block;
    opacity: 0;
}

.thermometer-value .char.bounce-in {
    animation: thermometer-char-bounce 0.4s ease-out forwards;
}

@keyframes thermometer-char-bounce {
    0% {
        opacity: 0;
        transform: translateY(6px) scale(0.6);
    }
    60% {
        opacity: 1;
        transform: translateY(-3px) scale(1.08);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.thermometer-bar-wrap {
    position: relative;
    padding-top: 100px;
}

.thermometer-bar-track {
    width: 100%;
    height: 32px;
    background-color: #ffffff;
    border: 4px solid #daebff;
    border-radius: 999px;
    box-sizing: border-box;
    overflow: hidden;
}

.thermometer-bar-fill {
    position: relative;
    width: 0%;
    height: 100%;
    background-color: #75bd1c;
    border-radius: 999px;
    transition: width 1.4s ease-out;
    overflow: hidden;
}

.thermometer-bar-shimmer {
    position: absolute;
    top: 0;
    left: -60%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.55) 50%, rgba(255, 255, 255, 0) 100%);
    animation: thermometer-shimmer 1.8s linear infinite;
}

@keyframes thermometer-shimmer {
    0% {
        left: -60%;
    }
    100% {
        left: 120%;
    }
}

.thermometer-progress-tooltip-wrap {
    position: relative;
}

.thermometer-progress-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: #ffffff;
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    padding: 8px 14px;
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
    z-index: 15;
    pointer-events: none;
}

.thermometer-progress-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #ffffff;
}

@media (hover: hover) and (pointer: fine) {
    .thermometer-progress-tooltip-wrap:hover .thermometer-progress-tooltip {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
    }
}

.thermometer-progress-tooltip-wrap.is-open .thermometer-progress-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.thermometer-piggy {
    position: absolute;
    top: -16px;
    left: 0%;
    width: 112px;
    height: 112px;
    margin-left: -56px;
    transition: left 1.4s ease-out;
}

.thermometer-piggy-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}

.thermometer-explainer-wrap {
    position: absolute;
    top: 18px;
    right: 18px;
}

.thermometer-explainer-trigger {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.7);
    background: transparent;
    color: inherit;
    font-style: normal;
    font-weight: 700;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.thermometer-explainer-panel {
    position: absolute;
    top: 34px;
    right: 0;
    width: 260px;
    max-width: 80vw;
    padding: 16px 18px;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 20;
}

.thermometer-explainer-panel p {
    margin: 0 0 10px;
    font-size: 14px;
    line-height: 1.5;
}

.thermometer-explainer-link {
    display: inline-block;
    font-size: 14px;
    font-weight: 700;
    text-decoration: underline;
}

@media (hover: hover) and (pointer: fine) {
    .thermometer-explainer-wrap:hover .thermometer-explainer-panel {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

.thermometer-explainer-wrap.is-open .thermometer-explainer-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.thermometer-confetti-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
    border-radius: 18px;
}

.thermometer-confetti-layer canvas {
    position: absolute;
    top: 0;
    left: 0;
}

@media (max-width: 480px) {
    .thermometer-block {
        padding: 20px 20px 32px;
    }

    .thermometer-value {
        font-size: 24px;
    }

    .thermometer-bar-wrap {
        padding-top: 82px;
    }

    .thermometer-piggy {
        top: -12px;
        width: 90px;
        height: 90px;
        margin-left: -45px;
    }
}
