/* ===== VALORA デザイントークン v1.9.62 ===== */
:root {
    color-scheme: dark;

    /* ── Layer 0: Surface ── */
    --bg-dark: #0F1115;
    --bg-card-dark: #1A1D24;
    --bg-card-hover: #242730;
    --text-primary: #F5F5F5;
    --text-secondary: #9E9E9E;
    --text-muted: #666;
    --border-subtle: rgba(255, 255, 255, 0.08);

    /* ── Layer 1: Feature Identity Colors (8機能) ── */
    --accent-blue: #4FC3F7;       /* SNAP — カメラ・写真査定 */
    --accent-emerald: #00E5CC;    /* QUEUE — キュー処理 */
    --accent-amber: #FFB300;      /* SCOUT detail — 相場リサーチ */
    --accent-crimson: #FF4458;    /* BULK — 一括査定 */
    --accent-violet: #B39DDB;     /* SCOUT — 商品リサーチ */
    --accent-cyan: #80DEEA;       /* LISTS — 履歴一覧 */
    --accent-green: #A5D6A7;      /* Advice/成功表示 */
    --accent-purple: #9C88FF;     /* SPLIT — 複数識別 */

    /* ── Layer 2: Semantic Colors (意味的な色) ── */
    --color-action: #667eea;      /* CTA・主要アクション（購入・送信） */
    --color-action-hover: #764ba2;
    --color-ai: #80DEEA;          /* AI処理中・AI関連インジケーター */
    --color-success: #4CAF50;     /* 成功・完了・保存済み */
    --color-success-soft: rgba(76, 175, 80, 0.15);
    --color-warning: #FF9800;     /* 警告・注意・残り少ない */
    --color-warning-soft: rgba(255, 152, 0, 0.15);
    --color-error: #FF4458;       /* エラー・削除・危険 */
    --color-error-soft: rgba(255, 68, 88, 0.15);
    --color-price: #FFD700;       /* 価格・金額・課金 */
    --color-info: #4FC3F7;        /* 情報・ヒント */

    /* ── Layer 3: Component Tokens ── */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-pill: 9999px;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.25);
    --shadow-glow-blue: 0 0 20px rgba(79, 195, 247, 0.15);
    --shadow-glow-emerald: 0 0 20px rgba(0, 229, 204, 0.15);

    --btn-height: 44px;           /* タッチターゲット最小サイズ */
    --btn-height-sm: 36px;
    --btn-height-lg: 52px;

    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;

    /* ── Legacy aliases (既存コード互換) ── */
    --glow-blue: rgba(79, 195, 247, 0.15);
    --glow-emerald: rgba(0, 229, 204, 0.10);
}

/* ===== ダーク固定 グローバル強制 ===== */
/* 旧UIの白・明るい背景を一括上書き（インラインスタイル含む） */
*[style*="background:white"],
*[style*="background: white"],
*[style*="background:#fff"],
*[style*="background: #fff"],
*[style*="background:#ffffff"],
*[style*="background: #ffffff"],
*[style*="background:#f8f8f8"],
*[style*="background: #f8f8f8"],
*[style*="background:#f5f5f5"],
*[style*="background: #f5f5f5"],
*[style*="background:#f0f4ff"],
*[style*="background: #f0f4ff"],
*[style*="background:#f8f7ff"],
*[style*="background: #f8f7ff"],
*[style*="background:#fff3f3"],
*[style*="background: #fff3f3"] {
    background: var(--bg-card-dark) !important;
    color: var(--text-primary) !important;
}

/* ===== うっすらトースト（グローバル共通） ===== */
.valora-toast {
    position: fixed;
    bottom: 42%;
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    background: rgba(30, 33, 42, 0.82);
    color: rgba(255, 255, 255, 0.65);
    padding: 7px 18px;
    border-radius: 20px;
    font-size: 12px;
    letter-spacing: 0.3px;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.07);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease;
    z-index: 9999;
    white-space: nowrap;
}
.valora-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

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

body {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    padding: 20px;
}

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

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card-dark);
    padding: 20px 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-subtle);
}

header h1 {
    font-size: 28px;
    color: var(--text-primary);
}

.header-btns {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.settings-btn {
    padding: 10px 20px;
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.settings-btn:hover {
    background: rgba(79, 195, 247, 0.15);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    transform: translateY(-2px);
}

.pricing-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    white-space: nowrap; /* 「料金プラン」折り返し防止 */
}

.pricing-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}


.history-btn {
    position: relative;
    padding: 10px 20px;
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.history-btn:hover {
    background: rgba(79, 195, 247, 0.15);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    transform: translateY(-2px);
}

/* アクティブナビボタン（共通ヘッダー v1.9.43） */
.history-btn.active {
    background: rgba(79, 195, 247, 0.15);
    border-color: rgba(79, 195, 247, 0.3);
    color: var(--accent-blue);
}
.settings-btn.active {
    background: rgba(79, 195, 247, 0.15);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.history-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #e53e3e;
    color: white;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    min-width: 20px;
    text-align: center;
}

.main-content {
    background: var(--bg-card-dark);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-subtle);
}

