:root {
    --bg-1: #050e18;
    --bg-2: #0b1f33;
    --bg-3: #112f43;
    --ink-1: #edf6ff;
    --ink-2: #b5c8dd;
    --ink-3: #88a2bb;
    --line: rgba(226, 240, 255, 0.12);
    --panel: rgba(9, 24, 38, 0.74);
    --panel-strong: rgba(12, 29, 46, 0.88);
    --accent-warm: #f3bc55;
    --accent-hot: #ff7f50;
    --accent-cool: #5ec7ff;
    --shadow: 0 26px 68px rgba(1, 10, 18, 0.34);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "IBM Plex Sans JP", sans-serif;
    color: var(--ink-1);
    background:
        radial-gradient(circle at 12% 14%, rgba(243, 188, 85, 0.14), transparent 20%),
        radial-gradient(circle at 84% 24%, rgba(94, 199, 255, 0.13), transparent 26%),
        radial-gradient(circle at 50% 110%, rgba(58, 130, 246, 0.15), transparent 34%),
        linear-gradient(180deg, #02050b 0%, #07121f 34%, #0c1c2d 100%);
}

main {
    display: flex;
    flex-direction: column;
}

main > #viewer {
    order: -1;
}

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

button,
input,
select,
textarea {
    font: inherit;
}

.page-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 24px 0 56px;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
    padding: 14px 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(6, 18, 30, 0.82);
    backdrop-filter: blur(16px);
    box-shadow: 0 16px 36px rgba(2, 10, 18, 0.22);
}

.brand {
    font-weight: 700;
    letter-spacing: 0.08em;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 16px;
}

.site-nav a {
    color: rgba(237, 246, 255, 0.8);
    font-size: 0.95rem;
}

.site-nav a:hover,
.site-nav a:focus-visible {
    color: #ffffff;
}

.section {
    margin-top: 28px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
    gap: 24px;
    padding: 42px;
    border-radius: 34px;
    background:
        radial-gradient(circle at 82% 20%, rgba(243, 188, 85, 0.16), transparent 18%),
        radial-gradient(circle at 16% 88%, rgba(94, 199, 255, 0.14), transparent 24%),
        linear-gradient(135deg, rgba(5, 16, 26, 0.98), rgba(8, 26, 42, 0.94) 58%, rgba(14, 45, 64, 0.88));
    box-shadow: 0 30px 72px rgba(2, 10, 18, 0.28);
}

.hero-copy h1,
.section-heading h2,
.hero-note h2,
.hero-summary .summary-title,
.panel h3,
.bridge-panel h3,
.info-card h3,
.hint-card h3 {
    font-family: "Shippori Mincho", serif;
}

.eyebrow,
.card-label,
.control-label,
.signal-kicker {
    margin: 0 0 8px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.eyebrow,
.card-label,
.signal-kicker {
    color: rgba(213, 230, 247, 0.72);
}

.hero-copy h1 {
    margin: 0;
    font-size: clamp(2.6rem, 4vw, 4.3rem);
    line-height: 1.08;
}

.hero-lead {
    margin: 22px 0 0;
    color: rgba(237, 246, 255, 0.86);
    font-size: 1.02rem;
    line-height: 1.95;
}

.hero-actions,
.button-row,
.footer-links,
.legend-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-actions {
    margin-top: 28px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border: 0;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.button:hover,
.button:focus-visible {
    transform: translateY(-1px);
}

.button-primary {
    background: linear-gradient(135deg, var(--accent-warm), #ffe18d);
    color: #162536;
    box-shadow: 0 14px 30px rgba(243, 188, 85, 0.26);
}

.button-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #f4f9ff;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-points {
    display: grid;
    gap: 12px;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
}

.hero-points li {
    position: relative;
    padding-left: 22px;
    color: rgba(237, 246, 255, 0.84);
    line-height: 1.7;
}

.hero-points li::before {
    content: "";
    position: absolute;
    top: 0.75em;
    left: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-warm), var(--accent-cool));
}

.hero-panel {
    display: grid;
    gap: 16px;
}

