body.home {
    background: #070d0b;
}

body.home::before {
    display: none;
}

body.home .home-stage {
    position: fixed;
    inset: 0;
    z-index: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    padding: 92px 16px 12px;
    overflow: hidden;
    pointer-events: none;
    background: #04110c url('/images/home/jungle-clearing.jpg') center 78% / cover no-repeat;
}

body.home .home-stage::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 168px;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(4, 10, 8, 0) 0%, rgba(4, 10, 8, 0.72) 78%, rgba(4, 10, 8, 0.88) 100%);
}

body.home .home-stage .home-hero-copy,
body.home .home-stage .home-actions,
body.home .home-stage button,
body.home .home-stage label,
body.home .home-stage input {
    pointer-events: auto;
}

body.home .menu-button,
body.home .menu,
body.home .header-right {
    position: fixed;
}

body.home .home-actions {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: min(100%, 420px);
}

body.home .home-note {
    max-width: 100%;
    margin: 10px 0 0;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(6, 14, 10, 0.82);
    color: #f4fff6;
    font-size: 0.85rem;
    line-height: 1.35;
    text-align: center;
}

body.home .home-note:empty {
    display: none;
    margin: 0;
    padding: 0;
}

body.home .home-sheet {
    position: relative;
    z-index: 2;
    margin-top: calc(100vh - 90px);
    padding: 26px 0 8px;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(0, 110, 50, 0.16), transparent 46%),
        #080e0c;
    border-radius: 28px 28px 0 0;
    border-top: 1px solid rgba(140, 255, 180, 0.28);
    box-shadow: 0 -32px 80px rgba(0, 0, 0, 0.62);
}

body.home .home-wrap,
body.home > .footer {
    position: relative;
    z-index: 2;
}

body.home > .footer {
    background: #080e0c;
}