/* AI Selector */
.ai-selector {
    margin-bottom: 30px;
    padding: 20px;
    background: var(--bg-card-dark);
    border-radius: 8px;
}

.ai-selector label {
    font-weight: 600;
    font-size: 16px;
    margin-right: 15px;
    color: #333;
}

.ai-selector select {
    padding: 10px 15px;
    font-size: 15px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    background: var(--bg-card-dark);
    color: #e0e0e0;
    cursor: pointer;
    min-width: 300px;
}

.ai-selector select:focus {
    outline: none;
    border-color: #667eea;
}

/* Upload Section */
.upload-section {
    margin-bottom: 30px;
}

.drop-zone {
    border: 2px dashed var(--border-subtle);
    border-radius: 12px;
    padding: 60px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(255,255,255,0.02);
}

.drop-zone:hover {
    border-color: var(--accent-blue);
    background: var(--glow-blue);
}

.drop-zone.drag-over {
    border-color: var(--accent-emerald);
    background: var(--glow-emerald);
    transform: scale(1.02);
}

.drop-zone-content svg {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.drop-zone-content h2 {
    font-size: 20px;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.drop-zone-content p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Preview Section */
.preview-section {
    text-align: center;
    padding: 30px;
    background: var(--bg-dark);
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
}

.preview-section h3 {
    margin-bottom: 20px;
    color: var(--text-primary);
}

.preview-section img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin: 5px;
}

.btn-primary {
    background: #667eea;
    color: white;
    animation: appraiseGlow 2.5s ease-in-out infinite;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(79, 195, 247, 0.7), 0 0 30px rgba(79, 195, 247, 0.3);
    animation: none;
}

@keyframes appraiseGlow {
    0%, 100% { box-shadow: 0 4px 12px rgba(79, 195, 247, 0.25); }
    50%       { box-shadow: 0 4px 22px rgba(79, 195, 247, 0.55), 0 0 28px rgba(79, 195, 247, 0.2); }
}

.btn-secondary {
    background: var(--bg-card-hover);
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

/* Loading */
.loading {
    text-align: center;
    padding: 60px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.loading p {
    font-size: 18px;
    color: #666;
}

/* Progress Bar (Appraisal) */
.progress-wrap {
    width: 80%;
    max-width: 280px;
    margin: 18px auto 0;
}
.progress-bar-track {
    height: 4px;
    background: rgba(255,255,255,0.12);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}
.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #4fc3f7 0%, #667eea 50%, #4fc3f7 100%);
    background-size: 200% 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
    animation: progressShimmer 1.8s linear infinite;
    box-shadow: 0 0 6px rgba(79,195,247,0.9), 0 0 14px rgba(79,195,247,0.4);
}
@keyframes progressShimmer {
    0%   { background-position:  200% 0; }
    100% { background-position: -200% 0; }
}
.progress-pct {
    font-size: 11px;
    color: #4fc3f7;
    text-align: center;
    margin-top: 6px;
    letter-spacing: 0.08em;
    min-height: 14px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    opacity: 0.85;
}

/* Result Section */
.result-section {
    margin-top: 30px;
}

.result-section h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.result-card {
    background: var(--bg-card-dark);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
}

.result-card h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 15px;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-item.full-width {
    grid-column: 1 / -1;
}

.info-item .label {
    font-weight: 600;
    color: #666;
    font-size: 14px;
    margin-bottom: 5px;
}

.info-item .value {
    color: #333;
    font-size: 16px;
}

.info-item .value.highlight {
    color: #667eea;
    font-size: 20px;
    font-weight: 700;
}

/* Authenticity */
.authenticity-text {
    color: #333;
    line-height: 1.6;
    margin-bottom: 15px;
}

.warning-box {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 12px;
    border-radius: 4px;
    color: #856404;
    font-size: 14px;
}

/* Market Info */
.market-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.market-source {
    padding: 15px;
    background: var(--bg-card-dark);
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.08);
}

.market-source h4 {
    margin-bottom: 10px;
    color: #e0e0e0;
}

.market-source p {
    color: #8888aa;
    margin-bottom: 10px;
}

.link-btn {
    display: inline-block;
    padding: 8px 16px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s;
}

.link-btn:hover {
    background: #5568d3;
    transform: translateX(4px);
}

/* Features List */
.features-list {
    list-style: none;
    padding: 0;
}

.features-list li {
    padding: 10px;
    background: var(--bg-card-dark);
    margin-bottom: 8px;
    border-radius: 6px;
    border-left: 4px solid var(--accent-blue);
    color: #c0c0d0;
}

/* AI Credit */
.ai-credit {
    text-align: center;
    padding: 15px;
    color: #999;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    /* スマホヘッダー: ナビボタン非表示・シンプル2要素レイアウト */
    header {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        gap: 10px;
        padding: 14px 16px;
    }

    header h1 {
        font-size: 16px;
        flex-shrink: 0;
    }

    .header-btns {
        flex-wrap: nowrap;
        gap: 8px;
        flex: 1;
        justify-content: flex-end;
    }

    /* ナビ系ボタン非表示（ヒーローのfeature cardsで代替） */
    .history-btn {
        display: none !important;
    }

    /* 設定ボタンをコンパクトに */
    .settings-btn {
        padding: 8px 12px;
        font-size: 13px;
    }

    /* 料金プランコンパクト */
    .pricing-btn {
        font-size: 12px;
        padding: 8px 12px;
    }

    /* ユーザーメニュー: 名前・プランは非表示、アバター+ログアウトのみ */
    .user-info-wrap {
        display: none;
    }

    .user-avatar {
        width: 32px;
        height: 32px;
    }

    .btn-logout {
        font-size: 12px;
        padding: 6px 10px;
    }

    .main-content {
        padding: 20px;
    }

    .ai-selector {
        flex-direction: column;
        align-items: flex-start;
    }

    .ai-selector select {
        width: 100%;
        margin-top: 10px;
    }

    .drop-zone {
        padding: 40px 20px;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== スマホヘッダー詰まり解消（幅480px以下） ===== */
/* ownerのAdminボタンはJS制御（plan=ownerの時のみ表示）に任せる         */
/* owner: pricing非表示 + Admin表示 → CONSOLE+Admin+user-menu で収まる  */
/* 一般: pricing表示 + Admin非表示  → CONSOLE+pricing+user-menu で収まる */
@media (max-width: 480px) {

    /* ボタン群をよりコンパクトに */
    .settings-btn {
        padding: 6px 9px;
        font-size: 12px;
    }

    /* 料金プランをさらに小さく */
    .pricing-btn {
        padding: 6px 9px;
        font-size: 11px;
    }

    /* ユーザーメニュー全体を詰める */
    .user-menu {
        padding: 4px 8px 4px 4px;
        gap: 5px;
    }

    /* ログアウトボタンをコンパクトに */
    .btn-logout {
        padding: 4px 7px;
        font-size: 11px;
    }

    /* アバター少し小さく */
    .user-avatar {
        width: 28px;
        height: 28px;
    }
}

/* ======================================
   v1.3: 共通スタイル
====================================== */

/* アクセントボタン */
.btn-accent {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: opacity 0.2s;
}
.btn-accent:hover { opacity: 0.85; }
.btn-accent:disabled { opacity: 0.5; cursor: not-allowed; }

/* 免責文 */
.disclaimer-box {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13px;
    color: #856404;
    margin-bottom: 16px;
    line-height: 1.6;
}

/* エラーテキスト */
.error-text { color: #e74c3c; font-size: 14px; }

/* ======================================
   v1.3: AIアドバイス
====================================== */
.advice-section {
    margin-bottom: 16px;
}
.advice-section h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #5c6bc0;
}
.advice-section ul {
    padding-left: 20px;
    line-height: 1.8;
    font-size: 14px;
}
.caution-list li { color: #c0392b; }
.tips-list li { color: #27ae60; }
.advice-section p { font-size: 14px; line-height: 1.7; color: #555; }

/* ======================================
   v1.3: 出品文章生成
====================================== */
.listing-block {
    margin-bottom: 14px;
}
.listing-block label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #aab;
    margin-bottom: 6px;
}
.listing-copy-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: var(--bg-card-dark);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 12px;
}
.listing-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.7;
    color: #e0e0e0;
    word-break: break-all;
}
.listing-desc {
    white-space: pre-wrap;
    outline: none;
    min-height: 60px;
    cursor: text;
    border-radius: 4px;
    padding: 4px;
    transition: background 0.2s;
}
.listing-desc:focus {
    background: rgba(255,255,255,0.06);
    box-shadow: 0 0 0 1px rgba(92,107,192,0.4);
}
.copy-btn {
    background: #5c6bc0;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
}
.copy-btn:hover { background: #3f51b5; }

/* ======================================
   v1.3: 利益シミュレーター（インライン）
====================================== */
.simulator-inline {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.sim-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.sim-row label {
    width: 120px;
    font-size: 14px;
    color: #555;
    flex-shrink: 0;
}
.sim-row input,
.sim-row select {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}
.sim-result {
    background: rgba(79,195,247,0.05);
    border-radius: 10px;
    padding: 14px 16px;
    margin-top: 6px;
}
.sim-result-row {
    display: flex;
    justify-content: space-between;
    font-size: 15px;
    padding: 4px 0;
    color: #444;
}
.sim-profit-value {
    font-weight: 700;
    font-size: 18px;
}

/* ===================== */
/* v1.9.93: SAFE BUY     */
/* ===================== */
.safe-buy-card {
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
    border: 2px solid #4caf50;
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 16px;
    text-align: center;
}
.safe-buy-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}
.safe-buy-icon { font-size: 22px; }
.safe-buy-title {
    font-size: 13px;
    font-weight: 700;
    color: #2e7d32;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.safe-buy-amount {
    font-size: 36px;
    font-weight: 800;
    color: #27ae60;
    line-height: 1.1;
    margin-bottom: 4px;
}
.safe-buy-basis {
    font-size: 12px;
    color: #666;
    margin-bottom: 6px;
}
.safe-buy-detail {
    font-size: 11px;
    color: #888;
    line-height: 1.6;
    margin-bottom: 10px;
}
.safe-buy-presets {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}
.safe-buy-preset-label {
    font-size: 11px;
    color: #999;
}
.preset-chip {
    padding: 5px 12px;
    border: 1px solid #c8e6c9;
    border-radius: 20px;
    background: #fff;
    color: #555;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.preset-chip.active {
    background: #4caf50;
    color: #fff;
    border-color: #4caf50;
}
.preset-chip:hover:not(.active) {
    background: #e8f5e9;
    border-color: #81c784;
}

/* ワンタップ入力ボタン */
.onetap-btn {
    padding: 6px 10px;
    border: 1px solid #90caf9;
    border-radius: 6px;
    background: #e3f2fd;
    color: #1565c0;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s;
}
.onetap-btn:hover {
    background: #bbdefb;
}
.onetap-btn:active {
    background: #1565c0;
    color: #fff;
}

/* v1.9.94: Share Button */
.share-btn {
    background: none;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 6px;
}
.share-btn:hover {
    background: rgba(79,195,247,0.1);
    border-color: #4FC3F7;
}
.share-btn:active {
    transform: scale(0.95);
}

/* ===================== */
/* Firebase Auth UI      */
/* ===================== */

/* ログインオーバーレイ */
.login-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.login-card {
    background: var(--bg-card-dark);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 48px 40px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    max-width: 400px;
    width: 90%;
}

.login-logo {
    font-size: 56px;
    margin-bottom: 16px;
}

.login-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.btn-google-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 24px;
    background: var(--bg-card-hover);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 16px;
}

.btn-google-login:hover {
    background: rgba(66, 133, 244, 0.15);
    border-color: rgba(66, 133, 244, 0.5);
    box-shadow: 0 4px 12px rgba(66,133,244,0.2);
}

.login-note {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ユーザートップバー（VALORAロゴバーの上・v1.9.40） */
.user-topbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 2px;
    min-height: 30px;
}

.user-topbar .user-avatar {
    width: 18px;
    height: 18px;
}

.user-topbar .user-name {
    max-width: 160px;
}

/* ユーザーメニュー（ヘッダー内・後方互換） */
.user-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 5px 12px 5px 6px;
    border-radius: 24px;
    backdrop-filter: blur(8px);
    transition: background 0.2s;
}

.user-menu:hover {
    background: rgba(255, 255, 255, 0.09);
}

.user-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(79, 195, 247, 0.3);
}

.user-name {
    font-size: 12px;
    color: #c0c0d0;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

.btn-logout {
    padding: 3px 8px;
    background: transparent;
    color: rgba(255, 255, 255, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 5px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.3px;
}

.btn-logout:hover {
    background: rgba(255, 80, 80, 0.15);
    color: rgba(255, 120, 120, 0.9);
    border-color: rgba(255, 80, 80, 0.3);
}

/* ユーザー情報ラップ（名前＋プランバッジ列） */
.user-info-wrap {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

/* プランバッジ行 */
.user-plan-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* プランバッジ */
.plan-badge {
    display: inline-block;
    padding: 0px 5px;
    border-radius: 6px;
    font-size: 9px;
    font-weight: 700;
    color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.08);
    white-space: nowrap;
    line-height: 1.6;
    letter-spacing: 0.5px;
}

/* 👑 Founderバッジ */
.founder-badge {
    display: none;
    padding: 0px 6px;
    border-radius: 6px;
    font-size: 8px;
    font-weight: 800;
    color: #0F1115;
    background: linear-gradient(135deg, #FFD700, #FFA000);
    white-space: nowrap;
    line-height: 1.8;
    letter-spacing: 1px;
}

/* 残り回数表示 */
.usage-info {
    font-size: 9px;
    color: rgba(255,255,255,0.3);
    white-space: nowrap;
}

/* ==========================================
   バーコードスキャン・撮影ガイド (v1.9.15)
   ========================================== */

/* SNAPカメラボタン */
.btn-snap-camera {
    background: linear-gradient(135deg, #0d2035, #0a3050);
    color: #4fc3f7;
    border: 1px solid rgba(79, 195, 247, 0.6);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.05em;
    box-shadow: 0 0 10px rgba(79, 195, 247, 0.15);
}
.btn-snap-camera:hover {
    background: linear-gradient(135deg, #0a3050, #083060);
    box-shadow: 0 0 18px rgba(79, 195, 247, 0.35);
    border-color: rgba(79, 195, 247, 0.9);
}

/* バーコードスキャンボタン */
.btn-barcode {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: #64ffda;
    border: 1px solid #64ffda;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.03em;
}
.btn-barcode:hover {
    background: linear-gradient(135deg, #16213e, #0f3460);
    box-shadow: 0 0 12px rgba(100, 255, 218, 0.3);
}

/* 撮影ガイドパネル */
#shooting-guide-panel {
    background: linear-gradient(135deg, rgba(79,195,247,0.06), rgba(0,229,204,0.04));
    border: 1px solid rgba(79,195,247,0.2);
    border-radius: 12px;
    padding: 16px;
    margin: 14px 0;
    text-align: left;
}

.guide-detecting {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--accent-blue);
    font-size: 14px;
    justify-content: center;
    padding: 8px 0;
}

.guide-spinner {
    animation: spin 1s linear infinite;
    display: inline-block;
}

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

.guide-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.guide-icon { font-size: 18px; }
.guide-title { font-size: 14px; color: #a0c4ff; font-weight: 600; }
.guide-desc { font-size: 12px; color: #8888aa; margin-bottom: 12px; }

.guide-list {
    list-style: none;
    margin: 0 0 12px 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.guide-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #c0c0d0;
    background: rgba(255,255,255,0.04);
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.06);
}
.guide-check { color: var(--accent-blue); font-size: 15px; }

/* 撮影ガイドボタン: 準備中は暗転、完了でふわっと点灯 */
.guide-actions {
    text-align: right;
}
.guide-actions .btn {
    opacity: 0.35;
    pointer-events: none;
    filter: grayscale(0.5);
    transition: opacity 0.6s ease, filter 0.6s ease, box-shadow 0.6s ease;
}
.guide-actions .btn.guide-btn-ready {
    opacity: 1;
    pointer-events: auto;
    filter: none;
    animation: guideReadyPop 0.55s ease forwards;
}
@keyframes guideReadyPop {
    0%   { opacity: 0.35; transform: scale(0.97); box-shadow: none; }
    60%  { opacity: 1;    transform: scale(1.03); box-shadow: 0 0 18px rgba(79,195,247,0.5); }
    100% { opacity: 1;    transform: scale(1);    box-shadow: 0 4px 14px rgba(79,195,247,0.25); }
}

/* バーコード商品カード */
.barcode-product-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card-dark);
    border-radius: 10px;
    padding: 12px;
    border: 1px solid rgba(79,195,247,0.15);
}
.barcode-product-info { flex: 1; min-width: 0; }
.barcode-product-name {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a2e;
    line-height: 1.4;
    word-break: break-all;
    margin-bottom: 4px;
}
.barcode-product-price {
    font-size: 13px;
    color: #e67e22;
    font-weight: 700;
}
.barcode-product-shop {
    font-size: 11px;
    color: #888;
    margin-top: 2px;
}

/* 小さいボタン */
.btn-sm {
    padding: 7px 14px !important;
    font-size: 13px !important;
}

/* ================================================================
   VALORA ヒーローセクション (v1.9.24〜)
   ================================================================ */
.valora-hero {
    background: var(--bg-dark);
    border-radius: 16px;
    padding: 52px 40px 44px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 40px;
}

/* 左カラム */
.hero-left {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

/* 右カラム */
.hero-right {
    flex-shrink: 0;
    width: 300px;
    position: relative;
    z-index: 1;
}

/* ===== Hero Demo Panel ===== */
.hero-demo-panel {
    background: rgba(15, 17, 21, 0.8);
    border: 1px solid rgba(79, 195, 247, 0.2);
    border-radius: 20px;
    padding: 22px 20px 18px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(8px);
    box-shadow:
        0 0 0 1px rgba(79, 195, 247, 0.05),
        0 8px 40px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* スキャンライン */
.demo-scan-wrap {
    height: 1px;
    position: relative;
    overflow: hidden;
    margin-bottom: 14px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 1px;
}

@keyframes scanline {
    0%   { transform: translateX(-100%); opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { transform: translateX(400%); opacity: 0; }
}

.demo-scan-bar {
    position: absolute;
    left: 0; top: 0;
    height: 100%;
    width: 30%;
    background: linear-gradient(90deg, transparent, var(--accent-emerald), transparent);
    animation: scanline 2.4s ease-in-out infinite;
    filter: blur(0.5px);
}

/* AI Analyzing... */
.demo-analyzing {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 16px;
}

.demo-analyzing-text {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--accent-emerald);
    text-transform: uppercase;
}

@keyframes dotpulse {
    0%, 80%, 100% { opacity: 0.2; transform: scale(0.8); }
    40%            { opacity: 1;   transform: scale(1.2); }
}

.demo-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent-emerald);
    animation: dotpulse 1.4s ease-in-out infinite;
}
.demo-dot:nth-child(2) { animation-delay: 0.2s; }
.demo-dot:nth-child(3) { animation-delay: 0.4s; }

/* メトリクス行 */
.demo-metrics {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.demo-metric-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.demo-metric-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.demo-metric-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
    text-transform: uppercase;
    flex-shrink: 0;
}

.demo-metric-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ミニバー */
.demo-mini-bar {
    width: 60px;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
}

.demo-mini-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-emerald));
    border-radius: 2px;
    transition: width 0.8s ease;
}

.demo-metric-value {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    font-family: 'Space Grotesk', monospace;
    min-width: 28px;
    text-align: right;
    transition: color 0.4s;
}

/* Risk Badge */
.demo-risk-badge {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-emerald);
    background: rgba(0, 229, 204, 0.1);
    border: 1px solid rgba(0, 229, 204, 0.25);
    border-radius: 20px;
    padding: 3px 10px;
    letter-spacing: 0.5px;
}

