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

        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif;
            background: #f5f5f5;
            color: #333;
            height: 100vh;
            display: flex;
            flex-direction: column;
        }

        header {
            background: #2c3e50;
            color: #fff;
            padding: 12px 24px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-shrink: 0;
        }

        .header-left {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        header h1 {
            font-size: 18px;
            font-weight: 600;
            cursor: pointer;
            transition: opacity 0.15s;
        }

        header h1:hover {
            opacity: 0.8;
        }

        .header-title-link {
            color: inherit;
            text-decoration: none;
        }

        .header-title-link:visited {
            color: inherit;
        }

        .header-title-link:hover {
            text-decoration: none;
        }

        .header-subtitle {
            font-size: 12px;
            color: #94a3b8;
        }

        .header-powered {
            display: flex;
            align-items: center;
            gap: 6px;
            background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
            padding: 8px 16px;
            border-radius: 6px;
            box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
        }

        .header-powered-icon {
            font-size: 16px;
        }

        .header-powered-text {
            font-size: 13px;
            color: rgba(255, 255, 255, 0.9);
        }

        .header-powered a {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            color: #fff;
            text-decoration: none;
            font-weight: 600;
            font-size: 14px;
            padding: 4px 12px;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 4px;
            transition: all 0.15s;
        }

        .header-powered a:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: translateY(-1px);
        }

        .container {
            display: flex;
            flex: 1;
            overflow: hidden;
        }

        /* サイドバー */
        .sidebar {
            width: 280px;
            background: #fff;
            border-right: 1px solid #e2e8f0;
            overflow-y: auto;
            flex-shrink: 0;
        }

        .sidebar-header {
            padding: 12px 16px;
            font-size: 13px;
            font-weight: 600;
            color: #64748b;
            border-bottom: 1px solid #e2e8f0;
            background: #f8fafc;
        }

        .search-box {
            padding: 12px 16px;
            border-bottom: 1px solid #e2e8f0;
            background: #fff;
            position: sticky;
            top: 0;
            z-index: 10;
        }

        .search-input {
            width: 100%;
            padding: 8px 12px;
            border: 1px solid #e2e8f0;
            border-radius: 6px;
            font-size: 13px;
            outline: none;
            transition: border-color 0.15s, box-shadow 0.15s;
        }

        .search-input:focus {
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }

        .search-input::placeholder {
            color: #94a3b8;
        }

        .search-result-info {
            padding: 8px 16px;
            font-size: 12px;
            color: #64748b;
            background: #fefce8;
            border-bottom: 1px solid #e2e8f0;
            display: none;
        }

        .search-result-info.visible {
            display: block;
        }

        .genre-item.hidden {
            display: none;
        }

        .company-item.hidden {
            display: none;
        }

        .company-item.highlight {
            background: #fef9c3;
        }

        .genre-item {
            border-bottom: 1px solid #f1f5f9;
        }

        /* <details>/<summary> でアコーディオンを実現（JSなし） */
        .genre-item > summary.genre-label {
            list-style: none;
        }

        .genre-item > summary.genre-label::-webkit-details-marker {
            display: none;
        }

        .genre-item > summary.genre-label::before {
            content: '▶';
            font-size: 10px;
            color: #94a3b8;
            transition: transform 0.2s;
        }

        .genre-item[open] > summary.genre-label::before {
            transform: rotate(90deg);
        }

        .genre-label {
            display: flex;
            align-items: center;
            padding: 10px 16px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 500;
            color: #334155;
            transition: background 0.15s;
            gap: 8px;
        }

        .genre-label:hover {
            background: #f1f5f9;
        }

        .genre-label.active {
            background: #e0f2fe;
            color: #0369a1;
        }

        .genre-name {
            flex: 1;
        }

        .genre-count {
            font-size: 11px;
            color: #94a3b8;
            background: #f1f5f9;
            padding: 2px 6px;
            border-radius: 10px;
        }

        .company-list {
            display: none;
            background: #f8fafc;
        }

        .genre-item[open] .company-list {
            display: block;
        }

        .company-item {
            padding: 8px 16px 8px 36px;
            font-size: 13px;
            color: #475569;
            cursor: pointer;
            transition: background 0.15s;
            border-top: 1px solid #f1f5f9;
        }

        /* <a> をリンクっぽく見せない（元のdivクリック風に） */
        .company-item > a {
            display: block;
            color: inherit;
            text-decoration: none;
        }

        .company-item > a:visited {
            color: inherit;
        }

        .company-item > a:hover {
            text-decoration: none;
        }

        .company-item:hover {
            background: #e2e8f0;
        }

        .company-item.active {
            background: #dbeafe;
            color: #1d4ed8;
            font-weight: 500;
        }

        /* メインエリア */
        .main {
            flex: 1;
            overflow-y: auto;
            padding: 24px;
        }

        .main-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 20px;
        }

        .main-title {
            font-size: 16px;
            font-weight: 600;
            color: #1e293b;
        }

        .article-count {
            font-size: 13px;
            color: #64748b;
        }

        .article-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .article-card {
            background: #fff;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            padding: 16px;
            transition: box-shadow 0.15s;
            cursor: pointer;
            text-decoration: none;
            color: inherit;
            display: block;
        }

        .article-card:hover {
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
            border-color: #cbd5e1;
        }

        .article-meta {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 8px;
            font-size: 12px;
            color: #64748b;
        }

        .article-source {
            background: #f1f5f9;
            padding: 2px 8px;
            border-radius: 4px;
            font-weight: 500;
        }

        .article-date {
            color: #94a3b8;
        }

        .article-title {
            font-size: 15px;
            font-weight: 500;
            color: #1e293b;
            margin-bottom: 6px;
            line-height: 1.5;
        }

        .article-description {
            font-size: 13px;
            color: #64748b;
            line-height: 1.6;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .article-tags {
            display: flex;
            gap: 6px;
            margin-top: 8px;
            flex-wrap: wrap;
        }

        .article-tag {
            font-size: 11px;
            background: #eff6ff;
            color: #3b82f6;
            padding: 2px 8px;
            border-radius: 4px;
            cursor: pointer;
            transition: background 0.15s, color 0.15s;
        }

        .article-tag:hover {
            background: #3b82f6;
            color: #fff;
        }

        /* 関連企業セクション */
        .related-companies {
            background: #f8fafc;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            padding: 12px 16px;
            margin-bottom: 16px;
        }

        .related-companies-title {
            font-size: 12px;
            color: #64748b;
            margin-bottom: 8px;
            font-weight: 500;
        }

        .related-companies-tags {
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
        }

        .related-company-tag {
            font-size: 12px;
            background: #fff;
            color: #475569;
            padding: 4px 10px;
            border-radius: 16px;
            border: 1px solid #e2e8f0;
            cursor: pointer;
            transition: all 0.15s;
        }

        .related-company-tag:hover {
            background: #3b82f6;
            color: #fff;
            border-color: #3b82f6;
        }

        .related-company-tag .count {
            font-size: 10px;
            color: #94a3b8;
            margin-left: 4px;
        }

        .related-company-tag:hover .count {
            color: rgba(255,255,255,0.7);
        }

        /* ローディング */
        .loading {
            text-align: center;
            padding: 40px;
            color: #94a3b8;
            font-size: 14px;
        }

        .empty-state {
            text-align: center;
            padding: 60px 20px;
            color: #94a3b8;
        }

        .empty-state p {
            font-size: 14px;
            margin-top: 8px;
        }

        /* もっと読み込むボタン */
        .load-more-container {
            text-align: center;
            padding: 20px;
        }

        .load-more-btn {
            background: #3b82f6;
            color: #fff;
            border: none;
            padding: 12px 32px;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: background 0.15s, transform 0.1s;
        }

        .load-more-btn:hover {
            background: #2563eb;
        }

        .load-more-btn:active {
            transform: scale(0.98);
        }

        .load-more-btn:disabled {
            background: #94a3b8;
            cursor: not-allowed;
        }

        .load-more-info {
            font-size: 12px;
            color: #94a3b8;
            margin-top: 8px;
        }

        /* エラー表示 */
        .error-state {
            text-align: center;
            padding: 40px 20px;
            color: #ef4444;
            background: #fef2f2;
            border: 1px solid #fecaca;
            border-radius: 8px;
        }

        .error-state p {
            font-size: 14px;
            margin-top: 8px;
        }

        /* API設定警告 */
        .api-warning {
            background: #fef3c7;
            border: 1px solid #f59e0b;
            border-radius: 8px;
            padding: 16px;
            margin-bottom: 16px;
            font-size: 13px;
            color: #92400e;
        }

        /* フッター */
        .footer {
            margin-top: 40px;
            padding: 20px;
            border-top: 1px solid #e2e8f0;
            background: #f8fafc;
        }

        .footer-disclaimer {
            font-size: 11px;
            color: #64748b;
            line-height: 1.7;
        }

        .footer-disclaimer-title {
            font-weight: 600;
            color: #475569;
            margin-bottom: 8px;
        }

        .footer-disclaimer ul {
            margin: 0;
            padding-left: 20px;
        }

        .footer-disclaimer li {
            margin-bottom: 4px;
        }

        .footer-copyright {
            margin-top: 12px;
            font-size: 10px;
            color: #94a3b8;
        }
