:root {
    /* Layout */
    --gutter-desktop: 120px;
    --gutter-tablet: 60px;
    --gutter-mobile: 30px;
    --section-vertical: 150px;
    --section-vertical-tablet: 100px;
    --section-vertical-mobile: 80px;

    /* Phase A - Fieldwork */
    --phase-a-bg: #F5F2EB;
    --phase-a-ink: #1A1A1A;
    --phase-a-muted: #8A847A;
    --phase-a-line: #C4BFB4;

    /* Phase B - Analysis */
    --phase-b-bg: #1A1525;
    --phase-b-ink: #E8E4F0;
    --phase-b-muted: #6B6480;
    --phase-b-line: #3D3650;

    /* Neon Accents */
    --neon-green: #39FF14;
    --neon-pink: #FF1493;
    --neon-cyan: #00F5FF;
    --neon-yellow: #FFFF00;

    /* Typography */
    --font-display: 'Cormorant Garamond', 'Noto Serif JP', serif;
    --font-data: 'IBM Plex Mono', monospace;

    /* Current Phase (controlled by JS) */
    --current-bg: var(--phase-a-bg);
    --current-ink: var(--phase-a-ink);
    --current-muted: var(--phase-a-muted);
    --current-line: var(--phase-a-line);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-display);
    background-color: var(--current-bg);
    color: var(--current-ink);
    transition: background-color 0.8s ease, color 0.8s ease;
    overflow-x: hidden;
    line-height: 1.8;
}

body.phase-b {
    --current-bg: var(--phase-b-bg);
    --current-ink: var(--phase-b-ink);
    --current-muted: var(--phase-b-muted);
    --current-line: var(--phase-b-line);
    background-color: var(--phase-b-bg);
    color: var(--phase-b-ink);
}

/* Utility */
.mono {
    font-family: var(--font-data);
}

.eyebrow {
    font-family: var(--font-data);
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--current-muted);
    display: inline-block;
}

.eyebrow.tight {
    letter-spacing: 0.1em;
}

body.phase-b .eyebrow {
    color: var(--neon-green);
}

.text-muted {
    color: var(--current-muted);
}

.emphasis {
    font-size: 1.3rem;
    font-weight: 600;
}

.lead {
    font-size: 1.1rem;
}

.caption {
    font-family: var(--font-data);
    font-size: 12px;
    color: var(--current-muted);
}

.section-note {
    color: var(--current-muted);
    margin-bottom: 60px;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-15 {
    margin-bottom: 15px;
}

.mb-30 {
    margin-bottom: 30px;
}

.mb-40 {
    margin-bottom: 40px;
}

.mb-50 {
    margin-bottom: 50px;
}

.mb-60 {
    margin-bottom: 60px;
}

.mt-15 {
    margin-top: 15px;
}

.mt-30 {
    margin-top: 30px;
}

.mt-50 {
    margin-top: 50px;
}

/* The Thread - Navigation Guide Line */
.thread {
    position: fixed;
    left: calc(var(--gutter-desktop) / 2);
    top: 0;
    width: 1px;
    height: 0;
    background: linear-gradient(to bottom, var(--neon-green), var(--neon-cyan));
    z-index: 100;
    transition: height 0.1s linear;
    opacity: 0.8;
}

.thread::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: -4px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--neon-green);
    box-shadow: 0 0 15px var(--neon-green), 0 0 30px var(--neon-green);
}

/* Technical Grid Overlay */
.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.03;
    background-image:
        linear-gradient(var(--current-ink) 1px, transparent 1px),
        linear-gradient(90deg, var(--current-ink) 1px, transparent 1px);
    background-size: 100px 100px;
    transition: opacity 0.5s ease;
}

body.phase-b .grid-overlay {
    opacity: 0.08;
    background-image:
        linear-gradient(var(--neon-cyan) 1px, transparent 1px),
        linear-gradient(90deg, var(--neon-cyan) 1px, transparent 1px);
}

/* Coordinate Display */
.coordinates {
    position: fixed;
    top: 20px;
    right: 20px;
    font-family: var(--font-data);
    font-size: 11px;
    color: var(--current-muted);
    z-index: 100;
    text-align: right;
    letter-spacing: 0.1em;
    transition: color 0.5s ease;
}

body.phase-b .coordinates {
    color: var(--neon-green);
    text-shadow: 0 0 10px var(--neon-green);
}

.coordinates span {
    display: block;
}

/* Background Music Control */
.bgm-control {
    position: fixed;
    right: calc(var(--gutter-desktop) / 2 + 60px);
    bottom: 28px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(26, 26, 26, 0.75);
    color: #f5f2eb;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(10px);
    cursor: pointer;
    z-index: 140;
    user-select: none;
    transition: transform 0.2s ease, box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease, opacity 0.3s ease;
}

