/* WorldSearch Searlo theme — site-wide（?theme=light で無効） */

html.theme-searlo-preview {
    --background-color: #070d18;
    --surface-color: rgba(255, 255, 255, 0.05);
    --border-color: rgba(255, 255, 255, 0.18);
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --primary-light: #3b82f6;
    --standard-color: #2dd4bf;
    --premium-color: #a78bfa;
    --chart-line: #60a5fa;
    --chart-fill: rgba(96, 165, 250, 0.18);
    --chart-grid: rgba(255, 255, 255, 0.08);
    --chart-tick: #94a3b8;
}

html.theme-searlo-preview body {
    background-color: var(--background-color);
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(59, 130, 246, 0.18), transparent),
        radial-gradient(ellipse 60% 40% at 100% 0%, rgba(45, 212, 191, 0.08), transparent);
    color: var(--text-primary);
}

html.theme-searlo-preview body main.container {
    background: transparent;
}

html.theme-searlo-preview body .text-muted {
    color: var(--text-secondary) !important;
}

html.theme-searlo-preview body .text-secondary {
    color: var(--text-muted) !important;
}

html.theme-searlo-preview body h1,
html.theme-searlo-preview body h2,
html.theme-searlo-preview body h3,
html.theme-searlo-preview body h4,
html.theme-searlo-preview body h5,
html.theme-searlo-preview body h6,
html.theme-searlo-preview body .h1,
html.theme-searlo-preview body .h2,
html.theme-searlo-preview body .h3,
html.theme-searlo-preview body .h4,
html.theme-searlo-preview body .h5,
html.theme-searlo-preview body .h6 {
    color: var(--text-primary);
}

html.theme-searlo-preview body small,
html.theme-searlo-preview body .small {
    color: var(--text-muted);
}

html.theme-searlo-preview body .card:not(.plan-card) {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

html.theme-searlo-preview body .card-header {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--border-color);
    color: var(--text-primary);
}

html.theme-searlo-preview body .card-footer {
    background: rgba(255, 255, 255, 0.02);
    border-color: var(--border-color);
}

html.theme-searlo-preview body .bg-light {
    background-color: rgba(255, 255, 255, 0.06) !important;
    color: var(--text-secondary) !important;
}

html.theme-searlo-preview body .border,
html.theme-searlo-preview body .border-top,
html.theme-searlo-preview body .border-bottom {
    border-color: var(--border-color) !important;
}

html.theme-searlo-preview body .form-label {
    color: var(--text-secondary);
}

html.theme-searlo-preview body .form-control,
html.theme-searlo-preview body .form-select {
    background-color: rgba(255, 255, 255, 0.06);
    border-color: var(--border-color);
    color: var(--text-primary);
}

html.theme-searlo-preview body .form-control::placeholder {
    color: var(--text-muted);
    opacity: 1;
}

html.theme-searlo-preview body .form-control:focus,
html.theme-searlo-preview body .form-select:focus {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-light);
    color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

html.theme-searlo-preview body .input-group-text {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

html.theme-searlo-preview body .btn-outline-primary {
    color: #93c5fd;
    border-color: rgba(147, 197, 253, 0.55);
}

html.theme-searlo-preview body .btn-outline-primary:hover {
    background: rgba(59, 130, 246, 0.15);
    color: #fff;
    border-color: rgba(147, 197, 253, 0.65);
}

html.theme-searlo-preview body .btn-outline-secondary {
    color: var(--text-secondary);
    border-color: var(--border-color);
}

html.theme-searlo-preview body .btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: var(--border-color);
}

html.theme-searlo-preview body .btn:disabled,
html.theme-searlo-preview body .btn.disabled,
html.theme-searlo-preview body fieldset:disabled .btn {
    opacity: 1 !important;
    color: var(--text-secondary) !important;
    border-color: var(--border-color) !important;
    background-color: rgba(255, 255, 255, 0.07) !important;
}

html.theme-searlo-preview body .btn-primary:disabled,
html.theme-searlo-preview body .btn-primary.disabled {
    color: #e2e8f0 !important;
    border: 1px solid rgba(147, 197, 253, 0.45) !important;
    background: rgba(59, 130, 246, 0.28) !important;
}

html.theme-searlo-preview body .btn-secondary:disabled,
html.theme-searlo-preview body .btn-secondary.disabled {
    color: var(--text-secondary) !important;
    border-color: var(--border-color) !important;
    background-color: rgba(255, 255, 255, 0.08) !important;
}

html.theme-searlo-preview body .table {
    color: var(--text-secondary);
    --bs-table-bg: transparent;
    --bs-table-color: var(--text-secondary);
    --bs-table-border-color: var(--border-color);
    --bs-table-striped-bg: rgba(255, 255, 255, 0.03);
    --bs-table-hover-bg: rgba(255, 255, 255, 0.06);
}

