/* BIKUNITAN - Design System (PRISM & Medical Hybrid) */
:root {
    --primary: #0056b3;
    --primary-light: #e6f0ff;
    --accent: #00a8ff;
    --gold: #FFD700;
    --gold-glow: rgba(255, 215, 0, 0.6);
    --bg-body: #eceef1;
    --text-main: #1a1a1a;
    --text-muted: #666;
    --radius-lg: 32px;
    --radius-md: 16px;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    --container-width: 1000px;
    --transition: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Jost', 'Noto Sans JP', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.8;
    overflow-x: hidden;
}

/* ドロップダウン形式のため、メニューが開いても背景のスクロールは維持 */
body.menu-open { overflow: auto; }

#bg-canvas {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1; opacity: 0.6;
    transition: opacity 1.5s ease;
}
/* ★追加: 夜間用Vanta背景スタイル */
#vanta-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2; /* #bg-canvasより後ろに配置 */
    opacity: 0; /* デフォルトは非表示 */
    pointer-events: none; /* マウス操作を透過 */
    transition: opacity 1.5s ease; /* フェード効果用 */
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 4%;
}

/* セクション間の余白を外側（margin）で統一 */
section:not(:last-child) {
    margin-bottom: 8rem; 
}

section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease, transform 1s ease;
}

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

.hero { 
    height: 90vh; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    text-align: center; 
    margin-bottom: 4rem;
}
.hero-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.shop-links {
    display: flex;
    gap: 2rem;
}

.shop-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-bottom: 1px solid transparent;
    transition: 0.3s;
}

.shop-link:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* Typography */
h1, h2, h3 { color: var(--text-main); font-weight: 300; letter-spacing: 0.05em; }

.section-title {
    font-size: 1.75rem;
    text-align: center;
    margin-bottom: 4rem;
    text-transform: uppercase;
    font-weight: 300;
}

.section-title::after {
    content: ''; display: block; width: 40px; height: 1px;
    background: var(--text-muted); margin: 1.5rem auto;
}

/* --- Hamburger Button (左側配置) --- */
.hamburger-btn {
    position: fixed;
    top: 30px;
    left: 30px; /* 左側に固定 */
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    z-index: 1000;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: var(--transition);
}

.hamburger-line {
    width: 20px;
    height: 1px;
    background: var(--text-main);
    transition: var(--transition);
}

.hamburger-btn.is-active .hamburger-line:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger-btn.is-active .hamburger-line:nth-child(2) { opacity: 0; }
.hamburger-btn.is-active .hamburger-line:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* --- Dropdown Menu (コンパクトな左寄せドロップダウン) --- */
.full-menu {
    position: fixed;
    top: 90px;
    left: 30px;
    width: 240px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-md);
    z-index: 999;
    padding: 1.5rem 0;
    box-shadow: var(--shadow);
    
    /* 初期状態は非表示 */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px) scale(0.95);
    transform-origin: top left;
    transition: var(--transition);
}

.full-menu.is-active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.nav-links { list-style: none; text-align: left; }
.nav-links li { 
    margin-bottom: 0; 
    opacity: 0; 
    transform: translateX(-10px); 
    transition: 0.4s ease; 
}
.full-menu.is-active .nav-links li { opacity: 1; transform: translateX(0); }

/* 順番にふわっと表示させるアニメーション */
.nav-links li:nth-child(1) { transition-delay: 0.05s; }
.nav-links li:nth-child(2) { transition-delay: 0.1s; }
.nav-links li:nth-child(3) { transition-delay: 0.15s; }
.nav-links li:nth-child(4) { transition-delay: 0.2s; }
.nav-links li:nth-child(5) { transition-delay: 0.25s; }
.nav-links li:nth-child(6) { transition-delay: 0.3s; }

.nav-links a {
    display: block;
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: 0.3s;
}

.nav-links a:hover { 
    color: var(--accent); 
    background: rgba(255, 255, 255, 0.3);
    padding-left: 2.5rem;
}