/* Trend */
.demo-trend-up {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-emerald);
}

/* Price */
.demo-price-val {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

/* フッター */
.demo-panel-footer {
    display: flex;
    align-items: center;
    gap: 5px;
    justify-content: flex-start;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* VALORA ENGINE ラベル */
.demo-engine-label {
    font-size: 9px;
    font-weight: 700;
    color: var(--accent-blue);
    letter-spacing: 1px;
    text-transform: uppercase;
}
.demo-engine-arrow {
    font-size: 9px;
    color: rgba(255,255,255,0.3);
}
.demo-ai-chip {
    font-size: 9px;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    transition: opacity 0.5s;
    flex: 1;
}

@keyframes livepulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.3; }
}

.demo-live-badge {
    font-size: 9px;
    font-weight: 700;
    color: var(--accent-emerald);
    letter-spacing: 1px;
    animation: livepulse 1.8s ease-in-out infinite;
    margin-left: auto;
}

/* 光のオーラ（右上・青） */
.valora-hero::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--glow-blue) 0%, transparent 70%);
    pointer-events: none;
}

/* 光のオーラ（左下・エメラルド） */
.valora-hero::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: 10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--glow-emerald) 0%, transparent 70%);
    pointer-events: none;
}

/* ブランドロゴ行 */
.hero-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.hero-logo-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-emerald));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 900;
    color: #0F1115;
    letter-spacing: -2px;
    flex-shrink: 0;
    box-shadow: 0 0 24px rgba(79, 195, 247, 0.35);
}

