:root {
    --bg-top: #eef8ea;
    --bg-bottom: #f7f2e3;
    --surface: rgba(255, 255, 255, 0.84);
    --text: #17322a;
    --muted: #5b7168;
    --line: rgba(23, 50, 42, 0.1);
    --sun: #f59e0b;
    --sun-strong: #d97706;
    --leaf: #22c55e;
    --leaf-strong: #15803d;
    --air: #0ea5e9;
    --air-strong: #0369a1;
    --soil: #8b5e34;
    --soil-strong: #6f4522;
    --shadow: 0 26px 70px rgba(82, 101, 78, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: "IBM Plex Sans JP", sans-serif;
    background:
        radial-gradient(circle at 16% 14%, rgba(245, 158, 11, 0.14), transparent 22%),
        radial-gradient(circle at 84% 18%, rgba(34, 197, 94, 0.12), transparent 18%),
        radial-gradient(circle at 50% 108%, rgba(139, 94, 52, 0.08), transparent 24%),
        linear-gradient(180deg, var(--bg-top) 0%, #f6fbf2 36%, var(--bg-bottom) 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(23, 50, 42, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(23, 50, 42, 0.03) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.14));
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

canvas {
    display: block;
}

.page-shell {
    width: min(1280px, calc(100% - 24px));
    margin: 0 auto;
    padding-bottom: 80px;
}

.site-header {
    position: sticky;
    top: 14px;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 18px 0 20px;
    padding: 16px 22px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(23, 50, 42, 0.08);
    backdrop-filter: blur(18px);
    box-shadow: 0 14px 34px rgba(114, 141, 101, 0.14);
}

.brand,
h1,
h2,
h3,
.signal-main,
.footer-title {
    font-family: "Shippori Mincho", serif;
}

.brand {
    font-size: 1.14rem;
    letter-spacing: 0.12em;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 18px;
    color: rgba(23, 50, 42, 0.8);
    font-size: 0.95rem;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.footer-links a:hover,
.footer-links a:focus-visible {
    color: #0b6b52;
}

.section,
.signal-strip,
.site-footer {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 520ms ease, transform 520ms ease;
}

.reveal.is-visible,
.site-footer.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    padding: 34px 0 22px;
}

.stage-copy,
.simulation-shell,
.model-card,
.observation-card,
.related-card,
.signal-strip,
.site-footer {
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.stage-copy {
    position: relative;
    overflow: hidden;
    min-width: 0;
    padding: 42px 36px 42px 38px;
    border-radius: 36px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 252, 245, 0.92));
}

.stage-copy::after {
    content: "";
    position: absolute;
    right: -54px;
    bottom: -92px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.16), rgba(34, 197, 94, 0));
}

.eyebrow,
.card-label,
.signal-kicker {
    margin: 0 0 12px;
    color: #0f7b54;
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

h1,
h2,
h3,
.brand {
    line-height: 1.15;
}

h1,
h2 {
    margin: 0;
}

h1 {
    font-size: clamp(2.6rem, 5vw, 4.5rem);
    letter-spacing: -0.04em;
}

h2 {
    font-size: clamp(2rem, 3vw, 3rem);
    letter-spacing: -0.03em;
}

h3 {
    margin: 0;
    font-size: 1.34rem;
}

.stage-lead,
.section-heading p,
.model-card p,
.observation-card p,
.related-card p,
.site-footer p,
.signal-sub,
.panel-header p,
.panel-status,
.floating-hint,
.stage-stats span,
.control span,
.subheading,
.button-secondary,
.note,
.stat-card span {
    color: var(--muted);
}

.stage-lead {
    margin: 20px 0 0;
    font-size: 1.04rem;
    line-height: 1.85;
}

.stage-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.stage-tags span {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.12);
    color: #166534;
    font-size: 0.9rem;
}

.simulation-shell {
    order: -1;
    position: relative;
    min-width: 0;
    min-height: 860px;
    border-radius: 38px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 252, 245, 0.98));
}

.simulation-shell::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 180px;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(248, 249, 241, 0.62));
}

#plantCanvas {
    width: 100%;
    height: 100%;
    min-height: 860px;
    background: linear-gradient(180deg, #dbeafe 0%, #f0fdf4 68%, #d9a56f 68%, #b77942 100%);
    border-radius: 38px;
}

.panel {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 2;
    width: min(392px, calc(100% - 40px));
    padding: 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(23, 50, 42, 0.1);
    backdrop-filter: blur(16px);
    box-shadow: 0 16px 34px rgba(114, 141, 101, 0.12);
}

.panel-header h2 {
    font-size: 1.42rem;
}

.panel-header p {
    margin: 8px 0 0;
    font-size: 0.93rem;
    line-height: 1.65;
}

.subheading {
    margin: 16px 0 10px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.control {
    display: grid;
    gap: 6px;
    margin-bottom: 12px;
}

.control span,
.control strong {
    font-size: 0.9rem;
}

.control strong {
    justify-self: end;
    color: #0b6b52;
}

.control input[type="range"] {
    width: 100%;
    accent-color: var(--leaf-strong);
}

.button-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.action-grid {
    margin-top: 8px;
}

button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--leaf), var(--leaf-strong));
    color: white;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