/* Components: Glass Card */
.glass-card {
    background: rgba(255, 255, 255, 0.35); 
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-lg);
    padding: 3.5rem;
    box-shadow: var(--shadow);
    position: relative;
}

.glitch {
    position: relative;
    font-size: clamp(3.5rem, 12vw, 6rem);
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    display: inline-block;
    line-height: 1;
}

.glitch::before, .glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: transparent;
}

.glitch::before { left: 2px; text-shadow: -2px 0 var(--accent); clip: rect(44px, 950px, 56px, 0); animation: glitch-anim 5s infinite linear alternate-reverse; }
.glitch::after { left: -2px; text-shadow: -2px 0 var(--gold); clip: rect(44px, 950px, 56px, 0); animation: glitch-anim2 5s infinite linear alternate-reverse; }

@keyframes glitch-anim {
    0% { clip: rect(31px, 9999px, 94px, 0); transform: skew(1deg); }
    50% { clip: rect(66px, 9999px, 25px, 0); transform: skew(0.5deg); }
    100% { clip: rect(13px, 9999px, 56px, 0); transform: skew(1deg); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(65px, 9999px, 100px, 0); transform: skew(0.3deg); }
    50% { clip: rect(9px, 9999px, 68px, 0); transform: skew(0.5deg); }
    100% { clip: rect(39px, 9999px, 19px, 0); transform: skew(0.3deg); }
}

.hero__sub { 
    font-size: 1.1rem; color: var(--text-muted); 
    margin-top: 2rem; margin-bottom: 3rem; font-weight: 300;
    letter-spacing: 0.1em;
}

.btn {
    display: inline-block; padding: 1.2rem 3rem; background: var(--text-main);
    color: #fff; text-decoration: none; border-radius: 4px; font-weight: 400;
    transition: var(--transition); letter-spacing: 0.1em; text-transform: uppercase;
}
.btn:hover { transform: scale(1.05); background: var(--accent); opacity: 0.8; }

/* About Creator */
#about.glass-card { background: rgba(255, 253, 250, 0.4); padding: 6rem 3rem 4rem; overflow: hidden; }
#about::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 12px;
    background-image: linear-gradient(135deg, var(--bg-body) 25%, transparent 25%), linear-gradient(-135deg, var(--bg-body) 25%, transparent 25%);
    background-size: 16px 16px; background-repeat: repeat-x; background-position: left -8px; z-index: 10;
}
#about p { text-align: center; max-width: 750px; margin: 0 auto; color: var(--text-main); font-size: 1.1rem; line-height: 2.2; }

/* Service Cards */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
@media (max-width: 900px) { .services-grid { grid-template-columns: 1fr; } }
.service-card { 
    text-align: left; padding: 2.5rem; background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 20px; transition: var(--transition);
}
.service-card:hover { transform: translateY(-8px); background: rgba(255, 255, 255, 0.4); }
.service-icon { width: 32px; height: 32px; margin-bottom: 2rem; color: var(--accent); opacity: 0.8; }
.service-icon svg { width: 100%; height: 100%; display: block; }
.service-card h3 { font-size: 1.1rem; margin-bottom: 1.5rem; font-weight: 400; text-transform: uppercase; }
.service-list { list-style: none; font-size: 0.8rem; color: var(--text-muted); }
.service-list li { padding: 0.4rem 0; border-bottom: 1px solid rgba(0,0,0,0.03); }

/* Gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
.gallery-item { 
    aspect-ratio: 1; padding: 0.8rem; background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 12px; cursor: pointer; transition: var(--transition);
    overflow: hidden; /* 画像ズーム用に追加 */
    position: relative;
}

.gallery-item img { 
    width: 100%; height: 100%; object-fit: cover; border-radius: 6px; 
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1); /* 少しゆったりと */
    will-change: transform; /* アニメーションを滑らかに */
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item:hover { 
    transform: translateY(-8px); 
    background: rgba(255, 255, 255, 0.6); 
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1); /* 影を少し強調 */
}