.bgm-control:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.22);
    border-color: var(--neon-green);
}

.bgm-control:active {
    transform: translateY(0);
}

.bgm-control.paused {
    opacity: 0.8;
    border-color: var(--neon-pink);
}

.bgm-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--neon-green);
    box-shadow: 0 0 10px var(--neon-green), 0 0 20px var(--neon-green);
    flex-shrink: 0;
}

.bgm-control.paused .bgm-indicator {
    background: var(--neon-pink);
    box-shadow: 0 0 10px var(--neon-pink), 0 0 20px var(--neon-pink);
}

.bgm-labels {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.bgm-label {
    font-family: var(--font-data);
    font-size: 10px;
    letter-spacing: 0.14em;
    color: var(--current-muted);
}

.bgm-status {
    font-family: var(--font-data);
    font-size: 11px;
    letter-spacing: 0.18em;
}

body.phase-b .bgm-control {
    background: rgba(16, 14, 24, 0.7);
    color: var(--phase-b-ink);
    border-color: rgba(0, 245, 255, 0.4);
}

body.phase-b .bgm-label {
    color: var(--neon-cyan);
}

@media (max-width: 1024px) {
    .bgm-control {
        right: calc(var(--gutter-tablet) + 50px);
        bottom: 26px;
    }
}

@media (max-width: 768px) {
    .bgm-control {
        right: var(--gutter-mobile);
        bottom: 78px;
        padding: 9px 12px;
    }

    .bgm-status {
        font-size: 10px;
    }
}

audio#bgm {
    display: none;
}

.fab-bot {
    position: fixed;
    bottom: 18px;
    right: 18px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    text-decoration: none;
    transition: all 0.25s ease;
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
    backdrop-filter: blur(6px);
}

.fab-bot:hover {
    border-color: var(--neon-cyan);
    background: rgba(0, 245, 255, 0.05);
}

.fab-bot-icon {
    font-family: var(--font-data);
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.4);
    transition: color 0.25s ease;
}

.fab-bot:hover .fab-bot-icon {
    color: var(--neon-cyan);
}

body.phase-b .fab-bot {
    border-color: rgba(0, 245, 255, 0.2);
}

@media (max-width: 768px) {
    .fab-bot {
        bottom: 16px;
        right: 16px;
        width: 34px;
        height: 34px;
    }

    .fab-bot-icon {
        font-size: 12px;
    }
}

/* Back Link */
.back-link {
    position: fixed;
    top: 20px;
    left: 20px;
    font-family: var(--font-data);
    font-size: 11px;
    color: var(--current-muted);
    text-decoration: none;
    letter-spacing: 0.1em;
    z-index: 100;
    transition: color 0.3s ease, opacity 0.3s ease;
    opacity: 0.7;
}

.back-link:hover {
    color: var(--current-ink);
    opacity: 1;
}

body.phase-b .back-link {
    color: var(--neon-green);
    text-shadow: 0 0 10px var(--neon-green);
}

body.phase-b .back-link:hover {
    color: var(--neon-cyan);
    text-shadow: 0 0 15px var(--neon-cyan);
}

@media (max-width: 768px) {
    .back-link {
        top: 15px;
        left: 15px;
        font-size: 10px;
    }
}

/* Navigation */
nav {
    position: fixed;
    top: 50%;
    right: 30px;
    transform: translateY(-50%);
    z-index: 1000;
}

nav ul {
    list-style: none;
}

nav li {
    margin: 15px 0;
}

nav a {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    text-decoration: none;
    color: var(--current-muted);
    font-family: var(--font-data);
    font-size: 10px;
    letter-spacing: 0.15em;
    transition: all 0.3s ease;
}

nav a::after {
    content: '';
    width: 8px;
    height: 8px;
    border: 1px solid var(--current-muted);
    border-radius: 50%;
    margin-left: 10px;
    transition: all 0.3s ease;
}

nav a:hover,
nav a.active {
    color: var(--current-ink);
}

nav a:hover::after,
nav a.active::after {
    background: var(--neon-green);
    border-color: var(--neon-green);
    box-shadow: 0 0 10px var(--neon-green);
}

body.phase-b nav a {
    color: var(--phase-b-muted);
}

body.phase-b nav a:hover,
body.phase-b nav a.active {
    color: var(--neon-cyan);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 var(--gutter-desktop);
    position: relative;
}

.hero-label {
    font-family: var(--font-data);
    font-size: 11px;
    letter-spacing: 0.3em;
    color: var(--current-muted);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.hero-label::before {
    content: '◇';
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }
}

p {
    margin-bottom: 0;
}

.principles-grid,
.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.principle-card,
.value-card {
    border: 1px solid var(--current-line);
    padding: 30px;
    background: rgba(255, 255, 255, 0.5);
}

