* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        "Microsoft YaHei",
        sans-serif;

    background: #f5f7fa;
    color: #1f2937;
}

.container {
    width: min(1240px, 94%);
    margin: 30px auto;
}

.title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 6px;
}

.subtitle {
    color: #6b7280;
    margin-bottom: 14px;
}

.monitoring-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    width: fit-content;
    max-width: 100%;
    margin: 8px auto 0;
    padding: 9px 15px;
    border: 1px solid rgba(16, 185, 129, 0.18);
    border-radius: 999px;

    background: rgba(236, 253, 245, 0.76);
    color: #047857;

    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
}

.monitoring-status.is-loading {
    border-color: #e5e7eb;
    background: #f9fafb;
    color: #6b7280;
}

.monitoring-status.is-unavailable {
    border-color: #fee2e2;
    background: #fef2f2;
    color: #b91c1c;
}

.monitoring-status.has-pending {
    border-color: #fde68a;
    background: #fffbeb;
    color: #b45309;
}

.monitoring-dot {
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.monitoring-status.is-loading .monitoring-dot {
    animation: monitoring-pulse 1.2s ease-in-out infinite;
    box-shadow: none;
}

.monitoring-status.is-unavailable .monitoring-dot,
.monitoring-status.has-pending .monitoring-dot {
    box-shadow: none;
}

@keyframes monitoring-pulse {
    50% {
        opacity: 0.35;
    }
}

.city-overview {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(150px, 1fr));

    gap: 12px;
    margin-bottom: 24px;
}

.city-card {
    background: white;
    border-radius: 16px;
    padding: 16px;
    cursor: pointer;

    border: 2px solid transparent;

    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.05);

    transition: 0.2s;
}

.city-card:hover {
    transform: translateY(-2px);
}

.city-card.active {
    border-color: #2563eb;
}

.city-card.has-alert:not(.active) {
    border-color: rgba(239, 68, 68, 0.35);
}

.city-card:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.25);
    outline-offset: 2px;
}

.city-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 24px;
}

.city-alert-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    flex: 0 0 auto;

    padding: 3px 8px;
    border-radius: 999px;

    background: #ef4444;
    color: white;

    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;

    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.22);
}

.city-name {
    font-weight: 600;
}

.city-temp {
    margin-top: 10px;
    font-size: 26px;
    font-weight: 700;
}

.city-weather {
    color: #6b7280;
    margin-top: 4px;
}

.city-weather-icon {
    margin-top: 10px;
    font-size: 32px;
    line-height: 1;
}

.push-center {
    margin-bottom: 24px;
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;

    background: white;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
}

.push-center-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.push-center h2 {
    margin: 0;
    font-size: 18px;
}

.push-center-header p {
    margin: 6px 0 0;
    color: #6b7280;
    font-size: 13px;
}

.test-push-button {
    flex: 0 0 auto;
    padding: 9px 14px;
    border: 0;
    border-radius: 10px;

    background: #2563eb;
    color: white;
    cursor: pointer;

    font: inherit;
    font-size: 13px;
    font-weight: 700;
}

.test-push-button:hover:not(:disabled) {
    background: #1d4ed8;
}

.test-push-button:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
}

.push-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.push-metric {
    min-height: 66px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f8fafc;
}

.push-metric-label {
    color: #64748b;
    font-size: 12px;
}

.push-metric-value {
    margin-top: 5px;
    font-size: 20px;
    font-weight: 750;
}

.push-metric-value.pending {
    color: #b45309;
}

.push-metric-value.sent {
    color: #047857;
}

.push-metric-value.failed {
    color: #b91c1c;
}

