#plant-stats-open.shop-title {
    appearance: none;
    border: 0;
    padding: 2px 4px;
    border-radius: 6px;
    background: transparent;
    font: inherit;
    font-size: 1.15rem;
    line-height: 1;
    color: #fff6b9;
    cursor: pointer;
    text-shadow:
        0 0 5px #fff7a8,
        0 0 10px #ffcf3d,
        0 0 15px #49f0ff,
        1px 1px 0 #5f2a08;
    animation: seedShackGlow 3.6s linear infinite;
    pointer-events: auto;
}

#plant-stats-open.shop-title:hover {
    transform: translateY(-1px) scale(1.03);
    filter: saturate(1.2);
}

#plant-stats-open.shop-title:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 2px;
}

@keyframes seedShackGlow {
    0% {
        color: #fff4a3;
        text-shadow: 0 0 5px #fff8bd, 0 0 12px #ffcb35, 0 0 18px #5fffe2, 1px 1px 0 #5f2a08;
    }
    33% {
        color: #b8fff0;
        text-shadow: 0 0 5px #eaffff, 0 0 13px #45ebff, 0 0 20px #8dff6d, 1px 1px 0 #5f2a08;
    }
    66% {
        color: #ffd1ff;
        text-shadow: 0 0 5px #fff4ff, 0 0 13px #ff70cf, 0 0 20px #ffe24f, 1px 1px 0 #5f2a08;
    }
    100% {
        color: #fff4a3;
        text-shadow: 0 0 5px #fff8bd, 0 0 12px #ffcb35, 0 0 18px #5fffe2, 1px 1px 0 #5f2a08;
    }
}

#plant-stats-overlay {
    position: fixed;
    inset: 0;
    z-index: 86;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(19, 52, 28, 0.56);
    backdrop-filter: blur(4px);
    pointer-events: auto;
}

#plant-stats-overlay.open {
    display: flex;
}

#plant-stats-panel {
    width: min(1120px, calc(100vw - 28px));
    max-height: min(760px, calc(100vh - 28px));
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr);
    border: 4px solid #fff0a6;
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255, 249, 211, 0.98), rgba(219, 248, 216, 0.98)),
        radial-gradient(circle at 16% 0%, rgba(255, 217, 71, 0.34), transparent 34%);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.36), inset 0 0 0 2px rgba(66, 119, 38, 0.18);
    color: #17381f;
    overflow: hidden;
}

.plant-stats-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 20px 14px;
    border-bottom: 2px solid rgba(65, 106, 38, 0.18);
    background: linear-gradient(90deg, rgba(255, 240, 140, 0.65), rgba(142, 235, 255, 0.24));
}

.plant-stats-title {
    font-size: 31px;
    font-weight: 1000;
    color: #17381f;
    line-height: 1;
}

.plant-stats-subtitle {
    margin-top: 6px;
    color: #4d6a3b;
    font-size: 13px;
    font-weight: 850;
}

.plant-stats-close {
    min-width: 76px;
    border: 0;
    border-radius: 7px;
    padding: 10px 12px;
    background: #18351f;
    color: #fff8d4;
    font: inherit;
    font-weight: 950;
    box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.22);
    cursor: pointer;
}

.plant-stats-tools {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto auto;
    gap: 12px;
    align-items: center;
    padding: 12px 18px;
    border-bottom: 2px solid rgba(65, 106, 38, 0.14);
}

#plant-stats-search {
    min-width: 0;
    border: 3px solid rgba(81, 43, 16, 0.2);
    border-radius: 8px;
    padding: 11px 12px;
    background: rgba(255, 255, 255, 0.76);
    color: #17381f;
    font: inherit;
    font-weight: 850;
}

.plant-stats-sort {
    display: grid;
    grid-template-columns: auto minmax(145px, auto) auto;
    align-items: center;
    gap: 7px;
}

.plant-stats-sort label {
    color: #315224;
    font-size: 12px;
    font-weight: 1000;
    text-transform: uppercase;
}

