.mobile-sheet {
    position: fixed;
    inset: 0;
    z-index: 180;
    display: grid;
    align-items: end;
}

.mobile-sheet[hidden] {
    display: none;
}

body.has-modal-sheet {
    overflow: hidden;
}

.mobile-sheet-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(10, 30, 18, 0.64);
    backdrop-filter: blur(5px);
    cursor: pointer;
    animation: home-sheet-fade-in 220ms ease both;
}

.mobile-sheet-panel {
    position: relative;
    z-index: 2;
    max-height: min(86dvh, 720px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 8px 0 calc(14px + env(safe-area-inset-bottom));
    border: 1px solid rgba(255, 255, 255, 0.58);
    border-bottom: 0;
    border-radius: 28px 28px 0 0;
    color: var(--home-ink);
    background: var(--home-paper);
    box-shadow: 0 -28px 70px rgba(13, 34, 21, 0.34);
    animation: home-sheet-rise-in 300ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.mobile-sheet-handle {
    width: 42px;
    height: 4px;
    flex: 0 0 auto;
    margin: 0 auto 8px;
    border-radius: 999px;
    background: rgba(36, 76, 53, 0.2);
}

.mobile-sheet-hero {
    position: relative;
    min-height: 132px;
    display: flex;
    align-items: flex-end;
    margin: 0 9px;
    overflow: hidden;
    padding: 20px 18px;
    border-radius: 20px;
    color: #fff;
    background-image:
        linear-gradient(180deg, rgba(11, 29, 19, 0.06), rgba(11, 29, 19, 0.88)),
        var(--sheet-image);
    background-color: var(--home-green);
    background-position: center;
    background-size: cover;
}

.mobile-sheet-hero-icon {
    position: absolute;
    top: 14px;
    left: 16px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.52);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.19);
    backdrop-filter: blur(10px);
}

.mobile-sheet-hero-icon .ui-icon {
    width: 18px;
    height: 18px;
}

.mobile-sheet-hero-copy {
    position: relative;
    z-index: 2;
}

.mobile-sheet-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.56rem;
    font-weight: 900;
    text-transform: uppercase;
}

.mobile-sheet-count::before {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #78C491;
    content: "";
}

.mobile-sheet-head {
    display: contents;
}

.mobile-sheet-head h2 {
    margin: 0;
    color: #fff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.75rem;
    line-height: 1;
}

.mobile-sheet-close {
    position: absolute;
    top: 14px;
    right: 16px;
    z-index: 4;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.48);
    border-radius: 50%;
    color: #fff;
    background: rgba(15, 37, 24, 0.45);
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.mobile-sheet-close .ui-icon {
    width: 20px;
    height: 20px;
}

.mobile-sheet-body {
    min-height: 0;
    overflow-y: auto;
    padding: 15px 14px 2px;
    overscroll-behavior: contain;
}

.mobile-sheet-prompt {
    margin: 0 1px 11px;
    color: var(--home-muted);
    font-size: 0.68rem;
    font-weight: 750;
}

.mobile-sheet-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.mobile-sheet-links a {
    position: relative;
    min-width: 0;
    min-height: 72px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    overflow: hidden;
    padding: 10px;
    border: 1px solid var(--home-line);
    border-radius: 15px;
    color: var(--home-green-dark);
    background: linear-gradient(145deg, #fff, #FFF8EC);
    box-shadow: 0 7px 18px rgba(51, 45, 35, 0.055);
    font-size: 0.68rem;
    font-weight: 850;
    text-decoration: none;
    transform: translateZ(0);
    transition:
        border-color 180ms ease,
        background 180ms ease,
        box-shadow 180ms ease,
        transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
    animation: home-sheet-link-in 320ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
    animation-delay: var(--link-delay, 0ms);
}

.mobile-sheet-links a::before {
    position: absolute;
    inset: -30% auto -30% -55%;
    width: 42%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.82), transparent);
    content: "";
    pointer-events: none;
    transform: skewX(-18deg);
    transition: left 430ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.mobile-sheet-links a > * {
    position: relative;
    z-index: 2;
}

