.active-page {
    color: var(--green) !important;
    font-weight: 700;
}

.emoji-page-hero {
    width: min(1180px, calc(100% - 40px));
    margin: 70px auto 48px;
    padding: 58px;

    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    gap: 48px;

    background:
        radial-gradient(
            circle at top right,
            rgba(189, 238, 189, 0.72),
            transparent 38%
        ),
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.94),
            rgba(239, 255, 240, 0.94)
        );

    border: 1px solid rgba(47, 143, 70, 0.13);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.emoji-page-heading h1 {
    color: var(--green-dark);
    font-size: clamp(3rem, 7vw, 6rem);
    line-height: 1;
    letter-spacing: -0.05em;
}

.emoji-page-heading h1 span {
    color: var(--green);
}

.emoji-page-heading > p:not(.eyebrow) {
    max-width: 690px;
    margin-top: 22px;

    color: var(--muted);
    font-size: 1.15rem;
    line-height: 1.7;
}

.emoji-total {
    width: fit-content;
    margin-top: 28px;
    padding: 11px 16px;

    display: flex;
    align-items: center;
    gap: 10px;

    color: var(--green-dark);
    font-weight: 600;

    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(47, 143, 70, 0.13);
    border-radius: 999px;
    box-shadow: 0 12px 28px rgba(18, 53, 36, 0.07);
}

.emoji-total img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.emoji-hero-decoration {
    min-height: 300px;
    position: relative;

    display: grid;
    place-items: center;
}

.emoji-hero-circle {
    width: 245px;
    height: 245px;

    display: grid;
    place-items: center;

    background:
        radial-gradient(
            circle,
            #ffffff 0%,
            #dff7df 70%
        );

    border: 1px solid rgba(47, 143, 70, 0.15);
    border-radius: 50%;
    box-shadow:
        inset 0 -14px 0 rgba(47, 143, 70, 0.08),
        0 28px 65px rgba(18, 53, 36, 0.15);

    animation: emojiHeroFloat 5s ease-in-out infinite;
}

.emoji-hero-circle img {
    width: 190px;
    height: 190px;
    object-fit: contain;
}

@keyframes emojiHeroFloat {
    0%,
    100% {
        transform: translateY(0) rotate(-2deg);
    }

    50% {
        transform: translateY(-12px) rotate(2deg);
    }
}

.mini-lily {
    width: 78px;
    height: 48px;
    position: absolute;

    background: #bdeebd;
    border-radius: 50% 50% 45% 45%;
    opacity: 0.9;
}

.mini-lily::after {
    content: "";
    width: 24px;
    height: 26px;

    position: absolute;
    top: 4px;
    right: 13px;

    background: rgba(255, 255, 255, 0.9);
    clip-path: polygon(100% 0, 0 45%, 100% 100%);
}

.mini-lily-one {
    top: 20px;
    right: 8%;
    transform: rotate(8deg);
}

.mini-lily-two {
    bottom: 12px;
    left: 4%;
    transform: scale(0.72) rotate(-8deg);
}

.emoji-browser {
    width: min(1180px, calc(100% - 40px));
    min-height: 600px;
    margin: 0 auto 80px;
    padding: 30px;

    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(47, 143, 70, 0.12);
    border-radius: var(--radius-large);
    box-shadow: 0 20px 55px rgba(18, 53, 36, 0.09);
    backdrop-filter: blur(16px);
}

