/* css/style.css */
/* ここにウェブサイトの見た目（デザインやレイアウト）を記述します */

:root {
    --bg-color: #0b0b0e;
    --text-main: #f0f0f2;
    --text-muted: #8d8d9b;
    --accent-color: #ffcfed;
    /* 落ち着いた藤の花色 */
    --accent-glow: rgba(180, 162, 229, 0.4);

    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-hover: rgba(255, 255, 255, 0.06);

    --font-serif: 'Shippori Mincho', serif;
    --font-sans: 'Zen Kaku Gothic New', sans-serif;
}

/* テーマ別定義 */
.theme-fujino,
body.theme-fujino {
    --accent-color: #c4b2f5;
    --accent-glow: rgba(180, 162, 229, 0.4);
}

.theme-sukina,
body.theme-sukina {
    --accent-color: #74b9ff;
    /* 澄んだサファイアブルー */
    --accent-glow: rgba(116, 185, 255, 0.4);
}

body.theme-fujino {
    background: radial-gradient(circle at top right, rgba(180, 162, 229, 0.06), #08080a 80%);
}

body.theme-sukina {
    background: radial-gradient(circle at top right, rgba(116, 185, 255, 0.06), #08080a 80%);
}

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

/* スムーズスクロールのマジック */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

/* ページ遷移アニメーション */
@keyframes pageIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@view-transition {
    navigation: auto;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    animation: pageIn 0.5s ease-out forwards;
}

/* 動く背景グラデーション */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 50% 50%, rgba(25, 20, 40, 0.8) 0%, var(--bg-color) 40%);
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

/* ヘッダー (グラスモーフィズム) */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 4rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid transparent;
    border-image: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.1), var(--accent-color), rgba(255, 255, 255, 0.1), transparent) 1;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transition: all 0.4s ease;
}

.logo {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    position: relative;
    padding-bottom: 5px;
}

.logo a {
    text-decoration: none;
    background: linear-gradient(135deg, #fff 40%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: all 0.5s ease;
}

.logo::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: linear-gradient(to right, var(--accent-color), transparent);
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.logo:hover::after {
    width: 100%;
}

.nav a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 2.5rem;
    font-size: 0.85rem;
    transition: all 0.4s ease;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.nav a:hover {
    color: var(--accent-color);
    letter-spacing: 0.25em;
}

/* コンテナ */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 8rem 2rem 2rem;
}

/* ===== ファーストビュー (ヒーローセクション) ===== */
.hero-screen {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* 画面いっぱいの透かし文字 */
.hero-bg-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-serif);
    font-size: clamp(8rem, 20vw, 18rem);
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.04);
    white-space: nowrap;
    letter-spacing: 0.1em;
    pointer-events: none;
    z-index: 0;
}

/* 縦書きのコンテンツを並べる */
.hero-content {
    display: flex;
    flex-direction: row-reverse;
    /* 縦書きなので右から左へ */
    gap: clamp(2rem, 8vw, 6rem);
    z-index: 1;
    align-items: flex-start;
    margin-top: -5vh;
    /* 画面中央より少し上に配置 */
}

/* 縦書きのメインタイトル */
.hero-welcome {
    writing-mode: vertical-rl;
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 300;
    letter-spacing: 0.2em;
    color: var(--text-main);
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.6);
}

/* 縦書きのサブテキスト */
.hero-desc {
    writing-mode: vertical-rl;
    font-family: var(--font-serif);
    font-size: clamp(0.95rem, 1.8vw, 1.1rem);
    font-weight: 300;
    letter-spacing: 0.5em;
    line-height: 1.5;
    color: #e0e0e5;
    opacity: 0.85;
    margin-top: 6rem;
    /* タイトルより少し下から始めると美しい */
}

.hero-desc p {
    margin-left: 2rem;
}

/* スクロールインジケーター：スッと落ちる光の線へ変更 */
.scroll-indicator {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-muted);
    opacity: 0.8;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.scroll-indicator:hover {
    color: var(--accent-color);
    opacity: 1;
}

.scroll-text {
    font-family: var(--font-serif);
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    writing-mode: vertical-rl;
    /* スクロールの文字も縦にする */
}

