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

        :root {
            --font-body: "IBM Plex Sans", "Hiragino Sans", "Noto Sans JP", sans-serif;
            --font-title: "IBM Plex Sans", "Hiragino Sans", "Noto Sans JP", sans-serif;
        }

        body {
            font-family: var(--font-body);
            background: #f5f5f5;
            color: #333;
            height: 100vh;
            display: flex;
            flex-direction: column;
        }

        .app-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 40px;
            height: 80px;
            background: linear-gradient(120deg, rgba(5, 46, 22, 0.92) 0%, rgba(20, 83, 45, 0.85) 55%, rgba(5, 46, 22, 0.92) 100%);
            backdrop-filter: blur(10px);
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            z-index: 100;
            color: #ffffff;
            flex-shrink: 0;
            box-shadow: 0 10px 30px rgba(5, 46, 22, 0.15);
        }

        .header-left {
            display: flex;
            flex-direction: column;
        }

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

        .header-action-btn {
            background: transparent;
            border: 1px solid rgba(255, 255, 255, 0.4);
            color: rgba(255, 255, 255, 0.85);
            border-radius: 999px;
            padding: 6px 12px;
            font-size: 12px;
            cursor: pointer;
            transition: all 0.2s ease;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
        }

        .header-action-btn:hover {
            border-color: #4ade80;
            color: #ffffff;
        }

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

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

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

        .app-title {
            font-family: var(--font-title);
            font-size: 1.7rem;
            font-weight: 700;
            margin: 0;
            color: #ffffff;
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
        }

        .app-subtitle {
            font-size: 0.85rem;
            color: rgba(255, 255, 255, 0.7);
            margin-top: 4px;
        }

        .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;
        }

        @media (max-width: 900px) {
            .app-header {
                height: auto;
                padding: 16px 20px;
                flex-direction: column;
                align-items: flex-start;
                gap: 12px;
            }

            .header-right {
                width: 100%;
                justify-content: flex-end;
            }

            .container {
                flex-direction: column;
                height: auto;
                overflow: visible;
            }

            .sidebar {
                width: 100%;
                border-right: none;
                border-bottom: 1px solid #e2e8f0;
                overflow-y: visible;
            }

            .main {
                padding: 20px;
                overflow-y: visible;
            }

            .search-box {
                position: static;
                top: auto;
            }
        }

        .search-input:focus {
            border-color: #22c55e;
            box-shadow: 0 0 0 3px rgba(34, 197, 94, 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-icon {
            width: 20px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            color: #64748b;
            font-size: 14px;
        }

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

        .genre-label.active {
            background: #dcfce7;
            color: #166534;
        }

        .genre-label.active .genre-icon {
            color: #166534;
        }

        .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: 0;
            font-size: 13px;
            color: #475569;
            cursor: pointer;
            transition: background 0.15s;
            border-top: 1px solid #f1f5f9;
        }

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

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

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

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

        .company-item.active {
            background: #dcfce7;
            color: #166534;
            font-weight: 500;
        }

        /* 政令指定都市の区（ネストされたアコーディオン） */
        .city-item {
            border-top: 1px solid #f1f5f9;
        }

        .city-item > summary.city-label {
            list-style: none;
        }

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

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

        .city-label::before {
            content: '▶';
            font-size: 9px;
            color: #94a3b8;
            transition: transform 0.2s;
        }

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

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

        .city-name {
            flex: 1;
        }

        .ward-list {
            display: none;
            background: #f0fdf4;
        }

        .city-item[open] .ward-list {
            display: block;
        }

        .ward-item > a {
            padding-left: 52px;
        }

        /* メインエリア */
        .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: #f0fdf4;
            color: #16a34a;
            padding: 2px 8px;
            border-radius: 4px;
            cursor: pointer;
            transition: background 0.15s, color 0.15s;
        }

        .article-tag:hover {
            background: #16a34a;
            color: #fff;
        }

        /* ローディング */
        .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: #16a34a;
            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: #15803d;
        }

        .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-note {
            font-size: 10px;
            color: #64748b;
            line-height: 1.5;
            margin-bottom: 10px;
            word-break: break-word;
            overflow-wrap: anywhere;
        }

        .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;
        }
