* {
    box-sizing: border-box;
}

:root {
    color-scheme: light;
    --eco-green: #16a34a;
    --eco-green-dark: #166534;
    --eco-lime: #bef264;
    --eco-blue: #0ea5e9;
    --eco-yellow: #fde68a;
    --eco-orange: #fb923c;
    --eco-purple: #8b5cf6;
    --eco-text: #173b2f;
    --eco-muted: #5b756b;
    --eco-card: rgba(255, 255, 255, 0.86);
    --eco-border: rgba(22, 101, 52, 0.16);
    --eco-shadow: 0 22px 60px rgba(20, 83, 45, 0.18);
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Outfit", "Segoe UI", system-ui, sans-serif;
    color: var(--eco-text);
    background:
        radial-gradient(circle at 12% 10%, rgba(190, 242, 100, 0.55), transparent 28%),
        radial-gradient(circle at 85% 6%, rgba(14, 165, 233, 0.32), transparent 30%),
        radial-gradient(circle at 78% 82%, rgba(251, 146, 60, 0.2), transparent 28%),
        linear-gradient(145deg, #f0fdf4 0%, #dcfce7 42%, #e0f2fe 100%);
}

button,
input {
    font: inherit;
}

.eco-app {
    width: min(1440px, calc(100% - 28px));
    margin: 0 auto;
    padding: 22px 0 44px;
}

.eco-hero,
.eco-layout,
.gallery-shell,
.teacher-notes article {
    border: 1px solid var(--eco-border);
    background: var(--eco-card);
    box-shadow: var(--eco-shadow);
    backdrop-filter: blur(14px);
}

.eco-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
    gap: 22px;
    align-items: stretch;
    margin-bottom: 18px;
    padding: 28px;
    border-radius: 30px;
    overflow: hidden;
}

.eco-hero::before {
    content: "";
    position: absolute;
    inset: auto -8% -45% 45%;
    height: 220px;
    border-radius: 999px;
    background: rgba(22, 163, 74, 0.12);
    transform: rotate(-8deg);
}

.eco-hero-copy,
.eco-hero-card,
.eco-back {
    position: relative;
    z-index: 1;
}

.eco-kicker {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--eco-green-dark);
    background: rgba(187, 247, 208, 0.88);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.eco-hero h1,
.gallery-info h2,
.teacher-notes h2 {
    margin: 0;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.eco-hero h1 {
    font-size: clamp(2.2rem, 6vw, 5.4rem);
    line-height: 0.95;
    color: var(--eco-green-dark);
}

.eco-hero p,
.gallery-info p,
.teacher-notes p,
.eco-panel-head p {
    color: var(--eco-muted);
}

.eco-hero-copy p {
    max-width: 760px;
    margin: 14px 0 20px;
    font-size: clamp(1rem, 1.7vw, 1.2rem);
}

.eco-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.eco-btn,
.eco-link-btn,
.gallery-tab,
.upload-card {
    border: 0;
    cursor: pointer;
    font-weight: 800;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.eco-btn,
.eco-link-btn {
    border-radius: 16px;
}

.eco-btn {
    padding: 12px 16px;
    color: var(--eco-green-dark);
    background: #fff;
    box-shadow: 0 7px 0 rgba(20, 83, 45, 0.16), 0 14px 28px rgba(20, 83, 45, 0.12);
}

.eco-btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--eco-green), #22c55e);
}

.eco-btn:hover,
.eco-link-btn:hover,
.gallery-tab:hover,
.upload-card:hover,
.block-card:hover,
.gallery-item:hover {
    transform: translateY(-2px);
}

.eco-btn:active,
.eco-link-btn:active,
.gallery-tab:active,
.upload-card:active,
.block-card:active,
.gallery-item:active {
    transform: translateY(2px);
}

