/* 共通レイアウト */
/* body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	margin: 0;
	padding: 0;
	background: #f5f5f5;
	color: #222;
}

header {
	background: #1e3d73;
	color: #fff;
	padding: 16px 24px;
}

main {
	max-width: 1200px;
	margin: 0 auto;
	padding: 24px 16px 40px;
}

h1 {
	margin: 0;
	font-size: 1.6rem;
} */

.last-updated {
	font-size: 0.9rem;
	margin-top: 4px;
	opacity: 0.85;
}

section.region {
	background: #fff;
	margin-bottom: 24px;
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
	overflow: hidden;
}

section.region h2 {
	margin: 0;
	padding: 12px 16px;
	font-size: 1.2rem;
	background: #e8eef9;
	border-bottom: 1px solid #d4def0;
}

table.warning-table {
	width: 100%;
	border-collapse: collapse;
}

table.warning-table th,
table.warning-table td {
	border: 1px solid #dfe5ee;
	padding: 8px 10px;
	vertical-align: top;
}

table.warning-table th {
	background: #f0f4fb;
	text-align: center;
	white-space: nowrap;
}

td.area-name {
	font-weight: 600;
	width: 50%;
	max-width: none;
	word-break: break-word;
}

td.area-name small {
	display: block;
	font-weight: normal;
	color: #666;
	margin-top: 4px;
	font-size: 0.8rem;
	line-height: 1.4;
	max-width: 100%;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	text-overflow: ellipsis;
}

td.warning-cell {
	width: 50%;
}

.warning-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
}

.badge {
	display: inline-flex;
	align-items: center;
	padding: 4px 8px;
	border-radius: 6px;
	font-size: 0.85rem;
	font-weight: 600;
	line-height: 1.2;
}

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

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

.badge-advisory {
	background: #ffe169;
	color: #222;
}

.badge.badge-none,
.no-warning {
	font-size: 0.75rem;
	color: #666;
}

.muted {
	color: #777;
}

.error-message {
	color: #d93025;
	font-size: 0.9rem;
}

.notice {
	background: #fff9c4;
	border: 1px solid #f0e68c;
	color: #8a6d3b;
	padding: 8px 12px;
	border-radius: 4px;
	margin-bottom: 16px;
}

.global-warning {
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
	padding: 20px 24px;
	margin-bottom: 28px;
}

.global-warning h2 {
	margin: 0 0 16px 0;
	font-size: 1.25rem;
	display: flex;
	align-items: center;
	gap: 12px;
}

.global-warning h2 small {
	font-size: 0.8rem;
	color: #666;
	font-weight: 400;
}

.warning-overview {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.region-line {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.region-line .region-name {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	font-weight: 600;
	min-width: 72px;
}

.region-line .region-prefs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	flex: 1 1 auto;
	align-items: center;
}

.pref-chip {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 6px 10px;
	border-radius: 999px;
	text-decoration: none;
	color: inherit;
	background: #f6f8fc;
	box-shadow: inset 0 0 0 1px rgba(30, 61, 115, 0.06);
	font-size: 0.9rem;
	line-height: 1;
}

.pref-chip.level-none {
	box-shadow: inset 0 0 0 1px rgba(30, 61, 115, 0.12);
}

.pref-chip.level-special {
	box-shadow: inset 0 0 0 2px #000;
}

.pref-chip.level-warning {
	box-shadow: inset 0 0 0 2px #d93025;
}

.pref-chip.level-advisory {
	box-shadow: inset 0 0 0 2px #ffe169;
}

.pref-chip .chip-label {
	font-weight: 600;
}

.global-warning.is-loading,
.region.is-loading {
	min-height: 160px;
	opacity: 0.85;
}

.bk-overview-root {
	position: relative;
	min-height: 160px;
	display: block;
}

.bk-overview-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 160px;
	color: #5a6a85;
	font-size: 0.95rem;
	gap: 8px;
}

.bk-overview-loading::before {
	content: "";
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 3px solid #bac3d4;
	border-top-color: #1e3d73;
	animation: bk-spin 1s linear infinite;
}

.bk-overview-error {
	padding: 12px;
	background: #fdecea;
	border: 1px solid #f5c6cb;
	color: #8a1c1c;
	border-radius: 6px;
	font-size: 0.9rem;
}

.bk-overview-fallback {
	border: 0;
	width: 100%;
	min-height: 640px;
}

@keyframes bk-spin {
	to {
		transform: rotate(360deg);
	}
}

.tsunami-warning {
	background: #fff;
	margin-top: 32px;
	padding: 20px;
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.tsunami-warning h2 {
	margin-top: 0;
}

.tsunami-headline {
	margin: 0 0 8px 0;
	font-weight: 600;
	color: #d93025;
	white-space: pre-wrap;
}

.tsunami-updated {
	margin: 0 0 12px 0;
	font-size: 0.9rem;
	color: #5a6a85;
}

.tsunami-table {
	width: 100%;
	border-collapse: collapse;
}

.tsunami-table th,
.tsunami-table td {
	border: 1px solid #dfe5ee;
	padding: 8px 10px;
}

.tsunami-table th {
	background: #f0f4fb;
	white-space: nowrap;
}

.tsunami-badge {
	display: inline-flex;
	align-items: center;
	padding: 4px 8px;
	border-radius: 999px;
	font-weight: 600;
	font-size: 0.85rem;
	color: #fff;
}

.tsunami-badge.badge-特別警報 {
	background: #000;
}

.tsunami-badge.badge-警報 {
	background: #d93025;
}

.tsunami-badge.badge-注意報 {
	background: #f1c40f;
	color: #333;
}

.tsunami-badge.badge-観測 {
	background: #2c7be5;
}

.tsunami-badge.badge-observation {
	background: #6c757d;
	color: #fff;
}

.tsunami-detail-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 16px;
}