.push-metric.skeleton {
    min-height: 66px;
    background: linear-gradient(90deg, #f1f5f9, #f8fafc, #f1f5f9);
    background-size: 200% 100%;
    animation: push-skeleton 1.3s linear infinite;
}

@keyframes push-skeleton {
    to {
        background-position: -200% 0;
    }
}

.recent-pushes {
    margin-top: 14px;
    color: #6b7280;
    font-size: 13px;
}

.push-record {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-top: 1px solid #f1f5f9;
}

.push-record-message {
    min-width: 0;
    color: #334155;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.push-record-time {
    color: #94a3b8;
    font-size: 12px;
}

.push-status-badge {
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.push-status-sent {
    background: #d1fae5;
    color: #047857;
}

.push-status-failed {
    background: #fee2e2;
    color: #b91c1c;
}

.push-status-pending,
.push-status-retrying,
.push-status-sending {
    background: #fef3c7;
    color: #b45309;
}

.weather-panel {
    position: relative;
    background: transparent;
    padding: 0;
    box-shadow: none;
}

.weather-panel.is-loading > * {
    opacity: 0.58;
    pointer-events: none;
}

.weather-panel.is-loading::after {
    content: "";
    position: absolute;
    z-index: 10;
    top: 22px;
    right: 22px;

    width: 24px;
    height: 24px;
    border: 3px solid rgba(37, 99, 235, 0.2);
    border-top-color: #2563eb;
    border-radius: 50%;

    animation: loading-spin 0.8s linear infinite;
}

.current-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    margin-bottom: 20px;
}

.current-city {
    font-size: 24px;
    font-weight: 700;
}

.current-temp {
    font-size: 58px;
    font-weight: 700;
    margin-top: 10px;
}

.current-weather {
    font-size: 20px;
    color: #6b7280;
}

.current-weather-icon {
    margin-top: 12px;
    font-size: 64px;
    line-height: 1;
}

.update-time {
    display: flex;
    align-items: center;
    gap: 6px;

    color: #9ca3af;
    font-size: 14px;
}

.update-time strong {
    font-weight: 600;
}

.metrics {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(130px, 1fr));

    gap: 12px;
    margin-bottom: 26px;
}

.metric {
    background: #f8fafc;
    border-radius: 12px;
    padding: 14px;
}

.metric-label {
    color: #6b7280;
    font-size: 13px;
}

.metric-value {
    font-size: 18px;
    font-weight: 600;
    margin-top: 5px;
}

.section {
    margin-top: 28px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 14px;
}

.hour-item {
    min-width: 92px;

    background: #f8fafc;
    border-radius: 14px;
    padding: 12px;

    text-align: center;
}

.hour-time {
    color: #6b7280;
    font-size: 13px;
}

.hour-weather {
    font-size: 13px;
}

.precipitation {
    background: #eff6ff;
    padding: 16px;
    border-radius: 14px;
}

.alert-normal {
    background: #ecfdf5;
    padding: 16px;
    border-radius: 14px;
}

.alert-warning {
    background: #fff7ed;
    padding: 16px;
    border-radius: 14px;
}

.loading,
.loading-state {
    padding: 40px;
    text-align: center;
    color: #6b7280;
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;

    background: white;
    border-radius: 18px;
}

.loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #dbeafe;
    border-top-color: #2563eb;
    border-radius: 50%;

    animation: loading-spin 0.8s linear infinite;
}

.error-state {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;

    padding: 22px;
    border: 1px solid #fecaca;
    border-radius: 18px;

    background: #fff7f7;
    color: #7f1d1d;
}

.error-icon {
    display: grid;
    place-items: center;

    width: 34px;
    height: 34px;
    border-radius: 50%;

    background: #ef4444;
    color: white;
    font-size: 20px;
    font-weight: 800;
}

.error-title {
    font-weight: 700;
}

