:root {
    --bg-dark: #171b26;
    --bg-mid: #39425b;
    --bg-soft: #f6f3ec;
    --surface: rgba(255, 251, 246, 0.95);
    --surface-strong: rgba(255, 255, 255, 0.98);
    --ink: #2b3246;
    --muted: #6f7487;
    --line: rgba(43, 50, 70, 0.12);
    --accent: #86d0da;
    --accent-strong: #2c8290;
    --accent-soft: #d9f1f4;
    --warm: #f0c277;
    --warm-strong: #bc8332;
    --ember: #df7b68;
    --ember-strong: #b44f3f;
    --shadow: 0 28px 68px rgba(18, 22, 34, 0.18);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: "IBM Plex Sans JP", sans-serif;
    background:
        radial-gradient(circle at 14% 16%, rgba(134, 208, 218, 0.16), transparent 18%),
        radial-gradient(circle at 86% 16%, rgba(240, 194, 119, 0.18), transparent 18%),
        linear-gradient(180deg, #171b26 0%, #39425b 18%, #edf0f6 18.1%, #fffdf9 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(circle at 16% 18%, rgba(255, 255, 255, 0.16) 0 1px, transparent 1.6px),
        radial-gradient(circle at 84% 18%, rgba(255, 255, 255, 0.12) 0 1px, transparent 1.8px),
        linear-gradient(rgba(255, 255, 255, 0.024) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.024) 1px, transparent 1px);
    background-size: 320px 320px, 280px 280px, 46px 46px, 46px 46px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.16));
}

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

button,
input {
    font: inherit;
}

canvas {
    display: block;
    width: 100%;
    height: auto;
}

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

.site-header {
    position: sticky;
    top: 14px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 18px 0 20px;
    padding: 16px 22px;
    border-radius: 999px;
    background: rgba(23, 27, 38, 0.84);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(18px);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.24);
}

.brand {
    color: #fffaf2;
    font-family: "Shippori Mincho", serif;
    font-size: 1.14rem;
    letter-spacing: 0.1em;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 18px;
    color: rgba(250, 244, 236, 0.84);
    font-size: 0.95rem;
}

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

.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);
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 24px;
    padding: 34px 0 22px;
}

.hero-copy,
.hero-panel,
.concept-card,
.formula-card,
.demo-panel,
.status-card,
.link-card,
.signal-strip,
.hero-note {
    border: 1px solid rgba(255, 255, 255, 0.68);
    background: var(--surface);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.hero-copy {
    min-width: 0;
    padding: 42px 32px 42px 38px;
    border-radius: 38px;
    position: relative;
    overflow: hidden;
}

.hero-copy::after {
    content: "";
    position: absolute;
    inset: auto -84px -150px auto;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(217, 241, 244, 0.58), rgba(217, 241, 244, 0));
}

.hero-panel {
    min-width: 0;
    padding: 26px;
    border-radius: 36px;
    display: grid;
    gap: 18px;
    background: rgba(234, 236, 243, 0.28);
}

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

h1,
h2,
h3,
.brand,
.formula-block,
.signal-main,
.canvas-caption strong {
    font-family: "Shippori Mincho", serif;
}

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

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 0;
    font-size: clamp(2.65rem, 5vw, 4.35rem);
    letter-spacing: -0.04em;
}

h2 {
    margin-bottom: 0;
    font-size: clamp(1.96rem, 3.7vw, 3.02rem);
    letter-spacing: -0.03em;
}

h3 {
    margin-bottom: 10px;
    font-size: 1.34rem;
}

.hero-lead,
.section-heading p,
.concept-card p,
.formula-card p,
.hero-note p,
.demo-note,
.canvas-caption,
.status-card p,
.link-card p,
.site-footer p,
.signal-sub {
    color: var(--muted);
}

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

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 22px;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
    cursor: pointer;
}

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

.button-primary {
    color: #fbffff;
    background: linear-gradient(135deg, #2c8290, #86d0da);
    box-shadow: 0 14px 30px rgba(44, 130, 144, 0.24);
}

.button-secondary {
    color: var(--ink);
    border-color: rgba(43, 50, 70, 0.12);
    background: rgba(255, 255, 255, 0.74);
}

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

.hero-points li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    line-height: 1.7;
}

.hero-points li::before {
    content: "";
    width: 9px;
    height: 9px;
    margin-top: 0.55em;
    border-radius: 50%;
    flex: 0 0 auto;
    background: linear-gradient(135deg, var(--accent), var(--warm));
    box-shadow: 0 0 18px rgba(134, 208, 218, 0.42);
}