.hero-app-name {
    font-size: 30px;
    font-weight: 900;
    color: var(--text-primary);
    letter-spacing: 6px;
    line-height: 1;
    display: block;
}

.hero-byline {
    font-size: 11px;
    color: var(--text-secondary);
    letter-spacing: 1.5px;
    margin-top: 5px;
    display: block;
    text-transform: uppercase;
}

/* コピーライン */
.hero-copy {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-blue);
    margin-bottom: 36px;
    letter-spacing: 0.3px;
    position: relative;
    z-index: 1;
}

/* 機能グリッド */
.hero-features {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    position: relative;
    z-index: 1;
}

.feature-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 16px 8px 14px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
}

.feature-card:hover {
    background: rgba(79, 195, 247, 0.10);
    border-color: rgba(79, 195, 247, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.feature-card:nth-child(1):hover { border-color: rgba(79, 195, 247, 0.5); }
.feature-card:nth-child(2):hover { border-color: rgba(0, 229, 204, 0.5); background: rgba(0, 229, 204, 0.08); }
.feature-card:nth-child(3):hover { border-color: rgba(255, 179, 0, 0.5); background: rgba(255, 179, 0, 0.08); }
.feature-card:nth-child(4):hover { border-color: rgba(255, 68, 88, 0.5); background: rgba(255, 68, 88, 0.08); }
.feature-card:nth-child(5):hover { border-color: rgba(179, 157, 219, 0.5); background: rgba(179, 157, 219, 0.08); }
.feature-card:nth-child(6):hover { border-color: rgba(128, 222, 234, 0.5); background: rgba(128, 222, 234, 0.08); }
.feature-card:nth-child(7):hover { border-color: rgba(165, 214, 167, 0.5); background: rgba(165, 214, 167, 0.08); }
.feature-card:nth-child(8):hover { border-color: rgba(156, 136, 255, 0.5); background: rgba(156, 136, 255, 0.08); }

.feature-icon {
    width: 36px;
    height: 36px;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon svg {
    width: 26px;
    height: 26px;
}

/* アイコンカラー */
.feature-card:nth-child(1) .feature-icon svg { stroke: var(--accent-blue); }
.feature-card:nth-child(2) .feature-icon svg { stroke: var(--accent-emerald); }
.feature-card:nth-child(3) .feature-icon svg { stroke: var(--accent-amber); }
.feature-card:nth-child(4) .feature-icon svg { stroke: var(--accent-crimson); }
.feature-card:nth-child(5) .feature-icon svg { stroke: var(--accent-violet); }
.feature-card:nth-child(6) .feature-icon svg { stroke: var(--accent-cyan); }
.feature-card:nth-child(7) .feature-icon svg { stroke: var(--accent-green); }
.feature-card:nth-child(8) .feature-icon svg { stroke: var(--accent-purple); }

/* SPLIT Pro カード — 特別な背景グラデーション */
.feature-card.feature-split-pro {
    border-color: rgba(156, 136, 255, 0.35);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.07), rgba(118, 75, 162, 0.04));
}
.feature-card.feature-split-pro .feature-name {
    color: var(--accent-purple);
}

.feature-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.feature-desc {
    font-size: 10px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* レスポンシブ */
@media (max-width: 900px) {
    .hero-features {
        grid-template-columns: repeat(4, 1fr);
    }
    .hero-app-name {
        font-size: 24px;
    }
    /* タブレット: デモパネルを小さく */
    .hero-right {
        width: 240px;
    }
}

@media (max-width: 700px) {
    /* スマホ: 縦積みに変更 */
    .valora-hero {
        flex-direction: column;
        padding: 36px 20px 28px;
        gap: 24px;
    }
    .hero-right {
        width: 100%;
    }
    .hero-features {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    .hero-copy {
        font-size: 15px;
        margin-bottom: 24px;
    }
    .hero-app-name {
        font-size: 22px;
        letter-spacing: 4px;
    }
    .hero-byline {
        font-size: 10px;
    }
    /* スマホではデモパネル横並び */
    .demo-metrics {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .demo-metric-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding-bottom: 8px;
    }
}

@media (max-width: 400px) {
    .hero-features {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* ============================================================
   VALORA Intelligence Panel  (v1.9.26)
   ============================================================ */

/* ---- Intel Header ---- */
.intel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card-dark);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 18px 24px;
    margin-bottom: 16px;
    gap: 16px;
}

.intel-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.intel-product-thumb {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid var(--border-subtle);
    background: var(--bg-dark);
}

.intel-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.intel-product-info {
    min-width: 0;
}

.intel-product-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.intel-product-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--text-secondary);
}

.meta-sep {
    opacity: 0.4;
}

.condition-badge {
    display: inline-block;
    background: rgba(79, 195, 247, 0.12);
    color: var(--accent-blue);
    border: 1px solid rgba(79, 195, 247, 0.3);
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.intel-header-right {
    flex-shrink: 0;
}

.ai-chip {
    display: inline-block;
    background: rgba(0, 229, 204, 0.08);
    color: var(--accent-emerald);
    border: 1px solid rgba(0, 229, 204, 0.25);
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.8px;
    white-space: nowrap;
}

/* ---- Intelligence Panel 3列グリッド ---- */
.intel-panel {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

/* ---- Intel Card ベーススタイル ---- */
.intel-card {
    background: var(--bg-card-dark);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 22px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: border-color 0.3s;
}

.intel-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.intel-card-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

/* ---- Confidence Score（左カード） ---- */
.intel-confidence {
    align-items: center;
    text-align: center;
    border-top: 2px solid var(--accent-emerald);
}

.confidence-gauge-wrap {
    width: 120px;
    height: 120px;
}

.confidence-gauge {
    width: 100%;
    height: 100%;
}

.gauge-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.06);
    stroke-width: 9;
}

.gauge-fill {
    fill: none;
    stroke: var(--accent-emerald);
    stroke-width: 9;
    stroke-linecap: round;
    transition: stroke-dasharray 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 0 6px rgba(0, 229, 204, 0.5));
}