.eco-hero-card {
    display: grid;
    align-content: center;
    min-height: 220px;
    padding: 22px;
    border-radius: 24px;
    color: #164e2f;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(220, 252, 231, 0.84)),
        radial-gradient(circle at top right, rgba(14, 165, 233, 0.22), transparent 45%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.eco-hero-card strong {
    font-size: 1.25rem;
}

.eco-link-btn {
    justify-self: start;
    padding: 10px 13px;
    color: var(--eco-green-dark);
    background: var(--eco-yellow);
}

.eco-back {
    position: absolute;
    top: 18px;
    right: 20px;
    color: var(--eco-green-dark);
    font-weight: 800;
    text-decoration: none;
}

.eco-layout {
    display: grid;
    grid-template-columns: 290px minmax(260px, 0.9fr) minmax(330px, 1.2fr);
    gap: 16px;
    padding: 16px;
    border-radius: 28px;
}

.eco-panel,
.eco-workspace,
.eco-stage-card {
    min-width: 0;
    padding: 16px;
    border: 1px solid rgba(22, 101, 52, 0.12);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.65);
}

.eco-panel-head {
    margin-bottom: 14px;
}

.eco-panel-head h2 {
    margin: 0 0 4px;
    font-size: 1.18rem;
}

.eco-panel-head p {
    margin: 0;
    font-size: 0.92rem;
}

.block-list,
.program-list {
    display: grid;
    gap: 10px;
}

.block-card,
.program-block {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    border: 0;
    border-radius: 18px;
    text-align: left;
    color: #fff;
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.13);
}

.block-card {
    min-height: 56px;
    padding: 12px;
    cursor: pointer;
}

.block-icon {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    place-items: center;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.24);
    font-size: 1.25rem;
}

.block-card strong,
.program-block strong {
    display: block;
}

.block-card span:not(.block-icon),
.program-block small {
    display: block;
    opacity: 0.88;
    font-size: 0.78rem;
}

.program-list {
    min-height: 314px;
    align-content: start;
}

.program-block {
    justify-content: space-between;
    padding: 12px;
}

.program-actions {
    display: flex;
    gap: 6px;
}

.program-actions button {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 0;
    border-radius: 10px;
    color: inherit;
    background: rgba(255, 255, 255, 0.22);
    cursor: pointer;
}

.program-empty {
    display: none;
    margin-top: 12px;
    padding: 18px;
    border: 2px dashed rgba(22, 101, 52, 0.22);
    border-radius: 20px;
    color: var(--eco-muted);
    text-align: center;
}

.program-empty.visible {
    display: block;
}

