.mars-masher-body {
    height: 100vh;
    overflow: hidden;
    background:
        radial-gradient(circle at top, rgba(201, 164, 76, 0.1), transparent 30%),
        radial-gradient(circle at 20% 20%, rgba(192, 68, 42, 0.18), transparent 25%),
        linear-gradient(180deg, #090910 0%, #0d0d17 28%, #09090f 100%);
}

.mars-masher-shell {
    height: calc(100svh - var(--nav-height));
    margin-top: var(--nav-height);
    padding: 0.85rem 0;
}

.mars-masher-grid {
    width: min(1320px, calc(100% - 2 * var(--container-padding)));
    height: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(300px, 0.95fr) minmax(340px, 1.15fr) minmax(320px, 0.95fr);
    gap: 1.25rem;
    align-items: stretch;
}

.mars-masher-grid > * {
    min-height: 0;
}

.game-panel {
    position: relative;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, rgba(19, 19, 31, 0.98), rgba(10, 10, 18, 0.98));
    border: 1px solid var(--border);
    border-radius: 26px;
    padding: 1.35rem;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
}

.game-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.035), transparent 42%);
    pointer-events: none;
}

.game-panel--center {
    min-height: 0;
    overflow-y: hidden;
}

.game-panel__scroll {
    min-height: 0;
}

.game-panel__scroll--center {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.2rem;
}

.panel-head {
    position: relative;
    margin-bottom: 1.15rem;
}

.panel-head h2 {
    font-size: 1.35rem;
    letter-spacing: 0.08em;
}

.panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.panel-tag {
    margin-top: 0.15rem;
    color: var(--gold);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    white-space: nowrap;
}

.planet-button {
    position: relative;
    display: grid;
    place-items: center;
    width: min(100%, 240px);
    aspect-ratio: 1;
    margin: 2.5rem auto 3rem;
    border: 0;
    overflow: visible;
    background: transparent;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.planet-button:active {
    transform: scale(0.96);
}

.planet-button__halo,
.orbiter-ring-layer,
.planet-button__planet,
.planet-debris-layer {
    position: absolute;
    inset: 0;
    border-radius: 50%;
}

.planet-button__halo {
    background:
        radial-gradient(circle, rgba(217, 85, 53, 0.2) 0%, rgba(217, 85, 53, 0.08) 45%, transparent 70%);
    transform: scale(1.15);
    filter: blur(4px);
}

.orbiter-ring-layer {
    inset: -8%;
    z-index: 2;
    pointer-events: none;
    overflow: visible;
}

.orbiter-ring-rotator {
    position: absolute;
    inset: 0;
    animation: orbiterRotate 55s linear infinite;
    transform-origin: 50% 50%;
}

@keyframes orbiterRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.planet-button__planet {
    z-index: 3;
    overflow: hidden;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.42);
}

.planet-button__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.planet-button__continent {
    position: absolute;
    background: rgba(111, 47, 27, 0.56);
    border-radius: 50%;
    filter: blur(1px);
}

.planet-button__continent--one {
    width: 42%;
    height: 24%;
    top: 22%;
    left: 14%;
    transform: rotate(-14deg);
}

.planet-button__continent--two {
    width: 34%;
    height: 18%;
    top: 48%;
    right: 14%;
    transform: rotate(12deg);
}

.planet-button__continent--three {
    width: 26%;
    height: 12%;
    bottom: 18%;
    left: 28%;
}

.planet-button__stamp {
    position: absolute;
    left: 50%;
    bottom: 18%;
    transform: translateX(-50%) rotate(-6deg);
    padding: 0.35rem 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: rgba(255, 241, 228, 0.9);
    background: rgba(34, 12, 8, 0.4);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.22em;
}

.planet-debris-layer {
    inset: -18%;
    pointer-events: none;
    z-index: 4;
    border-radius: 50%;
    overflow: visible;
}

.orbiter-icon {
    position: absolute;
    width: 15px;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(180deg, #fffdf7 0%, #d9d1c4 100%);
    box-shadow:
        0 0 0 1px rgba(19, 22, 28, 0.35),
        0 1px 4px rgba(0, 0, 0, 0.26);
    transform: translate(-50%, -50%) rotate(var(--tilt, 0deg));
}

.orbiter-icon::before,
.orbiter-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 7px;
    height: 3px;
    background: linear-gradient(180deg, rgba(241, 213, 117, 0.98), rgba(159, 116, 34, 0.98));
    border-radius: 2px;
    transform: translateY(-50%);
}

.orbiter-icon::before {
    left: -5px;
}

.orbiter-icon::after {
    right: -5px;
}