.gauge-score {
    fill: var(--text-primary);
    font-size: 26px;
    font-weight: 800;
    font-family: 'Space Grotesk', sans-serif;
    dominant-baseline: middle;
}

.gauge-sub {
    fill: var(--text-secondary);
    font-size: 10px;
    dominant-baseline: middle;
}

.confidence-level {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--accent-emerald);
    text-transform: uppercase;
}

.condition-detail {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.5;
    text-align: center;
}

/* ---- Price Intelligence（中カード） ---- */
.intel-price {
    border-top: 2px solid var(--accent-blue);
}

.price-main {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    line-height: 1;
}

.price-range-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.price-range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-secondary);
}

.price-range-bar {
    position: relative;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
}

.price-range-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-emerald));
    border-radius: 3px;
    width: 100%;
    transition: width 1s ease;
}

.price-range-dot {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: var(--accent-emerald);
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(0, 229, 204, 0.6);
}

.price-range-hint {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.25);
    text-align: center;
    letter-spacing: 0.5px;
}

.market-trend-wrap {
    padding: 8px 0;
    border-top: 1px solid var(--border-subtle);
}

.market-trend {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.trend-arrow {
    font-size: 14px;
    transition: color 0.3s;
}

.trend-up .trend-arrow    { color: var(--accent-emerald); }
.trend-stable .trend-arrow { color: var(--accent-amber); }
.trend-down .trend-arrow  { color: var(--accent-crimson); }

.market-links-compact {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.market-link-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    transition: all 0.25s;
}

.mercari-btn {
    background: rgba(255, 64, 87, 0.08);
    border-color: rgba(255, 64, 87, 0.2);
}

.mercari-btn:hover {
    background: rgba(255, 64, 87, 0.18);
    border-color: rgba(255, 64, 87, 0.5);
}

.yahoo-btn {
    background: rgba(255, 179, 0, 0.08);
    border-color: rgba(255, 179, 0, 0.2);
}

.yahoo-btn:hover {
    background: rgba(255, 179, 0, 0.18);
    border-color: rgba(255, 179, 0, 0.5);
}

.market-link-price {
    font-weight: 700;
    font-size: 11px;
    color: var(--text-secondary);
}

/* ---- Risk Assessment（右カード） ---- */
.intel-risk {
    border-top: 2px solid var(--accent-crimson);
}

.risk-meter-wrap {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.risk-bar-track {
    height: 8px;
    background: linear-gradient(90deg,
        rgba(0, 229, 204, 0.25) 0%,
        rgba(255, 179, 0, 0.25) 50%,
        rgba(255, 68, 88, 0.25) 100%);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.risk-bar-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    border-radius: 4px;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    /* 幅はJS側から動的にセット */
}

.risk-fill-low {
    width: 25%;
    background: linear-gradient(90deg, var(--accent-emerald), rgba(0, 229, 204, 0.7));
    box-shadow: 0 0 8px rgba(0, 229, 204, 0.4);
}

.risk-fill-mid {
    width: 58%;
    background: linear-gradient(90deg, var(--accent-emerald), var(--accent-amber));
    box-shadow: 0 0 8px rgba(255, 179, 0, 0.4);
}

.risk-fill-high {
    width: 90%;
    background: linear-gradient(90deg, var(--accent-emerald), var(--accent-amber), var(--accent-crimson));
    box-shadow: 0 0 8px rgba(255, 68, 88, 0.4);
}

.risk-labels {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-secondary);
    text-transform: uppercase;
    padding: 0 2px;
}

.risk-level-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    align-self: flex-start;
}

