:root {
    --bg-1: #090612;
    --bg-2: #171027;
    --bg-3: #26163d;
    --ink-1: #f7f2ff;
    --ink-2: #cabde4;
    --ink-3: #9b8fbc;
    --line: rgba(244, 231, 255, 0.12);
    --panel: rgba(18, 11, 30, 0.78);
    --panel-strong: rgba(24, 15, 40, 0.9);
    --accent-gold: #f2c96d;
    --accent-rose: #ff8e72;
    --accent-cyan: #78d8ff;
    --accent-violet: #c4a1ff;
    --shadow: 0 26px 68px rgba(3, 2, 10, 0.36);
}

* {
    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 18% 12%, rgba(242, 201, 109, 0.12), transparent 18%),
        radial-gradient(circle at 84% 18%, rgba(120, 216, 255, 0.12), transparent 24%),
        radial-gradient(circle at 52% 100%, rgba(196, 161, 255, 0.16), transparent 30%),
        linear-gradient(180deg, #05030a 0%, #0e0917 32%, #171025 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(10, 7, 18, 0.82);
    backdrop-filter: blur(16px);
    box-shadow: 0 16px 36px rgba(2, 1, 8, 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(247, 242, 255, 0.8);
    font-size: 0.95rem;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.text-link:hover,
.text-link:focus-visible,
.footer-links a:hover,
.footer-links 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 78% 18%, rgba(242, 201, 109, 0.16), transparent 20%),
        radial-gradient(circle at 16% 88%, rgba(120, 216, 255, 0.12), transparent 24%),
        linear-gradient(135deg, rgba(11, 8, 20, 0.98), rgba(18, 11, 30, 0.94) 58%, rgba(33, 20, 52, 0.88));
    box-shadow: 0 30px 72px rgba(4, 2, 10, 0.3);
}

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

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

.eyebrow,
.card-label,
.signal-kicker,
.stat-label {
    color: rgba(226, 215, 244, 0.72);
}

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

.hero-lead {
    margin: 22px 0 0;
    color: rgba(247, 242, 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, border-color 160ms ease;
}

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

.button-primary {
    background: linear-gradient(135deg, var(--accent-gold), #ffd9a1);
    color: #24172f;
    box-shadow: 0 14px 30px rgba(242, 201, 109, 0.26);
}

.button-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #f6f0ff;
    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(247, 242, 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-gold), var(--accent-cyan));
}

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

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

.hero-note,
.hero-summary {
    padding: 24px;
    background: rgba(255, 255, 255, 0.06);
    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(247, 242, 255, 0.82);
}

.strong-card {
    background: linear-gradient(135deg, rgba(120, 216, 255, 0.12), rgba(255, 255, 255, 0.05));
}

.warm-card {
    background: linear-gradient(135deg, rgba(255, 142, 114, 0.14), rgba(255, 255, 255, 0.05));
}

.signal-strip {
    margin-top: 28px;
    padding: 24px 28px;
    background: linear-gradient(135deg, rgba(19, 12, 31, 0.9), rgba(29, 18, 45, 0.82));
}

.signal-main,
.signal-sub,
.section-heading p,
.control-copy,
.summary-text,
.hint-card p,
.info-card p,
.site-footer p,
.text-link {
    color: var(--ink-2);
    line-height: 1.82;
}

.signal-main,
.section-heading h2 {
    margin: 0;
    font-size: clamp(1.65rem, 3vw, 2.4rem);
}

.signal-sub,
.section-heading p {
    margin: 10px 0 0;
}

.inline-code {
    padding: 0.14rem 0.48rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff4d6;
    font-family: "IBM Plex Sans JP", sans-serif;
}

.viewer-grid {
    display: grid;
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
    gap: 18px;
}

.views-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.panel,
.info-card,
.site-footer {
    padding: 24px;
    background: var(--panel);
    backdrop-filter: blur(16px);
}

.controls-panel,
.view-panel,
.top-panel {
    min-width: 0;
}

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

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

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

.control-title {
    font-weight: 600;
}

.control-value {
    color: #fff0c3;
    font-weight: 700;
}

.range-input {
    width: 100%;
    accent-color: var(--accent-gold);
}

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

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

.summary-text,
.hint-card p,
.info-card p {
    margin: 8px 0 0;
}

.view-chip {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(120, 216, 255, 0.14);
    color: #ddf5ff;
    font-size: 0.85rem;
    font-weight: 700;
}

.view-chip.secondary {
    background: rgba(255, 142, 114, 0.12);
    color: #ffe0d2;
}

.canvas-shell {
    position: relative;
    margin-top: 18px;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.06), transparent 30%),
        linear-gradient(180deg, rgba(248, 244, 255, 0.98), rgba(222, 231, 252, 0.94));
}

canvas {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 1 / 1;
}

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

.legend-chip {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--ink-2);
    font-size: 0.84rem;
}

.legend-chip.warm {
    background: rgba(255, 142, 114, 0.12);
}

.legend-chip.neutral {
    background: rgba(120, 216, 255, 0.12);
}

.stats-grid,
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.stat-card {
    padding: 20px;
    border-radius: 24px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: var(--shadow);
}

.stat-value {
    margin: 0;
    font-size: clamp(1.15rem, 2vw, 1.5rem);
    line-height: 1.45;
}

.text-link {
    display: inline-block;
    margin-top: 14px;
    color: #f8e0ab;
    font-weight: 700;
}

.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 28px;
}

.footer-title {
    margin: 0;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.footer-links a {
    color: var(--ink-2);
}

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

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

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

    .views-grid,
    .stats-grid,
    .cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

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

    .hero,
    .panel,
    .info-card,
    .signal-strip,
    .site-footer {
        padding: 20px;
    }

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

    .control-top,
    .view-top {
        flex-direction: column;
        align-items: flex-start;
    }
}