.time-window {
    position: relative;
    min-height: 320px;
    border-radius: 30px;
    overflow: hidden;
    background:
        radial-gradient(circle at 18% 22%, rgba(134, 208, 218, 0.16), transparent 18%),
        radial-gradient(circle at 78% 18%, rgba(240, 194, 119, 0.2), transparent 18%),
        linear-gradient(180deg, #161b27 0%, #252e44 44%, #4a5877 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.grid-layer,
.world-stack,
.frame-card,
.block-sheet,
.clock-orbit,
.clock-core,
.clock-hand,
.light-cone,
.memory-trace,
.record-dot,
.panel-tag {
    position: absolute;
}

.grid-layer {
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 28px 28px;
    opacity: 0.44;
}

.world-stack {
    left: 8%;
    top: 18%;
    width: 22%;
    height: 58%;
}

.frame-card {
    width: 92px;
    height: 44px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(249, 253, 255, 0.96), rgba(134, 208, 218, 0.82));
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.12);
}

.frame-a { left: 0; top: 0; }
.frame-b { left: 20px; top: 48px; }
.frame-c { left: 0; top: 96px; }
.frame-d { left: 20px; top: 144px; }

.block-sheet {
    width: 88px;
    height: 128px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: skewY(-14deg);
}

.sheet-a { left: 36%; top: 20%; }
.sheet-b { left: 44%; top: 24%; }
.sheet-c { left: 52%; top: 28%; }

.clock-orbit {
    right: 11%;
    top: 18%;
    width: 126px;
    height: 126px;
    border-radius: 50%;
    border: 2px solid rgba(255, 241, 218, 0.72);
    box-shadow: 0 0 28px rgba(240, 194, 119, 0.16);
}

.clock-core {
    right: 62px;
    top: calc(18% + 57px);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 247, 232, 0.92);
}

.clock-hand {
    right: 68px;
    top: calc(18% + 24px);
    width: 2px;
    height: 48px;
    background: linear-gradient(180deg, rgba(255, 247, 232, 0.96), rgba(255, 247, 232, 0.12));
    transform-origin: center 40px;
    transform: rotate(42deg);
}

.light-cone {
    width: 0;
    height: 0;
    left: 42%;
    border-left: 42px solid transparent;
    border-right: 42px solid transparent;
    filter: drop-shadow(0 0 12px rgba(134, 208, 218, 0.12));
}

.cone-a {
    top: 18%;
    border-bottom: 68px solid rgba(134, 208, 218, 0.12);
}

.cone-b {
    top: calc(18% + 68px);
    border-top: 68px solid rgba(240, 194, 119, 0.12);
}

.memory-trace {
    left: 22%;
    right: 14%;
    bottom: 18%;
    height: 2px;
    background: linear-gradient(90deg, rgba(134, 208, 218, 0.9), rgba(240, 194, 119, 0.34));
}

.record-dot {
    bottom: calc(18% - 5px);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 247, 232, 0.92);
    box-shadow: 0 0 18px rgba(134, 208, 218, 0.18);
}

.dot-a { left: 26%; }
.dot-b { left: 38%; }
.dot-c { left: 50%; }
.dot-d { left: 62%; }

.panel-tag {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(23, 27, 38, 0.76);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 250, 242, 0.9);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tag-block {
    left: 8%;
    top: 10%;
}

.tag-arrow {
    left: 40%;
    bottom: 8%;
}

.tag-page {
    right: 8%;
    top: 10%;
}

.hero-note-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.hero-note,
.concept-card,
.formula-card,
.status-card,
.link-card {
    border-radius: 26px;
    padding: 22px 22px 20px;
}

.strong-card,
.strong-note {
    background: linear-gradient(145deg, rgba(249, 253, 255, 0.98), rgba(224, 243, 246, 0.92));
}

.warm-card,
.warm-note {
    background: linear-gradient(145deg, rgba(255, 249, 232, 0.98), rgba(250, 228, 190, 0.92));
}

.night-card,
.night-note {
    border-color: rgba(255, 255, 255, 0.12);
    background: linear-gradient(160deg, rgba(24, 29, 42, 0.97), rgba(60, 70, 98, 0.93));
}

.night-card h3,
.night-card h2,
.night-note h2,
.night-card .card-label,
.night-note .card-label,
.night-card .formula-block,
.night-note .formula-block,
.status-card.night-card h3,
.link-card.night-card h3 {
    color: rgba(255, 249, 242, 0.96);
}

.night-card p,
.night-note p,
.status-card.night-card p,
.link-card.night-card p {
    color: rgba(232, 226, 217, 0.84);
}