body.home .home-splash {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #04110c url('/images/home/jungle-clearing.jpg') center 68% / cover no-repeat;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

body.home .home-splash img {
    position: relative;
    z-index: 1;
    width: min(78vw, 420px);
    height: auto;
    max-height: 42vh;
    object-fit: contain;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

body.home .home-splash .home-chest-glow {
    bottom: 36%;
    width: min(56vw, 260px);
    height: min(22vw, 100px);
}

body.home .home-splash.is-gone {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

body.home .home-wrap {
    width: min(1120px, calc(100% - 28px));
    margin: 0 auto 28px;
    min-width: 0;
}

body.home .home-hero-copy {
    position: relative;
    z-index: 2;
    text-align: center;
}

body.home .home-stage h1 {
    margin: 0 0 6px;
    color: #00ff00;
    font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
    font-size: 2.7rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    line-height: 0.95;
    text-shadow: 0 2px 0 #041208, 0 8px 18px rgba(0, 0, 0, 0.8);
}

body.home .home-lead {
    margin: 0 auto 8px;
    max-width: 40rem;
    color: #f4fff6;
    font-size: 0.95rem;
    line-height: 1.35;
    text-shadow: 0 1px 2px #041208, 0 2px 12px rgba(0, 0, 0, 0.95);
}

body.home .home-scene {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    flex: 1 1 auto;
    width: min(100%, 920px);
    height: auto;
    min-height: 200px;
    max-height: 520px;
    margin: 6px 0 0;
    background: transparent;
}

body.home .home-scene::after {
    content: "";
    position: absolute;
    left: 14%;
    right: 10%;
    bottom: 0;
    height: 28px;
    background: radial-gradient(ellipse, rgba(90, 50, 10, 0.28) 0%, transparent 72%);
    pointer-events: none;
    z-index: 0;
}

body.home .home-gorilla {
    position: absolute;
    left: 0;
    bottom: 0;
    z-index: 2;
    width: min(54%, 440px);
    height: 100%;
    object-fit: contain;
    object-position: left bottom;
    background: transparent;
    border: 0;
    box-shadow: none;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
    filter: drop-shadow(0 16px 10px rgba(0, 0, 0, 0.5));
    transition: opacity 0.45s ease;
}

body.home .home-gorilla.king {
    opacity: 0;
    object-position: center bottom;
}

body.home .home-scene.is-open .home-gorilla.bare {
    opacity: 0;
}

body.home .home-scene.is-open .home-gorilla.king {
    opacity: 1;
}

body.home .home-chest {
    position: relative;
    z-index: 3;
    width: min(46%, 340px);
    aspect-ratio: 880 / 665;
    margin: 0 2% 0 0;
    background: transparent;
    flex: 0 0 auto;
}

body.home .home-chest-glow {
    position: absolute;
    left: 50%;
    bottom: -22%;
    width: 140%;
    height: 78%;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(255, 236, 170, 1) 0%, rgba(255, 176, 40, 0.85) 34%, rgba(255, 110, 0, 0.4) 58%, rgba(255, 90, 0, 0) 76%);
    filter: blur(18px);
    z-index: 0;
    pointer-events: none;
    transform: translateX(-50%);
    animation: home-chest-glow 2.6s ease-in-out infinite;
}

body.home .home-chest .closed,
body.home .home-chest .open {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
    object-position: center bottom;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    z-index: 1;
}

body.home .home-chest .open {
    opacity: 0;
    transition: opacity 0.45s ease;
}

body.home .home-chest.is-open .closed {
    opacity: 0;
    transition: opacity 0.45s ease;
}

body.home .home-chest.is-open .open {
    opacity: 1;
}

body.home .home-chest.is-open .home-chest-glow {
    width: 168%;
    height: 156%;
    bottom: -20%;
    filter: blur(24px);
    background: radial-gradient(ellipse at center, rgba(255, 244, 190, 1) 0%, rgba(255, 176, 40, 0.9) 30%, rgba(255, 90, 0, 0.4) 58%, rgba(255, 80, 0, 0) 76%);
    animation: home-chest-glow-open 1.25s ease-in-out infinite;
}

@keyframes home-chest-glow-open {
    0%, 100% { opacity: 0.82; transform: translateX(-50%) scale(1); }
    50% { opacity: 1; transform: translateX(-50%) scale(1.14); }
}

@keyframes home-chest-glow {
    0%, 100% { opacity: 0.5; transform: translateX(-50%) scale(0.94); }
    50% { opacity: 1; transform: translateX(-50%) scale(1.08); }
}

body.home .spill {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: visible;
}

body.home .spill i {
    position: absolute;
    left: 48%;
    top: 18%;
    opacity: 0;
}

body.home .spill .coin {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #fff1a8, #e0b000 55%, #8a6200);
}

body.home .spill .bar {
    width: 26px;
    height: 9px;
    border-radius: 2px;
    background: linear-gradient(180deg, #ffe38a, #c48a00);
}

body.home .spill .gem {
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, #fff6c2, #d4a017 45%, #6fbf73);
    transform: rotate(45deg);
}

body.home .home-chest.is-open .spill i {
    animation: home-spill 1.15s ease-in forwards;
}

body.home .home-chest.is-open .spill i:nth-child(1)  { --x: -78px; --y: 86px;  --r: -30deg; animation-delay: 0.02s; }
body.home .home-chest.is-open .spill i:nth-child(2)  { --x: -46px; --y: 110px; --r: 20deg;  animation-delay: 0.08s; }
body.home .home-chest.is-open .spill i:nth-child(3)  { --x: -12px; --y: 124px; --r: 50deg;  animation-delay: 0.04s; }
body.home .home-chest.is-open .spill i:nth-child(4)  { --x: 22px;  --y: 108px; --r: -18deg; animation-delay: 0.1s; }
body.home .home-chest.is-open .spill i:nth-child(5)  { --x: 58px;  --y: 92px;  --r: 36deg;  animation-delay: 0.06s; }
body.home .home-chest.is-open .spill i:nth-child(6)  { --x: 84px;  --y: 70px;  --r: -48deg; animation-delay: 0.12s; }
body.home .home-chest.is-open .spill i:nth-child(7)  { --x: -96px; --y: 54px;  --r: 16deg;  animation-delay: 0.14s; }
body.home .home-chest.is-open .spill i:nth-child(8)  { --x: 8px;   --y: 78px;  --r: -60deg; animation-delay: 0.05s; }
body.home .home-chest.is-open .spill i:nth-child(9)  { --x: -62px; --y: 98px;  --r: 24deg;  animation-delay: 0.16s; }
body.home .home-chest.is-open .spill i:nth-child(10) { --x: 40px;  --y: 130px; --r: -12deg; animation-delay: 0.18s; }
body.home .home-chest.is-open .spill i:nth-child(11) { --x: 96px;  --y: 100px; --r: 40deg;  animation-delay: 0.2s; }
body.home .home-chest.is-open .spill i:nth-child(12) { --x: -28px; --y: 68px;  --r: 55deg;  animation-delay: 0.09s; }
body.home .home-chest.is-open .spill i:nth-child(13) { --x: 70px;  --y: 56px;  --r: -36deg; animation-delay: 0.15s; }
body.home .home-chest.is-open .spill i:nth-child(14) { --x: -8px;  --y: 140px; --r: 18deg;  animation-delay: 0.22s; }

@keyframes home-spill {
    0% { opacity: 0; transform: translate(-50%, 0) rotate(0deg) scale(0.5); }
    18% { opacity: 1; }
    100% { opacity: 0; transform: translate(calc(-50% + var(--x)), var(--y)) rotate(var(--r)) scale(1); }
}

body.home .home-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: min(100%, 320px);
    min-height: 48px;
    margin-top: 4px;
    padding: 0 22px;
    border: 0;
    border-radius: 9999px;
    background: #00ff00;
    color: #000;
    font-family: monospace;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 255, 0, 0.4);
}

body.home .home-cta:hover {
    background: #00cc00;
}

body.home .home-cta[aria-busy="true"] {
    opacity: 0.7;
}

body.home .home-pay {
    display: flex;
    align-items: center;
    gap: 8px;
    width: min(100%, 320px);
    min-height: 48px;
    margin-top: 6px;
    padding: 0 16px;
    box-sizing: border-box;
    border: 2px solid #00ff00;
    border-radius: 9999px;
    background: rgba(0, 0, 0, 0.72);
}

body.home .home-pay span {
    color: #00ff00;
    font-weight: bold;
}

body.home .home-pay input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    color: #fff;
    font-family: monospace;
    font-size: 1rem;
    outline: none;
}