body.phase-b .principle-card,
body.phase-b .value-card {
    border-color: var(--phase-b-line);
    background: rgba(26, 21, 37, 0.5);
}

.principle-number {
    font-family: var(--font-data);
    font-size: 12px;
    color: var(--neon-green);
    margin-bottom: 15px;
    letter-spacing: 0.1em;
}

.value-icon {
    color: var(--neon-green);
    margin-bottom: 15px;
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 7rem);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 40px;
}

.hero h1 em {
    font-style: italic;
    color: var(--current-muted);
}

.hero-subtitle {
    font-size: 1.3rem;
    max-width: 600px;
    color: var(--current-muted);
    font-weight: 400;
}

.cta-button {
    display: inline-block;
    margin-top: 30px;
    padding: 16px 36px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    color: var(--current-ink);
    background: transparent;
    border: 1px solid var(--current-muted);
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

.cta-button:hover {
    border-color: var(--current-ink);
    background: rgba(255, 255, 255, 0.05);
}

.hero-data {
    position: absolute;
    bottom: 60px;
    left: var(--gutter-desktop);
    font-family: var(--font-data);
    font-size: 11px;
    color: var(--current-muted);
    display: flex;
    gap: 50px;
}

.hero-data div {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.hero-data label {
    letter-spacing: 0.2em;
    font-size: 9px;
}

.hero-data span {
    font-size: 13px;
}

.scroll-indicator {
    position: absolute;
    bottom: 60px;
    right: var(--gutter-desktop);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-family: var(--font-data);
    font-size: 10px;
    letter-spacing: 0.2em;
    color: var(--current-muted);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(10px);
    }
}

.scroll-indicator::after {
    content: '';
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--current-muted), transparent);
}

/* Section Base Styles */
section {
    padding: var(--section-vertical) var(--gutter-desktop);
    position: relative;
    scroll-margin-top: 30px;
}

.section-marker {
    font-family: var(--font-data);
    font-size: 10px;
    letter-spacing: 0.3em;
    color: var(--current-muted);
    margin-bottom: 60px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.section-marker::before {
    content: '';
    width: 40px;
    height: 1px;
    background: var(--current-line);
}

body.phase-b .section-marker {
    color: var(--neon-cyan);
}

body.phase-b .section-marker::before {
    background: var(--neon-cyan);
    box-shadow: 0 0 10px var(--neon-cyan);
}

.section-number {
    font-size: 72px;
    font-weight: 700;
    opacity: 0.05;
    position: absolute;
    top: 100px;
    right: 100px;
    font-family: var(--font-display);
}

body.phase-b .section-number {
    color: var(--neon-pink);
    opacity: 0.15;
    text-shadow: 0 0 50px var(--neon-pink);
}

h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 600;
    margin-bottom: 50px;
    line-height: 1.3;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 25px;
    margin-top: 60px;
}

h3:first-of-type {
    margin-top: 0;
}

body.phase-b h2,
body.phase-b h3 {
    background: linear-gradient(90deg, var(--phase-b-ink), var(--neon-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Split Screen Layout */
.format-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 50px 60px;
    align-items: start;
}

/* Cards */
.card {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--current-line);
    padding: 40px;
    margin-bottom: 30px;
    position: relative;
    backdrop-filter: blur(10px);
    transition: all 0.4s ease;
}

body.phase-b .card {
    background: rgba(26, 21, 37, 0.8);
    border-color: var(--phase-b-line);
}

.card:hover {
    transform: translateX(10px);
    border-color: var(--neon-green);
}

body.phase-b .card:hover {
    box-shadow: 0 0 30px rgba(0, 245, 255, 0.1);
    border-color: var(--neon-cyan);
}

.card-label {
    font-family: var(--font-data);
    font-size: 10px;
    letter-spacing: 0.2em;
    color: var(--current-muted);
    margin-bottom: 15px;
}

body.phase-b .card-label {
    color: var(--neon-green);
}

.card h4 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.card p {
    color: var(--current-muted);
    font-size: 0.95rem;
}

/* Unified format cards */
.format-card {
    border: 1px solid var(--current-line);
    padding: 34px 32px;
    background: rgba(0, 0, 0, 0.02);
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

body.phase-b .format-card {
    background: rgba(255, 255, 255, 0.02);
    border-color: var(--phase-b-line);
}

.format-card:hover {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 24px rgba(0, 245, 255, 0.08);
    transform: translateY(-4px);
}

.format-badge {
    font-family: var(--font-data);
    font-size: 10px;
    letter-spacing: 0.18em;
    color: var(--neon-green);
    margin-bottom: 16px;
}

.format-card h3 {
    margin: 0 0 18px;
}

.format-lead {
    color: var(--current-muted);
    margin-bottom: 18px;
}

.format-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-family: var(--font-data);
    font-size: 0.95rem;
}

.format-list li {
    display: flex;
    gap: 12px;
    align-items: baseline;
    padding: 10px 0;
    border-bottom: 1px solid var(--current-line);
}

.format-list li:last-child {
    border-bottom: none;
}

.format-list li::before {
    content: '▸';
    color: var(--neon-green);
    font-size: 12px;
    position: relative;
    top: 1px;
}

/* Data List */
.data-list {
    list-style: none;
    font-family: var(--font-data);
    font-size: 0.85rem;
}

.data-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--current-line);
    display: flex;
    align-items: baseline;
    gap: 15px;
}