.signal-strip {
    position: relative;
    overflow: hidden;
    margin: 10px 0 16px;
    padding: 24px 28px;
    border-radius: 32px;
    background: linear-gradient(135deg, rgba(23, 27, 38, 0.96), rgba(57, 66, 91, 0.92));
    color: #fff8f2;
    display: grid;
    gap: 8px;
}

.signal-strip::after {
    content: "";
    position: absolute;
    inset: auto -80px -120px auto;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(134, 208, 218, 0.18), rgba(134, 208, 218, 0));
}

.signal-kicker {
    margin-bottom: 2px;
    color: rgba(217, 241, 244, 0.82);
}

.signal-main {
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 2.34rem);
    line-height: 1.2;
}

.signal-sub {
    margin: 0;
    color: rgba(255, 244, 236, 0.82);
    line-height: 1.8;
}

.section {
    padding: 38px 0 4px;
}

.section-heading {
    max-width: 860px;
    display: grid;
    gap: 10px;
    margin-bottom: 24px;
}

.section-heading p {
    margin-bottom: 0;
    line-height: 1.85;
}

.concept-grid,
.formula-strip,
.link-grid,
.status-panel {
    display: grid;
    gap: 16px;
}

.concept-grid,
.link-grid {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.formula-strip {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-top: 18px;
}

.formula-block {
    margin-bottom: 12px;
    font-size: clamp(1.02rem, 1.9vw, 1.34rem);
    color: var(--ink);
    line-height: 1.6;
}

.concept-card,
.link-card {
    min-height: 198px;
}

.demo-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.22fr) minmax(280px, 0.78fr);
    gap: 18px;
    align-items: start;
}

.demo-panel {
    border-radius: 32px;
    padding: 24px;
}

.mode-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.mode-chip {
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid rgba(43, 50, 70, 0.12);
    background: rgba(255, 255, 255, 0.72);
    color: var(--ink);
    cursor: pointer;
    transition: transform 180ms ease, background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.mode-chip.is-active {
    color: #fbffff;
    border-color: transparent;
    background: linear-gradient(135deg, #2c8290, #86d0da);
    box-shadow: 0 14px 30px rgba(44, 130, 144, 0.24);
}

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

.control {
    display: grid;
    gap: 10px;
    padding: 16px 18px;
    border-radius: 24px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.68);
}

.control span {
    color: var(--muted);
}

.control strong {
    color: var(--ink);
    font-size: 1.08rem;
}

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

.canvas-frame {
    margin-top: 18px;
    padding: 14px;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(23, 27, 38, 0.98), rgba(47, 56, 79, 0.96));
    border: 1px solid rgba(255, 255, 255, 0.08);
}

#timeCanvas {
    border-radius: 22px;
    background: #131722;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.canvas-caption,
.demo-note {
    margin-bottom: 0;
    line-height: 1.75;
}

.canvas-caption {
    margin-top: 14px;
}

.demo-note {
    margin-top: 12px;
}

.status-panel {
    grid-template-columns: 1fr;
}

.status-card {
    min-height: 120px;
}

.status-card h3,
.link-card h3 {
    font-size: 1.14rem;
}

.link-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.link-card .button {
    margin-top: auto;
}

.site-footer {
    margin-top: 38px;
    padding: 30px 32px;
    border-radius: 34px;
    background: rgba(23, 27, 38, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
}

.site-footer p {
    color: rgba(255, 241, 232, 0.84);
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 16px;
    color: rgba(255, 241, 232, 0.84);
}

.footer-links a {
    transition: color 180ms ease;
}

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

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

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

    .site-header {
        border-radius: 28px;
        padding: 16px 18px;
        align-items: flex-start;
        flex-direction: column;
    }

    .hero-copy,
    .hero-panel,
    .demo-panel,
    .site-footer {
        border-radius: 28px;
    }

    .hero-copy {
        padding: 34px 24px 34px 26px;
    }

    .hero-panel,
    .demo-panel {
        padding: 20px;
    }

    .control-grid,
    .status-panel {
        grid-template-columns: 1fr;
    }

    .mode-chip,
    .button {
        width: 100%;
    }

    .time-window {
        min-height: 286px;
    }

    .world-stack {
        left: 6%;
    }

    .clock-orbit {
        right: 6%;
        width: 108px;
        height: 108px;
    }

    .clock-core {
        right: 55px;
    }

    .clock-hand {
        right: 61px;
        height: 42px;
    }

    .panel-tag {
        font-size: 0.72rem;
    }
}