body.community-page-body {
    min-height: 100vh;
    overflow: auto;
    background: linear-gradient(180deg,
        var(--panel-bg-start, #f9fcff) 0%,
        var(--panel-bg-mid, #fef7ff) 55%,
        var(--panel-bg-end, #f5fbff) 100%);
}

body.community-page-body header {
    position: static;
    top: auto;
    left: auto;
    width: 100%;
    overflow-x: visible;
    display: flex;
    justify-content: center;
    padding: 16px 12px;
}

body.community-page-body .button-tray {
    width: 100%;
    max-width: 640px;
    justify-content: center;
    margin: 0 auto;
    background: linear-gradient(135deg,
        var(--panel-bg-start, rgba(255,255,255,0.98)),
        var(--panel-bg-mid, rgba(245,245,245,0.95)));
    border: 1px solid var(--panel-border, rgba(150,200,255,0.45));
    border-radius: 14px;
    box-shadow: 0 8px 20px var(--panel-shadow, rgba(33,150,243,0.14));
    padding: 10px;
}

body.community-page-body .button-group {
    width: 100%;
    justify-content: center;
    border: none;
    background: transparent;
    box-shadow: none;
    padding: 0;
}

body.community-page-body main.community-page {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    height: auto;
    overflow: visible;
    max-width: 1100px;
    margin: 16px auto 0;
    padding: 0 16px 60px;
}

.community-panel {
    background: linear-gradient(135deg,
        var(--panel-bg-start, rgba(255,255,255,0.98)) 0%,
        var(--panel-bg-mid, rgba(245,245,245,0.95)) 50%,
        var(--panel-bg-end, rgba(235,235,235,0.92)) 100%);
    border: 1px solid var(--panel-border, rgba(150,200,255,0.45));
    border-radius: 18px;
    box-shadow: 0 10px 24px var(--panel-shadow, rgba(33,150,243,0.14));
    padding: 22px 20px 20px;
}

.community-title {
    font-size: 2rem;
    margin-bottom: 6px;
}

.community-subtitle {
    opacity: 0.9;
    margin-bottom: 18px;
}

.community-controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--panel-border, rgba(150,200,255,0.45));
    background: rgba(255,255,255,0.55);
}

.community-stat {
    font-size: 1.1rem;
    font-weight: 700;
}

#add-rock-btn {
    padding: 10px 16px;
    border-radius: 10px;
}

#add-rock-btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

.community-message {
    min-height: 22px;
    margin: 8px 2px 12px;
    font-weight: 600;
}

.rock-pile-frame {
    border-radius: 16px;
    border: 1px solid var(--panel-border, rgba(150,200,255,0.45));
    background: linear-gradient(180deg, rgba(255,255,255,0.82), rgba(255,255,255,0.52));
    box-shadow: inset 0 0 0 2px var(--panel-inset, rgba(255,255,255,0.9));
    overflow: hidden;
}

#rock-pile {
    position: relative;
    width: 100%;
    height: min(580px, 64vh);
    min-height: 360px;
}

#rock-pile img {
    position: absolute;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

.pile-rock {
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.18));
}

.drop-rock {
    filter: drop-shadow(0 6px 6px rgba(0,0,0,0.25));
    will-change: transform;
}

@media (max-width: 700px) {
    body.community-page-body header {
        padding: 12px 8px;
    }

    body.community-page-body main.community-page {
        margin-top: 14px;
        padding: 0 10px 40px;
    }

    .community-title {
        font-size: 1.65rem;
    }
}
