body {
    background: radial-gradient(circle at 20% 20%, #f3fff4, #e5f2ff 40%, #f9f6ff 100%);
}

.grove-container {
    max-width: 1100px;
    margin: 2rem auto 4rem;
    padding: 2rem;
    position: relative;
}

.grove-shell {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 18px;
    box-shadow: 0 18px 50px rgba(63, 99, 131, 0.15);
    padding: 2rem;
    overflow: hidden;
    position: relative;
}

.floating-bubble {
    position: absolute;
    border-radius: 50%;
    filter: blur(0);
    opacity: 0.25;
}

.floating-bubble.one { width: 280px; height: 280px; background: #d5f8de; top: -80px; right: -80px; }
.floating-bubble.two { width: 220px; height: 220px; background: #d7e8ff; bottom: -90px; left: -60px; }
.floating-bubble.three { width: 160px; height: 160px; background: #ffe8d7; top: 30%; left: -40px; }

.grove-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.grove-title {
    max-width: 600px;
}

.grove-title h1 {
    font-size: 2.8rem;
    margin-bottom: 0.3rem;
    color: #19314d;
}

.grove-title p {
    color: #4c5d70;
    font-size: 1.05rem;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    background: #eef7ff;
    color: #1f71c2;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.9rem;
}

.scoreboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.score-card {
    background: #0f172a;
    color: white;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25);
}

.score-label {
    opacity: 0.7;
    font-size: 0.85rem;
}

.score-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
    margin-top: 0.3rem;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin: 2rem 0 1rem;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.stat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.6rem;
}

.stat-name {
    font-weight: 700;
    color: #1f2937;
}

.stat-value {
    font-weight: 800;
    color: #0f172a;
}

.bar-outer {
    width: 100%;
    height: 12px;
    background: #eef2f7;
    border-radius: 999px;
    overflow: hidden;
}

.bar-inner {
    height: 100%;
    width: 50%;
    border-radius: 999px;
    transition: width 0.25s ease, background 0.25s ease;
}

.scenario-card {
    background: linear-gradient(120deg, #0ea5e9, #38bdf8, #5eead4);
    color: white;
    padding: 1.5rem;
    border-radius: 14px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(14, 165, 233, 0.35);
}

.scenario-card:after {
    content: "";
    position: absolute;
    right: -40px;
    top: -40px;
    width: 180px;
    height: 180px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 30% 70% 67% 33% / 30% 44% 56% 70%;
    transform: rotate(12deg);
}

.scenario-label {
    display: inline-block;
    padding: 0.35rem 0.8rem;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.4px;
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
}

.scenario-title {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 0.4rem;
}

.scenario-body {
    opacity: 0.9;
    max-width: 800px;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.action-card {
    text-align: left;
    background: white;
    border: 2px solid #e6edf5;
    border-radius: 12px;
    padding: 1rem 1.1rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border 0.2s ease;
    position: relative;
}

.action-card:hover,
.action-card:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-color: #38bdf8;
    outline: none;
}

.action-card strong {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.3rem;
    font-size: 1.05rem;
}

.action-desc {
    color: #4b5563;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.effect-row {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.effect-pill {
    background: #f1f5f9;
    color: #0f172a;
    border-radius: 999px;
    padding: 0.25rem 0.6rem;
    font-weight: 700;
    font-size: 0.85rem;
}

.hotkey {
    font-weight: 800;
    color: #0ea5e9;
}

.footer-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.log {
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 12px;
    padding: 0.9rem 1rem;
    min-height: 64px;
    font-size: 0.95rem;
}

.control-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.ghost {
    background: transparent;
    color: #0f172a;
    border: 2px solid #0f172a;
}

.ghost:hover {
    background: #0f172a;
    color: white;
}

.overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    color: white;
}

.overlay-card {
    background: #0f172a;
    padding: 2rem;
    border-radius: 14px;
    width: min(640px, 92vw);
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.overlay-card h2 {
    margin-bottom: 0.5rem;
    color: #22d3ee;
}

.overlay-card ul {
    text-align: left;
    margin: 1rem 0 1.5rem;
    padding-left: 1.2rem;
    color: #cbd5e1;
    line-height: 1.5;
}

.overlay-card li + li {
    margin-top: 0.5rem;
}

.end-badge {
    display: inline-block;
    background: #22c55e;
    color: #0f172a;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-weight: 800;
    margin-bottom: 0.6rem;
}

@media (max-width: 680px) {
    .grove-shell {
        padding: 1.25rem;
    }

    .grove-title h1 {
        font-size: 2.1rem;
    }

    .actions-grid {
        grid-template-columns: 1fr;
    }

    .scoreboard {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
}
