/* --- 1. Google Fonts（プロ用フォント）の読み込み --- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700;900&family=Noto+Sans+JP:wght@400;700&display=swap');

/* --- 2. 全体の基本設定 --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Noto Sans JP", "Helvetica Neue", Arial, sans-serif;
    color: #333;
    line-height: 1.6;
}

/* --- 3. ヘッダーのデザイン --- */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    background-color: rgba(255, 255, 255, 0.95);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.logo-img {
    height: 35px;
    width: auto;
    display: block;
}

.nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav a {
    text-decoration: none;
    color: #333;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.05em;
    transition: color 0.3s;
}

/* ★変更：ホバー色を濃いグレーに */
.nav a:hover {
    color: #555;
}

.btn-contact {
    background-color: #111;
    color: #fff !important;
    padding: 10px 24px;
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

/* ★変更：ホバー色を濃いグレー（少し明るい黒）に */
.btn-contact:hover {
    background-color: #333;
}

/* --- 4. ヒーローセクション --- */
.hero {
    height: 100vh;
    width: 100%;
    background-image: url('images/topimage.webp'); 
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #fff;
    padding: 0 20px;
    max-width: 900px;
}

.main-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 64px;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
    text-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.sub-text {
    font-size: 16px;
    line-height: 2.0;
    margin-bottom: 40px;
    font-weight: 400;
    opacity: 0.95;
    letter-spacing: 0.08em;
}

/* --- 5. About Me セクション --- */
.section {
    padding: 100px 20px;
}

.section h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 32px;
    margin-bottom: 20px;
    color: #111;
    text-align: center;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 36px;
    font-weight: 900;
    text-align: center;
    margin-bottom: 10px;
    letter-spacing: 0.05em;
    color: #111;
}

.about-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
    max-width: 900px;
    margin: 0 auto;
    text-align: left;
}

.about-image img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border: 4px solid #fff;
}

.about-text h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
}

/* ★変更：役職名の色を濃いグレーに */
.about-text .role {
    color: #333;
    font-weight: bold;
    margin-bottom: 20px;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 0.05em;
}

.about-text .description {
    line-height: 1.8;
    color: #555;
}

/* --- 6. Serviceセクション --- */
#service {
    background-color: #f9f9f9;
}