#plant-stats-sort {
    min-width: 154px;
    border: 2px solid rgba(47, 91, 38, 0.24);
    border-radius: 8px;
    padding: 9px 10px;
    background: rgba(255, 255, 255, 0.72);
    color: #17381f;
    font: inherit;
    font-size: 12px;
    font-weight: 950;
}

#plant-stats-sort-direction {
    min-width: 82px;
    border: 2px solid rgba(47, 91, 38, 0.24);
    border-radius: 8px;
    padding: 9px 10px;
    background: linear-gradient(180deg, #fff1a8, #f2bc3c);
    color: #3c2a06;
    font: inherit;
    font-size: 12px;
    font-weight: 1000;
    cursor: pointer;
    box-shadow: 0 3px 0 rgba(117, 74, 11, 0.28);
}

.plant-stats-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    justify-content: end;
}

.plant-stats-tabs button {
    border: 2px solid rgba(47, 91, 38, 0.24);
    border-radius: 999px;
    padding: 8px 11px;
    background: rgba(255, 255, 255, 0.58);
    color: #24491e;
    font: inherit;
    font-size: 12px;
    font-weight: 1000;
    cursor: pointer;
}

.plant-stats-tabs button.active {
    border-color: #ffffff;
    background: linear-gradient(180deg, #7df476, #34bd53);
    color: #103816;
    box-shadow: 0 4px 0 rgba(17, 98, 32, 0.38);
}

#plant-stats-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 18px;
    border-bottom: 2px solid rgba(65, 106, 38, 0.14);
}

.plant-stat-chip {
    border-radius: 999px;
    padding: 7px 10px;
    background: rgba(255, 255, 255, 0.66);
    color: #315224;
    font-size: 12px;
    font-weight: 950;
}

.plant-stats-table-wrap {
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
}

#plant-stats-table {
    width: 100%;
    min-width: 960px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}

#plant-stats-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 10px 9px;
    background: #315d2a;
    color: #fff9d4;
    text-align: left;
    font-size: 12px;
    font-weight: 1000;
    text-transform: uppercase;
}

#plant-stats-table td {
    padding: 9px;
    border-bottom: 1px solid rgba(52, 88, 39, 0.16);
    background: rgba(255, 255, 255, 0.42);
    vertical-align: middle;
    font-weight: 780;
}

#plant-stats-table tr:nth-child(even) td {
    background: rgba(240, 255, 226, 0.5);
}

#plant-stats-table tr.slot-row td {
    background: rgba(229, 249, 255, 0.52);
}

#plant-stats-table tr.gold-row td {
    background: rgba(255, 240, 155, 0.56);
}

.plant-stat-name-cell {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 9px;
    align-items: center;
}

.plant-stat-thumb {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    background: linear-gradient(145deg, #faffc0, #74e4ff);
    box-shadow: inset 0 -5px 0 rgba(0, 93, 170, 0.15), 0 3px 0 rgba(63, 45, 17, 0.22);
}

.plant-stat-name {
    display: block;
    color: #17381f;
    font-weight: 1000;
}

.plant-stat-id {
    display: block;
    margin-top: 2px;
    color: #668158;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11px;
    font-weight: 800;
}

.plant-stat-pill {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    border-radius: 999px;
    padding: 4px 8px;
    background: rgba(48, 91, 42, 0.12);
    color: #21451d;
    font-size: 12px;
    font-weight: 950;
    white-space: nowrap;
}

.plant-stat-pill.gold {
    background: #ffd955;
    color: #53380a;
}

.plant-stat-pill.slot {
    background: #aeeefa;
    color: #14424a;
}

.plant-stat-empty {
    padding: 26px !important;
    text-align: center;
    color: #557348;
    font-weight: 950;
}

@media (max-width: 760px) {
    #plant-stats-overlay {
        padding: 8px;
    }

    #plant-stats-panel {
        width: calc(100vw - 16px);
        max-height: calc(100vh - 16px);
    }

    .plant-stats-header {
        padding: 14px;
    }

    .plant-stats-title {
        font-size: 24px;
    }

    .plant-stats-tools {
        grid-template-columns: 1fr;
    }

    .plant-stats-sort {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .plant-stats-tabs {
        justify-content: start;
    }
}
