#beach-scene {
    box-sizing: border-box;
    position: relative;
    display: block;
    height: 560px;
    min-height: 560px;
    overflow: hidden;
    padding: 0;
    border-color: #70bfcb;
    background: linear-gradient(
        to bottom,
        #90d9e8 0 23%,
        #d7f4ed 23% 58%,
        #efd6a2 58% 100%
    );
}

#beach-scene::before,
#beach-scene::after {
    position: absolute;
    right: 0;
    left: 0;
    content: "";
    pointer-events: none;
}

#beach-scene::before {
    z-index: 2;
    top: 0;
    height: 39%;
    background: #90d9e8;
    animation: beach-scene-ocean-drift 4.2s ease-in-out infinite;
}

#beach-scene::after {
    z-index: 1;
    top: 31%;
    height: 27%;
    background: #d7f4ed;
    animation: beach-scene-shore-drift 5.6s ease-in-out infinite;
}

@keyframes beach-scene-ocean-drift {
    0%, 100% { transform: translateY(-3px); }
    38% { transform: translateY(4px); }
    71% { transform: translateY(-1px); }
}

@keyframes beach-scene-shore-drift {
    0%, 100% { transform: translateY(2px); }
    31% { transform: translateY(-4px); }
    66% { transform: translateY(3px); }
}

.beach-landscape {
    position: absolute;
    z-index: 2;
    inset: 0;
    pointer-events: none;
}

.beach-decoration {
    position: absolute;
    display: block;
    font-size: 34px;
    line-height: 1;
    transform: translate(-50%, -50%);
    user-select: none;
}

.beach-shell-one { left: 12%; top: 79%; }
.beach-rock-one { left: 31%; top: 87%; font-size: 29px; }
.beach-coral { left: 12%; top: 39%; font-size: 39px; }
.beach-fish-one { left: 88%; top: 36%; font-size: 31px; }
.beach-shell-two { left: 72%; top: 76%; font-size: 29px; }
.beach-rock-two { left: 89%; top: 85%; font-size: 31px; }
.beach-fish-two { left: 87%; top: 45%; font-size: 32px; }
.beach-octopus { left: 14%; top: 42%; font-size: 30px; }

.beach-water-creature {
    z-index: 3;
}

.beach-fish-one { animation: beach-fish-swim 7s ease-in-out infinite; }
.beach-fish-two { animation: beach-fish-swim 9s ease-in-out -3s infinite; }

#beach-scene > .beach-fish {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    font-size: 32px;
    line-height: 1;
    transform: translate(-50%, -50%);
}

#beach-scene > .beach-fish:hover:not(:disabled) {
    background: transparent;
}

@keyframes beach-fish-swim {
    0% { transform: translate(-50%, -50%) translateX(13px) scaleX(1); }
    49% { transform: translate(-50%, -50%) translateX(-13px) scaleX(1); }
    50% { transform: translate(-50%, -50%) translateX(-13px) scaleX(-1); }
    99% { transform: translate(-50%, -50%) translateX(13px) scaleX(-1); }
    100% { transform: translate(-50%, -50%) translateX(13px) scaleX(1); }
}

#beach-scene #beach-crab-button {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 80%;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    font-size: 38px;
    line-height: 1;
    transform: translate(-50%, -50%);
    transition: left 1.8s ease-in-out, top 1.8s ease-in-out;
    pointer-events: auto;
}

#beach-scene #beach-crab-button:hover:not(:disabled) {
    background: transparent;
}

.beach-crab-emoji {
    display: inline-block;
    animation: beach-crab-wiggle 2.1s ease-in-out infinite;
}

@keyframes beach-crab-wiggle {
    0%, 100% { transform: rotate(-2deg) translateY(0); }
    50% { transform: rotate(2deg) translateY(-1px); }
}

#beach-scene > .beach-crab-fuzz {
    position: absolute;
    z-index: 5;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin: 0;
    padding: 0;
    border: 2px solid #ff40ac;
    border-radius: 50%;
    background: #fff;
    box-shadow: none;
    font-size: 28px;
    line-height: 1;
    transform: translate(-50%, -50%);
    animation: bug-fuzz-pop-out 0.25s ease-out both;
}

