:root {
    --bg: #07111f;
    --bg-soft: #0d1b2f;
    --panel: rgba(10, 22, 38, 0.8);
    --panel-strong: rgba(15, 27, 46, 0.92);
    --line: rgba(157, 198, 255, 0.18);
    --text: #eff6ff;
    --muted: #9bb0cc;
    --accent: #95f2ff;
    --accent-2: #ffdf8c;
    --accent-3: #8fffb3;
    --danger: #ff8f9f;
    --shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --max-width: 1240px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    background:
        radial-gradient(circle at top left, rgba(125, 211, 252, 0.18), transparent 26%),
        radial-gradient(circle at 80% 20%, rgba(255, 223, 140, 0.16), transparent 18%),
        radial-gradient(circle at bottom right, rgba(143, 255, 179, 0.14), transparent 24%),
        linear-gradient(180deg, #050c17 0%, #091528 55%, #050a14 100%);
    color: var(--text);
    font-family: "Manrope", sans-serif;
    overflow-x: hidden;
}

body.anime-mode {
    background:
        radial-gradient(circle at top left, rgba(255, 120, 214, 0.22), transparent 22%),
        radial-gradient(circle at 80% 16%, rgba(128, 248, 255, 0.2), transparent 18%),
        radial-gradient(circle at bottom center, rgba(255, 222, 89, 0.16), transparent 24%),
        linear-gradient(180deg, #050511 0%, #140b28 45%, #070b16 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: radial-gradient(circle at center, black 42%, transparent 85%);
    pointer-events: none;
    opacity: 0.55;
}

body.anime-mode::before {
    opacity: 0.75;
    background-size: 28px 28px;
}

.site-glow {
    position: fixed;
    width: 30rem;
    height: 30rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(149, 242, 255, 0.22), transparent 62%);
    filter: blur(10px);
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 0;
    transition: left 160ms ease, top 160ms ease;
}

.particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particles span {
    position: absolute;
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(149, 242, 255, 0.95), rgba(149, 242, 255, 0));
    box-shadow: 0 0 18px rgba(149, 242, 255, 0.55);
    animation: floatParticle linear infinite;
}

.particles span:nth-child(1) { left: 8%; animation-duration: 12s; animation-delay: -2s; top: 110%; }
.particles span:nth-child(2) { left: 18%; animation-duration: 16s; animation-delay: -6s; top: 108%; }
.particles span:nth-child(3) { left: 30%; animation-duration: 11s; animation-delay: -3s; top: 112%; }
.particles span:nth-child(4) { left: 47%; animation-duration: 18s; animation-delay: -8s; top: 109%; }
.particles span:nth-child(5) { left: 61%; animation-duration: 14s; animation-delay: -5s; top: 107%; }
.particles span:nth-child(6) { left: 74%; animation-duration: 17s; animation-delay: -4s; top: 114%; }
.particles span:nth-child(7) { left: 86%; animation-duration: 13s; animation-delay: -9s; top: 111%; }
.particles span:nth-child(8) { left: 93%; animation-duration: 15s; animation-delay: -7s; top: 110%; }

.hero,
main {
    position: relative;
    z-index: 1;
}

.hero,
.metrics,
.about,
.tracks,
.board,
.manifesto {
    width: min(calc(100% - 32px), var(--max-width));
    margin: 0 auto;
}