body.home .home-secondary {
    display: block;
    margin-top: 14px;
    color: #d7ffe4;
    font-size: 0.92rem;
    text-align: center;
    text-decoration: underline;
    text-underline-offset: 3px;
}

body.home .home-contract {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    max-width: 100%;
    margin: 12px 0 0;
    padding: 4px 8px 4px 14px;
    border-radius: 999px;
    background: rgba(6, 14, 10, 0.82);
    color: #f4fff6;
    font-size: 0.75rem;
}

body.home .home-contract-addr {
    overflow-wrap: anywhere;
}

body.home .home-contract button {
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid #d7ffe4;
    border-radius: 9999px;
    background: transparent;
    color: #d7ffe4;
    font-family: monospace;
    font-size: 0.8rem;
    cursor: pointer;
}

body.home .home-contract button.is-copied {
    color: #00ff00;
    border-color: #00ff00;
}

body.home .home-strip {
    margin-top: 28px;
}

body.home .home-strip h2,
body.home .home-about h2,
body.home .home-explore {
    margin: 0 0 10px;
    color: #00ff00;
    font-size: 1.05rem;
    font-weight: bold;
}

body.home .home-strip ol {
    display: flex;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

body.home .home-strip li {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 6px;
    background: rgba(0, 0, 0, 0.85);
    border: 2px solid #00ff00;
    border-radius: 14px;
}

body.home .home-strip li.gold {
    border-color: #ffd700;
    box-shadow: 0 0 18px rgba(255, 215, 0, 0.35);
}

body.home .home-rank {
    color: #ffd700;
    font-weight: bold;
    font-size: 0.85rem;
}

body.home .home-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    background: #1a1a1a;
}

body.home .home-avatar-empty {
    display: block;
}

body.home .who,
body.home .pts {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.75rem;
}

body.home .pts {
    color: #ffd700;
    font-weight: bold;
}

body.home .home-you,
body.home .home-strip-empty {
    margin: 8px 0 0;
    text-align: center;
    color: #00ddff;
    font-size: 0.85rem;
}

body.home .home-about {
    margin-top: 0;
}

body.home .home-about p {
    margin: 0;
    max-width: 42rem;
    color: #eee;
    font-size: 0.95rem;
    line-height: 1.45;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9);
}

body.home .home-explore {
    margin-top: 26px;
}

body.home .home-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

body.home .home-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: rgba(0, 0, 0, 0.82);
    border: 2px solid rgba(0, 255, 0, 0.4);
    border-radius: 16px;
    overflow: hidden;
}

body.home .home-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
}

body.home .home-card-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    padding: 12px 14px 14px;
}

body.home .home-card-label {
    margin: 0;
    color: #00ff00;
    font-size: 0.82rem;
}

body.home .home-card-fact {
    margin: 0;
    color: #ffd700;
    font-size: 1.25rem;
    font-weight: bold;
    overflow-wrap: anywhere;
}

body.home .home-card-note {
    margin: 0;
    color: #ddd;
    font-size: 0.78rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.home .home-open {
    margin-top: auto;
    padding-top: 8px;
    color: #00ff88;
    font-weight: bold;
    text-decoration: none;
}

body.home .home-open:hover {
    text-decoration: underline;
}

@media (min-width: 800px) {
    body.home .home-stage h1 {
        font-size: 4.2rem;
    }

    body.home .home-scene {
        min-height: 300px;
    }

    body.home .home-chest {
        width: min(42%, 380px);
    }

    body.home .home-cards {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1100px) {
    body.home .home-cards {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.home .home-chest-glow,
    body.home .home-chest.is-open .home-chest-glow,
    body.home .home-chest.is-open .spill i {
        animation: none;
    }

    body.home .spill {
        display: none;
    }

    body.home .home-splash {
        transition: none;
    }
}