.tsunami-detail-table th,
.tsunami-detail-table td {
	border: 1px solid #dfe5ee;
	padding: 8px 10px;
	vertical-align: top;
}

.tsunami-detail-table th {
	background: #f0f4fb;
}

.tsunami-detail-table td small {
	color: #5a6a85;
	display: block;
	line-height: 1.3;
}

footer {
	font-size: 0.85rem;
	color: #666;
	padding: 16px 0 24px;
}

footer a {
	color: inherit;
}

footer a:hover {
	text-decoration: underline;
}

/* pref.php 専用スタイル */
.summary {
	background: #fff;
	border-radius: 8px;
	padding: 16px 20px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
	margin-bottom: 20px;
}

.summary p {
	margin: 0 0 8px 0;
}

.summary .headline {
	font-weight: bold;
	color: #d93025;
}

.back-link {
	display: inline-block;
	margin-bottom: 16px;
	text-decoration: none;
	color: #1e3d73;
	font-weight: 600;
}

.back-link:hover {
	text-decoration: underline;
}

.table-wrapper {
	overflow-x: auto;
}

.category-cell.special {
	background: #f8d7da;
}

.category-cell.warning {
	background: #fff3cd;
}

.category-cell.advisory {
	background: #d4edda;
}

.category-cell.none {
	text-align: center;
}

.category-cell.special::before {
	content: "🚨 ";
}

.category-cell.warning::before {
	content: "⚠️ ";
}

.category-cell.advisory::before {
	content: "ℹ️ ";
}

.filter-panel {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	margin: 12px 0 16px 0;
	font-size: 0.9rem;
}

.filter-panel label {
	display: flex;
	align-items: center;
	gap: 4px;
}

.status-badge {
	display: inline-block;
	margin-left: 6px;
	padding: 2px 8px;
	border-radius: 12px;
	font-size: 0.72rem;
	color: #fff;
	font-weight: 600;
}

.status-special {
	background: #a30000;
}

.status-warning {
	background: #d9534f;
}

.status-advisory {
	background: #0f8244;
}

.timeline-section {
	background: #fff;
	border-radius: 8px;
	padding: 16px 20px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
	margin-bottom: 24px;
}

.timeline-title {
	margin: 0 0 12px 0;
	font-size: 1.1rem;
	font-weight: 600;
	color: #1e3d73;
}

.timeline-table-wrapper {
	overflow-x: auto;
}

table.timeline-table {
	border-collapse: collapse;
	min-width: 720px;
	width: 100%;
}

table.timeline-table th,
table.timeline-table td {
	border: 1px solid #dfe5ee;
	padding: 6px 8px;
	text-align: center;
	font-size: 0.85rem;
}

table.timeline-table th {
	background: #f0f4fb;
	position: sticky;
	top: 0;
}

td.timeline-label {
	text-align: left;
	font-weight: 600;
	min-width: 180px;
}

.timeline-cell {
	font-weight: 600;
	color: #fff;
	border-radius: 4px;
}

.timeline-cell.level-50 {
	background: #a30000;
}

.timeline-cell.level-40 {
	background: #d9534f;
}

.timeline-cell.level-30 {
	background: #f0ad4e;
	color: #44280f;
}

.timeline-cell.level-20 {
	background: #ffd966;
	color: #5c3c00;
}

.timeline-cell.level-10 {
	background: #fff3cd;
	color: #5c3c00;
}

.timeline-cell.level-0 {
	background: #f8f9fa;
	color: #555;
}

.timeline-cell .value {
	display: inline-block;
	min-width: 24px;
}

.continue-tag {
	display: inline-block;
	margin-left: 6px;
	padding: 2px 6px;
	background: #1e3d73;
	color: #fff;
	border-radius: 12px;
	font-size: 0.7rem;
	vertical-align: middle;
}

.property-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 12px;
	margin-top: 16px;
}

.property-card {
	background: #fff;
	border-radius: 8px;
	padding: 12px 14px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.property-card h3 {
	margin: 0 0 8px 0;
	font-size: 1rem;
	color: #1e3d73;
}

.property-card ul {
	margin: 0;
	padding-left: 18px;
	color: #444;
}

.property-card li {
	margin: 4px 0;
}

.region-table .area-major {
	background: #f8faff;
	font-weight: 600;
	min-width: 110px;
	vertical-align: top;
}

.region-table .area-middle {
	background: #f0f4fb;
	font-weight: 600;
	min-width: 110px;
	vertical-align: top;
}

.region-table .area-city {
	min-width: 160px;
}

.badge-group {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	align-items: center;
}

.badge-group .badge {
	padding: 2px 6px;
	border-radius: 4px;
	font-size: 0.78rem;
}

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

@media (max-width: 768px) {
	main {
		padding: 20px 12px 32px;
	}

	.global-warning {
		padding: 16px;
	}

	.pref-chip {
		font-size: 0.85rem;
		padding: 5px 9px;
	}

	table.warning-table th,
	table.warning-table td {
		font-size: 0.85rem;
	}

	.timeline-table {
		font-size: 0.8rem;
	}

	.property-grid {
		grid-template-columns: 1fr;
	}
}