.data-list li::before {
    content: '›';
    color: var(--current-muted);
}

body.phase-b .data-list li::before {
    content: '▸';
    color: var(--neon-green);
}

/* Technical Overlay Box */
.tech-box {
    border: 1px solid var(--current-line);
    padding: 30px;
    position: relative;
    margin: 40px 0;
}

.tech-box::before,
.tech-box::after {
    content: '+';
    position: absolute;
    font-family: var(--font-data);
    font-size: 12px;
    color: var(--current-muted);
}

.tech-box::before {
    top: -6px;
    left: -6px;
}

.tech-box::after {
    bottom: -6px;
    right: -6px;
}

body.phase-b .tech-box {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.1);
}

body.phase-b .tech-box::before,
body.phase-b .tech-box::after {
    color: var(--neon-cyan);
}

/* Warning Box */
.warning-box {
    background: rgba(255, 20, 147, 0.05);
    border-left: 3px solid var(--neon-pink);
    padding: 25px 30px;
    margin: 40px 0;
    font-family: var(--font-data);
    font-size: 0.85rem;
}

body.phase-b .warning-box {
    background: rgba(255, 20, 147, 0.1);
    box-shadow: 0 0 30px rgba(255, 20, 147, 0.1);
}

.warning-box strong {
    color: var(--neon-pink);
    display: block;
    margin-bottom: 10px;
    letter-spacing: 0.1em;
}

/* Info Box */
.info-box {
    background: rgba(0, 245, 255, 0.03);
    border: 1px dashed var(--current-line);
    padding: 25px 30px;
    margin: 40px 0;
    font-size: 0.9rem;
}

.info-box p {
    margin-top: 12px;
}

body.phase-b .info-box {
    background: rgba(0, 245, 255, 0.05);
    border-color: var(--neon-cyan);
}

/* Category Tags */
.category-tag {
    display: inline-block;
    font-family: var(--font-data);
    font-size: 10px;
    letter-spacing: 0.15em;
    padding: 6px 14px;
    border: 1px solid var(--current-line);
    margin-right: 8px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

body.phase-b .category-tag {
    border-color: var(--phase-b-line);
    color: var(--phase-b-ink);
}

.category-tag:hover {
    background: var(--neon-green);
    border-color: var(--neon-green);
    color: #000;
}

/* Prohibition List */
.prohibition-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.prohibition-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border: 1px solid var(--current-line);
    font-family: var(--font-data);
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.prohibition-item::before {
    content: '✕';
    font-size: 18px;
    color: var(--neon-pink);
}

body.phase-b .prohibition-item {
    border-color: var(--phase-b-line);
}

body.phase-b .prohibition-item:hover {
    border-color: var(--neon-pink);
    box-shadow: 0 0 20px rgba(255, 20, 147, 0.2);
}

/* Links */
a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid var(--current-muted);
    transition: all 0.3s ease;
}

a:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}

body.phase-b a {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}

body.phase-b a:hover {
    text-shadow: 0 0 10px var(--neon-cyan);
}

/* Footer */
footer {
    padding: 100px var(--gutter-desktop);
    border-top: 1px solid var(--current-line);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    white-space: nowrap;
    word-break: keep-all;
}

.footer-data {
    font-family: var(--font-data);
    font-size: 11px;
    color: var(--current-muted);
    text-align: right;
}

/* Closing message (Section 06) */
.closing-message {
    margin-top: 60px;
    font-size: 1.05rem;
    color: var(--current-muted);
    max-width: 640px;
}

.closing-message p {
    line-height: 1.7;
}