#beach-scene .beach-crab-fuzz:hover:not(:disabled) {
    background: #fff;
    transform: translate(-50%, -50%) scale(1.05);
}

.beach-crab-fuzz-reward {
    position: absolute;
    z-index: 6;
    padding: 5px 9px;
    border: 2px solid #ff40ac;
    border-radius: 14px;
    background: #fff;
    color: #8b2867;
    font-size: 13px;
    font-weight: bold;
    white-space: nowrap;
    pointer-events: none;
    transform: translate(12px, -50%);
    animation: bug-fuzz-reward-float 2.6s ease-out forwards;
}

.beach-crab-fuzz.collecting {
    animation: bug-fuzz-collect 0.25s ease-in forwards;
}

#beach-scene h3,
#beach-scene p {
    position: absolute;
    z-index: 3;
    left: 50%;
    width: min(82%, 520px);
    margin: 0;
    transform: translateX(-50%);
}

#beach-scene h3 {
    top: 13%;
}

#beach-scene p {
    top: 20%;
}

#beach-scene > button {
    position: absolute;
    z-index: 4;
    margin: 0;
}

#beach-scene #beach-back-button {
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
}

#beach-scene #beach-clean-button {
    top: 54%;
    left: 9%;
}

#beach-scene #beach-pier-button {
    top: 54%;
    right: 9%;
}

#beach-scene #visit-king-crab-button {
    right: 8%;
    bottom: 8%;
}

#beach-scene #beach-treasure-button {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    box-shadow: none;
    font-size: 42px;
    line-height: 1;
    transform: translate(-50%, -50%);
    transition: filter 0.15s ease, scale 0.15s ease;
}

#beach-scene #beach-treasure-button[hidden] {
    display: none !important;
}

#beach-scene #beach-treasure-button:hover:not(:disabled) {
    background: transparent;
    filter: drop-shadow(0 2px 3px rgb(84 58 25 / 35%));
    scale: 1.12;
}

#beach-scene #beach-treasure-button:focus-visible {
    outline: 3px solid #227b8b;
    outline-offset: 3px;
}

.beach-treasure-choices {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.seaside-pier-art {
    color: #187c98;
    font-size: 52px;
    line-height: 1.1;
}

#seaside-pier-scene[hidden],
#seaside-fishing-scene[hidden] { display: none !important; }

#seaside-pier-scene > p {
    width: min(100%, 520px);
}

#seaside-fishing-scene {
    border-color: #60aeba;
    background: #e1f6f4;
    color: #245f68;
    overflow: hidden;
    padding: 14px 18px 18px;
    gap: 6px;
}

#seaside-fishing-scene button {
    border-color: #60aeba;
    background: #f0ffff;
    color: #245f68;
}

#seaside-fishing-scene button:hover:not(:disabled) { background: #c9eef0; }
#seaside-fishing-scene h3 { margin: 0; color: #227b8b; }
#seaside-fishing-scene .seaside-fishing-subtitle {
    width: min(100%, 560px);
    margin: 0;
    color: #466c70;
    font-size: 14px;
    font-style: italic;
    line-height: 1.25;
}
#seaside-fishing-scene .ice-fishing-status {
    height: 34px;
    min-height: 34px;
    flex-basis: 34px;
    margin: 0;
    color: #245f68;
}
#seaside-fishing-scene > .ice-fishing-pet-preview {
    right: auto;
    bottom: calc(40% + 2px);
    left: 50%;
    transform: translateX(-50%);
}
#seaside-fishing-pet-preview > .beach-cleanup-pet-clone {
    transform-origin: bottom center !important;
}
#seaside-fishing-scene > .seaside-pier-plank {
    position: absolute;
    z-index: 2;
    bottom: 40%;
    left: 50%;
    width: 150px;
    height: 18px;
    transform: translateX(-50%);
    background: #8b5a2b;
    pointer-events: none;
}
#seaside-fishing-display {
    position: absolute;
    z-index: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: auto;
    height: 40%;
    flex: none;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: #90d9e8;
    box-shadow: none;
}
#seaside-fishing-result {
    z-index: 1;
    border-radius: 0;
    transform: translateY(-33px);
}
#seaside-fishing-scene .ice-fishing-result-copy {
    line-height: 1.05;
}
#seaside-fishing-scene .ice-fishing-result-copy > * {
    margin: 0 auto;
    line-height: 1.05;
}
#seaside-fishing-scene .ice-fishing-result-copy p {
    margin: 0;
    line-height: 1.05;
}
#seaside-fishing-reel { position: absolute; z-index: 11; bottom: 70px; left: 50%; max-width: calc(100% - 32px); transform: translateX(-50%); }
#seaside-fishing-wait { position: absolute; z-index: 2; top: 14px; left: 50%; max-width: calc(100% - 32px); transform: translateX(-50%); }
#seaside-fishing-wait-message { top: calc(50% - 33px); }