.risk-badge-low {
    background: rgba(0, 229, 204, 0.12);
    color: var(--accent-emerald);
    border: 1px solid rgba(0, 229, 204, 0.3);
}

.risk-badge-mid {
    background: rgba(255, 179, 0, 0.12);
    color: var(--accent-amber);
    border: 1px solid rgba(255, 179, 0, 0.3);
}

.risk-badge-high {
    background: rgba(255, 68, 88, 0.12);
    color: var(--accent-crimson);
    border: 1px solid rgba(255, 68, 88, 0.3);
}

.risk-auth {
    padding-top: 8px;
    border-top: 1px solid var(--border-subtle);
}

.risk-auth-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.risk-auth-text {
    font-size: 11px;
    color: var(--text-primary);
    line-height: 1.5;
}

.risk-points {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding-top: 6px;
}

.risk-points li {
    font-size: 11px;
    color: var(--text-secondary);
    padding-left: 14px;
    position: relative;
    line-height: 1.4;
}

.risk-points li::before {
    content: '⚠';
    position: absolute;
    left: 0;
    font-size: 9px;
    color: var(--accent-amber);
    top: 1px;
}

/* ---- Key Features カード ---- */
.intel-features-card {
    background: var(--bg-card-dark);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 18px 22px;
    margin-bottom: 14px;
}