.section-desc {
    text-align: center;
    margin-bottom: 60px;
    color: #666;
    font-size: 16px;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: #fff;
    padding: 40px 30px;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

/* ★変更：アイコンの色を濃いグレーに */
.icon-box {
    font-size: 40px;
    color: #333;
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 20px;
    margin-bottom: 15px;
    font-weight: 700;
}

.service-card p {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
}

/* --- 7. Contactセクション & ボタン --- */
.contact-btn-wrapper {
    text-align: center;
    margin-top: 30px;
}

.main-btn {
    background-color: #000;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    padding: 15px 40px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.main-btn:hover {
    background-color: #333;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}

.main-btn i {
    margin-right: 10px;
}

/* --- 8. モーダル（お問い合わせフォーム） --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fff;
    width: 90%;
    max-width: 700px;
    height: 85vh;
    border-radius: 12px;
    padding: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-content h3 {
    text-align: center;
    margin-bottom: 15px;
    font-size: 20px;
    color: #333;
}

.form-wrapper {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.form-wrapper iframe {
    width: 100%;
    height: 1000px;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 30px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    z-index: 10;
}

.close-btn:hover {
    color: #000;
}

/* --- 9. フローティング音楽プレイヤー --- */
.music-player {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 999;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

.player-header {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
    padding-left: 15px;
    font-weight: 900;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    font-family: 'Montserrat', sans-serif;
}

.player-content {
    display: flex;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    padding: 10px 15px 10px 10px;
    border-radius: 60px;
    color: #fff;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.1);
    gap: 15px;
    transition: all 0.3s ease;
    max-width: 380px;
}

.player-content:hover {
    transform: translateY(-2px);
    background-color: rgba(0, 0, 0, 0.95);
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}

/* --- プレイリストポップアップ（×ボタン付き） --- */
.playlist-popup {
    position: absolute;
    bottom: 110%;
    left: 0;
    width: 300px;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 15px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.playlist-popup.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ヘッダー（横並び） */
.playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
    padding-bottom: 5px;
    margin-bottom: 10px;
}

.header-text {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
}

/* ×ボタンのデザイン */
.close-playlist {
    font-size: 24px;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.close-playlist:hover {
    color: #fff;
}

.playlist-items {
    max-height: 250px;
    overflow-y: auto;
}

.playlist-item {
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 5px;
}

.playlist-item:hover {
    background-color: rgba(255,255,255,0.1);
}

/* ★変更：再生中の曲の強調色をグレー系に */
.playlist-item.active {
    background-color: rgba(100, 100, 100, 0.3);
    border: 1px solid rgba(100, 100, 100, 0.5);
}

.list-thumb {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    margin-right: 10px;
    object-fit: cover;
}

.list-info {
    flex: 1;
    overflow: hidden;
}

.list-title {
    font-size: 12px;
    font-weight: bold;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- アートワーク --- */
.art-wrapper {
    width: 45px;
    height: 45px;
    flex-shrink: 0;
    position: relative;
    cursor: pointer;
}

.music-art {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #333;
    transition: transform 0.5s;
}

.playing .music-art {
    animation: spin 4s linear infinite;
}

@keyframes spin { 100% { transform: rotate(360deg); } }

/* --- テキスト情報（スクロール対応） --- */
.text-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    width: 130px;
    cursor: pointer;
}

.track-title {
    font-size: 13px;
    font-weight: bold;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.marquee-container {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
}

.track-desc {
    font-size: 10px;
    color: #aaa;
    display: inline-block;
    padding-left: 100%;
    animation: marquee 15s linear infinite;
}

@keyframes marquee {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-100%, 0); }
}

/* --- ボタン類 --- */
.controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-btn {
    cursor: pointer;
    color: #ccc;
    transition: color 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.control-btn:hover {
    color: #fff;
}

.play-btn {
    width: 32px;
    height: 32px;
    background-color: #fff;
    color: #000;
    border-radius: 50%;
    font-size: 12px;
}

.play-btn:hover {
    background-color: #eee;
    color: #000;
    transform: scale(1.1);
}

.list-btn {
    margin-left: 5px;
    color: #888;
}

/* --- 10. スマホ対応（レスポンシブ共通設定） --- */
.hamburger {
    display: none;
    cursor: pointer;
    width: 30px;
    height: 20px;
    position: relative;
    z-index: 200;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #333;
    position: absolute;
    transition: all 0.3s ease;
}

.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger span:nth-child(3) { bottom: 0; }

@media (max-width: 768px) {
    /* 共通 */
    .section { padding: 60px 20px; }
    
    /* ヒーロー */
    .main-title { font-size: 42px; }
    .sub-text { font-size: 14px; text-align: left; display: inline-block; }
    .header { padding: 15px 20px; }

    /* About Me */
    .about-wrapper { flex-direction: column; text-align: center; gap: 30px; }
    
    /* ナビゲーションメニュー */
    .hamburger { display: block; }
    .nav {
        display: block;
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(10px);
        transition: all 0.4s ease;
        z-index: 150;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .nav.active { right: 0; }
    .nav ul { flex-direction: column; gap: 40px; text-align: center; }
    .nav a { font-size: 20px; color: #fff; }

    /* ハンバーガーアニメーション */
    .hamburger.active span { background-color: #fff; }
    .hamburger.active span:nth-child(1) { transform: rotate(45deg); top: 50%; }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: rotate(-45deg); bottom: auto; top: 50%; }

    /* ミュージックプレイヤー（スマホ版） */
    .music-player { 
        bottom: 20px; 
        left: 10px; 
        right: 10px; 
        width: auto; 
        display: flex; 
        flex-direction: column;
        align-items: center;
    }
    .player-content { width: 100%; max-width: 350px; }
    .text-info { flex: 1; width: auto; }
    
    /* スマホでのポップアップ位置調整 */
    .playlist-popup { 
        width: 300px; 
        left: 50%; 
        transform: translateX(-50%) translateY(20px); 
        bottom: 120%; 
    }
    /* .showがついた時の上書き */
    .playlist-popup.show { 
        transform: translateX(-50%) translateY(0); 
    }
}/* --- AI Sandbox Section (安全版) --- */
#sandbox.section {
    background-color: #0d0d0d;
    color: #fff;
    padding: 80px 20px;
    border-top: 1px solid #333;
}

/* ★変更：見出しを白く、小見出しを中央寄せに */
#sandbox .section-title {
    color: #ffffff !important; 
}

#sandbox .section-subtitle {
    text-align: center; /* 中央寄せ */
    color: #aaa;
    margin-bottom: 20px;
}

/* --- Sandbox アコーディオン --- */
.sandbox-accordion {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sandbox-item {
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
}

.sandbox-accordion-header {
    width: 100%;
    padding: 16px 20px;
    background: transparent;
    color: #fff;
    border: none;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.sandbox-accordion-header:hover {
    background: rgba(255, 255, 255, 0.03);
}

.sandbox-accordion-header.is-open {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sandbox-accordion-title {
    text-align: left;
}

.sandbox-accordion-icon {
    transition: transform 0.25s ease;
}

.sandbox-accordion-header.is-open .sandbox-accordion-icon {
    transform: rotate(180deg);
}

.sandbox-accordion-body {
    padding: 20px;
}

#sandbox .sandbox-project {
    margin-top: 10px;
    padding: 20px 10px 10px;
    background: transparent;
    border-radius: 16px;
    border: none;
    text-align: center;
}

#sandbox .project-name {
    font-size: 1.3rem;
    margin-bottom: 24px;
    color: #e0e0e0;
    font-weight: 600;
    display: inline-block;
    border-bottom: 2px solid #555;
    padding-bottom: 8px;
}

/* 予測ボードのレイアウト */
.prediction-dashboard {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.deviation-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 204, 0.1);
    padding: 20px;
    border-radius: 12px;
}

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

.ai-card {
    flex: 1;
    min-width: 250px;
    background: #1a1a1a;
    border: 1px solid #333;
    padding: 30px;
    border-radius: 16px;
}

/* GPTとGeminiのアクセントカラー */
.gpt-card { border-top: 4px solid #10a37f !important; }
.gemini-card { border-top: 4px solid #4285f4 !important; }

.price-display {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 10px 0;
}

.change-rate { font-weight: bold; }
.change-plus { color: #00ff88; }
.change-minus { color: #ff4d4d; }

.last-updated { font-size: 0.8rem; color: #666; margin-top: 20px; }
/* --- AI Sandbox 3銘柄対応版 --- */
.ai-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.asset-card {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 16px;
    padding: 20px;
    text-align: left;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s;
}

.asset-card:hover {
    transform: translateY(-5px);
    border-color: #555;
}

/* 銘柄ヘッダー */
.asset-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.asset-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
}

.current-price {
    font-size: 0.9rem;
    color: #888;
}

/* 市場状況表示 */
.market-status-container {
    margin-bottom: 10px;
    padding: 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.02);
    text-align: center;
}

.market-status {
    display: inline-block;
    font-size: 0.85rem;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 500;
}

.market-status.open {
    color: #00ff88;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.market-status.closed {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
}

/* AIごとの予測行 */
.prediction-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
}

.ai-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: bold;
}

.gpt-row .ai-label { color: #10a37f; }   /* OpenAI Green */
.gemini-row .ai-label { color: #4285f4; } /* Google Blue */

.pred-val {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: bold;
    color: #eee;
}

.pred-change {
    font-size: 0.8rem;
    margin-left: 8px;
}
.plus { color: #00ff88; }
.minus { color: #ff4d4d; }

.loading-msg {
    color: #ffcc00;
    font-size: 1.2rem;
    padding: 20px;
}/* --- AI Sandbox 決定版デザイン --- */
.ai-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.asset-card {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 16px;
    padding: 24px;
    text-align: left;
    transition: transform 0.3s, border-color 0.3s;
}

.asset-card:hover {
    transform: translateY(-5px);
    border-color: #555;
}

.asset-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
    padding-bottom: 12px;
    margin-bottom: 20px;
}

.asset-name { font-size: 1.3rem; font-weight: bold; color: #fff; }
.current-price { font-size: 0.9rem; color: #888; font-family: 'Courier New', monospace; }

.prediction-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
}

.ai-label { font-size: 0.9rem; font-weight: bold; display: flex; align-items: center; gap: 8px; }
.gpt-row .ai-label { color: #10a37f; }
.gemini-row .ai-label { color: #4285f4; }

.pred-data { text-align: right; }
.pred-val { font-family: 'Courier New', monospace; font-size: 1.2rem; font-weight: bold; color: #eee; display: block; }
.pred-change { font-size: 0.85rem; font-weight: bold; }
.plus { color: #00ff88; }
.minus { color: #ff4d4d; }

.loading-msg { color: #ffcc00; font-size: 1.1rem; text-align: center; padding: 40px; }
/* --- Sandbox AI Battle Styles --- */
.stats-board {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: #1a1a1a;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid #333;
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-item .model-name {
    display: block;
    font-size: 0.8em;
    color: #888;
    margin-bottom: 5px;
}

.stat-item .main-stat {
    display: block;
    font-size: 1.2em;
    font-weight: bold;
    color: #fff;
}

.stat-item .sub-stat {
    font-size: 0.7em;
    color: #666;
}

.vs-divider {
    font-style: italic;
    font-weight: bold;
    color: #ff4d4d;
    padding: 0 10px;
}

/* トレンドアイコンの装飾 */
.trend-icon.plus { color: #ff4d4d; margin-left: 5px; }
.trend-icon.minus { color: #4d79ff; margin-left: 5px; }

.battle-meta-footer {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #222;
    font-size: 0.8em;
    color: #888;
    display: flex;
    justify-content: space-between;
}
/* --- AI Sandbox: 答え合わせ & 未来予測のハイブリッド表示 --- */

/* 1. 本日の決着（答え合わせ）エリア */
.judge-section {
    background: rgba(255, 235, 59, 0.08); /* わずかに黄色い背景 */
    border: 1px dashed rgba(255, 235, 59, 0.4);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.85em;
    text-align: center;
}

.judge-section.empty {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid #333;
    color: #777;
    font-style: italic;
}

.judge-title {
    font-weight: bold;
    color: #ffeb3b;
    margin-bottom: 8px;
    display: block;
    letter-spacing: 0.05em;
}

.judge-result {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.judge-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    text-align: left;
}

.judge-label {
    font-weight: bold;
    color: #ffeb3b;
    font-size: 0.9em;
    margin-bottom: 2px;
}

.judge-detail {
    font-family: 'Courier New', monospace;
    font-size: 0.85em;
    color: #ddd;
    line-height: 1.4;
    word-break: break-word;
}

.judge-result span {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}
/* --- 11. 画像高速化のための微調整 --- */
.hero {
    /* 読み込みを速くするため、背景画像の描画を安定させる */
    background-color: #000; 
    will-change: transform;
}

/* --- 12. Sandbox アコーディオンの最新デザイン --- */

/* ヘッダーボタンの初期スタイル */
.sandbox-accordion-header {
    width: 100%;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.sandbox-accordion-header:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

/* 開いている（is-openクラスがある）時のヘッダー */
.sandbox-accordion-header.is-open {
    background: rgba(255, 255, 255, 0.05);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* アイコンの回転アニメーション */
.sandbox-accordion-icon {
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sandbox-accordion-header.is-open .sandbox-accordion-icon {
    transform: rotate(180deg);
}

/* コンテンツエリア（初期はJSまたはHTMLのinline styleで非表示） */
.sandbox-accordion-body {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: none;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    padding: 30px 20px;
    /* transitionを入れる場合は高さの制御が必要ですが、まずはdisplay:none対応 */
}

/* スマホ表示の調整 */
@media (max-width: 768px) {
    .sandbox-accordion-header {
        font-size: 0.9rem;
        padding: 15px;
    }
}
/* 2. 最新予測（未来）エリア */
.prediction-box {
    border-top: 1px solid #333;
    padding-top: 15px;
}

.target-label-main {
    font-size: 11px;
    color: #aaa;
    margin-bottom: 12px;
    text-align: left;
    border-left: 3px solid #10a37f; /* GPTカラーをアクセントに */
    padding-left: 10px;
    font-weight: bold;
}

.trend-indicator {
    font-size: 11px;
    margin-top: 4px;
    font-weight: bold;
}

.trend-indicator .plus { color: #ff4d4d; } /* 上昇は赤系（日本の慣習） */
.trend-indicator .minus { color: #4d79ff; } /* 下落は青系 */

/* 3. レイアウトの微調整 */
.prediction-row {
    margin-bottom: 12px !important; /* 行間を少し広げる */
}
.sandbox-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #333;
    text-align: left;
}

.disclaimer {
    font-size: 11px;
    color: #888;
    line-height: 1.6;
}

.disclaimer strong {
    color: #bbb;
}

/* --- チャットボタン & チャット窓 --- */
.chat-button-wrapper {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.chat-toggle-btn {
    width: 60px;
    height: 60px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    animation: floatAnimation 4s ease-in-out infinite;
}

.chat-toggle-btn.chat-open {
    animation: none;
}

.chat-bubble {
    background: rgba(26, 26, 26, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 10px 14px;
    color: #fff;
    font-size: 0.85rem;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: bubbleFadeIn 0.3s ease-out;
    min-width: 120px;
    text-align: center;
    display: inline-block;
    transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
    opacity: 1;
    visibility: visible;
}

.chat-bubble::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid rgba(26, 26, 26, 0.95);
}

.chat-bubble::before {
    content: '';
    position: absolute;
    bottom: -9px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-top: 9px solid rgba(255, 255, 255, 0.2);
}

#chatBubbleText {
    display: inline-block;
    animation: textFadeIn 0.3s ease-out;
}

@keyframes bubbleFadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes textFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.chatbot-icon {
    width: 60px;
    height: 60px;
    object-fit: contain;
    display: block;
    transition: transform 0.2s ease-out;
}

/* ふわふわ浮遊アニメーション（5px〜8px） */
@keyframes floatAnimation {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* ホバー時のピョコッと跳ねるアニメーション */
@keyframes bounceAnimation {
    0%, 100% {
        transform: translateY(-8px) scale(1);
    }
    25% {
        transform: translateY(-12px) scale(1.1);
    }
    50% {
        transform: translateY(-8px) scale(1.05);
    }
    75% {
        transform: translateY(-10px) scale(1.08);
    }
}

.chat-toggle-btn:hover .chatbot-icon {
    animation: bounceAnimation 0.6s ease-in-out;
    transform: scale(1.1);
}

.chat-toggle-btn:hover {
    animation: floatAnimation 4s ease-in-out infinite;
}

/* チャットオーバーレイ */
.chat-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: none;
    backdrop-filter: blur(4px);
}

.chat-overlay.show {
    display: block;
}

/* チャット窓 */
.chat-window {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    height: 80vh;
    max-height: 700px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    display: none;
    flex-direction: column;
    z-index: 9999;
    overflow: hidden;
    /* safe-area-insetを考慮（iPhone X以降のノッチ対応） */
    max-height: calc(80vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
}

.chat-window.chat-open {
    display: flex;
}

.chat-header {
    background: #0d0d0d;
    padding: 16px 20px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
    width: 100%;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

.chat-header h3 {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.chat-close-btn {
    background: transparent;
    border: none;
    color: #aaa;
    font-size: 32px;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s, background 0.3s;
    border-radius: 50%;
}

.chat-close-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.chat-body {
    flex: 1;
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    overflow-x: hidden;
    background: #1a1a1a;
    min-height: 0;
    scroll-behavior: smooth;
    /* スクロール時のパフォーマンス向上 */
    -webkit-overflow-scrolling: touch;
}

.chat-body::-webkit-scrollbar {
    width: 6px;
}

.chat-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.chat-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.chat-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.chat-message {
    margin-bottom: 16px;
    padding: 12px 16px;
    border-radius: 12px;
    max-width: 85%;
    word-wrap: break-word;
}

.chat-message p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: normal;
}

.chat-message p br {
    display: block;
    margin: 0.5em 0;
    content: "";
}

.bot-message {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    margin-right: auto;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.bot-message-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bot-avatar {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px;
}

/* クイックボタン */
.chat-quick-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.quick-btn {
    background: linear-gradient(135deg, #4285f4, #1a73e8);
    border: none;
    border-radius: 8px;
    padding: 12px 16px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
    text-align: left;
    min-height: 44px;
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.3);
}

.quick-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.4);
    opacity: 0.9;
}

.quick-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(66, 133, 244, 0.3);
}

.user-message {
    background: linear-gradient(135deg, #4285f4, #1a73e8);
    color: #fff;
    margin-left: auto;
    text-align: left;
}

.chat-footer {
    padding: 16px;
    background: #0d0d0d;
    border-top: 1px solid #333;
    flex-shrink: 0;
}

.chat-limit-info {
    font-size: 0.75rem;
    color: #aaa;
    margin-bottom: 10px;
    text-align: center;
}

.chat-input-wrapper {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.chat-input {
    flex: 1;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 10px 12px;
    color: #fff;
    font-size: 16px; /* iOSで自動ズームを防ぐため16px以上に設定 */
    font-family: inherit;
    resize: none;
    outline: none;
    transition: border-color 0.3s;
}

.chat-input:focus {
    border-color: #4285f4;
}

.chat-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chat-send-btn {
    background: linear-gradient(135deg, #4285f4, #1a73e8);
    border: none;
    border-radius: 8px;
    width: 44px;
    height: 44px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.chat-send-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.4);
}

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chat-contact-btn {
    width: 100%;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    border: none;
    border-radius: 8px;
    padding: 12px 16px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

.chat-contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.5);
    opacity: 0.95;
}

.chat-contact-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.4);
}

/* PCレイアウトの高さ調整 */
@media (min-width: 769px) {
    .chat-window {
        height: 85vh;
        max-height: 800px;
    }
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .chat-button-wrapper {
        bottom: 100px;
        right: 20px;
    }

    .chat-toggle-btn {
        width: 56px;
        height: 56px;
    }

    .chatbot-icon {
        width: 56px;
        height: 56px;
    }

    .chat-bubble {
        font-size: 0.75rem;
        padding: 8px 12px;
    }

    .chat-window {
        width: calc(100vw - 40px);
        max-width: 600px;
        height: 90vh;
        max-height: 700px;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
}