.error-message {
    margin-top: 4px;
    color: #991b1b;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.retry-button {
    padding: 9px 14px;
    border: 0;
    border-radius: 10px;

    background: #dc2626;
    color: white;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

.retry-button:hover {
    background: #b91c1c;
}

.retry-button:focus-visible {
    outline: 3px solid rgba(220, 38, 38, 0.25);
    outline-offset: 2px;
}

@keyframes loading-spin {
    to {
        transform: rotate(360deg);
    }
}
.weather-panel {
    transition:
        background 0.4s ease,
        color 0.4s ease;
}

.weather-sunny {
    background:
        linear-gradient(
            135deg,
            #60a5fa,
            #fbbf24
        );
    color: white;
}

.weather-cloudy {
    background:
        linear-gradient(
            135deg,
            #64748b,
            #cbd5e1
        );
    color: white;
}

.weather-rain {
    background:
        linear-gradient(
            135deg,
            #334155,
            #3b82f6
        );
    color: white;
}

.weather-thunder {
    background:
        linear-gradient(
            135deg,
            #312e81,
            #475569
        );
    color: white;
}

.weather-fog {
    background:
        linear-gradient(
            135deg,
            #94a3b8,
            #e2e8f0
        );
}

.weather-default {
    background: white;
}

.hero {
    border-radius: 18px;
    padding: 22px;
    margin-bottom: 22px;
}

.weather-panel[class*="weather-"]
.current-weather,
.weather-panel[class*="weather-"]
.update-time {
    color: inherit;
}

.alert-banner {
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 18px;
    font-weight: 600;
}

.alert-red {
    background: #fee2e2;
    color: #991b1b;
}

.alert-orange {
    background: #ffedd5;
    color: #9a3412;
}

.alert-yellow {
    background: #fef9c3;
    color: #854d0e;
}

.alert-blue {
    background: #dbeafe;
    color: #1e40af;
}

.alert-default {
    background: #fff7ed;
    color: #9a3412;
}
/* 白色内容卡片始终使用深色文字 */
.metric,
.hour-item,
.precipitation,
.alert-normal {
    color: #1f2937;
}

/* 指标标题 */
.metric-label {
    color: #6b7280;
}

/* 指标数值 */
.metric-value {
    color: #1f2937;
}

/* 小时天气文字 */
.hour-time,
.hour-weather {
    color: #374151;
}

/* 顶部当前天气区域 */
.weather-hero {
    border-radius: 22px;
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
    transition: background 0.4s ease;
}

/* 顶部天气区域中的文字 */
.weather-hero .current-city,
.weather-hero .current-temp,
.weather-hero .current-weather,
.weather-hero .update-time {
    color: white;
}

/* 顶部指标卡改成半透明 */
.weather-hero .metric {
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
}

.weather-hero .metric-label {
    color: rgba(255, 255, 255, 0.8);
}

.weather-hero .metric-value {
    color: white;
}

/* 下方内容统一浅色 */
.weather-content {
    background: #eef2f7;
    border-radius: 22px;
    padding: 24px;
    color: #1f2937;
}

/* 下方每个模块标题始终深色 */
.weather-content .section-title {
    color: #1f2937;
}

/* 降水信息 */
.weather-content .precipitation {
    color: #1f2937;
}

/* 小时卡片 */
.weather-content .hour-item {
    background: white;
    color: #1f2937;
}

.hourly-combined {
    margin-top: 14px;
    overflow-x: auto;
    overflow-y: hidden;

    background: white;
    border-radius: 16px;

    padding: 16px 12px 12px;
}

.hourly-track {
    position: relative;
}

.hourly-chart {
    display: block;
}

.hourly-cards-row {
    display: flex;
    gap: 0;
}

.hourly-combined .hour-item {
    flex: 0 0 90px;
    min-width: 90px;

    margin: 0;

    border-radius: 0;

    background: transparent;

    padding: 10px 6px 14px;

    text-align: center;

    border-right: 1px solid #eef2f7;
}

.hourly-combined .hour-item:last-child {
    border-right: none;
}

.province-map-section {
    margin-bottom: 24px;
    padding: 24px;
    border: 1px solid #dbe4ee;
    border-radius: 24px;
    background:
        radial-gradient(circle at 15% 0%, rgba(56, 189, 248, 0.14), transparent 34%),
        linear-gradient(145deg, #ffffff, #f8fbff);
    box-shadow: 0 16px 45px rgba(15, 23, 42, 0.08);
}

.section-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.section-heading-row h1 {
    margin: 4px 0 6px;
    color: #0f172a;
    font-size: clamp(22px, 3vw, 31px);
    line-height: 1.2;
}

.section-heading-row p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

.eyebrow {
    display: block;
    color: #0284c7;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.map-update-time {
    flex: 0 0 auto;
    padding: 8px 12px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 12px;
    font-weight: 700;
}

.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 20px 0 16px;
}

.category-filter {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 13px;
    border: 1px solid #dbe4ee;
    border-radius: 999px;
    background: white;
    color: #475569;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    transition: 0.18s ease;
}

.category-filter:hover,
.category-filter:focus-visible {
    border-color: #38bdf8;
    outline: none;
    transform: translateY(-1px);
}

.category-filter.active {
    border-color: #0284c7;
    background: #0284c7;
    color: white;
    box-shadow: 0 7px 18px rgba(2, 132, 199, 0.22);
}

.category-filter-count {
    display: grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.15);
    font-size: 11px;
}

.category-filter.active .category-filter-count {
    background: rgba(255, 255, 255, 0.2);
}

.map-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 2.25fr) minmax(250px, 0.75fr);
    gap: 16px;
}

.map-card,
.category-panel {
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    background: white;
}

.map-card {
    position: relative;
    overflow: hidden;
    background: #edf3f4;
}

