﻿/* FFXI Skillchain Simulator - Style Sheet */

:root {
    --bg-color: #030611;
    --card-bg: rgba(255, 255, 255, 0.02);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --accent-color: #00d2ff;
    --accent-glow: rgba(0, 210, 255, 0.3);
    
    /* 連携属性ごとのテーマカラー */
    --color-light: #f59e0b; /* 光: ゴールド */
    --color-dark: #a855f7;  /* 闇: 紫 */
    --color-fusion: #ef4444; /* 核熱: 赤 */
    --color-distortion: #3b82f6; /* 湾曲: 青 */
    --color-gravitation: #10b981; /* 重力: 緑 */
    --color-fragmentation: #06b6d4; /* 分解: 水色 */
    --color-level1: #cbd5e1; /* Lv1: スレート */
    
    --font-family: 'Outfit', 'Inter', 'Noto Sans JP', sans-serif;
    --shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

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

body {
    font-family: var(--font-family);
    color: var(--text-color);
    background: radial-gradient(circle at top right, #0d0a21, #04020a, #010103);
    min-height: 100vh;
    padding: 3rem 1.5rem;
    display: flex;
    justify-content: center;
    line-height: 1.6;
}

.container {
    max-width: 900px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

/* ヘッダー */
.header {
    text-align: center;
}

.header h1 {
    font-size: 2.75rem;
    font-weight: 900;
    letter-spacing: -0.05em;
    background: linear-gradient(135deg, #00d2ff 0%, #d946ef 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.75rem;
    text-shadow: 0 0 50px rgba(0, 210, 255, 0.25);
}

.header p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

/* ガラスカード */
.glass-card {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
    border-color: rgba(0, 210, 255, 0.2);
    box-shadow: 0 20px 50px rgba(0, 210, 255, 0.08);
}

/* フォームグリッド */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

.full-width {
    grid-column: span 2;
}

@media (max-width: 768px) {
    .full-width {
        grid-column: span 1;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding-left: 0.25rem;
}

select {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    color: var(--text-color);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    appearance: none;
    -webkit-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%2394a3b8" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"/></svg>');
    background-repeat: no-repeat;
    background-position: right 1.25rem center;
    background-size: 1.25rem;
    padding-right: 3rem;
}

select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px var(--accent-glow);
    background-color: rgba(0, 0, 0, 0.6);
}

/* アクションボタン */
.action-area {
    display: flex;
    justify-content: center;
    margin-top: 2.5rem;
}

.btn {
    padding: 1rem 2.5rem;
    border-radius: 16px;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 24px rgba(0, 210, 255, 0.25);
}

.btn-primary {
    background: linear-gradient(135deg, #00d2ff 0%, #0084ff 100%);
    color: #030611;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 210, 255, 0.45);
}

.btn-primary:active {
    transform: translateY(-1px);
}

/* 結果セクション */
.results-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    letter-spacing: -0.02em;
}

.section-title::before {
    content: '';
    width: 6px;
    height: 22px;
    background: linear-gradient(to bottom, var(--accent-color), #d946ef);
    border-radius: 3px;
    display: inline-block;
}

.badge {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.2rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-color);
}

/* 結果グリッド */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* 連携ルートカード */
.sc-card {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.4s ease-out forwards;
}

.sc-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

/* 連携属性ごとの光彩ボーダー */
.sc-card.chain-light { border-color: rgba(245, 158, 11, 0.4); box-shadow: 0 4px 20px rgba(245, 158, 11, 0.08); }
.sc-card.chain-dark { border-color: rgba(168, 85, 247, 0.4); box-shadow: 0 4px 20px rgba(168, 85, 247, 0.08); }
.sc-card.chain-fusion { border-color: rgba(239, 68, 110, 0.4); box-shadow: 0 4px 20px rgba(239, 68, 110, 0.08); }
.sc-card.chain-distortion { border-color: rgba(59, 130, 246, 0.4); box-shadow: 0 4px 20px rgba(59, 130, 246, 0.08); }
.sc-card.chain-gravitation { border-color: rgba(16, 185, 129, 0.4); box-shadow: 0 4px 20px rgba(16, 185, 129, 0.08); }
.sc-card.chain-fragmentation { border-color: rgba(6, 182, 212, 0.4); box-shadow: 0 4px 20px rgba(6, 182, 212, 0.08); }

/* ヘッダー帯 */
.sc-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--color-level1);
}
.sc-card.chain-light::after { background: var(--color-light); }
.sc-card.chain-dark::after { background: var(--color-dark); }
.sc-card.chain-fusion::after { background: var(--color-fusion); }
.sc-card.chain-distortion::after { background: var(--color-distortion); }
.sc-card.chain-gravitation::after { background: var(--color-gravitation); }
.sc-card.chain-fragmentation::after { background: var(--color-fragmentation); }

/* 連携名バッジ */
.sc-badge-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sc-name {
    font-size: 1.15rem;
    font-weight: 900;
    letter-spacing: -0.01em;
}

.sc-name.chain-light { color: var(--color-light); text-shadow: 0 0 10px rgba(245, 158, 11, 0.3); }
.sc-name.chain-dark { color: var(--color-dark); text-shadow: 0 0 10px rgba(168, 85, 247, 0.3); }
.sc-name.chain-fusion { color: var(--color-fusion); text-shadow: 0 0 10px rgba(239, 68, 110, 0.3); }
.sc-name.chain-distortion { color: var(--color-distortion); text-shadow: 0 0 10px rgba(59, 130, 246, 0.3); }
.sc-name.chain-gravitation { color: var(--color-gravitation); text-shadow: 0 0 10px rgba(16, 185, 129, 0.3); }
.sc-name.chain-fragmentation { color: var(--color-fragmentation); text-shadow: 0 0 10px rgba(6, 182, 212, 0.3); }

.sc-level {
    font-size: 0.725rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}
.sc-card.chain-light .sc-level { color: var(--color-light); background: rgba(245, 158, 11, 0.1); }
.sc-card.chain-dark .sc-level { color: var(--color-dark); background: rgba(168, 85, 247, 0.1); }
.sc-card.chain-fusion .sc-level { color: var(--color-fusion); background: rgba(239, 68, 110, 0.1); }
.sc-card.chain-distortion .sc-level { color: var(--color-distortion); background: rgba(59, 130, 246, 0.1); }
.sc-card.chain-gravitation .sc-level { color: var(--color-gravitation); background: rgba(16, 185, 129, 0.1); }
.sc-card.chain-fragmentation .sc-level { color: var(--color-fragmentation); background: rgba(6, 182, 212, 0.1); }

/* WSルート記述 */
.ws-steps {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.925rem;
}

.ws-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ws-num {
    font-size: 0.7rem;
    font-weight: 800;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sc-card.chain-light .ws-num { background: var(--color-light); color: #000; }
.sc-card.chain-dark .ws-num { background: var(--color-dark); color: #fff; }
.sc-card.chain-fusion .ws-num { background: var(--color-fusion); color: #fff; }
.sc-card.chain-distortion .ws-num { background: var(--color-distortion); color: #fff; }
.sc-card.chain-gravitation .ws-num { background: var(--color-gravitation); color: #000; }
.sc-card.chain-fragmentation .ws-num { background: var(--color-fragmentation); color: #000; }

.ws-name {
    font-weight: 700;
    color: #f1f5f9;
}

.ws-type {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* MB属性リスト */
.mb-row {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.mb-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mb-elements {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.mb-el {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.1rem 0.5rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
}

.el-fire { color: #f87171; background: rgba(248, 113, 113, 0.1); }
.el-ice { color: #38bdf8; background: rgba(56, 189, 248, 0.1); }
.el-wind { color: #34d399; background: rgba(52, 211, 153, 0.1); }
.el-earth { color: #fbbf24; background: rgba(251, 191, 36, 0.1); }
.el-thunder { color: #a78bfa; background: rgba(167, 139, 250, 0.1); }
.el-water { color: #60a5fa; background: rgba(96, 165, 250, 0.1); }
.el-light { color: #fbbf24; background: rgba(251, 191, 36, 0.15); text-shadow: 0 0 5px rgba(251, 191, 36, 0.4); }
.el-dark { color: #c084fc; background: rgba(192, 132, 252, 0.15); text-shadow: 0 0 5px rgba(192, 132, 252, 0.4); }

/* 空ステート・エラー */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
}

/* フッター */
.footer-info {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* アニメーション */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === 常時ダブル結果表示用UIスタイル === */
.sc-double-header {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 12px;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.sc-header-side {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}

.sc-header-side:first-child {
    padding-right: 0.5rem;
}

.sc-header-side.highlight-side {
    padding-left: 0.75rem;
    position: relative;
}

.sc-header-divider {
    width: 1px;
    background: rgba(255, 255, 255, 0.1);
    align-self: stretch;
}

.sc-mode-label {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.15rem;
}

.label-ionic {
    color: #f59e0b; /* イオ側はゴールド */
    text-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

.sc-name-small {
    font-size: 0.9rem;
    font-weight: 700;
    color: #cbd5e1;
}

.sc-level-small {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
}

.sc-name-big {
    font-size: 1.15rem;
    font-weight: 900;
    letter-spacing: -0.01em;
}

.sc-level-big {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-muted);
}

/* WS追加属性のゴールドハイライト */
.attr-added {
    color: #fbbf24;
    font-weight: 900;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.6);
    background: rgba(251, 191, 36, 0.1);
    padding: 0.05rem 0.25rem;
    border-radius: 4px;
    border: 1px solid rgba(251, 191, 36, 0.2);
    display: inline-block;
}

/* ダブルMB属性表示 */
.mb-double-row {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 0.75rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.mb-half {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mb-half:last-child {
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    padding-left: 0.75rem;
}

.mb-label-small {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.font-ionic-mb .mb-label-small {
    color: #fbbf24; /* イオ側はゴールド */
    text-shadow: 0 0 8px rgba(251, 191, 36, 0.2);
}

.mb-elements-small {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.mb-elements-small .mb-el {
    font-size: 0.65rem;
    padding: 0.05rem 0.35rem;
    border-radius: 4px;
}

/* === 多段タイムライン風連携カードUIスタイル === */
.multi-step-card {
    grid-column: 1 / -1; /* 全幅表示にしてタイムラインを広く見せる */
}

@media (min-width: 769px) {
    .multi-step-card {
        grid-column: span 2;
    }
}

.sc-multi-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sc-multi-title-area {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.sc-multi-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.sc-multi-name {
    font-size: 1.3rem;
    font-weight: 900;
    letter-spacing: -0.01em;
}

.sc-multi-name.chain-light { color: var(--color-light); text-shadow: 0 0 12px rgba(245, 158, 11, 0.4); }
.sc-multi-name.chain-dark { color: var(--color-dark); text-shadow: 0 0 12px rgba(168, 85, 247, 0.4); }
.sc-multi-name.chain-fusion { color: var(--color-fusion); text-shadow: 0 0 12px rgba(239, 68, 110, 0.4); }
.sc-multi-name.chain-distortion { color: var(--color-distortion); text-shadow: 0 0 12px rgba(59, 130, 246, 0.4); }
.sc-multi-name.chain-gravitation { color: var(--color-gravitation); text-shadow: 0 0 12px rgba(16, 185, 129, 0.4); }
.sc-multi-name.chain-fragmentation { color: var(--color-fragmentation); text-shadow: 0 0 12px rgba(6, 182, 212, 0.4); }

.sc-multi-level-badge {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}
.sc-multi-level-badge.chain-light { color: var(--color-light); background: rgba(245, 158, 11, 0.15); border: 1px solid rgba(245, 158, 11, 0.25); }
.sc-multi-level-badge.chain-dark { color: var(--color-dark); background: rgba(168, 85, 247, 0.15); border: 1px solid rgba(168, 85, 247, 0.25); }
.sc-multi-level-badge.chain-fusion { color: var(--color-fusion); background: rgba(239, 68, 110, 0.15); border: 1px solid rgba(239, 68, 110, 0.25); }
.sc-multi-level-badge.chain-distortion { color: var(--color-distortion); background: rgba(59, 130, 246, 0.15); border: 1px solid rgba(59, 130, 246, 0.25); }
.sc-multi-level-badge.chain-gravitation { color: var(--color-gravitation); background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.25); }
.sc-multi-level-badge.chain-fragmentation { color: var(--color-fragmentation); background: rgba(6, 182, 212, 0.15); border: 1px solid rgba(6, 182, 212, 0.25); }

.timeline-container {
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 0.5rem 0.5rem 0.5rem 0.25rem;
}

.timeline-step {
    display: flex;
    flex-direction: column;
    position: relative;
}

.timeline-ws-node {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    z-index: 2;
}

.timeline-ws-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #cbd5e1;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

/* 最終連携タイプに応じた丸数字のネオンボーダー */
.multi-step-card.chain-light .timeline-ws-num { border-color: var(--color-light); box-shadow: 0 0 8px rgba(245, 158, 11, 0.4); color: var(--color-light); }
.multi-step-card.chain-dark .timeline-ws-num { border-color: var(--color-dark); box-shadow: 0 0 8px rgba(168, 85, 247, 0.4); color: var(--color-dark); }
.multi-step-card.chain-fusion .timeline-ws-num { border-color: var(--color-fusion); box-shadow: 0 0 8px rgba(239, 68, 110, 0.4); color: var(--color-fusion); }
.multi-step-card.chain-distortion .timeline-ws-num { border-color: var(--color-distortion); box-shadow: 0 0 8px rgba(59, 130, 246, 0.4); color: var(--color-distortion); }
.multi-step-card.chain-gravitation .timeline-ws-num { border-color: var(--color-gravitation); box-shadow: 0 0 8px rgba(16, 185, 129, 0.4); color: var(--color-gravitation); }
.multi-step-card.chain-fragmentation .timeline-ws-num { border-color: var(--color-fragmentation); box-shadow: 0 0 8px rgba(6, 182, 212, 0.4); color: var(--color-fragmentation); }

.timeline-ws-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.timeline-ws-name {
    font-size: 1.05rem;
    font-weight: 800;
    color: #f8fafc;
}

.timeline-ws-type {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.timeline-connector-line {
    width: 3px;
    margin-left: 12.5px;
    min-height: 70px;
    position: relative;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    padding: 1rem 0;
}

/* 発生する連携ごとのコネクターラインのネオン化 */
.timeline-connector-line.chain-light { background: var(--color-light); box-shadow: 0 0 8px rgba(245, 158, 11, 0.5); }
.timeline-connector-line.chain-dark { background: var(--color-dark); box-shadow: 0 0 8px rgba(168, 85, 247, 0.5); }
.timeline-connector-line.chain-fusion { background: var(--color-fusion); box-shadow: 0 0 8px rgba(239, 68, 110, 0.5); }
.timeline-connector-line.chain-distortion { background: var(--color-distortion); box-shadow: 0 0 8px rgba(59, 130, 246, 0.5); }
.timeline-connector-line.chain-gravitation { background: var(--color-gravitation); box-shadow: 0 0 8px rgba(16, 185, 129, 0.5); }
.timeline-connector-line.chain-fragmentation { background: var(--color-fragmentation); box-shadow: 0 0 8px rgba(6, 182, 212, 0.5); }
.timeline-connector-line.chain-level1 { background: rgba(255, 255, 255, 0.3); }

.timeline-chain-badge {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.75rem;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 800;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(4, 2, 10, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
    z-index: 3;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.timeline-chain-badge.chain-light { border-color: rgba(245, 158, 11, 0.35); color: var(--color-light); box-shadow: 0 0 10px rgba(245, 158, 11, 0.15); }
.timeline-chain-badge.chain-dark { border-color: rgba(168, 85, 247, 0.35); color: var(--color-dark); box-shadow: 0 0 10px rgba(168, 85, 247, 0.15); }
.timeline-chain-badge.chain-fusion { border-color: rgba(239, 68, 110, 0.35); color: var(--color-fusion); box-shadow: 0 0 10px rgba(239, 68, 110, 0.15); }
.timeline-chain-badge.chain-distortion { border-color: rgba(59, 130, 246, 0.35); color: var(--color-distortion); box-shadow: 0 0 10px rgba(59, 130, 246, 0.15); }
.timeline-chain-badge.chain-gravitation { border-color: rgba(16, 185, 129, 0.35); color: var(--color-gravitation); box-shadow: 0 0 10px rgba(16, 185, 129, 0.15); }
.timeline-chain-badge.chain-fragmentation { border-color: rgba(6, 182, 212, 0.35); color: var(--color-fragmentation); box-shadow: 0 0 10px rgba(6, 182, 212, 0.15); }
.timeline-chain-badge.chain-level1 { border-color: rgba(255, 255, 255, 0.15); color: var(--color-level1); }

.tl-chain-name {
    font-weight: 900;
}

.tl-chain-level {
    font-size: 0.65rem;
    opacity: 0.8;
    background: rgba(255, 255, 255, 0.08);
    padding: 0.05rem 0.3rem;
    border-radius: 4px;
}

.tl-am-badge {
    font-size: 0.65rem;
    font-weight: 800;
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.3);
    padding: 0.05rem 0.35rem;
    border-radius: 4px;
    text-shadow: 0 0 5px rgba(251, 191, 36, 0.4);
}

.last-ws-step {
    margin-bottom: 0;
}

/* ==========================================================================
   お気に入り連携リスト（Favorites）のスタイル
   ========================================================================== */
.favorite-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #cbd5e1;
    cursor: pointer;
    transition: all 0.2s ease;
}

.favorite-chip:hover {
    background: rgba(234, 179, 8, 0.1);
    border-color: rgba(234, 179, 8, 0.4);
    color: #fef08a;
    transform: translateY(-1px);
}

.favorite-chip .btn-delete-fav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s ease;
    border: none;
}

.favorite-chip .btn-delete-fav:hover {
    background: #ef4444;
    color: #fff;
}

/* カード内のお気に入り追加ボタン */
.btn-fav {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s ease;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.btn-fav:hover {
    transform: scale(1.2);
    color: #fbbf24;
}

.btn-fav.active {
    color: #fbbf24;
    filter: drop-shadow(0 0 5px rgba(251, 191, 36, 0.5));
}

/* ==========================================================================
   V2プレビュー版 追加・改善スタイル
   ========================================================================== */

/* 1. スマホ表示での1列レイアウト化 & 横スクロール防止 */
@media (max-width: 768px) {
    body {
        padding: 1.5rem 1rem !important;
    }

    .glass-card {
        padding: 1.5rem !important;
        border-radius: 16px !important;
    }

    .form-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }

    /* 選択ボックスのパディングと幅の最適化（文字切れ防止） */
    select {
        font-size: 0.95rem !important;
        padding: 0.85rem 2.5rem 0.85rem 1rem !important;
        border-radius: 12px !important;
    }

    /* 結果グリッドを100%幅の1列にする */
    .results-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .sc-card {
        padding: 1.25rem !important;
        border-radius: 16px !important;
    }

    /* ダブルヘッダーの文字サイズ調整 */
    .sc-mode-label {
        font-size: 0.75rem !important;
    }

    .sc-name-big {
        font-size: 1.1rem !important;
    }

    /* タイムラインの幅調整（横スクロール防止） */
    .timeline-container {
        padding-left: 0.5rem !important;
    }

    .timeline-ws-name {
        font-size: 0.95rem !important;
    }

    .timeline-ws-type {
        font-size: 0.8rem !important;
    }

    .tl-chain-name {
        font-size: 0.85rem !important;
    }
}

/* 2. さらに表示ボタンのスタイル */
.load-more-container {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    margin-bottom: 3rem;
}

.btn-load-more {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--accent-color);
    padding: 0.8rem 2.5rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-load-more:hover {
    background: rgba(0, 210, 255, 0.1);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 210, 255, 0.25);
}

.btn-load-more:active {
    transform: translateY(0);
}

/* 3. prefers-reduced-motion に対応 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-delay: 0s !important;
        animation-duration: 0s !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0s !important;
        scroll-behavior: auto !important;
    }
}