.scroll-line {
    width: 1px;
    height: 80px;
    background: rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.scroll-line::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    animation: scrollLine 2s infinite cubic-bezier(0.65, 0, 0.35, 1);
}

@keyframes scrollLine {
    0% {
        transform: translateY(-100%);
    }

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

/* ===== 注意事項セクション ===== */
.attention-box {
    background: rgba(40, 15, 15, 0.4);
    border: 1px solid rgba(255, 100, 100, 0.3);
    border-left: 4px solid #ff6b6b;
    border-radius: 8px;
    padding: 2.5rem;
    margin: 2rem 0 4rem;
    backdrop-filter: blur(5px);
}

.attention-title {
    color: #ff8e8e;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-align: center;
    margin-bottom: 1.5rem;
}

.attention-list {
    color: #ffd0d0;
    font-size: 0.95rem;
    line-height: 1.8;
    padding-left: 1.5rem;
}

.attention-list li {
    margin-bottom: 0.8rem;
}

.attention-list li:last-child {
    margin-bottom: 0;
}

#message {
    margin: 8rem auto;
}

.message-title {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    font-weight: 300;
    color: var(--accent-color);
    letter-spacing: 0.15em;
    margin-bottom: 2rem;
}

.message-text {
    line-height: 2.2;
    color: #e0e0e5;
    font-size: 0.95rem;
    letter-spacing: 0.08em;
}

/* セクション共通 */
.section {
    margin-bottom: 4rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease, transform 1s ease;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-title {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
    color: var(--accent-color);
    letter-spacing: 0.1em;
}

/* グラスモーフィズムパネル */
.glass-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 2.5rem;
    backdrop-filter: blur(8px);
}

/* プロフィール */
.profile-list dt {
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 0.1em;
}

.profile-list dd {
    color: #d0d0d5;
}

/* 作品リスト (本棚) */
.works-grid {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    justify-content: flex-start;
    /* 左詰めに変更 */
    align-items: flex-end;
    padding: 0 2rem 20px;
    /* 左右に少し余白をもたせ、下部の板までの余白も指定 */
    border-bottom: 20px solid rgba(255, 255, 255, 0.05);
    /* 本棚の板（ガラス風） */
    margin: 2rem auto;
    max-width: 90%;
    min-height: 400px;
    background: linear-gradient(to bottom, rgb(255, 255, 255, 0.04) 10%, rgb(255, 255, 255, 0.04) 20%);
    border-radius: 4px;
}

/* 本（背表紙） */
.work-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 4px 10px 10px 4px;
    padding: 1.5rem 0.8rem;
    width: 75px;
    height: 350px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: inset -5px 0 10px rgba(0, 0, 0, 0.3), 5px 5px 15px rgba(0, 0, 0, 0.4);
}

.work-card:hover {
    transform: translateY(-20px) rotate(-2deg);
    /* 本を引き出すような動き */
    box-shadow: inset -5px 0 10px rgba(0, 0, 0, 0.3), 10px 25px 25px rgba(0, 0, 0, 0.5), 0 0 30px var(--accent-glow);
    z-index: 10;
}

/* 左端のテーマカラーライン（背表紙の装飾に） */
.work-card::after {
    content: '';
    position: absolute;
    top: 5%;
    left: 4px;
    width: 2px;
    height: 90%;
    background: var(--accent-color);
    opacity: 0.8;
}

.work-card.theme-fujino {
    background: linear-gradient(to right, rgba(196, 178, 245, 0.15), rgba(0, 0, 0, 0.4));
    border-left: 5px solid var(--accent-color);
}

.work-card.theme-sukina {
    background: linear-gradient(to right, rgba(116, 185, 255, 0.15), rgba(0, 0, 0, 0.4));
    border-left: 5px solid var(--accent-color);
}

/* 背表紙のタイトル */
.book-spine {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
}

.spine-title {
    writing-mode: vertical-rl;
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 500;
    letter-spacing: 0.3em;
    color: var(--text-main);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    pointer-events: none;
    line-height: 1;
    white-space: nowrap;
}

/* 中身（モーダルに渡す用） */
.work-content {
    display: none;
}

.work-header {
    margin-bottom: 1.5rem;
}