/* Responsive */
@media (max-width: 1024px) {

    .hero,
    section {
        padding: var(--section-vertical-tablet) var(--gutter-tablet);
    }

    .split-section {
        grid-template-columns: 1fr;
    }

    .split-content {
        position: relative;
        top: 0;
    }

    nav {
        display: none;
    }

    .thread {
        left: calc(var(--gutter-tablet) / 3);
    }

    .prohibition-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {

    .hero,
    section {
        padding: var(--section-vertical-mobile) var(--gutter-mobile);
    }

    .hero-data {
        position: relative;
        bottom: auto;
        left: auto;
        margin-top: 40px;
        flex-direction: column;
        gap: 20px;
    }

    .scroll-indicator {
        display: none;
    }

    .coordinates {
        display: none;
    }

    /* Footer / closing area tweaks for mobile */
    footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 70px var(--gutter-mobile) 60px;
    }

    .footer-logo {
        font-size: 1.1rem;
    }

    .footer-data {
        text-align: left;
        line-height: 1.6;
        font-size: 10px;
    }

    .closing-message {
        margin-top: 40px;
        font-size: 1rem;
    }
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Mobile: avoid blank space while waiting for intersection */
@media (max-width: 768px) {
    .fade-in {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Glitch effect for Phase B headers */
body.phase-b h2 {
    animation: glitch 5s infinite;
}

@keyframes glitch {

    0%,
    90%,
    100% {
        text-shadow: none;
    }

    92% {
        text-shadow: -2px 0 var(--neon-pink), 2px 0 var(--neon-cyan);
    }

    94% {
        text-shadow: 2px 0 var(--neon-pink), -2px 0 var(--neon-cyan);
    }

    96% {
        text-shadow: none;
    }
}

/* Data stream decoration */
.data-stream {
    position: fixed;
    left: calc(var(--gutter-desktop) * 0.67);
    top: 0;
    height: 100%;
    width: 1px;
    background: repeating-linear-gradient(to bottom,
            transparent,
            transparent 10px,
            var(--current-line) 10px,
            var(--current-line) 20px);
    opacity: 0.3;
    z-index: 1;
}

body.phase-b .data-stream {
    background: repeating-linear-gradient(to bottom,
            transparent,
            transparent 10px,
            var(--neon-green) 10px,
            var(--neon-green) 12px);
    opacity: 0.2;
}

/* ============================================
   PARTICIPATION FLOW - Section 04 Styles
   ============================================ */

/* Flow Container */
.flow-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    margin: 60px 0 80px;
    position: relative;
}

.flow-step {
    position: relative;
    padding: 0 30px;
    text-align: center;
}

.flow-step::after {
    content: '';
    position: absolute;
    top: 35px;
    right: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, var(--current-line), var(--neon-green) 50%, var(--current-line));
    z-index: 0;
}

.flow-step:last-child::after {
    display: none;
}

.flow-number {
    width: 70px;
    height: 70px;
    border: 2px solid var(--neon-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-data);
    font-size: 24px;
    font-weight: 600;
    color: var(--neon-green);
    margin: 0 auto 25px;
    position: relative;
    z-index: 1;
    background: var(--current-bg);
    transition: all 0.4s ease;
}

.flow-step:hover .flow-number {
    background: var(--neon-green);
    color: #000;
    box-shadow: 0 0 30px rgba(57, 255, 20, 0.4);
}

body.phase-b .flow-number {
    background: var(--phase-b-bg);
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.2);
}

body.phase-b .flow-step:hover .flow-number {
    background: var(--neon-green);
    color: #000;
    box-shadow: 0 0 40px rgba(57, 255, 20, 0.6);
}

.flow-content {
    padding-top: 10px;
}

.flow-content h4 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--current-ink);
}

body.phase-b .flow-content h4 {
    color: var(--phase-b-ink);
}

.flow-content p {
    font-size: 0.9rem;
    color: var(--current-muted);
    line-height: 1.7;
    margin-bottom: 15px;
}

.deadline-notice {
    display: inline-block;
    background: linear-gradient(90deg, rgba(255, 107, 107, 0.2), rgba(255, 107, 107, 0.1));
    border-left: 3px solid #ff6b6b;
    padding: 8px 15px;
    margin: 10px 0;
    font-size: 0.95rem;
    color: #ff6b6b;
}

.step-deadline {
    font-family: var(--font-data);
    font-size: 11px;
    letter-spacing: 0.05em;
    color: #ff6b6b;
    margin-top: 8px;
    font-weight: 600;
}

.flow-link {
    display: inline-block;
    font-family: var(--font-data);
    font-size: 11px;
    letter-spacing: 0.1em;
    color: var(--neon-cyan);
    border: 1px solid var(--neon-cyan);
    padding: 8px 16px;
    margin-top: 10px;
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--neon-cyan);
}

.flow-link:hover {
    background: var(--neon-cyan);
    color: #000;
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.3);
}

/* Flow Connector (vertical mobile) */
.flow-connector {
    display: none;
}

/* Platform Table */
.platform-table {
    margin-top: 40px;
    border: 1px solid var(--current-line);
    overflow: hidden;
}

body.phase-b .platform-table {
    border-color: var(--phase-b-line);
}

.platform-row {
    display: grid;
    grid-template-columns: 180px 1fr 1.5fr;
    border-bottom: 1px solid var(--current-line);
}