.orbiter-icon i {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 4px;
    height: 4px;
    margin-left: -2px;
    margin-top: -2px;
    border-radius: 50%;
    background: #c0442a;
    box-shadow: 0 0 4px rgba(192, 68, 42, 0.25);
}

.orbiter-overflow {
    position: absolute;
    left: 8%;
    bottom: 6%;
    min-width: 48px;
    padding: 0.32rem 0.55rem;
    border-radius: 999px;
    background: rgba(12, 14, 22, 0.88);
    border: 1px solid rgba(201, 164, 76, 0.3);
    color: var(--gold);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-align: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
}

.planet-debris {
    --size: 11px;
    position: absolute;
    left: 50%;
    top: 50%;
    width: var(--size);
    height: var(--size);
    margin-left: calc(var(--size) * -0.5);
    margin-top: calc(var(--size) * -0.5);
    border-radius: 50% 48% 43% 56%;
    background:
        radial-gradient(circle at 35% 35%, rgba(255, 213, 185, 0.9), rgba(192, 68, 42, 0.88) 58%, rgba(85, 29, 18, 0.96));
    box-shadow:
        0 0 10px rgba(201, 164, 76, 0.16);
    opacity: 0;
    animation: debrisBurst 0.9s ease-out forwards;
}

@keyframes debrisBurst {
    0% {
        opacity: 0.95;
        transform: translate(-50%, -50%) scale(0.8);
    }
    100% {
        opacity: 0;
        transform: translate(calc(-50% + var(--travel-x)), calc(-50% + var(--travel-y))) rotate(var(--spin, 0deg)) scale(0.45);
    }
}

.click-burst-layer {
    position: relative;
    min-height: 28px;
    margin-top: 0.35rem;
    margin-bottom: 0.9rem;
    overflow: hidden;
}

.click-burst {
    position: absolute;
    left: 50%;
    top: 8px;
    color: var(--gold);
    font-weight: 700;
    letter-spacing: 0.08em;
    animation: mashBurst 1s ease forwards;
    pointer-events: none;
}

@keyframes mashBurst {
    from {
        opacity: 0;
        transform: translate(-50%, 8px) scale(0.85);
    }
    20% {
        opacity: 1;
    }
    to {
        opacity: 0;
        transform: translate(calc(-50% + var(--offset-x, 0px)), -24px) scale(1.05);
    }
}

.planet-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.planet-action {
    flex: 1 1 160px;
    text-align: center;
}

.planet-action--danger {
    border-color: rgba(192, 68, 42, 0.45);
    color: #ffad95;
}

.meter-card,
.list-card,
.dashboard-card,
.stat-card,
.store-card,
.slot-card {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
}

.meter-card,
.list-card,
.dashboard-card {
    padding: 1rem;
}

.meter-card {
    margin-bottom: 0.75rem;
}

.meter-card__header,
.list-card__header,
.dashboard-card__header,
.shop-panel__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.meter-card__track {
    height: 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.meter-card__fill {
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(90deg, #bb4a2a 0%, #dda14a 100%);
    box-shadow: 0 0 20px rgba(217, 85, 53, 0.3);
    transition: width 0.35s ease;
}

.meter-card p,
.placeholder-note,
.dashboard-card__copy {
    color: var(--text-dim);
    font-size: 0.9rem;
}

.placeholder-note {
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 18px;
    border: 1px dashed rgba(201, 164, 76, 0.32);
    background: rgba(201, 164, 76, 0.05);
}

.buff-list,
.achievement-list,
.meta-upgrade-list,
.slot-list,
.store-list {
    display: grid;
    gap: 0.8rem;
}

.buff-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0.9rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.055);
}

.buff-chip strong,
.store-card strong,
.meta-upgrade-card strong,
.slot-card strong,
.achievement-card strong,
.stat-card strong {
    color: var(--text-bright);
}

.buff-chip span,
.store-card span,
.meta-upgrade-card span,
.slot-card span,
.achievement-card span,
.stat-card span,
.mini-label {
    color: var(--text-dim);
    font-size: 0.8rem;
}

.stat-band {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
    margin-bottom: 0.8rem;
}

.next-unlock-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.next-unlock-card {
    padding: 0.95rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: grid;
    gap: 0.28rem;
}

.next-unlock-card strong {
    color: var(--text-bright);
}

.dashboard-card--focus {
    margin-bottom: 1rem;
}