.stage {
    position: relative;
    height: 410px;
    overflow: hidden;
    border: 7px solid rgba(255, 255, 255, 0.8);
    border-radius: 28px;
    background: linear-gradient(#7dd3fc 0 48%, #dcfce7 48% 100%);
    box-shadow: inset 0 -20px 60px rgba(22, 101, 52, 0.18);
}

.stage-sky {
    position: absolute;
    inset: 0 0 45%;
    background:
        radial-gradient(circle at 18% 20%, #fff7ad 0 44px, transparent 46px),
        radial-gradient(circle at 72% 24%, rgba(255, 255, 255, 0.78) 0 28px, transparent 30px),
        radial-gradient(circle at 82% 22%, rgba(255, 255, 255, 0.78) 0 22px, transparent 24px);
}

.stage-mountain {
    position: absolute;
    left: 5%;
    right: 8%;
    bottom: 35%;
    height: 190px;
    background: linear-gradient(135deg, #86efac, #15803d);
    clip-path: polygon(0 100%, 28% 22%, 44% 58%, 58% 12%, 100% 100%);
    opacity: 0.88;
}

.stage-river {
    position: absolute;
    left: 34%;
    bottom: -22%;
    width: 28%;
    height: 62%;
    border-radius: 60% 60% 0 0;
    background: linear-gradient(180deg, rgba(125, 211, 252, 0.82), rgba(14, 165, 233, 0.95));
    transform: rotate(7deg);
}

.stage-ground {
    position: absolute;
    inset: auto 0 0;
    height: 34%;
    background:
        radial-gradient(circle at 12% 58%, rgba(22, 163, 74, 0.45) 0 20px, transparent 22px),
        radial-gradient(circle at 72% 62%, rgba(132, 204, 22, 0.35) 0 28px, transparent 30px),
        linear-gradient(180deg, #86efac, #4ade80);
}

.sprite {
    position: absolute;
    z-index: 5;
    display: grid;
    width: 76px;
    height: 76px;
    place-items: center;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 12px 24px rgba(20, 83, 45, 0.22);
    user-select: none;
}

.sprite span {
    font-size: 2.35rem;
}

.hero-sprite {
    left: 38px;
    bottom: 72px;
    transition: transform 0.45s ease;
}

.stage-item {
    cursor: grab;
    transition: transform 0.2s ease;
}

.stage-item:hover {
    transform: translateY(-3px) scale(1.04);
}

.stage-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.speech {
    position: absolute;
    z-index: 8;
    left: 98px;
    bottom: 152px;
    display: none;
    max-width: 210px;
    padding: 10px 12px;
    border-radius: 18px 18px 18px 4px;
    color: var(--eco-green-dark);
    background: #fff;
    box-shadow: 0 10px 24px rgba(20, 83, 45, 0.18);
    font-weight: 800;
}

.speech.visible {
    display: block;
}

.run-log {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 15px;
    color: var(--eco-green-dark);
    background: rgba(220, 252, 231, 0.78);
    font-weight: 700;
}

.gallery-shell {
    display: grid;
    grid-template-columns: minmax(240px, 330px) 1fr;
    gap: 18px;
    margin-top: 18px;
    padding: 18px;
    border-radius: 28px;
}

.gallery-info h2 {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    color: var(--eco-green-dark);
}

.upload-card {
    display: inline-flex;
    margin-top: 10px;
    padding: 14px 16px;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(135deg, var(--eco-blue), #2563eb);
    box-shadow: 0 7px 0 rgba(37, 99, 235, 0.2);
}

.upload-card input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.gallery-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.gallery-tab {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--eco-green-dark);
    background: rgba(255, 255, 255, 0.86);
}

.gallery-tab.active {
    color: #fff;
    background: var(--eco-green);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.gallery-item {
    min-height: 126px;
    padding: 10px;
    border: 1px solid rgba(22, 101, 52, 0.12);
    border-radius: 18px;
    color: var(--eco-text);
    background: rgba(255, 255, 255, 0.72);
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(20, 83, 45, 0.1);
}

.gallery-preview {
    display: grid;
    height: 76px;
    place-items: center;
    margin-bottom: 8px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(220, 252, 231, 0.85), rgba(224, 242, 254, 0.82));
    overflow: hidden;
}

.gallery-preview img {
    max-width: 86%;
    max-height: 86%;
    object-fit: contain;
}

.gallery-preview span {
    font-size: 2.5rem;
}

.gallery-item strong {
    display: block;
    font-size: 0.88rem;
}

.gallery-item small {
    color: var(--eco-muted);
}

.teacher-notes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.teacher-notes article {
    padding: 20px;
    border-radius: 24px;
}

.teacher-notes h2 {
    color: var(--eco-green-dark);
}

.block-motion {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.block-look {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.block-nature {
    background: linear-gradient(135deg, #16a34a, #15803d);
}

.block-care {
    background: linear-gradient(135deg, #f97316, #ea580c);
}

.block-time {
    background: linear-gradient(135deg, #64748b, #475569);
}

@media (max-width: 1180px) {
    .eco-layout {
        grid-template-columns: 1fr 1fr;
    }

    .eco-stage-card {
        grid-column: 1 / -1;
    }
}

@media (max-width: 820px) {
    .eco-app {
        width: min(100% - 18px, 720px);
        padding-top: 10px;
    }

    .eco-hero,
    .eco-layout,
    .gallery-shell,
    .teacher-notes {
        grid-template-columns: 1fr;
    }

    .eco-hero {
        padding: 22px 16px;
    }

    .eco-back {
        position: static;
        display: inline-block;
    }

    .stage {
        height: 340px;
    }
}