/* タグ・ラベル共通 */
.work-genre,
.tag {
    display: inline-flex;
    align-items: center;
    font-size: 0.85rem;
    padding: 0.4rem 1.1rem;
    border-radius: 20px;
    letter-spacing: 0.05em;
    white-space: nowrap;
    line-height: 1;
    transition: all 0.3s ease;
}

.work-genre {
    background: rgba(180, 162, 229, 0.15);
    color: var(--accent-color);
    border: 1px solid rgba(180, 162, 229, 0.4);
    margin-right: 0.5rem;
}

.tag {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    text-decoration: none !important;
}

.tag:hover {
    background: rgba(180, 162, 229, 0.15);
    border-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(180, 162, 229, 0.2);
    transform: translateY(-2px);
}

.work-title {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-main);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    letter-spacing: 0.1em;
}

.work-desc {
    color: #b0b0ba;
    margin-bottom: 2rem;
    font-size: 0.95rem;
    line-height: 1.7;
}

.char-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    margin-bottom: 0.8rem;
}

.char-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

/* リンク類 */
.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.social-link:hover {
    border-color: rgba(180, 162, 229, 0.4);
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-color);
}

.read-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.read-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: uppercase;
    padding: 0.1rem 0;
    transition: color 0.3s ease;
}

.read-link:hover .link-text,
.read-link:hover .link-arrow {
    color: var(--accent-color);
}

.read-link:hover .link-arrow {
    transform: translateX(5px);
}

/* =========================================
   キャラクター詳細ページ用スタイル
   ========================================= */
.character-detail-rich {
    margin-top: 4rem;
}

.char-header-top {
    margin-bottom: 3rem;
    text-align: center;
}

.char-meta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.char-name {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 500;
    letter-spacing: 0.15em;
    color: var(--text-main);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.char-name rt {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--accent-color);
    letter-spacing: 0.2em;
}

.char-data {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--glass-border);
}

.char-layout-body {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: start;
}

.char-visual {
    position: sticky;
    top: 150px;
}

/* 画像サイズを適切に制御 */
.char-image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transition: transform 0.5s ease;
}

.char-image-placeholder {
    width: 100%;
    aspect-ratio: 4 / 5;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.char-image-placeholder::before {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle at center, rgba(180, 162, 229, 0.08) 0%, transparent 70%);
    animation: placeholder-rotate 15s linear infinite;
}

@keyframes placeholder-rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.placeholder-main {
    display: block;
    font-family: var(--font-serif);
    font-size: 0.9rem;
    letter-spacing: 0.4em;
    color: var(--accent-color);
    margin-bottom: 0.8rem;
    opacity: 0.8;
}

.placeholder-jp {
    display: block;
    font-family: var(--font-serif);
    font-size: 1.1rem;
    writing-mode: vertical-rl;
    margin: 0 auto;
    color: var(--text-main);
    letter-spacing: 0.4em;
    opacity: 0.6;
}

.quote {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--text-main);
    text-align: center;
    padding: 1.5rem 0;
    margin-bottom: 2.5rem;
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    background: linear-gradient(90deg, transparent, rgba(180, 162, 229, 0.05), transparent);
}

.char-description p {
    margin-bottom: 1.8rem;
    color: #e0e0e5;
    line-height: 2.1;
}

.char-page-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.char-page-nav a {
    text-decoration: none;
    font-size: 0.95rem;
}