/* Profile Table */
.profile-table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.profile-table th, .profile-table td { padding: 2rem 1rem; text-align: left; border-bottom: 1px solid rgba(0,0,0,0.05); }
.profile-table th { width: 30%; font-weight: 400; color: var(--text-muted); font-size: 0.8rem; text-transform: uppercase; }

/* Contact Section */
.contact-content { text-align: center; }
.contact-content h3 { font-size: 1.5rem; margin-bottom: 1.5rem; font-weight: 400; }
.contact-content p { color: var(--text-muted); max-width: 600px; margin: 0 auto 2.5rem; }
.contact-actions { display: flex; justify-content: center; gap: 1.5rem; }

/* Footer */
.footer { padding: 4rem 0 6rem; text-align: center; color: var(--text-muted); }
.sns-container { display: flex; justify-content: center; gap: 2rem; margin-bottom: 2rem; }
.sns-link { color: var(--text-main); text-decoration: none; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; transition: var(--transition); opacity: 0.6; }
.sns-link:hover { opacity: 1; color: var(--accent); }
.copyright { font-size: 0.8rem; letter-spacing: 0.1em; opacity: 0.6; }

/* ページトップボタン */
.page-top-btn {
    position: fixed; bottom: 30px; right: 30px; width: 50px; height: 50px;
    background: rgba(255, 255, 255, 0.4); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8); border-radius: 50%; color: var(--text-main);
    display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 100;
    opacity: 0; visibility: hidden; transition: var(--transition); box-shadow: var(--shadow);
}
.page-top-btn.is-visible { opacity: 1; visibility: visible; }
.page-top-btn:hover { transform: translateY(-5px); background: rgba(255, 255, 255, 0.7); color: var(--accent); }

/* テーマ切り替えボタン（デバッグ用・目立たない） */
.theme-toggle-btn {
    position: fixed; bottom: 20px; left: 20px; width: 32px; height: 32px;
    background: rgba(0, 0, 0, 0.2); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 50%; color: var(--text-muted);
    display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 99;
    opacity: 0.3; transition: opacity 0.3s ease, transform 0.2s ease;
    font-size: 14px; padding: 0;
}
.theme-toggle-btn:hover {
    opacity: 0.7; transform: scale(1.1);
    background: rgba(0, 0, 0, 0.3);
}
.theme-icon {
    display: block; line-height: 1;
}
/* 夜間モード時のテーマ切り替えボタン */
body.is-night .theme-toggle-btn {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.4);
}
body.is-night .theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.6);
}



/* 2. セリフ吹き出し：キャラクターの頭上に固定 */
.ai-bubble {
    position: absolute !important;
    bottom: 95% !important; 
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: max-content !important;
    max-width: 220px !important;
    z-index: 910;
    pointer-events: auto;     /* セリフ内のボタンは押せるように */
}

.ai-bubble.is-active { opacity: 1; transform: translateY(0); }

/* キャラクターが入るコンテナ */
.ai-character-container, #js-live2d-container {
    width: 250px !important; /* Fixed width */
    height: 300px !important; /* Fixed height */
    pointer-events: auto;      /* キャラクターは触れるように */
}
/* ★ここが重要：高さを 300px に固定しました */
.ai-character { 
    width: 250px; 
    height: 300px; 
    background: transparent !important; /* 背景を透明に固定 */
    filter: drop-shadow(0 0 15px var(--gold-glow)); 
    transition: 0.5s ease; 
}

/* キャンバスを枠内に収める設定 */
.ai-character canvas {
    background: transparent !important; /* キャンバス自体も透明に */
    width: 250px !important; /* Fixed width */
    height: 300px !important; /* Fixed height */
    object-fit: contain;
}