.mobile-sheet-links a:hover,
.mobile-sheet-links a:focus-visible {
    border-color: rgba(200, 97, 56, 0.34);
    background: linear-gradient(145deg, #fff, #FBF1EB);
    box-shadow: 0 13px 28px rgba(51, 45, 35, 0.12);
    outline: none;
    transform: translateY(-3px);
}

.mobile-sheet-links a:hover::before,
.mobile-sheet-links a:focus-visible::before {
    left: 118%;
}

.mobile-sheet-links a:active,
.mobile-sheet-links a.is-pressed {
    border-color: rgba(200, 97, 56, 0.42);
    background: #F8E7DE;
    box-shadow: 0 4px 10px rgba(51, 45, 35, 0.08);
    transform: scale(0.965);
}

.mobile-sheet-link-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: var(--home-terra);
    background: #F8E7DE;
    transition: color 180ms ease, background 180ms ease, transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.mobile-sheet-link-icon .ui-icon {
    width: 18px;
    height: 18px;
}

.mobile-sheet-links a:nth-child(2n) .mobile-sheet-link-icon {
    color: var(--home-green);
    background: var(--home-green-soft);
}

.mobile-sheet-links a:nth-child(4n + 3) .mobile-sheet-link-icon {
    color: #97752E;
    background: #F3EAD5;
}

.mobile-sheet-links a:hover .mobile-sheet-link-icon,
.mobile-sheet-links a:focus-visible .mobile-sheet-link-icon {
    color: #fff;
    background: var(--home-terra);
    transform: rotate(-7deg) scale(1.1);
}

.mobile-sheet-link-label {
    min-width: 0;
    overflow-wrap: anywhere;
}

.mobile-sheet-link-arrow {
    color: var(--home-terra);
    transition: color 180ms ease, transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.mobile-sheet-link-arrow .ui-icon {
    width: 14px;
    height: 14px;
}

.mobile-sheet-links a:hover .mobile-sheet-link-arrow,
.mobile-sheet-links a:focus-visible .mobile-sheet-link-arrow {
    color: var(--home-green-dark);
    transform: translateX(4px);
}

@keyframes home-sheet-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes home-sheet-rise-in {
    from { opacity: 0; transform: translateY(28px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes home-sheet-link-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.home-mobile-dock {
    position: fixed;
    right: 8px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    left: 8px;
    z-index: 100;
    height: 64px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.64);
    border-radius: 20px;
    background: rgba(255, 253, 248, 0.9);
    box-shadow: 0 14px 38px rgba(24, 42, 29, 0.2);
    backdrop-filter: blur(18px) saturate(1.1);
}

.home-mobile-dock__indicator {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc((100% - 8px) / 5);
    border-radius: 16px;
    background: var(--home-green-soft);
    transform: translateX(calc(var(--dock-index, 0) * 100%));
    transition: transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
    pointer-events: none;
}

.home-mobile-dock__item {
    position: relative;
    z-index: 1;
    min-width: 0;
    min-height: 56px;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 3px;
    color: var(--home-muted);
    font-size: 0.56rem;
    font-weight: 850;
    text-decoration: none;
}

.home-mobile-dock__item.is-active {
    color: var(--home-green);
}

.home-mobile-dock__icon {
    position: relative;
    width: 23px;
    height: 23px;
    display: grid;
    place-items: center;
}

.home-mobile-dock__icon .ui-icon {
    width: 21px;
    height: 21px;
}

.home-mobile-dock__item.is-around .home-mobile-dock__icon {
    width: 42px;
    height: 42px;
    margin-top: -22px;
    border: 4px solid var(--home-paper);
    border-radius: 50%;
    color: #fff;
    background: var(--home-green);
    box-shadow: 0 9px 20px rgba(23, 53, 36, 0.25), 0 0 0 5px rgba(36, 76, 53, 0.07);
}

.home-mobile-dock__item.is-around .home-mobile-dock__icon::before {
    position: absolute;
    inset: -7px;
    z-index: -1;
    border: 1px solid rgba(36, 76, 53, 0.18);
    border-radius: 50%;
    content: "";
    animation: home-mobile-around-breathe 2.6s ease-in-out infinite;
}

.home-mobile-dock__item.is-around.is-active .home-mobile-dock__icon {
    background: var(--home-terra);
    box-shadow: 0 10px 24px rgba(168, 77, 44, 0.32), 0 0 0 6px rgba(200, 97, 56, 0.09);
    transform: translateY(-3px) rotate(-4deg);
}

@keyframes home-mobile-around-breathe {
    0%,
    100% {
        opacity: 0.25;
        transform: scale(0.92);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.08);
    }
}

.home-mobile-dock__badge {
    position: absolute;
    top: -8px;
    right: -10px;
    min-width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    padding: 0 4px;
    border-radius: 999px;
    color: #fff;
    background: var(--home-terra);
    font-size: 0.56rem;
}

@media (min-width: 360px) {
    .home-mobile-dock {
        right: 10px;
        left: 10px;
        height: 68px;
    }
}

@media (min-width: 740px) {
    .home-mobile-dock,
    .mobile-sheet {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .moment-track,
    .moment-image,
    .universe,
    .universe-image,
    .universe-links a,
    .seller-track,
    .seller-card,
    .home-mobile-dock__indicator,
    .mobile-sheet-backdrop,
    .mobile-sheet-panel,
    .mobile-sheet-links a,
    .mobile-sheet-link-icon,
    .mobile-sheet-link-arrow {
        scroll-behavior: auto;
        transition: none;
        animation: none;
    }

    .home-mobile-dock__item.is-around .home-mobile-dock__icon::before {
        animation: none;
    }

    .mobile-sheet-links a:hover,
    .mobile-sheet-links a:focus-visible,
    .mobile-sheet-links a:hover .mobile-sheet-link-icon,
    .mobile-sheet-links a:focus-visible .mobile-sheet-link-icon,
    .universe:hover,
    .universe:focus-within,
    .seller-card:hover,
    .seller-card:focus-visible {
        transform: none;
    }
}