.map-scroll {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.map-scroll::-webkit-scrollbar {
    display: none;
}

.guangdong-map {
    position: relative;
    min-width: 900px;
    aspect-ratio: 920 / 570;
    overflow: hidden;
    background:
        radial-gradient(circle at 14% 14%, rgba(255, 255, 255, 0.98), transparent 24%),
        radial-gradient(circle at 86% 18%, rgba(183, 215, 221, 0.4), transparent 30%),
        linear-gradient(165deg, #f8fbfb 0%, #e6eff1 48%, #d9e9ec 100%);
    isolation: isolate;
}

.guangdong-map::before {
    position: absolute;
    z-index: 0;
    inset: 0;
    background-image:
        linear-gradient(rgba(100, 116, 139, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(100, 116, 139, 0.04) 1px, transparent 1px);
    background-size: 58px 58px;
    content: "";
    mask-image: linear-gradient(180deg, black, rgba(0, 0, 0, 0.15));
    pointer-events: none;
}

.guangdong-map.is-loading {
    display: grid;
    place-items: center;
}

.map-loading {
    color: #64748b;
    font-size: 14px;
}

.province-shape {
    position: absolute;
    z-index: 0;
    inset: 3% 2% 2%;
    width: 96%;
    height: 95%;
    filter: drop-shadow(0 18px 26px rgba(51, 65, 85, 0.12));
}

.province-outline {
    fill: url(#provinceGradient);
    fill-opacity: 0.78;
    stroke: rgba(100, 116, 139, 0.46);
    stroke-width: 2;
    stroke-linejoin: round;
}

.province-boundary {
    fill: none;
    stroke: rgba(100, 116, 139, 0.26);
    stroke-width: 1.35;
}

.province-river {
    fill: none;
    stroke: rgba(255, 255, 255, 0.92);
    stroke-width: 2.4;
}

.map-water-label {
    fill: rgba(71, 113, 128, 0.48);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.35em;
}

.weather-field {
    position: absolute;
    z-index: 1;
    left: var(--field-x);
    top: var(--field-y);
    width: 20%;
    aspect-ratio: 1.38;
    border-radius: 46% 54% 58% 42% / 52% 45% 55% 48%;
    opacity: var(--field-opacity);
    filter: blur(24px) saturate(1.14);
    mix-blend-mode: multiply;
    transform: translate(-50%, -50%) scale(var(--field-scale));
    transition: opacity 0.24s ease, filter 0.24s ease;
    pointer-events: none;
}

.weather-field.category-rain {
    background:
        radial-gradient(circle at 52% 45%, rgba(110, 68, 232, 0.9) 0 18%, transparent 52%),
        radial-gradient(circle at 42% 52%, rgba(43, 126, 243, 0.94) 0 32%, rgba(77, 185, 245, 0.5) 62%, transparent 78%);
    box-shadow: 0 0 48px rgba(59, 130, 246, 0.5);
}

.weather-field.category-cloudy {
    background:
        radial-gradient(circle at 45% 45%, rgba(197, 214, 219, 0.92) 0 28%, transparent 70%),
        radial-gradient(circle at 62% 58%, rgba(111, 163, 183, 0.58), transparent 68%);
    box-shadow: 0 0 42px rgba(100, 146, 165, 0.28);
}

.weather-field.category-sunny {
    background:
        radial-gradient(circle, rgba(255, 238, 98, 0.96) 0 20%, rgba(250, 186, 71, 0.72) 42%, rgba(255, 210, 92, 0.16) 70%, transparent 78%);
    box-shadow: 0 0 54px rgba(250, 204, 21, 0.48);
}

.weather-field.category-other {
    background:
        radial-gradient(circle, rgba(165, 123, 213, 0.68), rgba(109, 187, 191, 0.32) 54%, transparent 76%);
}

.weather-field.is-muted {
    opacity: 0.055;
    filter: blur(28px) grayscale(0.8);
}

.map-layer-title {
    position: absolute;
    z-index: 4;
    top: 18px;
    left: 18px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 16px;
    background: rgba(247, 250, 251, 0.72);
    color: #17202b;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.1);
    backdrop-filter: blur(18px) saturate(1.3);
    pointer-events: none;
}

.map-layer-title strong,
.map-layer-title small {
    display: block;
}

.map-layer-title strong {
    font-size: 13px;
}

.map-layer-title small {
    margin-top: 2px;
    color: #64748b;
    font-size: 10px;
}

.map-layer-pulse {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #3b82f6;
    box-shadow: 0 0 0 5px rgba(59, 130, 246, 0.14);
}

.map-city-marker {
    position: absolute;
    z-index: 3;
    left: var(--map-x);
    top: var(--map-y);
    display: grid;
    grid-template-columns: 8px auto;
    grid-template-areas:
        "point city"
        ". weather"
        ". power";
    align-items: center;
    column-gap: 6px;
    min-width: 78px;
    padding: 3px;
    border: 0;
    background: transparent;
    color: #0f172a;
    cursor: pointer;
    font: inherit;
    line-height: 1.08;
    text-align: left;
    transform: translate(-50%, -50%);
    filter: drop-shadow(0 2px 2px rgba(255, 255, 255, 0.95));
    transition: opacity 0.18s ease, transform 0.18s ease, filter 0.18s ease;
}

.map-city-marker:hover,
.map-city-marker:focus-visible,
.map-city-marker.active {
    z-index: 5;
    outline: none;
    transform: translate(-50%, -50%) scale(1.08);
    filter: drop-shadow(0 7px 8px rgba(15, 23, 42, 0.2));
}

.map-city-marker.active {
    z-index: 6;
}

.map-city-marker.is-muted {
    z-index: 1;
    opacity: 0.18;
    filter: grayscale(0.75);
}

.map-marker-point {
    grid-area: point;
    width: 7px;
    height: 7px;
    border: 1.5px solid rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    background: #17202b;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.35);
}

.map-marker-city {
    grid-area: city;
    color: #111827;
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
    text-shadow:
        -1px -1px 0 rgba(255, 255, 255, 0.95),
        1px -1px 0 rgba(255, 255, 255, 0.95),
        -1px 1px 0 rgba(255, 255, 255, 0.95),
        1px 1px 0 rgba(255, 255, 255, 0.95),
        0 2px 4px rgba(255, 255, 255, 0.9);
}

.map-marker-weather {
    grid-area: weather;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    width: fit-content;
    margin-top: 3px;
    padding: 3px 6px;
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 999px;
    background: rgba(248, 250, 252, 0.76);
    color: #334155;
    font-size: 9px;
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.1);
    backdrop-filter: blur(12px) saturate(1.25);
}

.map-marker-icon {
    font-size: 12px;
}

.map-marker-temperature {
    font-weight: 900;
}

.map-marker-condition {
    color: #64748b;
}

.map-marker-power {
    grid-area: power;
    width: fit-content;
    margin-top: 2px;
    padding: 2px 5px;
    border-radius: 999px;
    background: rgba(240, 253, 250, 0.68);
    color: #0f766e;
    font-size: 7.5px;
    font-weight: 800;
    white-space: nowrap;
    backdrop-filter: blur(10px);
}

.map-city-marker.active .map-marker-point {
    background: #ef4444;
    box-shadow: 0 0 0 3px white, 0 0 0 5px rgba(239, 68, 68, 0.62);
}

.map-city-marker.active .map-marker-city {
    font-size: 16px;
}

.map-city-marker.active .map-marker-weather {
    border-color: rgba(255, 255, 255, 0.92);
    background: rgba(51, 65, 85, 0.92);
    color: white;
    box-shadow: 0 5px 16px rgba(15, 23, 42, 0.25);
}

.map-city-marker.active .map-marker-condition {
    color: #e2e8f0;
}

.map-legend {
    position: absolute;
    z-index: 8;
    bottom: 16px;
    left: 16px;
    display: grid;
    gap: 8px;
    width: 150px;
    padding: 13px 14px;
    border: 1px solid rgba(255, 255, 255, 0.76);
    border-radius: 18px;
    background: rgba(246, 250, 251, 0.76);
    color: #475569;
    font-size: 11px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.13);
    backdrop-filter: blur(18px) saturate(1.3);
    pointer-events: none;
}

.map-legend strong {
    margin-bottom: 2px;
    color: #111827;
    font-size: 13px;
}

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

.legend-dot {
    width: 24px;
    height: 7px;
    border-radius: 50%;
    filter: saturate(1.12);
}

.legend-dot.category-rain { background: linear-gradient(90deg, #38bdf8, #3b82f6, #8b5cf6); }
.legend-dot.category-cloudy { background: linear-gradient(90deg, #dbe7eb, #7fa5b4); }
.legend-dot.category-sunny { background: linear-gradient(90deg, #fde047, #f59e0b); }
.legend-dot.category-other { background: linear-gradient(90deg, #67b7b5, #a78bfa); }

.map-tools {
    position: absolute;
    z-index: 8;
    top: 16px;
    right: 16px;
}

.map-tool-button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 11px;
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 999px;
    background: rgba(247, 250, 251, 0.8);
    color: #1f2937;
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    font-weight: 800;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(18px) saturate(1.3);
}

.map-tool-button:hover,
.map-tool-button:focus-visible {
    outline: none;
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-1px);
}

.map-tool-icon {
    font-size: 18px;
    line-height: 1;
}

.category-panel {
    padding: 18px;
}

.category-panel-title {
    margin-bottom: 12px;
    color: #0f172a;
    font-size: 16px;
    font-weight: 800;
}

.category-group + .category-group {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eef2f7;
}

.category-group-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
}

.category-city-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.category-city-chip {
    padding: 5px 8px;
    border: 0;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    cursor: pointer;
    font: inherit;
    font-size: 11px;
}

.category-city-chip:hover,
.category-city-chip.active {
    background: #dbeafe;
    color: #1d4ed8;
}

.category-empty {
    color: #94a3b8;
    font-size: 12px;
}

.city-detail-card {
    margin-bottom: 24px;
    border: 1px solid #dbe4ee;
    border-radius: 22px;
    background: white;
    box-shadow: 0 10px 32px rgba(15, 23, 42, 0.07);
    overflow: hidden;
}

.city-detail-card > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    cursor: pointer;
    list-style: none;
    background: linear-gradient(90deg, #f8fbff, #ffffff);
}

.city-detail-card > summary::-webkit-details-marker {
    display: none;
}

.city-detail-card > summary strong {
    display: block;
    margin-top: 4px;
    color: #0f172a;
    font-size: 18px;
}

.detail-toggle-hint {
    color: #64748b;
    font-size: 12px;
}

.city-detail-card[open] .detail-toggle-hint::before {
    content: "收起 · ";
}

.city-detail-card:not([open]) .detail-toggle-hint::before {
    content: "展开 · ";
}

.city-detail-body {
    padding: 0 22px 22px;
}

.city-switcher {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 -22px 18px;
    padding: 12px 22px;
    border-top: 1px solid #eef2f7;
    border-bottom: 1px solid #eef2f7;
    background: #fbfdff;
}

.city-switcher label {
    color: #475569;
    font-size: 13px;
    font-weight: 700;
}

.city-switcher select {
    min-width: 150px;
    padding: 8px 34px 8px 11px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: white;
    color: #0f172a;
    font: inherit;
    font-size: 13px;
}

.power-market-section,
.rain-analysis-section {
    margin-bottom: 24px;
    padding: 24px;
    border: 1px solid #dbe4ee;
    border-radius: 24px;
    background: white;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.06);
}

.section-heading-row.compact h1,
.rain-analysis-section h1,
.power-market-section h1 {
    margin: 4px 0 6px;
    color: #0f172a;
    font-size: clamp(21px, 2.7vw, 29px);
}

.power-market-overview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.power-signal-card {
    min-height: 132px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #f8fafc;
}

.power-signal-card.tone-heat { background: #fff7ed; border-color: #fed7aa; }
.power-signal-card.tone-solar { background: #fffbeb; border-color: #fde68a; }
.power-signal-card.tone-wind { background: #ecfeff; border-color: #a5f3fc; }
.power-signal-card.tone-risk { background: #fef2f2; border-color: #fecaca; }

.power-signal-heading {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
}

.power-signal-heading strong {
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    font-size: 11px;
}

.power-signal-cities {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 13px;
}

.power-signal-cities button,
.rain-process-city {
    padding: 5px 8px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    color: #334155;
    cursor: pointer;
    font: inherit;
    font-size: 11px;
}

.power-signal-cities button:hover,
.rain-process-city:hover {
    border-color: #0ea5e9;
    color: #0369a1;
}

.signal-empty {
    color: #94a3b8;
    font-size: 12px;
}

.rain-process-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.rain-process-group {
    min-height: 118px;
    padding: 15px;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    background: #f8fbff;
}

.rain-process-group.process-continuous { background: #eff6ff; border-color: #93c5fd; }
.rain-process-group.process-stopping { background: #f0f9ff; border-color: #bae6fd; }
.rain-process-group.process-starting { background: #eef2ff; border-color: #c7d2fe; }
.rain-process-group.process-intermittent { background: #faf5ff; border-color: #e9d5ff; }
.rain-process-group.process-no_rain { background: #f8fafc; border-color: #e2e8f0; }

.rain-process-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #1e293b;
    font-size: 13px;
    font-weight: 800;
}

.rain-process-heading strong {
    color: #64748b;
    font-size: 11px;
}

.rain-process-city-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 11px;
}

.rain-process-city {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 9px;
}

.rain-process-city span {
    color: #64748b;
    font-size: 10px;
}

.power-weather-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.energy-signal-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.energy-signal {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: white;
}

.energy-signal-label {
    color: #64748b;
    font-size: 12px;
}

.energy-signal strong {
    color: #0f172a;
    font-size: 23px;
}

.energy-signal span {
    color: #64748b;
    font-size: 11px;
}

.energy-signal.signal-heat { border-top: 4px solid #f97316; }
.energy-signal.signal-solar { border-top: 4px solid #f59e0b; }
.energy-signal.signal-wind { border-top: 4px solid #06b6d4; }
.energy-signal.signal-risk { border-top: 4px solid #ef4444; }

.model-disclaimer {
    margin: 10px 0 0;
    color: #64748b;
    font-size: 11px;
}

.precipitation-process-card {
    padding: 18px;
    border: 1px solid #bfdbfe;
    border-radius: 16px;
    background: #eff6ff;
}

.precipitation-process-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.precipitation-process-header strong {
    color: #1d4ed8;
    font-size: 19px;
}

.precipitation-process-header span {
    color: #475569;
    font-size: 12px;
}

.precipitation-process-card p {
    margin: 11px 0;
    color: #334155;
    line-height: 1.65;
}

.precipitation-process-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.precipitation-process-metrics span {
    padding: 6px 9px;
    border-radius: 8px;
    background: white;
    color: #64748b;
    font-size: 11px;
}

.precipitation-process-metrics strong {
    color: #0f172a;
}

.seven-day-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(145px, 1fr));
    gap: 9px;
    overflow-x: auto;
    padding-bottom: 6px;
}

.seven-day-card {
    min-width: 145px;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 15px;
    background: white;
}

.seven-day-card.is-today {
    border-color: #38bdf8;
    box-shadow: inset 0 3px 0 #0ea5e9;
}

.seven-day-date {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #0f172a;
    font-size: 13px;
}

.seven-day-date span {
    color: #94a3b8;
    font-size: 10px;
}

.seven-day-weather-icon {
    margin: 13px 0 5px;
    font-size: 29px;
}

.seven-day-weather,
.seven-day-temperature {
    color: #334155;
    font-size: 12px;
}

.seven-day-temperature {
    margin-top: 5px;
    color: #0f172a;
    font-size: 16px;
    font-weight: 800;
}

.seven-day-factors {
    display: grid;
    gap: 3px;
    margin-top: 10px;
    color: #64748b;
    font-size: 10px;
}

.seven-day-signals {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 10px;
}

.seven-day-signals span {
    padding: 3px 5px;
    border-radius: 6px;
    background: #f1f5f9;
    color: #334155;
    font-size: 9px;
    font-weight: 800;
}

.seven-day-empty {
    padding: 24px;
    border-radius: 14px;
    background: white;
    color: #64748b;
    text-align: center;
}

@media (max-width: 720px) {
    body {
        background: #eef2f7;
    }

    .container {
        width: 100%;
        margin: 0;
        padding:
            max(18px, env(safe-area-inset-top))
            16px
            max(24px, env(safe-area-inset-bottom));
        overflow: hidden;
    }

    .title {
        font-size: 23px;
    }

    .subtitle {
        margin-bottom: 12px;
        font-size: 13px;
        line-height: 1.6;
    }

    .monitoring-status {
        width: fit-content;
        margin: 8px auto 0;
        border-radius: 999px;
        padding: 9px 11px;
        font-size: 12px;
    }

    .province-map-section {
        margin-right: -4px;
        margin-left: -4px;
        padding: 16px 12px;
        border-radius: 20px;
    }

    .power-market-section,
    .rain-analysis-section {
        margin-right: -4px;
        margin-left: -4px;
        padding: 16px 12px;
        border-radius: 20px;
    }

    .power-market-overview,
    .rain-process-summary,
    .energy-signal-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .power-signal-card {
        min-height: 120px;
        padding: 12px;
    }

    .section-heading-row {
        flex-direction: column;
        gap: 10px;
    }

    .map-update-time {
        align-self: flex-start;
    }

    .category-filters {
        flex-wrap: nowrap;
        margin-right: -12px;
        margin-left: -12px;
        padding: 0 12px 8px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .category-filter {
        flex: 0 0 auto;
    }

    .map-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .guangdong-map {
        min-width: 780px;
    }

    .map-layer-title {
        top: 12px;
        left: 12px;
    }

    .map-legend {
        bottom: 10px;
        left: 10px;
        gap: 6px;
        width: 128px;
        padding: 10px 11px;
        border-radius: 15px;
        font-size: 9px;
    }

    .map-legend strong {
        font-size: 11px;
    }

    .legend-dot {
        width: 19px;
        height: 6px;
    }

    .map-tools {
        top: 11px;
        right: 11px;
    }

    .map-tool-button {
        width: 42px;
        height: 42px;
        justify-content: center;
        padding: 0;
        border-radius: 50%;
    }

    .map-tool-button > span:last-child {
        display: none;
    }

    .weather-field {
        filter: blur(20px) saturate(1.12);
    }

    .category-panel {
        padding: 15px;
    }

    .city-detail-card {
        border-radius: 19px;
    }

    .city-detail-card > summary {
        align-items: flex-start;
        padding: 16px;
    }

    .detail-toggle-hint {
        max-width: 86px;
        text-align: right;
    }

    .city-detail-body {
        padding: 0 14px 16px;
    }

    .city-switcher {
        align-items: stretch;
        flex-direction: column;
        margin: 0 -14px 16px;
        padding: 12px 14px;
    }

    .city-switcher select {
        width: 100%;
    }

    .city-overview {
        display: flex;
        gap: 10px;

        margin-right: -16px;
        margin-bottom: 18px;
        margin-left: -16px;
        padding: 2px 16px 10px;

        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x proximity;
        overscroll-behavior-inline: contain;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .city-overview::-webkit-scrollbar {
        display: none;
    }

    .city-card {
        flex: 0 0 132px;
        min-width: 132px;
        padding: 14px;
        border-radius: 18px;
        scroll-snap-align: start;
    }

    .push-center {
        padding: 16px;
        border-radius: 16px;
    }

    .push-center-header {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }

    .test-push-button {
        width: 100%;
    }

    .push-metric {
        padding: 10px;
    }

    .push-metric-value {
        font-size: 18px;
    }

    .push-record {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .push-record-time {
        grid-column: 2;
    }

    .city-card:hover {
        transform: none;
    }

    .city-alert-badge {
        padding: 2px 7px;
        font-size: 11px;
    }

    .city-temp {
        font-size: 24px;
    }

    .weather-hero {
        padding: 20px;
        border-radius: 20px;
    }

    .current-header {
        gap: 12px;
    }

    .current-city {
        font-size: 22px;
    }

    .current-weather-icon {
        font-size: 54px;
    }

    .current-temp {
        font-size: 48px;
    }

    .current-weather {
        font-size: 18px;
    }

    .update-time {
        flex-direction: column;
        align-items: flex-end;
        gap: 2px;

        max-width: 110px;
        font-size: 12px;
        line-height: 1.45;
        text-align: right;
        overflow-wrap: anywhere;
    }

    .metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin-bottom: 0;
    }

    .power-weather-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .power-weather-metrics .metric:last-child {
        grid-column: auto;
    }

    .energy-signal strong {
        font-size: 19px;
    }

    .precipitation-process-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .metric {
        min-width: 0;
        padding: 12px;
    }

    .metric-value {
        font-size: 16px;
        overflow-wrap: anywhere;
    }

    .metric:last-child {
        grid-column: 1 / -1;
    }

    .weather-content {
        padding: 18px 14px;
        border-radius: 20px;
    }

    .section {
        margin-top: 22px;
    }

    .section:first-child {
        margin-top: 0;
    }

    .hourly-combined {
        margin-top: 10px;
        padding: 14px 8px 10px;
        -webkit-overflow-scrolling: touch;
    }

    .alert-banner,
    .alert-normal,
    .precipitation {
        line-height: 1.6;
        overflow-wrap: anywhere;
    }

    .weather-panel.is-loading::after {
        top: 14px;
        right: 14px;
    }

    .error-state {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 12px;
        padding: 18px 16px;
    }

    .retry-button {
        grid-column: 1 / -1;
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .weather-field,
    .map-city-marker,
    .map-tool-button {
        transition: none;
    }
}

@media (max-width: 420px) {
    .container {
        padding-right: 12px;
        padding-left: 12px;
    }

    .city-overview {
        margin-right: -12px;
        margin-left: -12px;
        padding-right: 12px;
        padding-left: 12px;
    }

    .city-card {
        flex-basis: 122px;
        min-width: 122px;
    }

    .weather-hero {
        padding: 18px 16px;
    }

    .weather-content {
        padding-right: 12px;
        padding-left: 12px;
    }
}