.emoji-tools {
    margin-bottom: 30px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.emoji-search {
    width: min(480px, 100%);
    min-height: 54px;
    padding: 0 18px;

    display: flex;
    align-items: center;
    gap: 11px;

    background: var(--white);
    border: 1px solid rgba(47, 143, 70, 0.17);
    border-radius: 999px;
    box-shadow: 0 10px 26px rgba(18, 53, 36, 0.06);

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.emoji-search:focus-within {
    border-color: rgba(47, 143, 70, 0.55);
    box-shadow: 0 12px 30px rgba(47, 143, 70, 0.13);
}

.emoji-search span {
    color: var(--green);
    font-size: 1.6rem;
    line-height: 1;
}

.emoji-search input {
    width: 100%;

    color: var(--text);
    font: inherit;

    background: transparent;
    border: none;
    outline: none;
}

.emoji-search input::placeholder {
    color: #8b978e;
}

.emoji-filters {
    padding: 5px;

    display: flex;
    align-items: center;
    gap: 5px;

    background: var(--green-light);
    border: 1px solid rgba(47, 143, 70, 0.12);
    border-radius: 999px;
}

.emoji-filter {
    padding: 10px 16px;

    color: var(--muted);
    font: inherit;
    font-weight: 600;

    background: transparent;
    border: none;
    border-radius: 999px;
    cursor: pointer;

    transition:
        color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.emoji-filter:hover {
    color: var(--green);
}

.emoji-filter.active {
    color: var(--green-dark);
    background: var(--white);
    box-shadow: 0 7px 18px rgba(18, 53, 36, 0.09);
}

.all-emojis-grid {
    max-height: min(68vh, 680px);
    padding: 10px 12px 12px 4px;

    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 15px;

    overflow-y: auto;
    overscroll-behavior-y: auto;
    scrollbar-color: rgba(47, 143, 70, 0.55) rgba(189, 238, 189, 0.28);
    scrollbar-width: thin;
}

.emoji-back-link {
    width: fit-content;
    min-height: 42px;
    margin-bottom: 26px;
    padding: 9px 16px;

    display: inline-flex;
    align-items: center;
    color: var(--green-dark);
    font-size: 0.92rem;
    font-weight: 600;

    background: rgba(223, 247, 223, 0.72);
    border: 1px solid rgba(47, 143, 70, 0.13);
    border-radius: 999px;
    box-shadow: 0 8px 20px rgba(18, 53, 36, 0.06);

    transition:
        color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.emoji-back-link:hover {
    color: var(--green);
    background: var(--white);
    box-shadow: 0 12px 26px rgba(18, 53, 36, 0.1);
    transform: translateX(-3px);
}

.all-emojis-grid::-webkit-scrollbar {
    width: 10px;
}

.all-emojis-grid::-webkit-scrollbar-track {
    background: rgba(189, 238, 189, 0.28);
    border-radius: 999px;
}

.all-emojis-grid::-webkit-scrollbar-thumb {
    background: rgba(47, 143, 70, 0.55);
    border: 2px solid rgba(247, 255, 247, 0.9);
    border-radius: 999px;
}

.all-emoji-card {
    width: 100%;
    min-width: 0;
    padding: 20px 12px 16px;

    position: relative;

    text-align: center;
    color: inherit;
    font: inherit;
    cursor: pointer;

    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.98),
            rgba(247, 255, 247, 0.96)
        );

    border: 1px solid rgba(47, 143, 70, 0.11);
    border-radius: 22px;
    box-shadow: 0 12px 30px rgba(18, 53, 36, 0.07);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.all-emoji-card:hover {
    transform: translateY(-6px);
    border-color: rgba(47, 143, 70, 0.28);
    box-shadow: 0 20px 42px rgba(18, 53, 36, 0.12);
}

.all-emoji-card img {
    width: 86px;
    height: 86px;
    margin: 0 auto 13px;

    object-fit: contain;
    filter: drop-shadow(
        0 10px 10px rgba(18, 53, 36, 0.13)
    );
}

.all-emoji-card h2 {
    overflow: hidden;

    color: var(--green-dark);
    font-size: 0.94rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.animated-badge {
    width: 25px;
    height: 25px;

    position: absolute;
    top: 9px;
    right: 9px;

    display: grid;
    place-items: center;

    color: var(--green);
    font-size: 0.72rem;
    font-weight: 700;

    background: var(--green-soft);
    border-radius: 50%;
}

.emoji-copy-toast {
    max-width: calc(100% - 32px);
    padding: 12px 18px;

    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1000;

    color: var(--white);
    font-weight: 600;
    text-align: center;

    background: var(--green-dark);
    border-radius: 999px;
    box-shadow: 0 14px 34px rgba(18, 53, 36, 0.22);
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.emoji-copy-toast.visible {
    opacity: 1;
    transform: translateY(0);
}

.emoji-copy-toast.is-error {
    background: #9f3f3f;
}

.emoji-state {
    min-height: 390px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    color: var(--muted);
    text-align: center;
}

.emoji-state[hidden] {
    display: none;
}

.emoji-state img {
    width: 120px;
    height: 120px;
    margin-bottom: 16px;
    object-fit: contain;
}

.emoji-state h2 {
    margin-bottom: 8px;

    color: var(--green-dark);
    font-size: 1.7rem;
}

.emoji-state .primary-button {
    margin-top: 20px;
    border: none;
    cursor: pointer;
    font: inherit;
}

.pond-loader {
    width: 130px;
    height: 90px;
    margin-bottom: 18px;

    display: grid;
    place-items: center;

    background: rgba(189, 238, 189, 0.8);
    border-radius: 50%;

    animation: loaderFloat 1.4s ease-in-out infinite;
}

.pond-loader img {
    width: 90px;
    height: 90px;
    margin: 0;
}

@keyframes loaderFloat {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.emoji-join {
    width: min(980px, calc(100% - 40px));
    margin: 0 auto 90px;
    padding: 42px 46px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;

    color: var(--white);

    background:
        radial-gradient(
            circle at top right,
            rgba(255, 255, 255, 0.18),
            transparent 38%
        ),
        linear-gradient(
            135deg,
            #2f8f46,
            #165d2d
        );

    border-radius: 32px;
    box-shadow: 0 28px 75px rgba(18, 53, 36, 0.2);
}

.emoji-join .eyebrow {
    color: var(--white);
    background: rgba(255, 255, 255, 0.15);
}

.emoji-join h2 {
    margin-bottom: 10px;
    font-size: clamp(1.8rem, 4vw, 3rem);
}

.emoji-join p:not(.eyebrow) {
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.6;
}

.emoji-join .primary-button {
    flex-shrink: 0;

    color: var(--green);
    background: var(--white);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.13);
}

@media (max-width: 1020px) {
    .all-emojis-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 920px) {
    .emoji-page-hero {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .emoji-page-heading > p:not(.eyebrow) {
        margin-right: auto;
        margin-left: auto;
    }

    .emoji-back-link {
        margin-right: auto;
        margin-left: auto;
    }

    .emoji-total {
        margin-right: auto;
        margin-left: auto;
    }

    .emoji-hero-decoration {
        min-height: 260px;
    }

    .emoji-tools {
        flex-direction: column;
        align-items: stretch;
    }

    .emoji-search {
        width: 100%;
    }

    .emoji-filters {
        width: fit-content;
        margin: 0 auto;
    }

    .all-emojis-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .emoji-page-hero,
    .emoji-browser,
    .emoji-join {
        width: min(100% - 24px, 1180px);
    }

    .emoji-page-hero {
        margin-top: 46px;
        padding: 42px 18px;
    }

    .emoji-page-heading h1 {
        font-size: clamp(2.8rem, 14vw, 4.5rem);
    }

    .emoji-browser {
        padding: 18px;
    }

    .all-emojis-grid {
        max-height: 62vh;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 11px;
    }

    .emoji-join {
        padding: 38px 24px;
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 510px) {
    .emoji-copy-toast {
        right: 50%;
        bottom: 16px;
        transform: translate(50%, 12px);
    }

    .emoji-copy-toast.visible {
        transform: translate(50%, 0);
    }

    .emoji-filters {
        width: 100%;
    }

    .emoji-filter {
        flex: 1;
        padding: 10px 8px;
    }

    .all-emojis-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .all-emoji-card {
        padding: 16px 8px 13px;
        border-radius: 18px;
    }

    .all-emoji-card img {
        width: 72px;
        height: 72px;
    }

    .emoji-hero-circle {
        width: 210px;
        height: 210px;
    }

    .emoji-hero-circle img {
        width: 165px;
        height: 165px;
    }
}

.all-emoji-card:focus-visible {
    outline: 3px solid rgba(47, 143, 70, 0.42);
    outline-offset: 2px;
}