@keyframes float-vertical { 
    0%, 100% { transform: translateY(0); } 
    50% { transform: translateY(-20px); } 
}

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); z-index: 1000; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: 0.4s ease; }
.modal.is-active { opacity: 1; visibility: visible; }
.modal-content img { max-width: 90%; max-height: 85vh; box-shadow: var(--shadow); }
/* モーダル内の動画レスポンシブ対応 */
.video-container {
    position: relative;
    width: 80vw;
    aspect-ratio: 16 / 9;
    max-width: 900px;
}
.video-container iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}
/* スマホ向けの調整 */
@media (max-width: 600px) {
    .ai-character {
        width: 180px !important; /* 少し小さく */
        height: 220px !important;
    }
    .ai-nav {
        left: 50% !important; /* 中央付近に寄せる */
        top: auto !important;
        bottom: 20px !important;
        transform: translateX(-50%);
    }
}
.gallery-item {
    position: relative; /* 子要素の基準にする */
    overflow: hidden; /* はみ出した文字を隠す */
    border-radius: 12px;
}

.gallery-overlay {
    position: absolute;
    inset: 0;           /* top:0, left:0, width:100%, height:100% と同等 */
    z-index: 2;         /* 画像(z-indexなし)より上に配置 */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* 下から上へ、濃い紺色から透明になるグラデーション（参考サイト風） */
    background: linear-gradient(0deg, rgba(0, 30, 60, 0.8) 0%, rgba(0, 30, 60, 0) 60%);
    display: flex;
    align-items: flex-end; /* 下端に寄せる */
    justify-content: flex-start; /* 左端に寄せる */
    padding: 1.2rem; /* 余白 */
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.4s ease; /* じわっと表示 */
    pointer-events: none; /* マウスイベントを画像本体に逃がす */
}



.gallery-info {
    color: #fff;
    text-align: left;
    font-size: 0.75rem; /* 少し小さめで洗練された印象に */
    padding: 1.5rem;
    line-height: 1.6;
    letter-spacing: 0.08em;
    font-weight: 300;
    /* テキストに影をつけて可読性を上げる */
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease;
}
.gallery-title {
    font-family: 'Jost', sans-serif; /* 英字が綺麗なフォントを指定 */
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.3rem; /* キャプションとの隙間 */
}

.gallery-caption {
    font-size: 0.7rem;
    opacity: 0.8;
    line-height: 1.4;
}

/* ホバー時のふわっとした動きを追加 */
.gallery-item:hover .gallery-info {
    transform: translateY(0);
    transition: transform 0.4s ease;
    opacity: 1; /* マウスを乗せたら表示 */
}
.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.modal-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.modal-caption {
    color: var(--text-main);
    text-align: center;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.8);
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    backdrop-filter: blur(5px);
    box-shadow: var(--shadow);
}
/* 背景色の変更：真っ黒から深い紺へ */
body.is-night {
    --text-main: #f1f5f9;    /* Slate 100: ほぼ白に近い、目に優しいグレーホワイト */
    --text-muted: #94a3b8;   /* Slate 400: 暗い背景でもはっきり読める明るさ */
    --bg-body: #020617;      /* より深みのある紺色（背景の透過性を補助） */
}
/* ガラスカードの調整 */
body.is-night .glass-card {
    background: rgba(15, 23, 42, 0.85); /* 背景を濃くする */
    border: 1px solid rgba(51, 65, 85, 0.8); /* 境界線を明示 */
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}
/* About/Profileなどのカード内の文章 */
body.is-night .glass-card p {
    color: var(--text-main);
}
/* 夜間モード時のボタンを確実に白背景・黒文字にする */
body.is-night .btn {
    background-color: #ffffff;
    color: #1a1b2e;
    border: none;
}
/* Hero セクションのサブテキスト */
body.is-night .hero__sub {
    color: #cbd5e1; /* Slate 300 */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); /* 文字の輪郭を強調 */
}
/* About セクションの本文 */
body.is-night #about p {
    color: var(--text-main);
}
/* サービスカード内の各項目（muted設定箇所） */
body.is-night .service-list li {
    color: #cbd5e1;
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

/* プロフィールテーブルの項目名(th) */
body.is-night .profile-table th {
    color: var(--accent); /* 青色のアクセントを足して構造をわかりやすく */
    opacity: 0.9;
}
/* フッターのコピーライト */
body.is-night .footer,
body.is-night .copyright {
    color: #64748b; /* Slate 500 */
}

/* フッターのコピーライト */
body.is-night .copyright,
body.is-night .sns-link {
    color: var(--text-muted);
}
/* プラン内容のリストなどの視認性向上 */
body.is-night .plan-features li {
    color: #cbd5e1; /* Slate-300 */
    border-bottom-color: rgba(255, 255, 255, 0.05);
}
/* セクションタイトルに微細なグロー効果 */
body.is-night .section-title {
    color: #fff;
    text-shadow: 0 0 15px rgba(0, 168, 255, 0.3);
}

/* AI吹き出し：読みやすさを最大化 */
body.is-night .ai-bubble {
    background: rgba(255, 255, 255, 0.98); /* 吹き出しは白地に黒文字が最も読みやすい */
    color: #0f172a;
    font-weight: 500;
}
/* 夜間はThree.jsの背景を少し暗く見せるためのオーバーレイ */
body.is-night #bg-canvas {
    filter: brightness(0.5) hue-rotate(20deg);
    opacity: 0; /* 昼の背景を隠す */
}
body.is-night #vanta-bg {
    opacity: 1; /* 夜の背景を表示 */
}
/* style.css の夜間モード設定を調整 */