body.phase-b .platform-row {
    border-color: var(--phase-b-line);
}

.platform-row:last-child {
    border-bottom: none;
}

.platform-row.header {
    background: rgba(0, 0, 0, 0.03);
    font-family: var(--font-data);
    font-size: 10px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--current-muted);
}

body.phase-b .platform-row.header {
    background: rgba(57, 255, 20, 0.05);
    color: var(--neon-green);
}

.platform-row > div {
    padding: 20px 25px;
    border-right: 1px solid var(--current-line);
}

body.phase-b .platform-row > div {
    border-color: var(--phase-b-line);
}

.platform-row > div:last-child {
    border-right: none;
}

.platform-name {
    display: flex;
    align-items: center;
}

.platform-tag {
    font-family: var(--font-data);
    font-size: 11px;
    letter-spacing: 0.1em;
    padding: 6px 12px;
    border: 1px solid var(--current-line);
    background: transparent;
    transition: all 0.3s ease;
}

body.phase-b .platform-tag {
    border-color: var(--phase-b-line);
    color: var(--neon-cyan);
}

.platform-row:hover .platform-tag {
    border-color: var(--neon-green);
    color: var(--neon-green);
}

body.phase-b .platform-row:hover .platform-tag {
    background: rgba(0, 245, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 245, 255, 0.2);
}

.platform-role {
    font-size: 0.9rem;
    line-height: 1.6;
}

.platform-policy {
    font-size: 0.85rem;
    color: var(--current-muted);
    line-height: 1.7;
}

.platform-policy a {
    display: inline-block;
    margin-top: 8px;
    color: var(--neon-cyan);
    font-family: var(--font-data);
    font-size: 11px;
    letter-spacing: 0.1em;
}

/* Section Lead Text */
.section-lead {
    font-size: 1.2rem;
    color: var(--current-muted);
    margin-bottom: 40px;
    max-width: 600px;
}

body.phase-b .section-lead {
    color: var(--phase-b-muted);
}

/* Responsive Flow */
@media (max-width: 1024px) {
    .flow-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px 20px;
    }

    .flow-step::after {
        display: none;
    }

    .flow-step {
        padding: 0 20px;
    }

    .platform-row {
        grid-template-columns: 140px 1fr 1.2fr;
    }

    .platform-row > div {
        padding: 15px 18px;
    }
}

@media (max-width: 768px) {
    .flow-container {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .flow-step {
        display: grid;
        grid-template-columns: 80px 1fr;
        text-align: left;
        padding: 25px 0;
        border-bottom: 1px solid var(--current-line);
    }

    body.phase-b .flow-step {
        border-color: var(--phase-b-line);
    }

    .flow-step:last-child {
        border-bottom: none;
    }

    .flow-number {
        width: 50px;
        height: 50px;
        font-size: 18px;
        margin: 0;
    }

    .flow-content {
        padding-top: 0;
        padding-left: 15px;
    }

    .flow-content h4 {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }

    .flow-connector {
        display: block;
        width: 1px;
        height: 30px;
        background: linear-gradient(to bottom, var(--neon-green), transparent);
        margin: 0 auto;
    }

    /* Platform Table Mobile */
    .platform-table {
        border: none;
    }

    .platform-row {
        display: flex;
        flex-direction: column;
        border: 1px solid var(--current-line);
        margin-bottom: 20px;
    }

    body.phase-b .platform-row {
        border-color: var(--phase-b-line);
    }

    .platform-row.header {
        display: none;
    }

    .platform-row > div {
        border-right: none;
        border-bottom: 1px solid var(--current-line);
        padding: 15px 20px;
    }

    body.phase-b .platform-row > div {
        border-color: var(--phase-b-line);
    }

    .platform-row > div:last-child {
        border-bottom: none;
    }

    .platform-name {
        background: rgba(0, 0, 0, 0.02);
    }

    body.phase-b .platform-name {
        background: rgba(57, 255, 20, 0.03);
    }
}

/* ============================================
   AWARD STRUCTURE - Section 05 Styles (Redesigned)
   ============================================ */

/* ===== GRAND PRIZE - 大賞 ===== */
.grand-prize-showcase {
    position: relative;
    padding: 60px 50px;
    margin: 60px 0;
    background: linear-gradient(135deg, 
        rgba(255, 215, 0, 0.03) 0%, 
        rgba(255, 180, 0, 0.08) 50%, 
        rgba(255, 215, 0, 0.03) 100%);
    border: 2px solid transparent;
    background-clip: padding-box;
    overflow: hidden;
}

.grand-prize-showcase::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid;
    border-image: linear-gradient(135deg, #FFD700, #FFA500, #FFD700) 1;
    pointer-events: none;
}

body.phase-b .grand-prize-showcase {
    background: linear-gradient(135deg, 
        rgba(57, 255, 20, 0.05) 0%, 
        rgba(0, 245, 255, 0.08) 50%, 
        rgba(57, 255, 20, 0.05) 100%);
}

body.phase-b .grand-prize-showcase::before {
    border-image: linear-gradient(135deg, var(--neon-green), var(--neon-cyan), var(--neon-green)) 1;
}

/* Glow effect */
.grand-prize-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.15) 0%, transparent 70%);
    pointer-events: none;
    animation: grand-glow 4s ease-in-out infinite;
}

