:root {
    --cube-red: #d83434;
    --cube-orange: #ff9d42;
    --cube-green: #2e8c5a;
    --cube-blue: #2a6bff;
    --cube-yellow: #f2c84b;
    --cube-white: #ffffff;
    --cube-black: #131a2a;
    --shadow-light: rgba(17, 33, 64, 0.08);
    --shadow-medium: rgba(17, 33, 64, 0.18);
    --background-light: #f5f7fc;
    --panel-elevated: rgba(255, 255, 255, 0.92);
    --panel-outline: rgba(13, 24, 44, 0.08);
    --text-primary: #1e2433;
    --text-secondary: #56607a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', 'Roboto', sans-serif;
    background-color: var(--background-light);
    background-image: radial-gradient(circle at 15% 15%, rgba(42, 107, 255, 0.12), transparent 45%),
        radial-gradient(circle at 85% 10%, rgba(242, 200, 75, 0.15), transparent 40%),
        radial-gradient(circle at 50% 85%, rgba(46, 140, 90, 0.1), transparent 45%);
    color: var(--text-primary);
    line-height: 1.8;
    font-size: 1.05rem;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* --- 背景アニメーション --- */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

@keyframes bg-float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    50% {
        opacity: 0.1;
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

.bg-shape {
    position: absolute;
    border-radius: 40% 60% 60% 40% / 70% 30% 70% 30%;
    animation: bg-float 60s infinite linear;
}

.bg-shape:nth-child(1) { width: 400px; height: 400px; left: -10%; background-color: var(--cube-red); animation-delay: -2s; }
.bg-shape:nth-child(2) { width: 300px; height: 300px; left: 20%; background-color: var(--cube-green); animation-delay: -10s; }
.bg-shape:nth-child(3) { width: 250px; height: 250px; left: 50%; background-color: var(--cube-blue); animation-delay: -20s; }
.bg-shape:nth-child(4) { width: 350px; height: 350px; left: 80%; background-color: var(--cube-yellow); animation-delay: -30s; }
.bg-shape:nth-child(5) { width: 200px; height: 200px; left: 5%; background-color: var(--cube-orange); animation-delay: -40s; }
.bg-shape:nth-child(6) { width: 280px; height: 280px; left: 35%; background-color: var(--cube-white); animation-delay: -50s; opacity: 0.3; }
.bg-shape:nth-child(7) { width: 320px; height: 320px; left: 65%; background-color: var(--cube-red); animation-delay: -55s; }
.bg-shape:nth-child(8) { width: 220px; height: 220px; left: 90%; background-color: var(--cube-green); animation-delay: -58s; }


/* --- アニメーション定義 --- */
@keyframes fadeInUp { /* ... */ }

/* ... 他の既存スタイルは省略 ... */

:root {
    --cube-red: #d83434;
    --cube-orange: #ff9d42;
    --cube-green: #2e8c5a;
    --cube-blue: #2a6bff;
    --cube-yellow: #f2c84b;
    --cube-white: #ffffff;
    --cube-black: #131a2a;
    --shadow-light: rgba(17, 33, 64, 0.08);
    --shadow-medium: rgba(17, 33, 64, 0.18);
    --background-light: #f5f7fc;
    --panel-elevated: rgba(255, 255, 255, 0.92);
    --panel-outline: rgba(13, 24, 44, 0.08);
    --text-primary: #1e2433;
    --text-secondary: #56607a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', 'Roboto', sans-serif;
    background-color: var(--background-light);
    color: var(--text-primary);
    line-height: 1.8;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.body-sections {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    padding: 2rem clamp(1rem, 4vw, 4rem) 4rem;
}

.section-inner {
    max-width: 1100px;
    margin: 0 auto;
    background: var(--panel-elevated);
    border-radius: 32px;
    padding: clamp(1.75rem, 4vw, 3.5rem);
    box-shadow: 0 25px 75px rgba(17, 33, 64, 0.12);
    backdrop-filter: blur(12px);
    position: relative;
    border: 1px solid var(--panel-outline);
}

.layered-card::before,
.layered-card::after {
    content: '';
    position: absolute;
    inset: 15px;
    border-radius: 24px;
    z-index: -1;
    opacity: 0.35;
}

.layered-card::before {
    background: linear-gradient(135deg, rgba(42, 107, 255, 0.12), rgba(248, 196, 120, 0.18));
    filter: blur(8px);
}

.layered-card::after {
    inset: 5px;
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.section-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.section-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.15rem 0.9rem;
    border-radius: 999px;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(106, 169, 255, 0.15);
    color: var(--cube-blue);
    border: 1px solid rgba(106, 169, 255, 0.35);
}

.section-pill.accent {
    background: rgba(251, 192, 45, 0.18);
    color: var(--cube-yellow);
    border-color: rgba(251, 192, 45, 0.4);
}

.section-pill.accent.green {
    background: rgba(46, 125, 50, 0.16);
    color: var(--cube-green);
    border-color: rgba(46, 125, 50, 0.35);
}

.section-heading {
    font-size: clamp(2.2rem, 4vw, 3rem);
    text-align: center;
    margin-bottom: 1.25rem;
}

.learn-subtitle {
    margin: -0.5rem auto 1.5rem;
    text-align: center;
    font-size: 1.05rem;
    color: rgba(30, 36, 51, 0.7);
    max-width: 640px;
    line-height: 1.6;
}

.section-body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

 .section-body.two-column {
    display: none;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.section-lead {
    font-size: clamp(1.15rem, 2.4vw, 1.5rem);
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.message-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.insight-panel {
    background: rgba(255, 255, 255, 0.65);
    border-radius: 24px;
    border: 1px solid rgba(13, 24, 44, 0.08);
    padding: 1.5rem;
}

.insight-panel.compact {
    padding: 1.25rem;
}

.panel-label {
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 0.9rem;
}

.insight-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.insight-title {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
}

.insight-desc {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.concept-ribbon {
    display: inline-flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.concept-ribbon span {
    padding: 0.35rem 0.8rem;
    border-radius: 12px;
    background: rgba(30, 36, 51, 0.04);
    border: 1px solid rgba(30, 36, 51, 0.08);
    font-size: 0.85rem;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-button.primary {
    background: rgba(42, 107, 255, 0.12);
    color: var(--cube-blue);
    border: 1px solid rgba(42, 107, 255, 0.25);
    box-shadow: none;
}

.cta-button.ghost {
    border: 1px solid rgba(30, 36, 51, 0.2);
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.7);
}

.cta-button.subtle-link {
    font-size: 0.95rem;
    padding: 0.55rem 1.1rem;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(30, 36, 51, 0.15);
    color: rgba(30, 36, 51, 0.75);
    box-shadow: none;
}

.app-section .cta-button.ghost {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
    background: transparent;
}

.play-button {
    background: #c62828;
    color: #fff;
    border: none;
    box-shadow: 0 12px 24px rgba(198, 40, 40, 0.3);
    min-width: 160px;
    justify-content: center;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
}

.cta-button.subtle-link:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.85);
    box-shadow: none;
}

.section-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    color: var(--cube-blue);
    text-decoration: none;
    font-size: 1rem;
}

.section-link::after {
    content: '→';
    font-size: 0.9rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.learn-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.learn-grid .feature-card {
    display: grid;
    grid-template-columns: 0.3fr 0.6fr 0.1fr;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 1.5rem;
}

.learn-grid .feature-card h3 {
    text-align: left;
    margin: 0;
}

.learn-grid .feature-card .card-meta-row {
    justify-self: flex-end;
}

.learn-grid .feature-card .section-link::after {
    content: '→';
}

.feature-card {
    position: relative;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 20px;
    padding: 1.8rem;
    box-shadow: 0 18px 40px rgba(17, 33, 64, 0.12);
    border: 1px solid var(--panel-outline);
    color: var(--text-primary);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.card-thumb-wrapper {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    margin: 0;
    border: 1px solid rgba(17, 33, 64, 0.08);
    box-shadow: 0 18px 30px -18px rgba(17, 33, 64, 0.2);
    background: #fff;
}

.card-thumb-wrapper img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

.learn-grid .card-thumb-wrapper {
    max-width: 220px;
    justify-self: center;
}

.feature-card:hover {
    transform: translateY(-6px);
    border-color: rgba(42, 107, 255, 0.25);
}

.gradient-card {
    color: var(--text-primary);
    background: linear-gradient(135deg, rgba(76, 125, 255, 0.18), rgba(255, 199, 107, 0.18));
    border: 1px solid rgba(76, 125, 255, 0.25);
    position: relative;
    overflow: hidden;
}

.gradient-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.5), transparent 60%);
    pointer-events: none;
}

.gradient-card.alt {
    background: linear-gradient(135deg, rgba(46, 140, 90, 0.2), rgba(242, 200, 75, 0.2));
    border-color: rgba(46, 140, 90, 0.2);
}

.gradient-card h3 {
    color: var(--text-primary);
}

.gradient-card p {
    color: var(--text-secondary);
}

.card-thumb {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
    margin-bottom: 1rem;
    border: 1px solid rgba(42, 107, 255, 0.15);
    box-shadow: 0 12px 30px rgba(17, 33, 64, 0.12);
}

.gradient-card h3 {
    color: #fff;
}

.gradient-card p {
    color: rgba(255, 255, 255, 0.92);
}

.outline-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(13, 24, 44, 0.08);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.outline-card .card-icon {
    background: rgba(21, 101, 192, 0.08);
    color: var(--cube-blue);
}

.card-icon.ring {
    border-radius: 999px;
    border: 2px solid rgba(0, 0, 0, 0.08);
    background: transparent;
}

.card-points {
    list-style: none;
    margin: 0 0 1.25rem;
    padding: 0;
    color: var(--text-secondary);
}

.card-points li {
    position: relative;
    padding-left: 1.1rem;
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
}

.card-points li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: rgba(42, 107, 255, 0.4);
}

.card-actions {
    display: flex;
    justify-content: center;
}

.card-meta-row {
    margin-top: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.meta-pill {
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    background: rgba(21, 101, 192, 0.08);
    color: var(--cube-blue);
    font-size: 0.85rem;
}

.outline-card .section-link {
    font-size: 0.9rem;
}

@media (max-width: 1024px) {
    .section-body.two-column {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .body-sections {
        padding: 1.5rem;
    }

    .section-inner {
        padding: 1.5rem;
    }

    .message-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .section-body.two-column {
        flex-direction: column;
    }
}

.feature-card h3 {
    margin-bottom: 0.75rem;
    font-size: 1.35rem;
    text-align: center;
    color: var(--text-primary);
}

.feature-card p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.feature-card .card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    text-decoration: none;
    font-weight: 600;
    color: var(--cube-blue);
    padding: 0.2rem 0;
    border-bottom: 1px solid rgba(106, 169, 255, 0.3);
}

.feature-card .card-link::after {
    content: '↗';
    font-size: 0.85rem;
}

.gradient-card .card-link {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.35);
}

/* --- アニメーション定義 --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* --- 汎用アニメーションクラス --- */
.fade-in-up { animation: fadeInUp 0.8s ease-out forwards; opacity: 0; }
.slide-in-left { animation: slideInLeft 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards; opacity: 0; }
.slide-in-right { animation: slideInRight 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards; opacity: 0; }
.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

/* --- ヘッダー --- */
.main-header {
    text-align: center;
    padding: 120px 20px;
    position: relative;
    overflow: hidden;
}

.header-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.subtitle { font-size: clamp(1.2rem, 2.2vw, 1.6rem); color: var(--text-secondary); letter-spacing: 0.1em; text-transform: uppercase; }

.main-title { font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1.2; }

.description { font-size: clamp(1.05rem, 2.3vw, 1.35rem); color: var(--text-secondary); margin-top: 0.5rem; }

/* --- ナビゲーション --- */
.main-nav {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(13, 24, 44, 0.08);
    padding: 0.85rem 2rem;
    position: sticky;
    top: 0;
    z-index: 120;
    box-shadow: 0 15px 35px rgba(17, 33, 64, 0.12);
}

.main-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.2rem;
}

.nav-item {
    display: block;
    padding: 0.55rem 1.4rem;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.05rem;
    border-radius: 999px;
    transition: all 0.25s ease;
    position: relative;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    border: 1px solid transparent;
}

.nav-item:hover {
    transform: translateY(-2px);
    border-color: rgba(30, 36, 51, 0.15);
}

.app-link {
    background: linear-gradient(120deg, rgba(255, 205, 135, 0.95), rgba(255, 255, 255, 0.95)) !important;
    color: #3a2600 !important;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(255, 194, 120, 0.35);
}
.dropdown { position: relative; }
.dropdown-content {
    display: none;
    position: absolute;
    background-color: rgba(255, 255, 255, 0.95);
    min-width: 220px;
    box-shadow: 0 20px 45px rgba(17, 33, 64, 0.12);
    z-index: 1;
    border-radius: 14px;
    padding: 8px 0;
    border: 1px solid rgba(13, 24, 44, 0.08);
}

.dropdown-content a {
    color: var(--text-primary);
    padding: 12px 20px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
}

.dropdown-content a:hover {
    background-color: rgba(42, 107, 255, 0.08);
}
.dropdown:hover .dropdown-content { display: block; }
.white-theme {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.green-theme {
    background: rgba(58, 210, 159, 0.15);
    color: var(--cube-green);
    border: 1px solid rgba(58, 210, 159, 0.35);
}

/* --- メインコンテンツ --- */
main {
    padding: 50px 20px;
    max-width: 1300px;
    margin: 0 auto;
    flex-grow: 1;
    position: relative;
    z-index: 1;
}

.content-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 50px;
    align-items: start;
}

.left-content, .right-content { display: flex; flex-direction: column; gap: 40px; }

.section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

/* --- ウェルカムカード --- */
.welcome-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 30px var(--shadow-light);
    border: 1px solid #e8eef1;
}