/* ボタンの文字を夜でもはっきりさせる */
body.is-night .btn {
    color: #1a1a1a; /* 黒に近い色に固定 */
    background: rgba(255, 255, 255, 0.9); /* 背景を少し明るくして文字を目立たせる */
}

/* 吹き出しの文字が見えない問題の修正 */
body.is-night .ai-bubble {
    background: rgba(40, 44, 52, 0.9);
    color: #fff;
}

.ai-bubble { 
    background: rgba(255, 255, 255, 0.9); /* 少しだけ不透明度を上げる */
    backdrop-filter: blur(8px);
    padding: 1rem 1.2rem; 
    border-radius:  20px 20px 20px 0px; 
    font-size: 0.9rem; 
    color: #111; /* 文字色を少し濃くして視認性アップ */
    box-shadow: var(--shadow); /* 共通の影を適用 */
    transition: var(--transition);
}

body.is-night .ai-bubble {
    border-radius: 20px 20px 20px 0px; /* ここでも形を維持 */
}

/* Style.css に追記してデザインを統一 */
.nav-btn {
    padding: 6px 12px;
    background: rgba(0, 242, 255, 0.1);
    color: var(--main) !important;
    border: 1px solid var(--main);
    border-radius: 12px;
    font-size: 0.75rem;
    cursor: pointer;
    font-family: 'Inter', 'Noto Sans JP', sans-serif; /* フォントを統一 */
    outline: none;
    transition: 0.3s;
}

.nav-btn:hover {
    background: var(--main);
    color: var(--bg) !important;
    box-shadow: 0 0 15px var(--main); /* ぼんやり光らせる */
    transform: scale(0.95); /* 押した時に少し凹む演出 */
}

/* 夜間モード時の吹き出しとボタン（コントラスト調整） */
body.is-night .ai-bubble {
    background: rgba(30, 32, 50, 0.95) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

body.is-night .nav-btn {
    background: rgba(255, 255, 255, 0.05);
    color: #e0e0e0 !important;
    border-color: rgba(255, 255, 255, 0.4);
}

body.is-night .nav-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff !important;
}

