.heat-alert-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px;
    color: #222;
}

.main-visual img {
    display: block;
    width: 100%;
    height: auto;
}

.heat-alert-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid #ddd;
}

.heat-tab-button {
    flex: 1;
    padding: 16px;
    border: none;
    background: #f3f3f3;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    transition: background 0.3s ease, color 0.3s ease;
}

.heat-tab-button:hover {
    background: #ececec;
}

.heat-tab-button.active {
    color: #fff;
    background: #f08a00;
}

.heat-tab-content {
    display: none;
}

.heat-tab-content.active {
    display: block;
}

.tab-title {
    margin: 0 0 24px;
    font-size: 24px;
    text-align: center;
}

.region-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
}

.region-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.region-button {
    width: 100%;
    padding: 18px 52px 18px 20px;
    border: none;
    background: #fff7ec;
    font-size: 18px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    position: relative;
}

.region-button:hover {
    background: #fff1de;
}

.region-button::after {
    content: "＋";
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
}

.region-card.open > .region-button::after {
    content: "－";
}

.region-name {
    display: inline-block;
}

.region-summary {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-left: 10px;
    vertical-align: middle;
}

.summary-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
}

.summary-special {
    color: #fff;
    background: #c40000;
}

.summary-warning {
    color: #fff;
    background: #f08a00;
}

.summary-none {
    color: #555;
    background: #eee;
}

.summary-unpublished {
    color: #8a4b00;
    background: #fff0d8;
    border: 1px solid #f3c078;
}

.region-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.region-panel-inner {
    padding: 14px;
    background: #fff;
}

.heat-alert-item-list {
    display: grid;
    gap: 10px;
}

.heat-alert-item {
    display: block;
    padding: 12px 14px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #ddd;
    color: inherit;
    text-decoration: none;
    transition: background .2s ease, box-shadow .2s ease;
}

.heat-alert-item:hover {
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0,0,0,.12);
}

.heat-alert-item.status-special {
    border-left: 6px solid #c40000;
    background: #fff5f5;
}

.heat-alert-item.status-warning {
    border-left: 6px solid #f08a00;
    background: #fffaf2;
}

.heat-alert-item.status-unpublished {
    border-left: 6px solid #999;
    background: #fafafa;
}

.heat-alert-item.status-none {
    border-left: 6px solid #ccc;
    background: #fff;
}

.heat-alert-item-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.heat-alert-name {
    color: #222;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
}

.alert-badge {
    flex-shrink: 0;
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
}

.badge-special {
    color: #fff;
    background: #c40000;
}

.badge-warning {
    color: #fff;
    background: #f08a00;
}

.badge-unpublished {
    color: #8a4b00;
    background: #fff0d8;
    border: 1px solid #f3c078;
}

.badge-none {
    color: #555;
    background: #eee;
}

.unpublished-message {
    margin: 8px 0 0;
    padding: 10px 12px;
    background: #fff8ec;
    border: 1px solid #f3c078;
    border-radius: 8px;
    color: #8a4b00;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.6;
}

.empty-message {
    padding: 16px;
    background: #fff;
    border-radius: 8px;
    color: #666;
    border: 1px solid #ddd;
}


/* =========================
   地図エリア
========================= */

.heat-map-wrap {
    max-width: 900px;
    padding: 24px;
    background: #fff;

    display: grid;
    grid-template-columns: 1fr;
}

.heat-alert-tabs {
    grid-row: 1;
}

.heat-map-title {
    grid-row: 2;

    margin: 0 0 15px;
    text-align: center;
    font-size: 24px;
    display: none;
}

#heat-alert-jpmap {
    grid-row: 3;
    grid-column: 1;

    width: min(800px, 100%);
    aspect-ratio: 2 / 1;
    margin: 0 auto;
    background-color: #d9ebff;
    overflow: hidden;
    padding: 15px;
}

#heat-alert-jpmap canvas {
    display: block;
    margin: 0 auto;
}


/* 地図上の凡例 */
.heat-map-legend {
    grid-row: 3;
    grid-column: 1;
    align-self: end;
    justify-self: end;
    margin-right: 65px;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 14px;
    font-weight: 700;
    z-index: 2;
}

.heat-map-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.heat-map-legend i {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.legend-special {
    background: #c40000;
}

.legend-warning {
    background: #f08a00;
}

.legend-unpublished {
    background: #fff0d8;
    border: 1px solid #f3c078;
}

.legend-none {
    background: #c0c0c0;
    border: 1px solid #9f9d9d;
}

.heat-map-message {
    max-width: 760px;
    margin: 0 auto;
}


/* =========================
   注意書き
========================= */

.alert-note {
    margin-top: 40px;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.8;
}

.alert-note a {
    color: #0066cc;
    text-decoration: underline;
}

.alert-note a:hover {
    text-decoration: none;
}

.source-note {
    margin-top: 14px;
    color: #555;
}
