.view-section h2 {
    font-size: 28px;
}

.matrix-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
}

.refresh-btn {
    background: transparent;
    color: var(--text-main);
    box-shadow: none;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 13px;
    white-space: nowrap;
}

.refresh-btn:hover {
    background: var(--bg-button);
}

.refresh-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#matrix-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.matrix-card {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 17px;
    padding: 15px 18px 6px;
    position: relative;
}

.matrix-card:hover {
    border-color: rgba(61, 156, 114, 0.3);
}

.card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 11px;
}

.matrix-title {
    margin: 0;
    padding-right: 10px;
    font-size: 13px;
    line-height: 1.15;
    font-weight: 800;
    color: var(--text-main);
}

.unfav-btn {
    background: none;
    border: 0;
    color: #f2a100;
    font-size: 14px;
    cursor: pointer;
    padding: 1px 0 0;
    line-height: 1;
    box-shadow: none;
    transform: translateY(1px);
}

.unfav-btn:hover {
    background: transparent;
}

.card-clickable-area {
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.card-status {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
}

.matrix-empty {
    color: var(--text-muted);
    font-style: italic;
    grid-column: 1 / -1;
    padding: 10px;
}

.day-forecast {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) minmax(96px, 0.95fr);
    gap: 6px;
    align-items: center;
    margin: 0;
    padding: 9px 0;
    border-radius: 0;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
    border-left: 0;
    background: transparent;
}

.day-forecast:first-child {
    border-top: 0;
}

.forecast-day {
    font-weight: 700;
    font-size: 12px;
    color: #1f2937;
    justify-self: start;
    text-align: left;
}

.forecast-values {
    display: grid;
    grid-template-columns: 36px 36px;
    column-gap: 4px;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
    justify-self: center;
    justify-content: center;
    width: 72px;
}

.forecast-temp {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.01em;
    line-height: 1;
    justify-self: end;
    text-align: right;
}

.forecast-rain {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #98a2b3;
    font-weight: 600;
    font-size: 12px;
    line-height: 1;
    justify-self: start;
    text-align: left;
}

.forecast-temp,
.forecast-rain {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.forecast-rain-icon {
    color: #52b788;
    font-size: 10px;
    line-height: 1;
}

.forecast-rating {
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    border-radius: 999px;
    padding: 5px 8px;
    line-height: 1;
    text-align: right;
    justify-self: end;
    width: auto;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.day-forecast.rating-spectacular .forecast-rating {
    color: #f97316;
    background: rgba(249, 115, 22, 0.12);
}

.day-forecast.rating-clear .forecast-rating {
    color: #06b6d4;
    background: rgba(6, 182, 212, 0.18);
}

.day-forecast.rating-dynamic .forecast-rating {
    color: #2f9a67;
    background: rgba(47, 154, 103, 0.12);
}

.day-forecast.rating-poor .forecast-rating {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
}

@media (max-width: 640px) {
    .matrix-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }
}
