:root {
    --bg-top: #eef7fb;
    --bg-bottom: #f8fbff;
    --surface: rgba(255, 255, 255, 0.84);
    --surface-strong: rgba(255, 255, 255, 0.94);
    --text: #163047;
    --muted: #53708a;
    --line: rgba(22, 48, 71, 0.1);
    --accent: #0ea5e9;
    --accent-strong: #2563eb;
    --warm: #f97316;
    --warm-strong: #ef4444;
    --soft-gold: #fbbf24;
    --shadow: 0 26px 70px rgba(65, 91, 125, 0.14);
}

* {
    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 18% 14%, rgba(14, 165, 233, 0.12), transparent 22%),
        radial-gradient(circle at 78% 18%, rgba(251, 191, 36, 0.12), transparent 18%),
        radial-gradient(circle at 50% 110%, rgba(14, 165, 233, 0.08), transparent 26%),
        linear-gradient(180deg, var(--bg-top) 0%, #edf6ff 36%, var(--bg-bottom) 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(22, 48, 71, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(22, 48, 71, 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(22, 48, 71, 0.08);
    backdrop-filter: blur(18px);
    box-shadow: 0 14px 34px rgba(95, 129, 164, 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(22, 48, 71, 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: #0f5a8d;
}

.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(246, 251, 255, 0.92));
}

.stage-copy::after {
    content: "";
    position: absolute;
    right: -60px;
    bottom: -96px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.16), rgba(14, 165, 233, 0));
}

.eyebrow,
.card-label,
.signal-kicker {
    margin: 0 0 12px;
    color: #0f6ca6;
    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.7rem, 5.1vw, 4.7rem);
    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(14, 165, 233, 0.08);
    border: 1px solid rgba(14, 165, 233, 0.12);
    color: #1d5d88;
    font-size: 0.9rem;
}

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

.simulation-shell::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 180px;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(244, 248, 253, 0), rgba(234, 244, 251, 0.58));
}

#mixCanvas {
    width: 100%;
    height: 100%;
    min-height: 840px;
    background: linear-gradient(180deg, #ddf1ff 0%, #ebf8ff 26%, #f8fbff 100%);
    border-radius: 38px;
}

.panel {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 2;
    width: min(370px, calc(100% - 40px));
    padding: 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(22, 48, 71, 0.1);
    backdrop-filter: blur(16px);
    box-shadow: 0 16px 34px rgba(95, 129, 164, 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: #0f517c;
}

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

.primary-action {
    width: 100%;
    margin-bottom: 10px;
}

.secondary-tone {
    background: linear-gradient(135deg, #67e8f9, #38bdf8);
}

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

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(--accent), var(--accent-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(37, 99, 235, 0.18);
}

.hot {
    background: linear-gradient(135deg, var(--warm), var(--warm-strong));
}

.hot.is-on {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
}

.cool {
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
}

.neutral,
.button-secondary {
    background: linear-gradient(135deg, #94a3b8, #64748b);
}

.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, 255, 0.92);
    border: 1px solid rgba(22, 48, 71, 0.06);
}

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

.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;
    right: 20px;
    bottom: 20px;
    z-index: 2;
    max-width: 360px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(22, 48, 71, 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: 120px;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(22, 48, 71, 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(242, 250, 255, 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(245, 251, 255, 0.96), rgba(238, 248, 255, 0.92));
}

.warm-card {
    background: linear-gradient(180deg, rgba(255, 248, 236, 0.96), rgba(255, 244, 229, 0.92));
}

.mist-card {
    background: linear-gradient(180deg, rgba(243, 249, 252, 0.96), rgba(236, 244, 250, 0.92));
}

.neutral-card {
    background: linear-gradient(180deg, rgba(248, 250, 253, 0.96), rgba(241, 246, 251, 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;
    }

    #mixCanvas {
        min-height: 500px;
        height: 62vh;
    }

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

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

@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;
    }

    #mixCanvas {
        min-height: 430px;
        height: 54vh;
    }

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

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