/* 夜間モード時の「言葉を教える」ボタン（金色背景）の視認性向上 */
body.is-night .nav-btn[style*="background: #FFD700"],
body.is-night .nav-btn[style*="background:#FFD700"],
body.is-night .nav-btn[style*="background: var(--gold)"],
body.is-night .nav-btn[style*="background:var(--gold)"] {
    color: #4a4a4a; /* 濃いめのグレー */
    background: #FFD700; /* 金色を維持 */
    border: 2px solid rgba(255, 255, 255, 0.3); /* 白い枠線を追加 */
    font-weight: bold;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5); /* 金色のグロー効果 */
}
/* モバイルでのLive2D位置微調整 */
@media (max-width: 600px) {
    .ai-character {
        width: 180px !important; /* 少し小さく */
        height: 220px !important;
    }
    .ai-nav {
        left: 50% !important; /* 中央付近に寄せる */
        top: auto !important;
        bottom: 20px !important;
        transform: translateX(-50%);
    }
}
/* Pricing Grid */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 4rem;
}

.plan-card {
    display: flex;
    flex-direction: column;
    padding: 3rem 2rem;
    text-align: center;
    transition: var(--transition);
}

.plan-card.featured {
    border: 1px solid var(--accent);
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.6);
    z-index: 1;
}

.plan-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: white;
    font-size: 0.7rem;
    padding: 0.3rem 1.2rem;
    border-radius: 20px;
    letter-spacing: 0.1em;
    font-weight: bold;
}

.plan-name { font-size: 1.2rem; margin-bottom: 1rem; }
.plan-price { font-size: 2rem; font-weight: 300; margin-bottom: 2rem; }
.plan-price .tax { font-size: 0.8rem; opacity: 0.5; }

.plan-features {
    list-style: none;
    text-align: left;
    font-size: 0.85rem;
    margin-bottom: 2.5rem;
    flex-grow: 1;
}

.plan-features li {
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.03);
    color: var(--text-muted);
}

.plan-features li::before {
    content: '→';
    margin-right: 0.8rem;
    color: var(--accent);
}

/* Service Flow */
.flow-container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    max-width: 700px;
    margin: 0 auto;
}

.flow-item {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.flow-num {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--accent);
    opacity: 0.5;
    font-family: 'Quicksand', sans-serif;
}

.flow-content h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.flow-content p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; }

@media (max-width: 900px) {
    .pricing-grid { grid-template-columns: 1fr; }
    .plan-card.featured { transform: scale(1); margin: 1rem 0; }
}
/* プランカード内のボタン用追加スタイル */
.btn-outline {
    display: inline-block;
    padding: 1rem 2rem;
    border: 1px solid var(--text-main);
    color: var(--text-main);
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: var(--transition);
}

.btn-outline:hover {
    background: var(--text-main);
    color: #fff;
    transform: translateY(-3px);
}

/* サービスフローセクションの微調整 */
.flow-section {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

/* 夜間モード時のフロー番号の視認性アップ */
body.is-night .flow-num {
    color: var(--accent);
    opacity: 0.8;
}
.ai-nav {
    position: fixed !important;
    width: 250px !important;  /* 適正な横幅 */
    height: 300px !important; /* 適正な高さ */
    z-index: 900;             /* メニュー(999)より下、コンテンツより上 */
    pointer-events: none;     /* 箱自体はクリックを邪魔しない */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    /* transition は JS 側で動的に制御するので、ここでは短めに */
    transition: left 0.5s ease-out, top 0.5s ease-out;
}


.ai-nav:active {
    cursor: grabbing; /* 掴んでいる間のアイコン */
}
/* 3. キャラクター表示エリア：画面全体設定(100vw)を解除して、親の箱(250px)に合わせる */
#js-live2d-container {
    position: relative !important; /* fixed を解除 */
    top: auto !important;
    left: auto !important;
    width: 250px !important;      /* 親の 250px に合わせる */
    height: 300px !important;     /* 親の 300px に合わせる */
    pointer-events: auto !important; /* キャラクターは触れるように */
    background: transparent !important;
    z-index: 905 !important;
}
/* キャンバスも箱の中に収める */
#js-live2d-container canvas {
    width: 250px !important;
    height: 300px !important;
    object-fit: contain;
}

/* ついでにThree.js背景も確実に後ろへ */
#bg-canvas {
    z-index: -1 !important;
}
