:root {
    --primary-color: #004d99;
    --secondary-color: #f5f5f5;
    --border-color: #ddd;
    --text-color: #333;
    --hover-color: #0066cc;
}

body {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}




header {
    margin-bottom: 30px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 15px;
}

h1 {
    color: #333;
    font-size: 32px;
    line-height: 1.4;
    letter-spacing: 0.02em;
}

header h1 .title-sub {
    font-size: 18px;
    font-weight: 600;
    margin-left: 10px;
    color: #444;
    vertical-align: baseline;
}

.subtitle {
    color: #555;
    margin: 10px 0 0;
    font-size: 15px;
}

.lead {
    color: #222;
    margin: 24px 0 0;
    font-size: 18px;
    line-height: 1.8;
}

.controls {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 2px 2px 4px rgba(0.05, 0.05, 0, 0.05);
    margin-bottom: 20px;
}

#latest-meetings-area {
    margin-bottom: 20px;
}

.latest-title {
    font-size: 16px;
    color: #004d99;
    margin-bottom: 10px;
    border-bottom: 2px solid #eef4fb;
    padding-bottom: 5px;
}

.search-box {
    margin-bottom: 15px;
}

#searchInput {
    width: 100%;
    padding: 10px 40px 10px 10px;
    /* Add right padding for the button */
    font-size: 16px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-sizing: border-box;
}

.search-container {
    position: relative;
    width: 100%;
}

.btn-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 5px;
    display: none;
    /* Hidden by default */
}

.btn-clear:hover {
    color: var(--primary-color);
}

.filters {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
}

.filter-row {
    width: 100%;
}

select {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    max-width: 100%;
    /* Prevent dropdown from overflowing container */
    text-overflow: ellipsis;
    /* Add ellipsis for long text if supported */
}

.filter-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-reset {
    padding: 8px 16px;
    border: 1px solid var(--primary-color);
    background-color: white;
    color: var(--primary-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    font-size: 14px;
}

.btn-reset:hover {
    background-color: var(--primary-color);
    color: white;
}

.stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
    color: #666;
}

.table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 0;
}

th,
td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
    /* Align to top for multi-line content */
}

th {
    white-space: nowrap;
}

tr:hover {
    background-color: #f0f7ff;
}

/* Specific column styles */
.date-col {
    width: 10%;
    white-space: nowrap;
    font-size: 0.9em;
    color: #666;
}

.council-col {
    width: 20%;
    font-weight: bold;
    font-weight: 700;
    color: #444;
}

.council-link {
    cursor: pointer;
    color: #004d99;
    font-weight: 700;
}

.council-link:hover {
    text-decoration: underline;
    color: #0066cc;
}

.tags-col {
    width: 10%;
}

.meeting-content {
    width: 60%;
}

/* Meeting Title */
.meeting-title{
    margin-bottom: 10px;
    font-weight: bold;
    font-size: 1.1em;
    /* Larger title */
}

.meeting-title a {
    color: var(--primary-color);
    text-decoration: none;
}

.meeting-title a:hover {
    text-decoration: underline;
}

/* Document List */
.doc-list {
    margin: 0;
    padding-left: 20px;
    font-size: 0.95em;
}

.doc-list li {
    margin-bottom: 4px;
}

.doc-link {
    color: #333;
    text-decoration: none;
}

.doc-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.doc-text-only {
    color: #666;
    font-style: italic;
}

.no-docs {
    color: #999;
    font-style: italic;
    font-size: 0.9em;
    padding-left: 10px;
}

/* HotWords エリア */

#hotwords-area {
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    margin-top: -8px;
    margin-bottom: 12px;
    
    width: 100%;
}

#hotwords-area:empty {
    display: none;
}

.hotwords-label {
    font-size: 15px;
    color: #333;
    display: block;
    margin-bottom: 8px;
}

#hotwords-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;

    width: 95%;
    margin-left: 30px;
}

#hotwords-container:empty {
    display: none;
}

#hotwords-container + .hotwords-label {
    display: none;
}

.hotword-tag {
    display: inline-block;
    background: #eef4fb;
    color: #004d99;
    border: 1px solid #b3cde0;
    padding: 4px 14px;
    border-radius: 16px;
    font-size: 13px;
    text-decoration: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.hotword-tag:hover {
    background: #004d99;
    color: white;
    border-color: #004d99;
}

.tag {
    display: inline-block;
    background: #e1ecf4;
    color: #39739d;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-right: 5px;
    margin-bottom: 2px;
}

.badge-new {
    display: inline-block;
    background-color: #e60000;
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 8px;
    vertical-align: middle;
    box-shadow: 0 1px 3px rgba(230, 0, 0, 0.3);
}

.loading {
    text-align: center;
    color: #666;
    padding: 30px;
}

@media (max-width: 768px) {
    .meeting-title,
    .meeting-title a {
        font-size: 1rem;
        line-height: 1.5;
        font-weight: 600;
    }

    .council-col,
    .council-link {
        font-size: 1rem;
        line-height: 1.5;
        font-weight: 700;
    }
    .container {
        padding: 12px;
    }

    header {
        margin-bottom: 20px;
        padding-bottom: 12px;
    }

    h1 {
        font-size: 1.7rem;
        line-height: 1.3;
    }

    header h1 .title-sub {
        display: block;
        font-size: 1rem;
        margin-left: 0;
        margin-top: 4px;
    }

    .lead {
        font-size: 15px;
        line-height: 1.7;
        margin-top: 16px;
    }

    .controls {
        padding: 14px;
    }

    .filters {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .filter-group {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        width: 100%;
    }

    select,
    #searchInput,
    .btn-reset {
        width: 100%;
        box-sizing: border-box;
        min-height: 48px;
        font-size: 16px;
    }

    .stats {
        flex-direction: column;
        gap: 4px;
        line-height: 1.5;
    }

    .table-container {
        overflow-x: visible;
        background: transparent;
        box-shadow: none;
    }

    table {
        width: 100%;
        min-width: 0;
    }

    thead {
        display: none;
    }

    table,
    tbody,
    tr,
    td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    tr {
        background: white;
        margin-bottom: 14px;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
        padding: 12px;
    }

    tr:hover {
        background: white;
    }

    td {
        border-bottom: none;
        padding: 6px 4px;
    }

    .date-col,
    .council-col,
    .tags-col,
    .meeting-content {
        width: 100%;
        white-space: normal;
    }


    .doc-list {
        padding-left: 18px;
        font-size: 0.9em;
        line-height: 1.5;
    }

    .doc-list li {
        margin-bottom: 6px;
        line-height: 1.5;
    }

    .tag {
        margin-top: 2px;
        margin-bottom: 4px;
    }

    .pagination {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 20px 0;
        gap: 8px;
        flex-wrap: wrap;
    }

    .pagination button {
        padding: 8px 16px;
        border: 1px solid var(--primary-color);
        background-color: transparent;
        color: var(--primary-color);
        border-radius: 4px;
        cursor: pointer;
        transition: all 0.2s;
        flex: 1;
        min-width: 120px;
    }

    .pagination button:hover:not(:disabled) {
        background-color: var(--primary-color);
        color: white;
    }

    .pagination button:disabled {
        border-color: #ddd;
        color: #999;
        cursor: not-allowed;
    }

    .page-info {
        color: #666;
        font-weight: bold;
        width: 100%;
        text-align: center;
    }

     #hotwords-area {
        width: 100%;
    }

      #hotwords-container {
        width: 100%;
        margin-left: 0;
    }

}