:root {
    --bg: #ffffff;
    --text: #333333;
    --muted: #666666;
    --grid: #d8dde5;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg);
    color: var(--text);
}

.chart-shell {
    width: 100%;
    min-height: 2940px;
    padding: 4px 4px 2px;
}

.chart-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 4px;
}

.chart-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.25;
}

.chart-subtitle {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.status {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 0.75rem;
    text-align: right;
    white-space: nowrap;
}

.error {
    color: #b00020;
    font-weight: 600;
}

#meteograms-chart {
    width: 100%;
    height: 2880px;
}

@media (max-width: 600px) {
    .chart-shell {
        min-height: 2940px;
        padding: 6px 4px 2px;
    }

    .chart-header {
        display: block;
    }

    .status {
        margin-top: 3px;
        text-align: left;
    }

    #meteograms-chart {
        height: 2880px;
    }
}

/*
 * Tooltip-only dewpoint-depression control.
 * This is intentionally an HTML button rather than an ECharts legend item,
 * which prevents the text from shifting when its selected state changes.
 *
 * Adjust `left` to move T-TdΔ horizontally:
 *   larger percentage = farther right
 *   smaller percentage = farther left
 */
.meteogram-chart-wrap {
    position: relative;
}

.dewpoint-depression-toggle {
    position: absolute;
    z-index: 10;
    top: 733px;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #c5cbd3;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
}

.dewpoint-depression-toggle.is-active {
    color: #444444;
}

.dewpoint-depression-toggle:focus-visible {
    outline: 1px solid #888888;
    outline-offset: 3px;
}