body.phase-b .grand-prize-glow {
    background: radial-gradient(circle, rgba(57, 255, 20, 0.2) 0%, transparent 70%);
}

@keyframes grand-glow {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
}

.grand-prize-badge {
    font-family: var(--font-data);
    font-size: 11px;
    letter-spacing: 0.3em;
    color: #B8860B;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

body.phase-b .grand-prize-badge {
    color: var(--neon-green);
    text-shadow: 0 0 10px var(--neon-green);
}

.grand-prize-star {
    font-size: 64px;
    color: #FFD700;
    text-shadow: 
        0 0 20px rgba(255, 215, 0, 0.5),
        0 0 40px rgba(255, 215, 0, 0.3),
        0 0 60px rgba(255, 215, 0, 0.2);
    animation: star-shimmer 3s ease-in-out infinite;
    position: relative;
    z-index: 1;
    line-height: 1;
    margin-bottom: 20px;
}

body.phase-b .grand-prize-star {
    color: var(--neon-green);
    text-shadow: 
        0 0 20px var(--neon-green),
        0 0 40px var(--neon-green),
        0 0 60px var(--neon-green);
}

@keyframes star-shimmer {
    0%, 100% { 
        transform: scale(1) rotate(0deg); 
        filter: brightness(1);
    }
    50% { 
        transform: scale(1.1) rotate(5deg); 
        filter: brightness(1.3);
    }
}

.grand-prize-content {
    position: relative;
    z-index: 1;
}

.grand-prize-label {
    display: inline-block;
    font-family: var(--font-data);
    font-size: 13px;
    letter-spacing: 0.2em;
    color: #DAA520;
    margin-bottom: 10px;
    padding: 6px 16px;
    border: 1px solid #DAA520;
}

body.phase-b .grand-prize-label {
    color: var(--neon-cyan);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 245, 255, 0.3);
}

.grand-prize-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #FFD700, #FFA500, #FFD700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 15px 0;
    line-height: 1.2;
}

body.phase-b .grand-prize-title {
    background: linear-gradient(135deg, var(--neon-green), var(--neon-cyan), var(--neon-green));
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow: none;
}

.grand-prize-desc {
    font-size: 1.1rem;
    color: var(--current-muted);
    max-width: 500px;
}

.grand-prize-decoration {
    position: absolute;
    top: 20px;
    right: 30px;
    display: flex;
    gap: 8px;
}

.grand-prize-decoration span {
    width: 8px;
    height: 8px;
    background: #FFD700;
    transform: rotate(45deg);
    opacity: 0.5;
    animation: deco-pulse 2s ease-in-out infinite;
}

.grand-prize-decoration span:nth-child(2) { animation-delay: 0.3s; }
.grand-prize-decoration span:nth-child(3) { animation-delay: 0.6s; }

body.phase-b .grand-prize-decoration span {
    background: var(--neon-green);
    box-shadow: 0 0 10px var(--neon-green);
}

@keyframes deco-pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* ===== CATEGORY AWARDS - 部門賞 ===== */
.category-section {
    margin: 80px 0;
}

.category-header {
    margin-bottom: 40px;
}

.category-badge {
    font-family: var(--font-data);
    font-size: 11px;
    letter-spacing: 0.2em;
    color: var(--current-muted);
    display: block;
    margin-bottom: 15px;
}

body.phase-b .category-badge {
    color: var(--neon-cyan);
}

.category-header h3 {
    font-size: 1.8rem;
    margin: 0 0 10px;
}

.category-header p {
    color: var(--current-muted);
    font-size: 1rem;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    border: 1px solid var(--current-line);
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
    text-align: center;
    position: relative;
    overflow: hidden;
}

body.phase-b .category-card {
    background: rgba(26, 21, 37, 0.5);
    border-color: var(--phase-b-line);
}

.category-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(0, 245, 255, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.category-card:hover {
    transform: translateY(-8px);
    border-color: var(--neon-cyan);
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.1),
        0 0 0 1px var(--neon-cyan);
}

body.phase-b .category-card:hover {
    box-shadow: 
        0 15px 40px rgba(0, 245, 255, 0.15),
        0 0 30px rgba(0, 245, 255, 0.1);
}