.hero {
    padding: 28px 0 52px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 18px 24px;
    margin-bottom: 28px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(7, 17, 31, 0.55);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.mode-toggle {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font: inherit;
    cursor: pointer;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.mode-toggle:hover,
.mode-toggle:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(149, 242, 255, 0.45);
    box-shadow: 0 0 24px rgba(149, 242, 255, 0.12);
}

.mode-toggle-label {
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.mode-toggle-core {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #ffffff);
    box-shadow: 0 0 16px rgba(149, 242, 255, 0.6);
}

body.anime-mode .mode-toggle {
    border-color: rgba(255, 120, 214, 0.4);
    box-shadow: 0 0 30px rgba(255, 120, 214, 0.18);
}

body.anime-mode .mode-toggle-core {
    background: linear-gradient(135deg, #ff78d6, #ffe46d);
    box-shadow: 0 0 22px rgba(255, 120, 214, 0.65);
}

.brand,
.topbar-links a,
.button {
    text-decoration: none;
}

.brand {
    color: var(--text);
    font-family: "Space Grotesk", sans-serif;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.topbar-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.topbar-links a {
    color: var(--muted);
    transition: color 180ms ease, transform 180ms ease;
}

.topbar-links a:hover,
.topbar-links a:focus-visible {
    color: var(--text);
    transform: translateY(-1px);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
    gap: 24px;
    align-items: stretch;
}

.hero-copy,
.hero-panel,
.about-card,
.track-card,
.board-shell,
.manifesto-panel,
.metric {
    border: 1px solid var(--line);
    background: var(--panel);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.hero-copy {
    padding: 48px;
    border-radius: var(--radius-xl);
    position: relative;
    overflow: hidden;
}

.hero-copy::after {
    content: "";
    position: absolute;
    inset: auto -10% -40% 40%;
    height: 16rem;
    background: radial-gradient(circle, rgba(149, 242, 255, 0.18), transparent 70%);
    pointer-events: none;
}

.hero-copy::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(125deg, transparent 0%, rgba(255, 255, 255, 0.08) 48%, transparent 52%);
    transform: translateX(-130%);
    animation: heroSweep 8s ease-in-out infinite;
    pointer-events: none;
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-size: 0.78rem;
    font-weight: 800;
}

h1,
h2,
h3,
.metric-value,
.signal-value {
    font-family: "Space Grotesk", sans-serif;
}

h1 {
    margin: 0;
    max-width: 11ch;
    font-size: clamp(3rem, 7vw, 6.4rem);
    line-height: 0.95;
    letter-spacing: -0.05em;
}

.hero-text {
    max-width: 60ch;
    margin: 24px 0 0;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--muted);
}

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

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.hero-badge,
.track-aura,
.anime-kicker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 700;
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

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

.button-primary {
    color: #05111f;
    background: linear-gradient(135deg, var(--accent) 0%, #d8fbff 100%);
}

.button-secondary {
    color: var(--text);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
}

.hero-panel {
    border-radius: var(--radius-xl);
    padding: 24px;
    display: grid;
    gap: 16px;
}

.signal-card {
    padding: 26px;
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.signal-card-accent {
    background: linear-gradient(135deg, rgba(255, 223, 140, 0.1), rgba(149, 242, 255, 0.08));
}

.signal-card-quote {
    position: relative;
    overflow: hidden;
}

.signal-card-quote::after {
    content: "";
    position: absolute;
    inset: auto -20% -20% auto;
    width: 12rem;
    height: 12rem;
    background: radial-gradient(circle, rgba(255, 120, 214, 0.22), transparent 70%);
}

.signal-quote {
    margin: 0;
    max-width: 26ch;
    font-size: 1.1rem;
    line-height: 1.65;
}

.signal-label,
.signal-note,
.metric-label,
.section-heading p,
.about-card p,
.track-card p,
.manifesto-panel p,
caption {
    color: var(--muted);
}

.signal-label {
    margin: 0 0 10px;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.signal-value {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3rem);
}

.signal-note {
    margin: 12px 0 0;
    line-height: 1.7;
}

.metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    padding: 0 0 36px;
}

.metric {
    padding: 24px;
    border-radius: var(--radius-lg);
}

.metric-value {
    display: block;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1;
    margin-bottom: 12px;
    color: var(--accent-2);
}

.metric-label {
    line-height: 1.6;
}

section {
    padding: 34px 0;
}

.section-heading {
    max-width: 850px;
    margin-bottom: 24px;
}

h2 {
    margin: 0;
    font-size: clamp(2rem, 4.5vw, 4rem);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.about-card {
    padding: 28px;
    border-radius: var(--radius-lg);
}

.about-card h3,
.track-card h3 {
    margin: 0 0 14px;
    font-size: 1.35rem;
}

.about-card p,
.track-card p,
.manifesto-panel p {
    margin: 0;
    line-height: 1.8;
}

.track-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.track-card {
    position: relative;
    min-height: 220px;
    padding: 26px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transform-style: preserve-3d;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.track-card::before {
    content: "";
    position: absolute;
    inset: auto -15% -20% auto;
    width: 10rem;
    height: 10rem;
    background: radial-gradient(circle, rgba(149, 242, 255, 0.16), transparent 70%);
}

.track-card::after {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 42%, transparent 58%, rgba(255, 255, 255, 0.03));
    opacity: 0;
    transition: opacity 180ms ease;
    pointer-events: none;
}

.track-index {
    display: inline-flex;
    margin-bottom: 18px;
    color: var(--accent);
    font-family: "Space Grotesk", sans-serif;
    font-size: 0.85rem;
    letter-spacing: 0.22em;
}

.track-card:hover,
.track-card:focus-within {
    border-color: rgba(149, 242, 255, 0.38);
    box-shadow: 0 28px 64px rgba(0, 0, 0, 0.45), 0 0 28px rgba(149, 242, 255, 0.1);
}

.track-card:hover::after,
.track-card:focus-within::after {
    opacity: 1;
}

.track-aura {
    position: absolute;
    left: 26px;
    bottom: 24px;
    color: var(--accent);
}

.anime-zone {
    padding-top: 22px;
}

.anime-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr 0.9fr;
    gap: 18px;
}

.anime-card {
    position: relative;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(8, 17, 31, 0.72);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.anime-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 40%);
    pointer-events: none;
}

.anime-card h3 {
    margin: 14px 0 10px;
    font-size: 2rem;
    letter-spacing: -0.04em;
}

.anime-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.75;
}

.anime-card-kana {
    transform-style: preserve-3d;
}

.anime-card-kana h3 {
    text-shadow: 0 0 22px rgba(149, 242, 255, 0.28);
}

.anime-card-kana::after {
    content: "覚醒";
    position: absolute;
    right: 20px;
    bottom: 10px;
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(3rem, 7vw, 5rem);
    color: rgba(255, 255, 255, 0.05);
    letter-spacing: 0.08em;
}

.anime-card-quote {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.anime-line {
    display: none;
    font-size: 1.15rem;
    color: var(--text);
}

.anime-line.is-active {
    display: block;
    animation: quoteFlash 420ms ease;
}

.charge-bar {
    width: 100%;
    height: 16px;
    margin: 18px 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.charge-fill {
    display: block;
    width: 78%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #95f2ff 0%, #ff78d6 45%, #ffe46d 100%);
    box-shadow: 0 0 22px rgba(255, 120, 214, 0.28);
    animation: chargePulse 2.2s ease-in-out infinite;
}

.charge-text strong {
    color: var(--accent-2);
}

.board-shell {
    overflow: hidden;
    border-radius: 28px;
    padding: 18px;
}

.progress-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 860px;
}

caption {
    text-align: left;
    padding: 4px 4px 18px;
    caption-side: top;
}

.progress-table th,
.progress-table td {
    padding: 16px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    text-align: left;
}

.progress-table thead th {
    font-size: 0.9rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.progress-table tbody th {
    color: var(--text);
    white-space: nowrap;
}

.status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 5.25rem;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 700;
}

.status-pass {
    color: #072112;
    background: linear-gradient(135deg, var(--accent-3), #d9ffe8);
}

.status-focus {
    color: #2b1f00;
    background: linear-gradient(135deg, var(--accent-2), #fff1c9);
}

.status-empty {
    color: var(--muted);
    background: rgba(255, 255, 255, 0.06);
}

.manifesto {
    padding-bottom: 72px;
}

.manifesto-panel {
    padding: 42px;
    border-radius: var(--radius-xl);
    background:
        linear-gradient(135deg, rgba(149, 242, 255, 0.12), rgba(255, 223, 140, 0.08)),
        var(--panel-strong);
}

body.anime-mode .hero-copy,
body.anime-mode .hero-panel,
body.anime-mode .about-card,
body.anime-mode .track-card,
body.anime-mode .board-shell,
body.anime-mode .manifesto-panel,
body.anime-mode .metric,
body.anime-mode .anime-card {
    border-color: rgba(255, 120, 214, 0.22);
    box-shadow: 0 26px 80px rgba(0, 0, 0, 0.42), 0 0 34px rgba(255, 120, 214, 0.08);
}

body.anime-mode .eyebrow,
body.anime-mode .track-index,
body.anime-mode .track-aura,
body.anime-mode .anime-kicker {
    color: #ffb5e9;
}

body.anime-mode h1,
body.anime-mode h2,
body.anime-mode .signal-value,
body.anime-mode .metric-value,
body.anime-mode .anime-line {
    text-shadow: 0 0 18px rgba(255, 120, 214, 0.16);
}

body.anime-mode .button-primary {
    background: linear-gradient(135deg, #ff78d6 0%, #ffe46d 100%);
}

body.anime-mode .status-focus {
    background: linear-gradient(135deg, #ffb6e4, #ffeaa2);
}

body.anime-mode .charge-fill {
    width: 98%;
}

[data-reveal] {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 700ms ease, transform 700ms ease;
}

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

@media (max-width: 1100px) {
    .hero-grid,
    .about-grid,
    .track-grid,
    .metrics,
    .anime-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media (max-width: 800px) {
    .hero {
        padding-top: 18px;
    }

    .topbar,
    .hero-grid,
    .hero-panel,
    .about-grid,
    .track-grid,
    .metrics,
    .anime-grid {
        grid-template-columns: 1fr;
    }

    .topbar {
        border-radius: 26px;
    }

    .topbar,
    .topbar-links,
    .hero-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .mode-toggle {
        width: 100%;
        justify-content: space-between;
    }

    .hero-copy,
    .hero-panel,
    .manifesto-panel,
    .board-shell,
    .metric,
    .about-card,
    .track-card {
        padding-left: 20px;
        padding-right: 20px;
    }

    .hero-copy {
        padding-top: 28px;
        padding-bottom: 28px;
    }

    h1 {
        max-width: 100%;
    }

    .board-shell {
        overflow-x: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .site-glow,
    [data-reveal],
    .button,
    .topbar-links a,
    .track-card,
    .mode-toggle,
    .charge-fill,
    .particles span,
    .hero-copy::before {
        transition: none;
        animation: none;
    }

    [data-reveal] {
        opacity: 1;
        transform: none;
    }
}

@keyframes floatParticle {
    0% {
        transform: translate3d(0, 0, 0) scale(0.6);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    50% {
        transform: translate3d(20px, -50vh, 0) scale(1);
    }
    100% {
        transform: translate3d(-18px, -115vh, 0) scale(0.65);
        opacity: 0;
    }
}

@keyframes heroSweep {
    0%, 100% {
        transform: translateX(-130%);
    }
    45%,
    55% {
        transform: translateX(130%);
    }
}

@keyframes chargePulse {
    0%, 100% {
        filter: saturate(1);
        transform: scaleX(0.985);
    }
    50% {
        filter: saturate(1.25);
        transform: scaleX(1);
    }
}

@keyframes quoteFlash {
    0% {
        opacity: 0;
        transform: translateY(8px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}