html.theme-searlo-preview body .table thead th {
    color: var(--text-primary);
    border-color: var(--border-color);
}

html.theme-searlo-preview body .alert-info {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.35);
    color: #bfdbfe;
}

html.theme-searlo-preview body .alert-warning {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.35);
    color: #fde68a;
}

html.theme-searlo-preview body .alert-success {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.35);
    color: #a7f3d0;
}

html.theme-searlo-preview body .alert-danger {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.35);
    color: #fecaca;
}

html.theme-searlo-preview body .alert-secondary {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

html.theme-searlo-preview body .accordion-item {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

html.theme-searlo-preview body .accordion-button {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    border-color: var(--border-color);
}

html.theme-searlo-preview body .accordion-button:not(.collapsed) {
    background: rgba(59, 130, 246, 0.12);
    color: #93c5fd;
}

html.theme-searlo-preview body .accordion-button::after {
    filter: invert(0.85);
}

html.theme-searlo-preview body .accordion-body {
    background: rgba(0, 0, 0, 0.15);
    color: var(--text-muted) !important;
}

html.theme-searlo-preview body .dropdown-menu {
    background: #0f172a;
    border-color: var(--border-color);
}

html.theme-searlo-preview body .dropdown-item {
    color: var(--text-secondary);
}

html.theme-searlo-preview body .dropdown-item:hover,
html.theme-searlo-preview body .dropdown-item:focus {
    background: rgba(59, 130, 246, 0.15);
    color: var(--text-primary);
}

html.theme-searlo-preview body .modal-content {
    background: #0f172a;
    border-color: var(--border-color);
    color: var(--text-secondary);
}

html.theme-searlo-preview body .modal-header,
html.theme-searlo-preview body .modal-footer {
    border-color: var(--border-color);
}

html.theme-searlo-preview body .list-group-item {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

html.theme-searlo-preview body .page-link {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

html.theme-searlo-preview body .page-item.active .page-link {
    background: rgba(59, 130, 246, 0.35);
    border-color: rgba(59, 130, 246, 0.5);
    color: #fff;
}

html.theme-searlo-preview body .plan-cards-section__title {
    color: #f8fafc;
}

html.theme-searlo-preview body .plan-cards-for-box {
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
}

html.theme-searlo-preview body .plan-cards-for-box--std h6 {
    color: #5eead4;
}

html.theme-searlo-preview body .plan-cards-for-box--biz h6 {
    color: #c4b5fd;
}

html.theme-searlo-preview body .ws-current-plan {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-color);
    box-shadow: none;
}

html.theme-searlo-preview body .ws-current-plan__name {
    color: var(--text-primary);
}

html.theme-searlo-preview body .ws-current-plan__eyebrow {
    color: var(--text-muted);
}

html.theme-searlo-preview body footer,
html.theme-searlo-preview body .footer {
    color: var(--text-muted);
}

html.theme-searlo-preview body footer a {
    color: var(--text-secondary);
}

html.theme-searlo-preview body .index-search-flow-text,
html.theme-searlo-preview body .index-search-flow-text:hover,
html.theme-searlo-preview body .index-search-flow-note,
html.theme-searlo-preview body .index-search-flow-note:hover {
    color: #0c5460 !important;
}

html.theme-searlo-preview body.page-index {
    background-color: var(--background-color);
}

/* ダッシュボード — テーブルヘッダ（table-light） */
html.theme-searlo-preview body .table-light {
    --bs-table-bg: rgba(255, 255, 255, 0.06);
    --bs-table-color: var(--text-secondary);
    --bs-table-border-color: var(--border-color);
}

/* サービス紹介（about/*）— A4 時点では未対応だったライト専用変数をダークに差し替え */
html.theme-searlo-preview body .about-page {
    --about-bg: var(--background-color);
    --about-surface: rgba(255, 255, 255, 0.04);
    --about-text: var(--text-primary);
    --about-muted: var(--text-muted);
    --about-accent: var(--standard-color);
    --about-accent-soft: rgba(45, 212, 191, 0.12);
    --about-border: var(--border-color);
    background: var(--about-bg);
}

html.theme-searlo-preview body .about-subnav-wrap {
    background: rgba(15, 23, 42, 0.92);
    border-bottom-color: var(--border-color);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

html.theme-searlo-preview body .about-subnav a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

html.theme-searlo-preview body .about-subnav a.is-active {
    color: #fff;
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
}

html.theme-searlo-preview body .about-hero .btn-outline-light {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.75);
}

html.theme-searlo-preview body .about-hero .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

/* 検索結果ページ — results.html 内のライト専用スタイルを上書き */
html.theme-searlo-preview body .bg-white {
    background-color: rgba(255, 255, 255, 0.06) !important;
    color: var(--text-secondary) !important;
}

html.theme-searlo-preview body .tab-content {
    background: transparent !important;
    color: var(--text-secondary);
}

html.theme-searlo-preview body .nav-tabs {
    border-bottom-color: var(--border-color) !important;
}

html.theme-searlo-preview body .nav-tabs .nav-link {
    color: var(--text-muted) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: transparent !important;
}

html.theme-searlo-preview body .nav-tabs .nav-link:hover {
    color: var(--text-primary) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: var(--border-color) !important;
}

html.theme-searlo-preview body .nav-tabs .nav-link.active {
    color: var(--text-primary) !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: var(--border-color) var(--border-color) transparent !important;
    box-shadow: none !important;
}

/* 通常検索 — スニペット・タイトル */
html.theme-searlo-preview body .card .card-title,
html.theme-searlo-preview body .card .card-title a {
    color: #93c5fd !important;
}

html.theme-searlo-preview body .card .card-title a:hover {
    color: #bfdbfe !important;
}

html.theme-searlo-preview body .card .card-text,
html.theme-searlo-preview body .card .js-snippet-target {
    color: var(--text-secondary) !important;
    background: transparent !important;
}

html.theme-searlo-preview body .card .card-body .bg-light {
    background: rgba(255, 255, 255, 0.06) !important;
    color: var(--text-muted) !important;
    border-color: var(--border-color) !important;
}

html.theme-searlo-preview body .card a.small,
html.theme-searlo-preview body .card a.small[style*="color"] {
    color: var(--text-muted) !important;
}

html.theme-searlo-preview body mark,
html.theme-searlo-preview body mark.bg-warning {
    background-color: rgba(251, 191, 36, 0.35) !important;
    color: #fef9c3 !important;
}

/* AIリサーチ — 意図バナー */
html.theme-searlo-preview body .ai-research-intent-banner.alert-secondary {
    background: rgba(59, 130, 246, 0.14) !important;
    border: 1px solid rgba(59, 130, 246, 0.35) !important;
    color: var(--text-primary) !important;
}

html.theme-searlo-preview body .ai-research-intent-banner .ai-research-intent-label {
    color: #93c5fd !important;
}

html.theme-searlo-preview body .ai-research-intent-banner .ai-research-intent-body {
    color: var(--text-primary) !important;
}

/* X世論 — 分析サマリー枠（JS で bg-white） */
html.theme-searlo-preview body .x-opinion-summary-panel {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: var(--border-color) !important;
    color: var(--text-secondary) !important;
}

/* LLM 要約パネル（共通） */
html.theme-searlo-preview body .ws-llm-summary-panel {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(59, 130, 246, 0.25) !important;
    box-shadow: none !important;
}

html.theme-searlo-preview body .ws-llm-summary-panel .ws-llm-summary-badge {
    color: #93c5fd !important;
    background: rgba(59, 130, 246, 0.14) !important;
    border-color: rgba(59, 130, 246, 0.28) !important;
}

html.theme-searlo-preview body .ws-llm-summary-panel .progress {
    background: rgba(255, 255, 255, 0.1) !important;
}

html.theme-searlo-preview body .x-opinion-summary-panel h5,
html.theme-searlo-preview body .x-opinion-summary-panel p {
    color: var(--text-secondary) !important;
}

html.theme-searlo-preview body .x-opinion-summary-panel .progress {
    background: rgba(255, 255, 255, 0.1) !important;
}

html.theme-searlo-preview body .x-opinion-summary-panel .progress-bar {
    background: var(--primary-light) !important;
}

/* AIリサーチ結果タブ（共有ページ含む） */
html.theme-searlo-preview body #aiResearchResultTabs.ai-research-result-tabs {
    border-bottom-color: var(--border-color);
}

html.theme-searlo-preview body #aiResearchResultTabs.ai-research-result-tabs .nav-link.ai-research-tab-link {
    background: rgba(255, 255, 255, 0.06) !important;
    color: var(--text-secondary) !important;
    border-color: var(--border-color) !important;
    box-shadow: none;
}

html.theme-searlo-preview body #aiResearchResultTabs.ai-research-result-tabs .nav-link.ai-research-tab-link:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: var(--text-primary) !important;
    border-color: rgba(59, 130, 246, 0.45) !important;
}

html.theme-searlo-preview body #aiResearchResultTabs.ai-research-result-tabs .nav-link.ai-research-tab-link.active {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.95) 0%, rgba(59, 130, 246, 0.9) 100%) !important;
    color: #fff !important;
    border-color: rgba(59, 130, 246, 0.55) !important;
}