.category-card:hover::before {
    opacity: 1;
}

.category-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--current-ink);
    transition: all 0.4s ease;
    position: relative;
    z-index: 1;
}

body.phase-b .category-icon {
    color: var(--neon-cyan);
}

.category-card:hover .category-icon {
    transform: scale(1.2);
    color: var(--neon-cyan);
}

body.phase-b .category-card:hover .category-icon {
    text-shadow: 0 0 20px var(--neon-cyan);
}

.category-name {
    font-family: var(--font-data);
    font-size: 11px;
    letter-spacing: 0.1em;
    color: var(--current-ink);
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

body.phase-b .category-name {
    color: var(--phase-b-ink);
}

.category-card:hover .category-name {
    color: var(--neon-cyan);
}

/* ===== SPECIAL AWARDS - 特別賞 ===== */
.special-section {
    margin: 80px 0;
}

.special-header {
    margin-bottom: 40px;
}

.special-badge {
    font-family: var(--font-data);
    font-size: 11px;
    letter-spacing: 0.2em;
    color: var(--current-muted);
    display: block;
    margin-bottom: 15px;
}

body.phase-b .special-badge {
    color: var(--neon-pink);
}

.special-header h3 {
    font-size: 1.8rem;
    margin: 0 0 10px;
}

.special-header p {
    color: var(--current-muted);
    font-size: 1rem;
}

.special-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.special-card {
    position: relative;
    padding: 35px;
    border: 1px solid var(--current-line);
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.4s ease;
    overflow: hidden;
}

body.phase-b .special-card {
    background: rgba(26, 21, 37, 0.5);
    border-color: var(--phase-b-line);
}

.special-card-accent {
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--neon-cyan);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.special-card:hover .special-card-accent {
    opacity: 1;
}

body.phase-b .special-card:hover .special-card-accent {
    box-shadow: 0 0 15px var(--neon-cyan);
}

.process-award .special-card-accent {
    background: var(--neon-green);
}

body.phase-b .process-award .special-card-accent {
    box-shadow: 0 0 15px var(--neon-green);
}

.context-award .special-card-accent {
    background: var(--neon-pink);
}

body.phase-b .context-award .special-card-accent {
    box-shadow: 0 0 15px var(--neon-pink);
}

.special-card-badge {
    font-family: var(--font-data);
    font-size: 10px;
    letter-spacing: 0.2em;
    color: var(--current-muted);
    margin-bottom: 15px;
}

body.phase-b .process-award .special-card-badge {
    color: var(--neon-green);
}

body.phase-b .context-award .special-card-badge {
    color: var(--neon-pink);
}

.special-card h4 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--current-ink);
}

body.phase-b .special-card h4 {
    color: var(--phase-b-ink);
}

.special-card p {
    font-size: 0.95rem;
    color: var(--current-muted);
    line-height: 1.8;
    margin-bottom: 20px;
}

.special-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-family: var(--font-data);
    font-size: 11px;
    letter-spacing: 0.1em;
    color: var(--current-muted);
}

.process-award .special-keywords span {
    color: var(--neon-green);
}

.context-award .special-keywords span {
    color: var(--neon-pink);
}

body.phase-b .process-award .special-keywords span {
    text-shadow: 0 0 10px var(--neon-green);
}

body.phase-b .context-award .special-keywords span {
    text-shadow: 0 0 10px var(--neon-pink);
}

.special-card:hover {
    transform: translateX(8px);
    border-color: var(--neon-cyan);
}

body.phase-b .special-card:hover {
    box-shadow: 0 0 30px rgba(0, 245, 255, 0.15);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }

    .special-grid {
        gap: 25px;
    }

    .grand-prize-showcase {
        padding: 50px 40px;
    }

    .grand-prize-star {
        font-size: 48px;
    }

    .grand-prize-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .category-card {
        padding: 25px 15px;
    }

    .category-icon {
        font-size: 2rem;
    }

    .category-name {
        font-size: 10px;
    }

    .special-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .special-card {
        padding: 28px;
    }

    .grand-prize-showcase {
        padding: 40px 30px;
        margin: 40px 0;
    }

    .grand-prize-star {
        font-size: 40px;
    }

    .grand-prize-title {
        font-size: 1.6rem;
    }

    .grand-prize-decoration {
        display: none;
    }
}

@media (max-width: 480px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .category-card {
        padding: 20px 12px;
    }

    .category-icon {
        font-size: 1.6rem;
        margin-bottom: 10px;
    }

    .category-name {
        font-size: 9px;
    }

    .grand-prize-showcase {
        padding: 30px 25px;
    }

    .grand-prize-star {
        font-size: 32px;
        margin-bottom: 15px;
    }

    .grand-prize-title {
        font-size: 1.4rem;
    }
}
