:root {
    --text-color: #e6e6e6;
    --accent-color: #ffd1dc; /* 桜色 */
    --bg-color: #080808;
    --glass-bg: rgba(15, 15, 15, 0.65);
    --border-color: rgba(255, 255, 255, 0.1);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Zen Old Mincho', serif;
    overflow-x: hidden;
    width: 100%;
    line-height: 1.8;
}

#webgl-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: -2;
}

/* ノイズ加工 */
.grain-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

main { position: relative; z-index: 1; }

/* セクション間隔の調整 */
.section {
    min-height: 120vh; /* 少し短くしてリズムを作る */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
}

/* 最初のセクションは高く */
#intro { min-height: 100vh; }

/* スクロールインジケーター */
.scroll-indicator {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Shippori Mincho', serif;
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    opacity: 0.7;
    animation: bob 2s infinite;
    z-index: 10;
}

@keyframes bob {
    0%, 100% { transform: translate(-50%, 0); opacity: 0.5; }
    50% { transform: translate(-50%, 10px); opacity: 1; }
}

.title-vertical {
    writing-mode: vertical-rl;
    font-size: clamp(4rem, 10vw, 8rem);
    letter-spacing: 0.2em;
    font-weight: 700;
    text-shadow: 0 0 40px rgba(255, 209, 220, 0.3);
}

.subtitle {
    font-family: 'Shippori Mincho', serif;
    font-size: 1.2rem;
    line-height: 2.4;
    text-align: center;
    margin-top: 2rem;
    opacity: 0.8;
}

/* テキストボックス */
.text-box {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 3.5rem;
    border: 1px solid var(--border-color);
    max-width: 600px;
    width: 100%;
    border-radius: 2px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.6);
    transition: transform 0.3s ease;
    position: relative;
}

/* 章番号 */
.chapter-num {
    position: absolute;
    top: -20px;
    left: 20px;
    font-size: 4rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.05);
    font-family: sans-serif;
    line-height: 1;
}

.text-box h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--accent-color);
    line-height: 1.4;
    font-feature-settings: "palt";
    letter-spacing: 0.05em;
}

.text-box p {
    font-size: 1.05rem;
    line-height: 2.2;
    text-align: justify;
    color: #ccc;
}

.text-box strong {
    color: #fff;
    font-weight: 700;
    border-bottom: 1px dotted #666;
}

/* 特別な強調ボックス */
.highlight-box {
    border: 1px solid var(--accent-color);
    background: rgba(20, 10, 15, 0.8);
}

/* レイアウト配置 */
.left { margin-right: auto; margin-left: 10%; }
.right { margin-left: auto; margin-right: 10%; }
.center { margin: 0 auto; text-align: center; }
.center p { text-align: left; display: inline-block; }

/* ボタン */
.cta-button {
    display: inline-block;
    margin-top: 3rem;
    padding: 1.2rem 5rem;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    text-decoration: none;
    font-size: 1.2rem;
    letter-spacing: 0.2em;
    transition: all 0.4s cubic-bezier(0.2, 1, 0.3, 1);
    background: rgba(0,0,0,0.5);
}

.cta-button:hover {
    background: var(--accent-color);
    color: #000;
    box-shadow: 0 0 50px var(--accent-color);
}

.footer-note {
    margin-top: 2rem;
    font-size: 0.8rem;
    opacity: 0.4;
}

@media (max-width: 768px) {
    .section { min-height: 100vh; padding: 1rem; }
    .title-vertical { writing-mode: horizontal-tb; font-size: 3rem; margin-bottom: 1rem; }
    .text-box { padding: 2rem; margin: 0 auto; width: 95%; }
    .left, .right, .center { margin: 0 auto; }
    .chapter-num { font-size: 3rem; top: -15px; left: 10px; }
}