.card-header { display: flex; align-items: center; margin-bottom: 1rem; }
.cube-icon { width: 36px; height: 36px; background: linear-gradient(135deg, var(--cube-blue), var(--cube-green)); border-radius: 8px; margin-right: 15px; animation: rotate 10s infinite linear; }
#welcome-title { font-family: 'Montserrat', sans-serif; font-size: 2rem; color: var(--cube-blue); margin: 0; }
.highlight-text { font-size: 1.1rem; font-weight: 500; color: var(--cube-red); margin-bottom: 1rem; }
.card-body p { color: var(--text-secondary); }

/* --- 学習ロードマップ --- */
.roadmap-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.roadmap-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 8px 30px var(--shadow-light);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    border-top: 4px solid;
}

.roadmap-card:hover { transform: translateY(-8px); box-shadow: 0 12px 40px var(--shadow-medium); }
.blue-card { border-color: var(--cube-blue); }
.yellow-card { border-color: var(--cube-yellow); }
.red-card { border-color: var(--cube-red); }

.card-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.roadmap-card h3 { font-family: 'Montserrat', sans-serif; font-size: 1.3rem; margin-bottom: 0.8rem; color: var(--text-primary); }
.roadmap-card p { font-size: 0.95rem; color: var(--text-secondary); margin-bottom: 1.5rem; }
.card-link {
    display: inline-block;
    padding: 10px 20px;
    text-decoration: none;
    font-weight: 500;
    border-radius: 20px;
    transition: all 0.3s ease;
    background-color: var(--background-light);
    color: var(--text-primary);
    border: 1px solid #e0e0e0;
}