.features-chips {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.features-chips li {
    display: inline-block;
    background: rgba(79, 195, 247, 0.08);
    color: var(--accent-blue);
    border: 1px solid rgba(79, 195, 247, 0.2);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.25s;
}

.features-chips li:hover {
    background: rgba(79, 195, 247, 0.15);
    border-color: var(--accent-blue);
}

/* ---- Disclaimer ---- */
.disclaimer-box {
    background: rgba(255, 179, 0, 0.06);
    border: 1px solid rgba(255, 179, 0, 0.2);
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 11px;
    color: rgba(255, 179, 0, 0.8);
    margin-bottom: 14px;
    line-height: 1.5;
}

/* ---- Action Cards 3列 ---- */
.action-cards {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 14px;
}

/* ---- 旧 result-card スタイルの継承 ---- */
.result-card {
    background: var(--bg-card-dark);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 22px 20px;
}

.result-card h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 14px;
    letter-spacing: 0.3px;
}

/* ---- Intel Panel レスポンシブ ---- */
@media (max-width: 900px) {
    .intel-panel {
        grid-template-columns: 1fr 1fr;
    }
    .intel-risk {
        grid-column: 1 / -1;
    }
    .action-cards {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .intel-panel {
        grid-template-columns: 1fr;
    }
    .intel-risk {
        grid-column: auto;
    }
    .intel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .intel-product-name {
        font-size: 16px;
    }
    .price-main {
        font-size: 22px;
    }
    .action-cards {
        grid-template-columns: 1fr;
    }
}