.stat-card {
    padding: 0.85rem;
    min-height: 94px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.stat-card--primary {
    background:
        radial-gradient(circle at top left, rgba(217, 85, 53, 0.16), transparent 35%),
        rgba(255, 255, 255, 0.04);
}

.stat-card__label {
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 700;
}

.stat-card strong {
    font-size: clamp(1.35rem, 2vw, 2rem);
    line-height: 1.05;
}

.event-banner {
    margin-bottom: 0.8rem;
    padding: 0.8rem 0.9rem;
    border-radius: 18px;
    border: 1px solid rgba(201, 164, 76, 0.18);
    color: var(--text-bright);
    background: rgba(201, 164, 76, 0.06);
    min-height: 54px;
    display: flex;
    align-items: center;
}

.event-banner--alert {
    border-color: rgba(217, 85, 53, 0.45);
    background: rgba(217, 85, 53, 0.08);
}

.event-banner--idle {
    color: var(--text);
}

.supply-drop-stage {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(180px, 0.95fr);
    align-items: stretch;
    gap: 0.75rem;
    min-height: 124px;
    padding: 0.85rem;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background:
        radial-gradient(circle at 50% 130%, rgba(192, 68, 42, 0.28), transparent 42%),
        linear-gradient(180deg, rgba(20, 20, 32, 0.92), rgba(11, 11, 18, 0.98));
    margin-bottom: 0.8rem;
}

.supply-drop-layer {
    position: relative;
    min-height: 124px;
    z-index: 2;
}

.supply-drop-feedback-layer {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
}

.supply-drop-stage__copy {
    position: relative;
    z-index: 1;
    display: grid;
    align-content: center;
    padding: 0.15rem 0.15rem 0.15rem 0.3rem;
}

.supply-drop-stage__copy p {
    color: var(--text-dim);
    font-size: 0.9rem;
}

.supply-drop-explainer {
    margin-bottom: 0.3rem;
}

.supply-drop {
    position: absolute;
    width: 88px;
    aspect-ratio: 1;
    border: 0;
    background: transparent;
    cursor: pointer;
    z-index: 3;
    pointer-events: auto;
    touch-action: manipulation;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transform: translate(-50%, -50%);
    animation: supplyPulse 1.8s ease-in-out infinite;
}

.supply-drop::before,
.supply-drop::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
}

.supply-drop::before {
    background:
        linear-gradient(145deg, rgba(247, 223, 162, 0.95), rgba(205, 137, 56, 0.85));
    box-shadow: 0 0 30px rgba(201, 164, 76, 0.32);
}

.supply-drop::after {
    inset: 10px;
    border: 2px solid rgba(85, 37, 17, 0.22);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.25), transparent),
        radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.22), transparent 55%);
}

.supply-drop__label {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 0.66rem;
    line-height: 1.1;
    color: #50220f;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    z-index: 1;
    pointer-events: none;
}

.supply-drop-feedback {
    position: absolute;
    min-width: 128px;
    max-width: 180px;
    padding: 0.55rem 0.7rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(9, 11, 17, 0.94);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.32);
    transform: translate(-50%, -50%);
    animation: supplyFeedbackRise 1.4s ease-out forwards;
}

.supply-drop-feedback::before {
    content: '';
    position: absolute;
    inset: -12px;
    border-radius: 22px;
    border: 1px solid rgba(201, 164, 76, 0.28);
    opacity: 0;
    animation: supplyFeedbackRing 0.55s ease-out forwards;
}

.supply-drop-feedback strong {
    display: block;
    color: var(--text-bright);
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.supply-drop-feedback span {
    display: block;
    margin-top: 0.2rem;
    color: var(--text-dim);
    font-size: 0.8rem;
    line-height: 1.25;
}

.supply-drop-feedback--reward strong {
    color: var(--gold);
}

.supply-drop-feedback--buff strong {
    color: #ffd8a8;
}

@keyframes supplyFeedbackRise {
    0% {
        opacity: 0;
        transform: translate(-50%, -35%) scale(0.82);
    }
    18% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -95%) scale(1);
    }
}

@keyframes supplyFeedbackRing {
    0% {
        opacity: 0.9;
        transform: scale(0.7);
    }
    100% {
        opacity: 0;
        transform: scale(1.18);
    }
}

.supply-drop--storm::before {
    background: linear-gradient(145deg, rgba(255, 200, 147, 0.95), rgba(192, 68, 42, 0.88));
}

.supply-drop--chain::before {
    background: linear-gradient(145deg, rgba(255, 245, 197, 0.95), rgba(201, 164, 76, 0.92));
}

@keyframes supplyPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.08);
    }
}

.dashboard-card__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 0.85rem;
}

.dashboard-card__grid strong,
.achievement-summary strong {
    display: block;
    margin-top: 0.2rem;
    font-size: 1.35rem;
}