.blue-card .card-link:hover { background-color: var(--cube-blue); color: white; }
.yellow-card .card-link:hover { background-color: var(--cube-yellow); color: var(--cube-black); }
.red-card .card-link:hover { background-color: var(--cube-red); color: white; }

/* --- CTAセクション --- */
.cta-section { text-align: center; }
.pulse-button { display: inline-block; padding: 15px 35px; background: linear-gradient(135deg, var(--cube-orange), var(--cube-red)); color: white; text-decoration: none; border-radius: 30px; font-weight: bold; font-size: 1.1rem; transition: all 0.3s ease; box-shadow: 0 8px 25px rgba(239, 108, 0, 0.3); }
.pulse-button:hover { transform: translateY(-3px); box-shadow: 0 12px 35px rgba(239, 108, 0, 0.5); animation: pulse 0.6s ease-in-out; }

/* --- 右側コンテンツ --- */
.cube-section, .stats-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 30px var(--shadow-light);
}

.cube-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.cube-header h3 { font-family: 'Montserrat', sans-serif; font-size: 1.5rem; color: var(--cube-blue); margin: 0; }
.color-indicators { display: flex; gap: 6px; }
.color-dot { width: 14px; height: 14px; border-radius: 50%; box-shadow: 0 2px 5px var(--shadow-light); }
.red-bg { background-color: var(--cube-red); }
.orange-bg { background-color: var(--cube-orange); }
.green-bg { background-color: var(--cube-green); }
.blue-bg { background-color: var(--cube-blue); }
.yellow-bg { background-color: var(--cube-yellow); }
.white-bg { background-color: var(--cube-white); border: 1px solid #ddd; }

#cube-container { width: 100%; max-width: 400px; height: 400px; margin: 0 auto; cursor: grab; }
#cube-container:active { cursor: grabbing; }
.cube-instruction { font-size: 0.9rem; color: #666; margin-top: 1rem; display: flex; align-items: center; justify-content: center; gap: 8px; }

/* --- 統計パネル --- */
.stats-panel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; text-align: center; }
.stat-item { padding: 10px; }
.stat-number { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 700; font-family: 'Montserrat', sans-serif; }
.stat-label { font-size: 1rem; color: var(--text-secondary); line-height: 1.2; }
.stat-sub-label { font-size: 0.8rem; color: #888; }
.red-text { color: var(--cube-red); }
.blue-text { color: var(--cube-blue); }
.green-text { color: var(--cube-green); }

/* --- フッター --- */
footer {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-top: 1px solid #e0e0e0;
    padding: 30px 20px;
    margin-top: 60px;
}

.footer-content { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; }
.footer-content p { color: #666; margin: 0; }
.footer-cube-animation { display: flex; gap: 5px; }
.mini-cube { width: 12px; height: 12px; border-radius: 2px; animation: pulse 1.5s infinite; }
.mini-cube:nth-child(1) { background-color: var(--cube-red); animation-delay: 0s; }
.mini-cube:nth-child(2) { background-color: var(--cube-green); animation-delay: 0.5s; }
.mini-cube:nth-child(3) { background-color: var(--cube-blue); animation-delay: 1s; }

/* --- レスポンシブデザイン --- */
@media (max-width: 1024px) {
    .content-wrapper { grid-template-columns: 1fr; gap: 40px; }
    .right-content { max-width: 600px; margin: 0 auto; }
    #cube-container { height: 350px; }
}

@media (max-width: 768px) {
    .roadmap-grid { grid-template-columns: 1fr; }
    .main-nav ul { flex-wrap: wrap; }
    .stats-panel { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 480px) {
    body { line-height: 1.7; }
    main { padding: 30px 15px; }
    .section-title { font-size: 1.5rem; }
    .roadmap-card { padding: 20px; }
    .stat-number { font-size: 1.5rem; }
    .stat-label { font-size: 0.9rem; }
}

/* --- Message Page Override Styles --- */

body.message-page-body {
    background: radial-gradient(circle at 15% 20%, rgba(42, 107, 255, 0.12), transparent 45%),
        radial-gradient(circle at 80% 0%, rgba(242, 200, 75, 0.18), transparent 35%),
        radial-gradient(circle at 50% 90%, rgba(46, 140, 90, 0.12), transparent 50%),
        #f8faff;
    color: var(--text-primary);
    position: relative;
}

/* トップページの背景アニメーションはメッセージページでは非表示 */
.message-page-body .background-animation {
    display: none;
}

.message-page-body .main-nav {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(13, 24, 44, 0.08);
    position: static;
    box-shadow: 0 12px 30px rgba(13, 24, 44, 0.08);
}

.message-page-body .nav-item {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(13, 24, 44, 0.1);
}

.message-page-body .nav-item:hover {
    background-color: rgba(42, 107, 255, 0.08);
}

.message-hero {
    padding-top: 40px;
    position: relative;
    min-height: 100vh;
    color: var(--text-primary);
}

.message-page-body .main-nav ul {
    justify-content: center;
}

.message-page-body .nav-item {
    background-color: #fff;
    border: 1px solid rgba(13, 24, 44, 0.1);
    color: var(--text-primary);
}

.message-page-body .nav-item:hover {
    background-color: rgba(42, 107, 255, 0.08);
}

.cube-bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.floating-cube {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 30% 70% 60% 40%;
    background: linear-gradient(135deg, rgba(42, 107, 255, 0.15), rgba(248, 196, 120, 0.25));
    animation: driftShape 28s infinite ease-in-out;
    filter: blur(0.5px);
}

.floating-cube:nth-child(1) { top: 15%; left: 5%; animation-delay: 0s; }
.floating-cube:nth-child(2) { top: 55%; right: 10%; animation-delay: 8s; }
.floating-cube:nth-child(3) { bottom: 10%; left: 45%; animation-delay: 16s; }
.floating-cube:nth-child(4) { top: 30%; right: 35%; animation-delay: 4s; }

@keyframes driftShape {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); }
    25% { transform: translate(20px, -30px) scale(1.05) rotate(10deg); }
    50% { transform: translate(-10px, 10px) scale(0.95) rotate(0deg); }
    75% { transform: translate(-25px, -20px) scale(1.08) rotate(-8deg); }
    100% { transform: translate(0, 0) scale(1) rotate(0deg); }
}

.message-content {
    padding: 40px 20px;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.message-intro {
    text-align: center;
    margin-bottom: 60px;
}

.message-title {
    font-family: 'Spectral', serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 600;
    background: linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.subtitle-jp {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 1.1rem;
    color: rgba(255,255,255,0.7);
    letter-spacing: 3px;
}

.message-sections {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.message-block {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.block-icon {
    margin-bottom: 15px;
    color: #89f7fe;
}

.message-text {
    font-size: 1.1rem;
    line-height: 1.9;
    font-family: 'Noto Sans JP', sans-serif;
}

.message-text-sub {
    font-size: 1rem;
    color: rgba(255,255,255,0.6);
    margin-top: 10px;
}

.highlight.glow {
    color: #fbc02d;
    text-shadow: 0 0 15px rgba(251, 192, 45, 0.6);
    font-weight: 500;
}

.emphasis.gradient-text {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 500;
}

.math-beauty {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 20px 0;
    font-size: clamp(2rem, 5vw, 3rem);
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 700;
}

.letter-animate {
    display: inline-block;
    background: linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: letterFloat 3s infinite ease-in-out;
}

@keyframes letterFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* message page light overrides */
.message-page-body .subtitle-jp {
    color: var(--text-secondary);
}

.message-page-body .message-block {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(13, 24, 44, 0.08);
    box-shadow: 0 15px 30px rgba(13, 24, 44, 0.08);
    color: var(--text-primary);
}

.message-page-body .block-icon {
    color: var(--cube-blue);
}

.message-page-body .message-text,
.message-page-body .message-text-sub,
.message-page-body .message-text.elegant {
    color: var(--text-primary);
}

.message-page-body .message-text-sub {
    color: var(--text-secondary);
}

.message-page-body .highlight.glow {
    color: var(--cube-orange);
    text-shadow: none;
}

.message-page-body .letter-animate {
    background: none;
    -webkit-background-clip: initial;
    -webkit-text-fill-color: initial;
    color: var(--cube-blue);
}

.message-page-body .concept-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(13, 24, 44, 0.08);
    box-shadow: 0 10px 25px rgba(13, 24, 44, 0.08);
}

.message-page-body .concept-card h3 {
    color: var(--text-primary);
}

.message-page-body .concept-card p {
    color: var(--text-secondary);
}

.message-page-body .theorem-box {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(13, 24, 44, 0.08);
}

.message-page-body .philosophy-card {
    background: rgba(42, 107, 255, 0.08);
    border: 1px solid rgba(42, 107, 255, 0.2);
    color: var(--text-primary);
}

.concept-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.concept-card {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
}

.concept-card:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.12);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

.concept-card h3 {
    color: #89f7fe;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.concept-card p {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
}

.theorem-box {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
}

.message-text.elegant {
    font-family: 'Spectral', serif;
    font-size: 1.3rem;
    font-style: italic;
    color: rgba(255,255,255,0.9);
    line-height: 1.8;
}

.final-message {
    text-align: center;
    padding: 20px;
}

.site-title {
    font-size: 2rem;
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.philosophy-cards {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.philosophy-card {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50px;
    padding: 10px 25px;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.philosophy-card:hover {
    transform: scale(1.05);
    background: rgba(255,255,255,0.15);
}

.highlight-2 {
    color: #4fc3f7;
    font-weight: 500;
}

.highlight-3 {
    color: #81c784;
    font-weight: 500;
}

.message-page-body .fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.message-page-body .fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Message Page Responsive Adjustments --- */

@media (max-width: 600px) {
    body.message-page-body .main-nav ul {
        flex-direction: column; /* ナビゲーションを縦並びに */
        gap: 0.5rem;
    }

    .message-content {
        padding: 20px 15px; /* コンテンツの左右の余白を減らす */
    }

    .message-intro {
        margin-bottom: 40px; /* タイトル下の余白を減らす */
    }

    .message-title {
        font-size: 2.2rem; /* タイトルのフォントサイズを調整 */
    }

    .subtitle-jp {
        font-size: 1rem; /* サブタイトルのフォントサイズを調整 */
    }

    .message-sections {
        gap: 30px; /* 各ブロック間の余白を減らす */
    }

    .message-block {
        padding: 20px; /* ブロック内の余白を減らす */
    }

    .message-text {
        font-size: 1rem; /* 本文のフォントサイズを調整 */
    }

    .math-beauty {
        font-size: 1.8rem; /* 「数学的秩序」のフォントサイズを調整 */
        flex-wrap: wrap; /* はみ出さないように折り返す */
    }

    .message-text.elegant {
        font-size: 1.1rem; /* イタリック体のテキストサイズを調整 */
    }

    .concept-card {
        padding: 20px;
    }

    .concept-card h3 {
        font-size: 1.1rem;
    }
    
    .philosophy-card {
        padding: 8px 20px;
        font-size: 0.9rem;
    }
}
.pll-heading {
    color: #000;
}
.external-link {
    position: relative;
    overflow: visible;
}

.external-link::after {
    content: '別タブで開きます';
    position: absolute;
    white-space: nowrap;
    top: 110%;
    left: 50%;
    transform: translate(-50%, 10px);
    background: rgba(30, 36, 51, 0.92);
    color: #fff;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.external-link:hover::after,
.external-link:focus-visible::after {
    opacity: 1;
    transform: translate(-50%, 0);
}