.nav-back {
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.nav-back:hover {
    color: var(--text-main);
    transform: translateX(-5px);
}

.nav-read {
    color: var(--accent-color);
    font-weight: 500;
    padding: 0.8rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(180, 162, 229, 0.2);
    border-radius: 30px;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.nav-read:hover {
    background: rgba(180, 162, 229, 0.1);
    border-color: var(--accent-color);
    box-shadow: 0 0 20px rgba(180, 162, 229, 0.2);
    transform: translateY(-2px);
}

.footer {
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

/* =========================================
   レスポンシブ共通 (スマホ・タブレット向け)
   ========================================= */
@media (max-width: 950px) {
    .char-layout-body {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .char-visual {
        position: static;
        max-width: 500px;
        margin: 0 auto 2rem;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 0.8rem 1rem;
    }

    .logo {
        font-size: 1.2rem;
        white-space: nowrap;
    }

    .nav {
        margin-left: auto;
        display: flex;
        gap: 1rem;
    }

    .nav a {
        margin-left: 0;
        font-size: 0.9rem;
        color: var(--text-main);
        white-space: nowrap;
    }

    .hero-screen {
        min-height: 40vh;
    }

    #message {
        margin-top: 2rem;
        margin-bottom: 2rem;
        line-height: 1;
    }

    .container {
        padding: 6rem 1rem 1rem;
    }

    .attention-box,
    .message-box {
        padding: 1.5rem 1rem;
        margin-left: 0;
        margin-right: 0;
    }

    .modal-book-page {
        padding: 1.5rem 1rem;
    }

    .works-grid {
        flex-wrap: wrap;
        justify-content: center;
        align-content: flex-end;
        align-items: flex-end;
        gap: 1.5rem;
        padding: 3rem 1rem 20px 1rem; /* 上に余白を持たせて本を下に押し下げる絶対的アプローチ */
        min-height: 0; /* 400pxのリセットを確実にするため0に */
    }

    .work-card {
        height: 280px;
        width: 60px;
    }

    .spine-title {
        font-size: 1.1rem;
        letter-spacing: 0.15em;
    }

    .profile-list {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .profile-list dt {
        margin-top: 1rem;
    }
}

/* 極小画面向け (iPhone SE相当) */
@media (max-width: 480px) {
    .header {
        padding: 0.6rem 0.5rem;
    }

    .logo {
        font-size: 1rem;
        letter-spacing: 0;
    }

    .nav {
        gap: 0.8rem;
    }

    .nav a {
        font-size: 0.8rem;
    }
}

/* 既存のボタン用スタイル (保持) */
button {
    padding: 10px 20px;
    font-size: 16px;
    background-color: #0056b3;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* トップへ戻るボタン */
.scroll-to-top {
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 45px;
    height: 45px;
    background: rgba(25, 20, 40, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--accent-color);
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: rgba(180, 162, 229, 0.15);
    border-color: var(--accent-color);
    box-shadow: 0 0 20px var(--accent-glow);
}

/* =========================================
   プレミアム演出用スタイル
   ========================================= */


/* =========================================
   モーダル / 本を開くアニメーション
   ========================================= */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content-wrapper {
    position: relative;
    z-index: 2001;
    perspective: 1500px;
    /* 3D効果用 */
    width: 90%;
    max-width: 650px;
}

.modal-book {
    width: 100%;
    /* 本を閉じた状態から開くアニメーションの初期状態 */
    transform-style: preserve-3d;
    transform: rotateY(-90deg) scale(0.8) translateX(-100px);
    transform-origin: left center;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.6s;
    opacity: 0;
}

.modal.active .modal-book {
    transform: rotateY(0deg) scale(1) translateX(0);
    opacity: 1;
}

.modal-book-page {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 3rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 40px var(--accent-glow);
    position: relative;
    background: linear-gradient(135deg, rgba(30, 25, 40, 0.95), rgba(20, 20, 30, 0.95));
    border-left: 8px solid var(--accent-color);
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 85vh;
    /* 画面に収まるように高さを制限 */
}

/* モーダルの閉じるボタン */
.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
    z-index: 10;
}

.modal-close:hover {
    color: var(--accent-color);
}

#modal-body {
    position: relative;
    z-index: 1;
}

/* 2. 出現アニメーション (IntersectionObserver) */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* 3. 背景パーティクルキャンバス */
#bg-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

/* 4. 背景テーマ連動 (Body へのクラス付与で制御) */
body {
    transition: background-color 1s ease;
}

body.fujino-active {
    background-color: #1a1625;
    /* ほのかに藤色 */
}

body.sukina-active {
    background-color: #101a25;
    /* ほのかにブルー */
}

/* スマホ対応：縦書きテキストを非表示または調整 */
@media (max-width: 950px) {
    .vertical-phrase {
        display: none;
    }
}

.illusted-link {
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.9rem;
    padding: 0rem 0.2rem;
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.illusted-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-color);
}

.copyright {
    font-size: 0.9rem;
    color: var(--text-main);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
}

.divider {
    color: var(--text-muted);
    opacity: 0.5;
}

.disclaimer {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    line-height: 1.4;
    text-align: center;
    margin: 0;
}