@media (max-width: 600px) {
    #beach-scene {
        height: 520px;
        min-height: 520px;
    }

    #beach-scene h3 { top: 15%; }
    #beach-scene p { top: 22%; width: 86%; }

    #beach-scene #beach-clean-button {
        top: 53%;
        left: 5%;
    }

    #beach-scene #beach-pier-button {
        top: 53%;
        right: 5%;
    }

    #beach-scene #beach-clean-button,
    #beach-scene #beach-pier-button {
        padding: 8px 10px;
        font-size: 13px;
    }

    #beach-scene #visit-king-crab-button {
        right: 5%;
        bottom: 6%;
    }

    .beach-decoration { font-size: 29px; }
}

.beach-cleanup-map {
    box-sizing: border-box;
    position: relative;
    isolation: isolate;
    width: min(100%, 700px);
    height: 360px;
    border: 3px solid #60aeba;
    border-radius: 20px;
    background: #efd6a2;
    overflow: hidden;
}

.beach-cleanup-map::before {
    position: absolute;
    z-index: 0;
    top: -12px;
    right: 0;
    left: 0;
    height: 52%;
    background: linear-gradient(to bottom, #90d9e8 0 58.33%, #d7f4ed 58.33% 100%);
    content: "";
    pointer-events: none;
    animation: beach-color-blocks-drift 3.8s ease-in-out infinite;
}

.beach-cleanup-pet-position {
    position: absolute;
    z-index: 1;
    left: 50%;
    top: 75%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.beach-cleanup-pet-preview {
    display: inline-block;
    animation: beach-cleanup-pet-wiggle 3.4s ease-in-out infinite;
    transform-origin: bottom center;
    pointer-events: none;
}

.beach-cleanup-pet-clone {
    position: relative;
    display: inline-block;
    flex-shrink: 0;
    margin: 0;
    cursor: default;
    pointer-events: none;
}

.beach-cleanup-pet-clone > img {
    display: block;
    max-width: none;
    height: auto;
    pointer-events: none;
}

.beach-cleanup-pet-clone .beach-cleanup-accessory-anchor {
    position: absolute;
    left: 50%;
    top: 5px;
    width: 0;
    height: 0;
    font-size: 45px;
    transform: translateX(-50%);
    z-index: 10;
    user-select: none;
    pointer-events: none;
}

.beach-cleanup-pet-clone .beach-cleanup-accessory-anchor:not(.show) {
    display: none;
}

.beach-cleanup-pet-clone .beach-cleanup-accessory-anchor.show {
    display: block;
}

.beach-cleanup-pet-clone .accessory-copy {
    cursor: default;
}

.beach-cleanup-pet-clone .accessory-copy img {
    width: 175px;
    height: 175px;
    object-fit: contain;
}

.beach-cleanup-pet-clone .accessory-copy[data-inventory-image-accessory="true"] img {
    width: 210px;
    height: 210px;
}

.beach-cleanup-pet-clone .accessory-rotate-controls {
    display: none !important;
}

@keyframes beach-cleanup-pet-wiggle {
    0%, 100% { transform: rotate(0deg) translateY(0); }
    25% { transform: rotate(-1.2deg) translateY(-1px); }
    65% { transform: rotate(1deg) translateY(0); }
}

@keyframes beach-color-blocks-drift {
    0% { transform: translateY(-4px); }
    19% { transform: translateY(3px); }
    43% { transform: translateY(8px); }
    68% { transform: translateY(-1px); }
    84% { transform: translateY(6px); }
    100% { transform: translateY(-4px); }
}

#beach-cleanup-status {
    box-sizing: border-box;
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: min(100%, 440px);
    height: 4.5em;
    margin: 0 0 8px;
    line-height: 1.4;
    text-align: center;
}

.beach-cleanup-map .beach-trash {
    position: absolute;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    font-size: 32px;
    line-height: 1;
    transform: translate(-50%, -50%);
    transition: transform 0.15s ease;
}

#beach-cleanup-map .beach-trash[hidden] {
    display: none !important;
}