.hero-note,
.hero-summary,
.panel,
.signal-strip,
.bridge-panel,
.info-card {
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.hero-note,
.hero-summary {
    padding: 24px;
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(12px);
}

.hero-note h2,
.hero-summary .summary-title {
    margin: 0;
    font-size: 1.35rem;
}

.hero-note p,
.hero-summary p {
    margin: 12px 0 0;
    line-height: 1.8;
    color: rgba(237, 246, 255, 0.82);
}

.strong-card {
    background: linear-gradient(135deg, rgba(94, 199, 255, 0.12), rgba(255, 255, 255, 0.06));
}

.warm-card {
    background: linear-gradient(135deg, rgba(255, 127, 80, 0.12), rgba(255, 255, 255, 0.06));
}

.signal-strip {
    margin-top: 24px;
    padding: 22px 28px;
    background: linear-gradient(135deg, rgba(8, 24, 38, 0.88), rgba(11, 35, 53, 0.78));
}

.signal-main {
    margin: 0;
    font-size: clamp(1.35rem, 2vw, 1.8rem);
    font-weight: 700;
    line-height: 1.45;
}

.signal-sub {
    margin: 10px 0 0;
    color: var(--ink-2);
    line-height: 1.85;
}

.section-heading {
    margin-bottom: 18px;
}

.section-heading .eyebrow,
.control-label {
    color: var(--ink-3);
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(1.9rem, 3vw, 2.7rem);
}

.section-heading p:last-child {
    margin: 12px 0 0;
    color: var(--ink-2);
    line-height: 1.85;
}

.viewer-grid,
.cards-grid,
.stats-grid {
    display: grid;
    gap: 18px;
}

.viewer-grid {
    grid-template-columns: minmax(300px, 0.78fr) minmax(0, 1.22fr);
}

.panel,
.bridge-panel,
.info-card {
    padding: 24px;
    background: linear-gradient(180deg, rgba(9, 24, 38, 0.88), rgba(7, 19, 30, 0.8));
}

.control-stack {
    display: grid;
    gap: 18px;
}

.control-group {
    display: grid;
    gap: 10px;
}

.control-top,
.canvas-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.control-title {
    font-size: 0.98rem;
    font-weight: 700;
}

.control-value {
    font-weight: 700;
    color: var(--ink-1);
}

.control-copy,
.summary-text,
.hint-card p,
.bridge-panel p,
.info-card p {
    color: var(--ink-2);
    line-height: 1.8;
}

.range-input {
    width: 100%;
    appearance: none;
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(94, 199, 255, 0.32), rgba(255, 127, 80, 0.26));
}

.range-input::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #f9fcff;
    border: 2px solid rgba(8, 26, 42, 0.88);
    box-shadow: 0 4px 14px rgba(2, 10, 18, 0.28);
}

.range-input::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(8, 26, 42, 0.88);
    border-radius: 50%;
    background: #f9fcff;
    box-shadow: 0 4px 14px rgba(2, 10, 18, 0.28);
}

.summary-box,
.hint-card {
    margin-top: 18px;
    padding: 18px 20px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.hint-card h3,
.canvas-top h3,
.bridge-panel h3,
.info-card h3 {
    margin: 0;
    font-size: 1.22rem;
}

.summary-box p,
.hint-card p,
.info-card p,
.bridge-panel p {
    margin: 10px 0 0;
}

.canvas-top h3 {
    margin-top: 4px;
}

.canvas-chip {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--ink-1);
    font-weight: 700;
}

.canvas-chip.is-cold {
    background: rgba(94, 199, 255, 0.16);
    color: #ccefff;
}

.canvas-chip.is-temperate {
    background: rgba(141, 234, 180, 0.15);
    color: #dcffe7;
}

.canvas-chip.is-hot {
    background: rgba(255, 127, 80, 0.16);
    color: #ffe0d2;
}

.canvas-shell {
    margin-top: 18px;
    padding: 16px;
    border-radius: 28px;
    background: radial-gradient(circle at 30% 24%, rgba(243, 188, 85, 0.08), rgba(6, 18, 30, 0) 26%), linear-gradient(180deg, rgba(4, 12, 21, 0.96), rgba(3, 9, 16, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.08);
}

canvas {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 22px;
    background: radial-gradient(circle at center, #0b1f33, #020812 74%);
}

.legend-row {
    margin-top: 14px;
}

.legend-chip,
.inline-code {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--ink-2);
    font-size: 0.9rem;
}

.legend-chip.ocean {
    color: #9edfff;
}

.legend-chip.land {
    color: #ffd8b8;
}

.legend-chip.ice {
    color: #eff8ff;
}

.legend-chip.cloud {
    color: #ddeaf7;
}

.inline-code {
    padding: 2px 10px;
    min-height: auto;
    font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
    font-size: 0.92em;
}

.stats-grid {
    margin-top: 18px;
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.stat-card {
    padding: 18px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(9, 24, 38, 0.84), rgba(7, 19, 30, 0.78));
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.stat-label {
    margin: 0;
    font-size: 0.82rem;
    color: var(--ink-3);
}

.stat-value {
    margin: 10px 0 0;
    font-size: 1.34rem;
    font-weight: 700;
    color: var(--ink-1);
    overflow-wrap: anywhere;
}

.cards-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 18px;
}

.site-footer {
    margin-top: 28px;
    padding: 28px;
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(5, 16, 26, 0.98), rgba(8, 26, 42, 0.92));
}

.footer-links {
    margin-top: 16px;
}

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 680ms ease, transform 680ms ease;
}

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

.range-input:focus-visible,
.button:focus-visible,
.site-nav a:focus-visible {
    outline: 2px solid rgba(94, 199, 255, 0.84);
    outline-offset: 3px;
}

@media (max-width: 1180px) {
    .stats-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1080px) {
    .hero,
    .viewer-grid,
    .cards-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .page-shell {
        width: min(100% - 20px, 1180px);
        padding-top: 16px;
    }

    .site-header,
    .hero,
    .signal-strip,
    .panel,
    .bridge-panel,
    .info-card,
    .site-footer {
        padding: 20px;
        border-radius: 24px;
    }

    .site-header,
    .control-top,
    .canvas-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-copy h1 {
        font-size: clamp(2.2rem, 12vw, 3.2rem);
    }

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