button:hover,
.button:hover,
button:focus-visible,
.button:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(21, 128, 61, 0.18);
}

.day-action {
    background: linear-gradient(135deg, var(--sun), var(--sun-strong));
}

.night-action,
.reset-action,
.button-secondary {
    background: linear-gradient(135deg, #475569, #334155);
}

.feed-action {
    background: linear-gradient(135deg, var(--leaf), var(--leaf-strong));
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
}

.stat-card {
    padding: 10px;
    border-radius: 14px;
    background: rgba(246, 250, 245, 0.92);
    border: 1px solid rgba(23, 50, 42, 0.06);
}

.stat-card strong {
    display: block;
    margin-top: 3px;
    font-size: 1.08rem;
    color: #132f25;
}

.note {
    margin: 14px 0 0;
    font-size: 0.83rem;
    line-height: 1.65;
}

.panel-status {
    margin: 14px 0 0;
    font-size: 0.92rem;
    line-height: 1.7;
}

.floating-hint {
    position: absolute;
    top: 132px;
    right: 20px;
    z-index: 2;
    max-width: 320px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(23, 50, 42, 0.08);
    font-size: 0.92rem;
    line-height: 1.65;
}

.stage-stats {
    position: absolute;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.stage-stats article {
    min-width: 124px;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(23, 50, 42, 0.08);
}

.stage-stats span {
    display: block;
    margin-bottom: 6px;
    font-size: 0.8rem;
}

.stage-stats strong {
    font-size: 1.02rem;
}

.signal-strip {
    margin-top: 6px;
    padding: 24px 28px;
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(247, 252, 245, 0.9));
}

.signal-kicker,
.signal-main,
.signal-sub {
    margin: 0;
}

.signal-main {
    margin-top: 6px;
    font-size: clamp(1.45rem, 2.6vw, 2.4rem);
}

.signal-sub {
    margin-top: 10px;
    line-height: 1.8;
}

.section {
    padding-top: 28px;
}

.section-heading {
    max-width: 780px;
    margin-bottom: 20px;
}

.section-heading p {
    margin: 12px 0 0;
    line-height: 1.8;
}

.model-grid,
.observation-grid,
.related-grid {
    display: grid;
    gap: 18px;
}

.model-grid,
.observation-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.related-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.model-card,
.observation-card,
.related-card {
    min-width: 0;
    padding: 24px;
    border-radius: 30px;
    background: var(--surface);
}

.model-card p,
.observation-card p,
.related-card p {
    margin: 12px 0 0;
    line-height: 1.75;
}

.strong-card {
    background: linear-gradient(180deg, rgba(255, 248, 237, 0.96), rgba(255, 240, 224, 0.92));
}

.air-card {
    background: linear-gradient(180deg, rgba(239, 248, 255, 0.96), rgba(232, 244, 255, 0.92));
}

.growth-card {
    background: linear-gradient(180deg, rgba(241, 252, 245, 0.96), rgba(233, 247, 238, 0.92));
}

.soil-card {
    background: linear-gradient(180deg, rgba(250, 244, 238, 0.96), rgba(244, 234, 224, 0.92));
}

.feature-card {
    background: linear-gradient(180deg, rgba(244, 251, 255, 0.96), rgba(237, 247, 255, 0.92));
}

.site-footer {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-top: 28px;
    padding: 24px 26px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.82);
}

.footer-title {
    margin: 0;
    font-size: 1.18rem;
}

.site-footer p {
    margin: 8px 0 0;
    line-height: 1.7;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 16px;
}

@media (max-width: 1160px) {
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .page-shell {
        width: min(100%, calc(100% - 16px));
    }

    .site-header,
    .site-footer {
        border-radius: 28px;
        flex-direction: column;
        align-items: flex-start;
    }

    .site-nav,
    .footer-links {
        justify-content: flex-start;
    }

    .model-grid,
    .observation-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .simulation-shell {
        min-height: auto;
        padding-bottom: 16px;
    }

    #plantCanvas {
        min-height: 430px;
        height: 58vh;
    }

    .panel,
    .floating-hint,
    .stage-stats {
        position: relative;
        top: auto;
        right: auto;
        bottom: auto;
        left: auto;
        width: auto;
        max-width: none;
        margin: 16px 16px 0;
        transform: none;
    }
}

@media (max-width: 560px) {
    .stage-copy,
    .model-card,
    .observation-card,
    .related-card,
    .signal-strip,
    .site-footer {
        border-radius: 24px;
    }

    .stage-copy {
        padding: 32px 22px;
    }

    .panel {
        padding: 16px;
    }

    #plantCanvas {
        min-height: 360px;
        height: 50vh;
    }

    .button-grid,
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .stage-stats article {
        min-width: calc(50% - 6px);
    }
}