.beach-cleanup-map .beach-trash:hover:not(:disabled) {
    background: transparent;
    transform: translate(-50%, -50%) scale(1.18);
}

.beach-cleanup-map .beach-trash.is-cleaning {
    pointer-events: none;
    animation: beach-trash-jiggle 360ms ease-in-out;
}

.beach-cleanup-map .beach-trash.is-disappearing {
    pointer-events: none;
    animation: beach-trash-disappear 220ms ease-in forwards;
}

@keyframes beach-trash-jiggle {
    0%, 100% { transform: translate(-50%, -50%) rotate(0) scale(1); }
    20% { transform: translate(-50%, -50%) rotate(-15deg) scale(1.1); }
    40% { transform: translate(-50%, -50%) rotate(13deg) scale(1.08); }
    60% { transform: translate(-50%, -50%) rotate(-9deg) scale(1.04); }
    80% { transform: translate(-50%, -50%) rotate(7deg) scale(1.02); }
}

@keyframes beach-trash-disappear {
    to { transform: translate(-50%, -50%) scale(0); opacity: 0; }
}

.beach-cleanup-map .beach-trash:focus-visible {
    outline: 2px dashed #245f68;
    outline-offset: 2px;
}

.beach-cleanup-fuzz {
    position: absolute;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    min-width: 48px;
    margin: 0;
    padding: 0;
    border: 2px solid #ff40ac;
    border-radius: 50%;
    background: #fff;
    font-size: 29px;
    line-height: 1;
    transform: translate(-50%, -50%);
    animation: beach-fuzz-pop-out 0.25s ease-out both;
    cursor: pointer;
    pointer-events: auto;
}

.beach-cleanup-gold {
    border-color: #c58a19;
    background: #fff4bd;
}

.beach-subscene .beach-cleanup-fuzz:hover:not(:disabled) {
    background: #fff;
    transform: translate(-50%, -50%) scale(1.04);
}

.beach-cleanup-fuzz.collecting {
    animation: beach-fuzz-collect 0.25s ease-in forwards;
}

@keyframes beach-fuzz-pop-out {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.2); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes beach-fuzz-collect {
    from { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    to { opacity: 0; transform: translate(-50%, -65%) scale(0.5); }
}

.beach-cleanup-fuzz-reward {
    position: absolute;
    z-index: 5;
    padding: 5px 9px;
    border: 2px solid #ff40ac;
    border-radius: 14px;
    background: #fff;
    color: #8b2867;
    font-size: 13px;
    font-weight: bold;
    white-space: nowrap;
    pointer-events: none;
    transform: translate(12px, -50%);
    animation: beach-fuzz-reward-float 2.6s ease-out forwards;
}

@keyframes beach-fuzz-reward-float {
    from { opacity: 1; transform: translate(12px, -50%); }
    to { opacity: 0; transform: translate(12px, calc(-50% - 26px)); }
}

.beach-cleanup-completion {
    width: min(100%, 440px);
    padding: 16px;
    border: 2px dashed #60aeba;
    border-radius: 18px;
    background: #f7ffff;
    text-align: center;
}

#beach-cleanup-scene[hidden] .beach-cleanup-map,
#beach-cleanup-map[hidden] {
    display: none !important;
}