.dashboard-card__actions {
    display: flex;
    justify-content: flex-start;
}

.achievement-summary {
    display: flex;
    align-items: baseline;
    gap: 0.55rem;
    margin-bottom: 0.85rem;
}

.achievement-card,
.meta-upgrade-card,
.slot-card,
.store-card {
    padding: 0.9rem;
}

.achievement-card,
.meta-upgrade-card,
.slot-card {
    display: grid;
    gap: 0.3rem;
}

.achievement-card--shadow {
    border-color: rgba(201, 164, 76, 0.24);
    background: rgba(201, 164, 76, 0.05);
}

.achievement-card--locked {
    opacity: 0.5;
}

.meta-upgrade-card,
.store-card {
    position: relative;
    z-index: 2;
    display: grid;
    gap: 0.35rem;
}

.meta-upgrade-card__actions,
.store-card__actions,
.slot-card__actions {
    position: relative;
    z-index: 4;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.35rem;
}

.store-btn,
.slot-btn {
    position: relative;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0.65rem 0.85rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-bright);
    font-family: var(--font-body);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.store-btn:hover,
.slot-btn:hover {
    border-color: rgba(201, 164, 76, 0.4);
    background: rgba(201, 164, 76, 0.08);
}

.store-btn[disabled],
.slot-btn[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
}

.store-card__title-row,
.meta-upgrade-card__title-row,
.slot-card__title-row {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
}

.store-card__eyebrow,
.meta-upgrade-card__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--gold);
    font-size: 0.68rem;
    font-weight: 700;
}

.store-card--owned,
.meta-upgrade-card--owned,
.slot-card--filled {
    border-color: rgba(201, 164, 76, 0.24);
    background: rgba(201, 164, 76, 0.05);
}

.store-card--locked,
.meta-upgrade-card--locked {
    opacity: 0.62;
}

.store-card__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.mobile-toggles {
    display: none;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.advanced-panel {
    margin-top: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.025);
    overflow: hidden;
}

.advanced-panel summary {
    padding: 1rem;
    cursor: pointer;
    color: var(--text-bright);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    list-style: none;
}

.advanced-panel summary::-webkit-details-marker {
    display: none;
}

.advanced-panel__content {
    padding: 0 1rem 1rem;
    display: grid;
    gap: 0.8rem;
}

.shop-toggle {
    flex: 1;
    min-height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    border-radius: 14px;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;
}

.shop-toggle.is-active {
    background: rgba(192, 68, 42, 0.12);
    border-color: rgba(192, 68, 42, 0.32);
    color: var(--text-bright);
}

.shop-panel {
    position: relative;
    z-index: 3;
    display: grid;
    gap: 0.8rem;
}

.shop-panel + .shop-panel {
    margin-top: 1rem;
}

.slot-card__slot-index {
    color: var(--gold);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

@media (max-width: 1180px) {
    .mars-masher-body {
        height: auto;
        overflow: auto;
    }

    .mars-masher-shell {
        height: auto;
        margin-top: var(--nav-height);
    }

    .mars-masher-grid {
        height: auto;
        grid-template-columns: 1fr;
    }

    .game-panel--left,
    .game-panel--center,
    .game-panel--right {
        order: unset;
    }

    .game-panel {
        height: auto;
    }
}

@media (max-width: 820px) {
    .mars-masher-shell {
        padding-top: 1.1rem;
    }

    .mars-masher-grid {
        width: min(100% - 1.5rem, 100%);
        gap: 0.9rem;
    }

    .game-panel {
        padding: 1rem;
        border-radius: 22px;
    }

    .stat-band {
        grid-template-columns: 1fr;
    }

    .next-unlock-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-card__grid {
        grid-template-columns: 1fr 1fr;
    }

    .mobile-toggles {
        display: flex;
    }

    .shop-panel {
        display: none;
    }

    .shop-panel.shop-panel--active {
        display: grid;
    }

    .shop-panel + .shop-panel {
        margin-top: 0;
    }

    .supply-drop-stage {
        grid-template-columns: 1fr;
        gap: 0.4rem;
    }

    .supply-drop-layer {
        min-height: 132px;
    }

    .supply-drop-stage__copy {
        padding: 0 0.15rem 0.15rem;
    }
}

@media (max-width: 560px) {
    .planet-button {
        width: min(100%, 232px);
    }

    .dashboard-card__grid {
        grid-template-columns: 1fr;
    }

    .planet-actions,
    .meta-upgrade-card__actions,
    .store-card__actions,
    .slot-card__actions {
        flex-direction: column;
    }
}
